added vid grab to IResponse

This commit is contained in:
Jamie Allen 2012-02-20 20:28:12 +01:00
parent 2bd7704f38
commit 51c71bdc15
3 changed files with 8 additions and 1 deletions

View File

@ -189,6 +189,7 @@ void RefractiveIndex::state_analysis()
void RefractiveIndex::update() void RefractiveIndex::update()
{ {
state_analysis(); state_analysis();
/* /*
RefractiveIndex::_vidGrabber.grabFrame(); // get a new frame from the camera RefractiveIndex::_vidGrabber.grabFrame(); // get a new frame from the camera

View File

@ -200,6 +200,13 @@ void IResponseAnalysis::save_cb(Timer& timer)
{ {
_save_cnt++; _save_cnt++;
RefractiveIndex::_vidGrabber.grabFrame(); // get a new frame from the camera
if (RefractiveIndex::_vidGrabber.isFrameNew())
{
RefractiveIndex::_pixels = RefractiveIndex::_vidGrabber.getPixelsRef(); //get ofPixels from the camera
}
cout << "IResponseAnalysis::saving...\n"; cout << "IResponseAnalysis::saving...\n";
string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg";

View File

@ -278,7 +278,6 @@ void ShadowScapesAnalysis::save_cb(Timer& timer)
RefractiveIndex::_pixels = RefractiveIndex::_vidGrabber.getPixelsRef(); //get ofPixels from the camera RefractiveIndex::_pixels = RefractiveIndex::_vidGrabber.getPixelsRef(); //get ofPixels from the camera
} }
cout << "ShadowScapesAnalysis::saving...\n"; cout << "ShadowScapesAnalysis::saving...\n";
string file_name; string file_name;