david commit 19:31

This commit is contained in:
Jamie Allen
2012-02-21 19:31:58 +01:00
parent 117eaca232
commit 2903c7a969
4 changed files with 38 additions and 14 deletions
+11 -8
View File
@@ -115,7 +115,7 @@ void RefractiveIndex::setup()
_analysisVector.push_back(new DiffNoiseAnalysis());
_currentAnalysisIndx = 0;
_currentAnalysis = _analysisVector.at(_currentAnalysisIndx);
_currentAnalysis = _analysisVector.at(_currentAnalysisIndx++);
_state = ISTATE_START;
@@ -216,18 +216,21 @@ void RefractiveIndex::draw()
void RefractiveIndex::setup_camera()
{
stop_camera();
if(!_vidGrabber.initGrabber(_vid_w, _vid_h)) {
_vidGrabber.setDeviceID(_vid_id);
_vidGrabber.listDevices();
if(!_vidGrabber.initGrabber(_vid_w, _vid_h)) {
ofLog(OF_LOG_ERROR) << "RefractiveIndex::setup_camera - could not initialise grabber";
return;
}
_vidGrabber.setVerbose(true);
_vidGrabber.setUseTexture(false);
_vidGrabber.listDevices();
_vidGrabber.setVerbose(true);
_vid_stream_open = true;
_vidGrabber.setDeviceID(_vid_id);
cout << "CAMERA SETUP " << endl;
return;
}
void RefractiveIndex::stop_camera()