Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab6c3d5be5 |
+39
-39
@@ -1,45 +1,45 @@
|
|||||||
<!-- THIS FILE NEEDS TO GO IN THE APPLICATION /data/ folder -->
|
<!-- THIS FILE NEEDS TO GO IN THE APPLICATION /data/ folder -->
|
||||||
|
|
||||||
<config>
|
<config>
|
||||||
<camera>
|
<camera>
|
||||||
<id>1</id>
|
<id>1</id>
|
||||||
<width>640</width>
|
<width>640</width>
|
||||||
<height>480</height>
|
<height>480</height>
|
||||||
</camera>
|
</camera>
|
||||||
<display>
|
<display>
|
||||||
<fps>30</fps>
|
<fps>30</fps>
|
||||||
</display>
|
</display>
|
||||||
<locale>
|
<locale>
|
||||||
<name>SWANSEA</name>
|
<name>SWANSEA</name>
|
||||||
</locale>
|
</locale>
|
||||||
|
|
||||||
<analysis_NUM_RUN>
|
<analysis_NUM_RUN>
|
||||||
<NUM_RUN_shadowscapes> 3 </NUM_RUN_shadowscapes>
|
<NUM_RUN_shadowscapes> 3 </NUM_RUN_shadowscapes>
|
||||||
<NUM_RUN_relaxrate> 3 </NUM_RUN_relaxrate>
|
<NUM_RUN_relaxrate> 3 </NUM_RUN_relaxrate>
|
||||||
<NUM_RUN_iresponse> 3 </NUM_RUN_iresponse>
|
<NUM_RUN_iresponse> 3 </NUM_RUN_iresponse>
|
||||||
<NUM_RUN_shapefromshading> 3 </NUM_RUN_shapefromshading>
|
<NUM_RUN_shapefromshading> 3 </NUM_RUN_shapefromshading>
|
||||||
<NUM_RUN_strobe> 5 </NUM_RUN_strobe>
|
<NUM_RUN_strobe> 5 </NUM_RUN_strobe>
|
||||||
<NUM_RUN_camnoise> 5 </NUM_RUN_camnoise>
|
<NUM_RUN_camnoise> 5 </NUM_RUN_camnoise>
|
||||||
<NUM_RUN_colorsingle> 5 </NUM_RUN_colorsingle>
|
<NUM_RUN_colorsingle> 5 </NUM_RUN_colorsingle>
|
||||||
<NUM_RUN_colormulti> 5 </NUM_RUN_colormulti>
|
<NUM_RUN_colormulti> 5 </NUM_RUN_colormulti>
|
||||||
<NUM_RUN_diffnoise> 3 </NUM_RUN_diffnoise>
|
<NUM_RUN_diffnoise> 3 </NUM_RUN_diffnoise>
|
||||||
</analysis_NUM_RUN>
|
</analysis_NUM_RUN>
|
||||||
|
|
||||||
<analysis_time>
|
|
||||||
<acquiretime_shadowscapes> 30 </acquiretime_shadowscapes>
|
|
||||||
<acquiretime_relaxrate> 30 </acquiretime_relaxrate>
|
|
||||||
<acquiretime_iresponse> 30 </acquiretime_iresponse>
|
|
||||||
<acquiretime_shapefromshading> 30 </acquiretime_shapefromshading>
|
|
||||||
<acquiretime_strobe> 30 </acquiretime_strobe>
|
|
||||||
<acquiretime_camnoise> 30 </acquiretime_camnoise>
|
|
||||||
<acquiretime_colorsingle> 40 </acquiretime_colorsingle>
|
|
||||||
<acquiretime_colormulti> 40 </acquiretime_colormulti>
|
|
||||||
<acquiretime_diffnoise> 30 </acquiretime_diffnoise>
|
|
||||||
</analysis_time>
|
|
||||||
|
|
||||||
<relaxrate>
|
|
||||||
<threshold>51</threshold>
|
|
||||||
<maxblobs>25</maxblobs>
|
|
||||||
</relaxrate>
|
|
||||||
|
|
||||||
|
<analysis_time>
|
||||||
|
<acquiretime_shadowscapes> 30 </acquiretime_shadowscapes>
|
||||||
|
<acquiretime_relaxrate> 30 </acquiretime_relaxrate>
|
||||||
|
<acquiretime_iresponse> 30 </acquiretime_iresponse>
|
||||||
|
<acquiretime_shapefromshading> 30 </acquiretime_shapefromshading>
|
||||||
|
<acquiretime_strobe> 30 </acquiretime_strobe>
|
||||||
|
<acquiretime_camnoise> 30 </acquiretime_camnoise>
|
||||||
|
<acquiretime_colorsingle> 40 </acquiretime_colorsingle>
|
||||||
|
<acquiretime_colormulti> 40 </acquiretime_colormulti>
|
||||||
|
<acquiretime_diffnoise> 30 </acquiretime_diffnoise>
|
||||||
|
</analysis_time>
|
||||||
|
|
||||||
|
<relaxrate>
|
||||||
|
<treshold>51</treshold>
|
||||||
|
<maxblobs>25</maxblobs>
|
||||||
|
</relaxrate>
|
||||||
|
|
||||||
</config>
|
</config>
|
||||||
+52
-64
@@ -27,10 +27,8 @@
|
|||||||
#define ISTATE_TRANSITION 0xCCCC
|
#define ISTATE_TRANSITION 0xCCCC
|
||||||
#define ISTATE_END 0xDDDD
|
#define ISTATE_END 0xDDDD
|
||||||
|
|
||||||
|
|
||||||
int _state = ISTATE_UNDEF;
|
int _state = ISTATE_UNDEF;
|
||||||
|
|
||||||
int RefractiveIndex::_mode;
|
|
||||||
ofPixels RefractiveIndex::_pixels;
|
ofPixels RefractiveIndex::_pixels;
|
||||||
ofVideoGrabber RefractiveIndex::_vidGrabber;
|
ofVideoGrabber RefractiveIndex::_vidGrabber;
|
||||||
int RefractiveIndex::_vid_w, RefractiveIndex::_vid_h, RefractiveIndex::_vid_id;
|
int RefractiveIndex::_vid_w, RefractiveIndex::_vid_h, RefractiveIndex::_vid_id;
|
||||||
@@ -51,11 +49,7 @@ void RefractiveIndex::setup()
|
|||||||
} else {
|
} else {
|
||||||
XML.loadFile("config.refindx");
|
XML.loadFile("config.refindx");
|
||||||
}
|
}
|
||||||
|
|
||||||
// <mode>
|
|
||||||
string m = XML.getValue("config:mode", "analysing");
|
|
||||||
_mode = (m == "analysing" ? MODE_ANALYSING : (m == "drawing" ? MODE_DRAWING : MODE_ANALYSING));
|
|
||||||
|
|
||||||
// <camera>
|
// <camera>
|
||||||
_vid_id = XML.getValue("config:camera:id", CAMERA_ID);
|
_vid_id = XML.getValue("config:camera:id", CAMERA_ID);
|
||||||
cout << "_vid_id: " << _vid_id << endl;
|
cout << "_vid_id: " << _vid_id << endl;
|
||||||
@@ -65,12 +59,12 @@ void RefractiveIndex::setup()
|
|||||||
|
|
||||||
// <display>
|
// <display>
|
||||||
int fps = XML.getValue("config:display:fps", 30);
|
int fps = XML.getValue("config:display:fps", 30);
|
||||||
|
|
||||||
// <location>
|
// <location>
|
||||||
_location = XML.getValue("config:locale:name", LOCATION);
|
_location = XML.getValue("config:locale:name", LOCATION);
|
||||||
|
|
||||||
cout << "Configuring..." << endl;
|
cout << "Configuring..." << endl;
|
||||||
|
|
||||||
// display
|
// display
|
||||||
cout << "> display" << endl;
|
cout << "> display" << endl;
|
||||||
ofSetFrameRate(fps);
|
ofSetFrameRate(fps);
|
||||||
@@ -88,15 +82,13 @@ void RefractiveIndex::setup()
|
|||||||
cout << "* cam width = " << _vid_w << endl;
|
cout << "* cam width = " << _vid_w << endl;
|
||||||
cout << "* cam height = " << _vid_h << endl;
|
cout << "* cam height = " << _vid_h << endl;
|
||||||
|
|
||||||
if(_mode == MODE_ANALYSING) {
|
_vid_stream_open = false;
|
||||||
_vid_stream_open = false;
|
setup_camera();
|
||||||
setup_camera();
|
|
||||||
}
|
|
||||||
|
|
||||||
cout << "RRRRRREADY!" << endl;
|
cout << "RRRRRREADY!" << endl;
|
||||||
|
|
||||||
_analysisAdapator = NULL;
|
_analysisAdapator = NULL;
|
||||||
|
|
||||||
//getting a warning from the OFlog that the pixels aren't allocated
|
//getting a warning from the OFlog that the pixels aren't allocated
|
||||||
//void ofPixels::allocate(int w, int h, ofImageType type)
|
//void ofPixels::allocate(int w, int h, ofImageType type)
|
||||||
_pixels.allocate(_vid_w, _vid_h, OF_IMAGE_COLOR);
|
_pixels.allocate(_vid_w, _vid_h, OF_IMAGE_COLOR);
|
||||||
@@ -107,7 +99,7 @@ void RefractiveIndex::setup()
|
|||||||
_analysisVector.push_back(new ShadowScapesAnalysis(V));
|
_analysisVector.push_back(new ShadowScapesAnalysis(V));
|
||||||
_analysisVector.push_back(new ShadowScapesAnalysis(H));
|
_analysisVector.push_back(new ShadowScapesAnalysis(H));
|
||||||
_analysisVector.push_back(new ShadowScapesAnalysis(D));
|
_analysisVector.push_back(new ShadowScapesAnalysis(D));
|
||||||
|
|
||||||
_analysisVector.push_back(new RelaxRateAnalysis());
|
_analysisVector.push_back(new RelaxRateAnalysis());
|
||||||
|
|
||||||
|
|
||||||
@@ -125,7 +117,7 @@ void RefractiveIndex::setup()
|
|||||||
|
|
||||||
_analysisVector.push_back(new DiffNoiseAnalysis());
|
_analysisVector.push_back(new DiffNoiseAnalysis());
|
||||||
|
|
||||||
|
|
||||||
//_currentAnalysisIndx = 0;
|
//_currentAnalysisIndx = 0;
|
||||||
//_currentAnalysis = _analysisVector.at(_currentAnalysisIndx++);
|
//_currentAnalysis = _analysisVector.at(_currentAnalysisIndx++);
|
||||||
//_state = ISTATE_START;
|
//_state = ISTATE_START;
|
||||||
@@ -181,14 +173,10 @@ void RefractiveIndex::state_analysis()
|
|||||||
break;
|
break;
|
||||||
case ISTATE_STOP:
|
case ISTATE_STOP:
|
||||||
stop_analysis(); // blocking
|
stop_analysis(); // blocking
|
||||||
if(_mode == MODE_DRAWING)
|
_state = ISTATE_TRANSITION;
|
||||||
_state = ISTATE_UNDEF;
|
|
||||||
else
|
|
||||||
_state = ISTATE_TRANSITION;
|
|
||||||
break;
|
break;
|
||||||
case ISTATE_END:
|
case ISTATE_END:
|
||||||
if(_mode == MODE_ANALYSING)
|
stop_camera();
|
||||||
stop_camera();
|
|
||||||
::exit(1);
|
::exit(1);
|
||||||
break;
|
break;
|
||||||
case ISTATE_UNDEF:
|
case ISTATE_UNDEF:
|
||||||
@@ -210,7 +198,7 @@ void RefractiveIndex::draw()
|
|||||||
|
|
||||||
// black
|
// black
|
||||||
ofBackground(0, 0, 0);
|
ofBackground(0, 0, 0);
|
||||||
|
|
||||||
if(_currentAnalysis)
|
if(_currentAnalysis)
|
||||||
_currentAnalysis->draw();
|
_currentAnalysis->draw();
|
||||||
}
|
}
|
||||||
@@ -271,7 +259,7 @@ void RefractiveIndex::keyPressed (int key)
|
|||||||
if(!_currentAnalysis)
|
if(!_currentAnalysis)
|
||||||
_state = ISTATE_TRANSITION;
|
_state = ISTATE_TRANSITION;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(key == '2')
|
else if(key == '2')
|
||||||
{
|
{
|
||||||
if(_currentAnalysis)
|
if(_currentAnalysis)
|
||||||
@@ -280,7 +268,7 @@ void RefractiveIndex::keyPressed (int key)
|
|||||||
if(!_currentAnalysis)
|
if(!_currentAnalysis)
|
||||||
_state = ISTATE_TRANSITION;
|
_state = ISTATE_TRANSITION;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(key == '3')
|
else if(key == '3')
|
||||||
{
|
{
|
||||||
if(_currentAnalysis)
|
if(_currentAnalysis)
|
||||||
@@ -352,7 +340,7 @@ void RefractiveIndex::keyPressed (int key)
|
|||||||
if(!_currentAnalysis)
|
if(!_currentAnalysis)
|
||||||
_state = ISTATE_TRANSITION;
|
_state = ISTATE_TRANSITION;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(key == 'q')
|
else if(key == 'q')
|
||||||
{
|
{
|
||||||
if(_currentAnalysis)
|
if(_currentAnalysis)
|
||||||
@@ -366,42 +354,42 @@ void RefractiveIndex::keyPressed (int key)
|
|||||||
TO DO: add a file dialog so we can save images to another hard drive...
|
TO DO: add a file dialog so we can save images to another hard drive...
|
||||||
e.g.: http://dev.openframeworks.cc/pipermail/of-dev-openframeworks.cc/2011-April/003125.html
|
e.g.: http://dev.openframeworks.cc/pipermail/of-dev-openframeworks.cc/2011-April/003125.html
|
||||||
|
|
||||||
>> case 's':
|
>> case 's':
|
||||||
>> doSave ^= true;
|
>> doSave ^= true;
|
||||||
>> doLoad = false;
|
>> doLoad = false;
|
||||||
>> if(doSave) {
|
>> if(doSave) {
|
||||||
>> ofFileDialogResult r = ofSystemLoadDialog("Select path to save to", true);
|
>> ofFileDialogResult r = ofSystemLoadDialog("Select path to save to", true);
|
||||||
>> if(r.bSuccess) {
|
>> if(r.bSuccess) {
|
||||||
>> saveCounter = 0;
|
>> saveCounter = 0;
|
||||||
>> savePath = r.getPath();
|
>> savePath = r.getPath();
|
||||||
>> ofDirectory::createDirectory(savePath + "/color/");
|
>> ofDirectory::createDirectory(savePath + "/color/");
|
||||||
>> ofDirectory::createDirectory(savePath + "/depth/");
|
>> ofDirectory::createDirectory(savePath + "/depth/");
|
||||||
>> printf("SAVE %s %s\n", r.getPath().c_str(), r.getName().c_str());
|
>> printf("SAVE %s %s\n", r.getPath().c_str(), r.getName().c_str());
|
||||||
>> } else {
|
>> } else {
|
||||||
>> doSave = false;
|
>> doSave = false;
|
||||||
>> }
|
>> }
|
||||||
>>
|
>>
|
||||||
>> }
|
>> }
|
||||||
>> break;
|
>> break;
|
||||||
>>
|
>>
|
||||||
>> case 'l':
|
>> case 'l':
|
||||||
>> doLoad ^= true;
|
>> doLoad ^= true;
|
||||||
>> doSave = false;
|
>> doSave = false;
|
||||||
>> if(doLoad) {
|
>> if(doLoad) {
|
||||||
>> ofFileDialogResult r = ofSystemLoadDialog("Select path to load from", true);
|
>> ofFileDialogResult r = ofSystemLoadDialog("Select path to load from", true);
|
||||||
>> if(r.bSuccess) {
|
>> if(r.bSuccess) {
|
||||||
>> loadCounter = 0;
|
>> loadCounter = 0;
|
||||||
>> loadPath = r.getPath();
|
>> loadPath = r.getPath();
|
||||||
>> ofDirectory dir;
|
>> ofDirectory dir;
|
||||||
>> loadMaxFiles = MAX(dir.listDir(loadPath + "/color"), dir.listDir(loadPath + "/depth"));
|
>> loadMaxFiles = MAX(dir.listDir(loadPath + "/color"), dir.listDir(loadPath + "/depth"));
|
||||||
>> printf("LOAD %i %s %s\n", loadMaxFiles, r.getPath().c_str(), r.getName().c_str());
|
>> printf("LOAD %i %s %s\n", loadMaxFiles, r.getPath().c_str(), r.getName().c_str());
|
||||||
>> } else {
|
>> } else {
|
||||||
>> doLoad = false;
|
>> doLoad = false;
|
||||||
>> }
|
>> }
|
||||||
>>
|
>>
|
||||||
>> }
|
>> }
|
||||||
>> break;
|
>> break;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
#include "ofxOpenCv.h"
|
#include "ofxOpenCv.h"
|
||||||
#include "ofxXmlSettings.h"
|
#include "ofxXmlSettings.h"
|
||||||
|
|
||||||
#define MODE_DRAWING 0xEEFF
|
|
||||||
#define MODE_ANALYSING 0xFFEE
|
|
||||||
|
|
||||||
class RefractiveIndex : public ofBaseApp
|
class RefractiveIndex : public ofBaseApp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -58,8 +55,6 @@ public:
|
|||||||
// acquisition
|
// acquisition
|
||||||
static ofPixels _pixels;
|
static ofPixels _pixels;
|
||||||
static ofVideoGrabber _vidGrabber;
|
static ofVideoGrabber _vidGrabber;
|
||||||
static int _mode;
|
|
||||||
|
|
||||||
vector<string> videoSourceList;
|
vector<string> videoSourceList;
|
||||||
static int _vid_w, _vid_h, _vid_id;
|
static int _vid_w, _vid_h, _vid_id;
|
||||||
static bool _vid_stream_open;
|
static bool _vid_stream_open;
|
||||||
|
|||||||
@@ -12,8 +12,12 @@ void AbstractAnalysis::do_synthesize() {
|
|||||||
cout << "NUM_RUN: " << i << endl;
|
cout << "NUM_RUN: " << i << endl;
|
||||||
|
|
||||||
_saved_filenames_analysis.clear();
|
_saved_filenames_analysis.clear();
|
||||||
_saved_filenames_synthesis.clear();
|
_saved_filenames_synthesis.clear();
|
||||||
|
|
||||||
|
if(_state == STATE_STOP) goto exit;
|
||||||
|
_state = STATE_ALLOCATE;
|
||||||
|
allocate();
|
||||||
|
if(_state == STATE_STOP) goto exit;
|
||||||
_state = STATE_ACQUIRING;
|
_state = STATE_ACQUIRING;
|
||||||
acquire();
|
acquire();
|
||||||
if(_state == STATE_STOP) goto exit;
|
if(_state == STATE_STOP) goto exit;
|
||||||
@@ -22,6 +26,7 @@ void AbstractAnalysis::do_synthesize() {
|
|||||||
if(_state == STATE_STOP) goto exit;
|
if(_state == STATE_STOP) goto exit;
|
||||||
_state = STATE_DISPLAY_RESULTS;
|
_state = STATE_DISPLAY_RESULTS;
|
||||||
displayresults();
|
displayresults();
|
||||||
|
_state = STATE_CLEANUP;
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,13 @@
|
|||||||
#define ANALYSIS_PATH "analysis/"
|
#define ANALYSIS_PATH "analysis/"
|
||||||
#define SYNTHESIS_PATH "synthesis/"
|
#define SYNTHESIS_PATH "synthesis/"
|
||||||
|
|
||||||
|
#define STATE_ALLOCATE 0x0010
|
||||||
|
#define STATE_CLEANUP 0x0001
|
||||||
#define STATE_ACQUIRING 0x1111
|
#define STATE_ACQUIRING 0x1111
|
||||||
#define STATE_SYNTHESISING 0x2222
|
#define STATE_SYNTHESISING 0x2222
|
||||||
#define STATE_DISPLAY_RESULTS 0x3333
|
#define STATE_DISPLAY_RESULTS 0x3333
|
||||||
#define STATE_STOP 0xDEADBEEF
|
#define STATE_STOP 0xDEADBEEF
|
||||||
|
#define STATE_DEF 0x0000
|
||||||
|
|
||||||
class AbstractAnalysis {
|
class AbstractAnalysis {
|
||||||
|
|
||||||
@@ -48,8 +51,11 @@ protected:
|
|||||||
|
|
||||||
// display the results from disk
|
// display the results from disk
|
||||||
virtual void displayresults() = 0;
|
virtual void displayresults() = 0;
|
||||||
|
|
||||||
|
// allocate all images
|
||||||
|
virtual void allocate() {;}
|
||||||
|
|
||||||
// display the results from disk
|
// deallocate all images
|
||||||
virtual void cleanup() {;}
|
virtual void cleanup() {;}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -151,17 +151,17 @@ void CamNoiseAnalysis::synthesise()
|
|||||||
//cvColorImage2.setFromPixels(image5.getPixels(), image5.width, image5.height);
|
//cvColorImage2.setFromPixels(image5.getPixels(), image5.width, image5.height);
|
||||||
|
|
||||||
cvColorImage1.convertToGrayscalePlanarImage(cvGrayImage1, 1);
|
cvColorImage1.convertToGrayscalePlanarImage(cvGrayImage1, 1);
|
||||||
// cvColorImage2.convertToGrayscalePlanarImage(cvGrayImage2, 1);
|
// cvColorImage2.convertToGrayscalePlanarImage(cvGrayImage2, 1);
|
||||||
//added by tom we weren't actually setting cvgrayimage1 anywhere
|
//added by tom we weren't actually setting cvgrayimage1 anywhere
|
||||||
// cvGrayImage1.setFromPixels(cvColorImage1.getPixels(),cvColorImage1.width,cvColorImage1.height);
|
// cvGrayImage1.setFromPixels(cvColorImage1.getPixels(),cvColorImage1.width,cvColorImage1.height);
|
||||||
//cvGrayDiff1.absDiff(cvGrayImage2, cvGrayImage1);
|
//cvGrayDiff1.absDiff(cvGrayImage2, cvGrayImage1);
|
||||||
//cvGrayImage1=cvColorImage1;
|
//cvGrayImage1=cvColorImage1;
|
||||||
|
|
||||||
cvGrayImage1.erode();
|
cvGrayImage1.erode();
|
||||||
cvGrayImage1.erode();
|
cvGrayImage1.erode();
|
||||||
cvGrayImage1.erode();
|
cvGrayImage1.erode();
|
||||||
cvGrayImage1.blur();
|
cvGrayImage1.blur();
|
||||||
cvGrayImage1.contrastStretch();
|
cvGrayImage1.contrastStretch();
|
||||||
/* cvColorImage1.erode();
|
/* cvColorImage1.erode();
|
||||||
cvColorImage1.erode();
|
cvColorImage1.erode();
|
||||||
cvColorImage1.erode();
|
cvColorImage1.erode();
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ void ColorMultiAnalysis::draw()
|
|||||||
//cout << "FADING IN..." << endl;
|
//cout << "FADING IN..." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (_frame_cnt >= _fade_in_frames && _frame_cnt < _frame_cnt_max-_fade_in_frames){
|
if (_frame_cnt >= _fade_in_frames && _frame_cnt < _frame_cnt_max-_fade_in_frames){
|
||||||
|
|
||||||
aColor.setHsb(c, 255, 255);
|
aColor.setHsb(c, 255, 255);
|
||||||
|
|||||||
+17
-164
@@ -105,7 +105,7 @@ void ColorSingleAnalysis::acquire()
|
|||||||
Timer* save_timer;
|
Timer* save_timer;
|
||||||
|
|
||||||
TimerCallback<ColorSingleAnalysis> save_callback(*this, &ColorSingleAnalysis::save_cb);
|
TimerCallback<ColorSingleAnalysis> save_callback(*this, &ColorSingleAnalysis::save_cb);
|
||||||
|
|
||||||
_run_cnt++;
|
_run_cnt++;
|
||||||
_frame_cnt = 0; _save_cnt = 0; _anim_cnt = 0, _synth_save_cnt = 0;
|
_frame_cnt = 0; _save_cnt = 0; _anim_cnt = 0, _synth_save_cnt = 0;
|
||||||
_RUN_DONE = false;
|
_RUN_DONE = false;
|
||||||
@@ -124,6 +124,7 @@ void ColorSingleAnalysis::acquire()
|
|||||||
|
|
||||||
save_timer->stop();
|
save_timer->stop();
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,105 +135,13 @@ void ColorSingleAnalysis::synthesise()
|
|||||||
if(_state == STATE_STOP) return;
|
if(_state == STATE_STOP) return;
|
||||||
|
|
||||||
for(float i=1;i<_saved_filenames_analysis.size()-1;i++){
|
for(float i=1;i<_saved_filenames_analysis.size()-1;i++){
|
||||||
|
|
||||||
//cout << "ColorSingleAnalysis::synthesis FOR LOOP...\n";
|
//cout << "ColorSingleAnalysis::synthesis FOR LOOP...\n";
|
||||||
|
|
||||||
//cout << "_saved_filenames_analysis[i]" << _saved_filenames_analysis[i] << endl;
|
//cout << "_saved_filenames_analysis[i]" << _saved_filenames_analysis[i] << endl;
|
||||||
|
|
||||||
if(_state == STATE_STOP) return;
|
if(_state == STATE_STOP) return;
|
||||||
|
|
||||||
image1.loadImage("Mar_02_19_00_47_2/194_9.72_1.jpg");
|
|
||||||
image1.resize(image1.width/20, image1.height/20);
|
|
||||||
|
|
||||||
int width = image1.width;
|
|
||||||
int height = image1.height;
|
|
||||||
|
|
||||||
// get the pixels from the image
|
|
||||||
imagePixels = image1.getPixels();
|
|
||||||
|
|
||||||
// ------------------- create the vector field ------------------------------------
|
|
||||||
|
|
||||||
vectorCount = width * height;
|
|
||||||
|
|
||||||
// create a 2d vector field
|
|
||||||
vectorField = new ofVec2f[vectorCount];
|
|
||||||
|
|
||||||
// set all values in vector field to 0.0
|
|
||||||
for(int i=0; i<vectorCount; i++){
|
|
||||||
|
|
||||||
vectorField[i].x = 0.0;
|
|
||||||
vectorField[i].y = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------- calculate the vectors ------------------------------------
|
|
||||||
|
|
||||||
// loop through all of the pixels
|
|
||||||
for(int x=1; x< width-1; x++){
|
|
||||||
for(int y=1; y< height-1; y++){
|
|
||||||
|
|
||||||
char areaPixels[9];
|
|
||||||
|
|
||||||
// loop through the area pixels
|
|
||||||
for(int i=-1; i<=1; i++){
|
|
||||||
for(int j=-1; j<=1; j++){
|
|
||||||
|
|
||||||
// determine where to read from in the area (not optimized)
|
|
||||||
int readPos = ((y + j) * width + (x + i)) * 3;
|
|
||||||
|
|
||||||
unsigned char R = imagePixels[readPos];
|
|
||||||
unsigned char G = imagePixels[readPos+1];
|
|
||||||
unsigned char B = imagePixels[readPos+2];
|
|
||||||
|
|
||||||
unsigned char BR = (0.299 * R) + (.587 * G) + (.114 * B);
|
|
||||||
|
|
||||||
int writePos = (j+1) * 3 + (i + 1);
|
|
||||||
|
|
||||||
areaPixels[writePos] = BR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float dX = (areaPixels[0] + areaPixels[3] + areaPixels[6])/3 - (areaPixels[2] + areaPixels[5] + areaPixels[8])/3;
|
|
||||||
float dY = (areaPixels[0] + areaPixels[1] + areaPixels[2])/3 - (areaPixels[6] + areaPixels[7] + areaPixels[8])/3;
|
|
||||||
|
|
||||||
int vectorPos = y * width + x;
|
|
||||||
|
|
||||||
//printf("dx %f\n", dX);
|
|
||||||
|
|
||||||
vectorField[vectorPos].x = dX;
|
|
||||||
vectorField[vectorPos].y = dY;
|
|
||||||
|
|
||||||
//vectorField[vectorPos].x = -dY;
|
|
||||||
//vectorField[vectorPos].y = dX;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------- normalize the vectors ------------------------------------
|
|
||||||
|
|
||||||
// variables for the maximum magnitude (absolute) in x and y
|
|
||||||
float maxMagX = 1.0;
|
|
||||||
float maxMagY = 1.0;
|
|
||||||
|
|
||||||
// loop through the vector field to find the maximum x and y values
|
|
||||||
for(int i=0; i< vectorCount; i++){
|
|
||||||
|
|
||||||
if(fabs(vectorField[i].x) > maxMagX) maxMagX = fabs(vectorField[i].x);
|
|
||||||
if(fabs(vectorField[i].y) > maxMagY) maxMagY = fabs(vectorField[i].y);
|
|
||||||
}
|
|
||||||
|
|
||||||
// loop through the vector field to normalize the values
|
|
||||||
for(int i=0; i< vectorCount; i++){
|
|
||||||
|
|
||||||
vectorField[i].x /= maxMagX;
|
|
||||||
vectorField[i].y /= maxMagY;
|
|
||||||
}
|
|
||||||
|
|
||||||
// COMMENTING OUT THE FILLER SYNTH ALGORITHM
|
|
||||||
/*
|
|
||||||
if(!image1.loadImage(_saved_filenames_analysis[i])){
|
if(!image1.loadImage(_saved_filenames_analysis[i])){
|
||||||
//couldn't load image
|
//couldn't load image
|
||||||
cout << "didn't load image" << endl;
|
cout << "didn't load image" << endl;
|
||||||
@@ -271,7 +180,7 @@ void ColorSingleAnalysis::synthesise()
|
|||||||
//ofImage image;
|
//ofImage image;
|
||||||
//image.allocate(cvColorImage1.width, cvColorImage1.height, OF_IMAGE_COLOR);
|
//image.allocate(cvColorImage1.width, cvColorImage1.height, OF_IMAGE_COLOR);
|
||||||
|
|
||||||
// This needs to be here for OSX of we get a BAD ACCESS ERROR. DOES IT BREAK WINDOWS?
|
//*** This needs to be here for OSX of we get a BAD ACCESS ERROR. DOES IT BREAK WINDOWS? ***//
|
||||||
//image.setUseTexture(false);
|
//image.setUseTexture(false);
|
||||||
|
|
||||||
//image.setFromPixels(cvColorImage1.getPixels(), cvColorImage1.width, cvColorImage1.height,OF_IMAGE_COLOR);
|
//image.setFromPixels(cvColorImage1.getPixels(), cvColorImage1.width, cvColorImage1.height,OF_IMAGE_COLOR);
|
||||||
@@ -283,12 +192,9 @@ void ColorSingleAnalysis::synthesise()
|
|||||||
|
|
||||||
saveImageSynthesis(file_name, &cvColorImage1, OF_IMAGE_COLOR);
|
saveImageSynthesis(file_name, &cvColorImage1, OF_IMAGE_COLOR);
|
||||||
_synth_save_cnt++;
|
_synth_save_cnt++;
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
}
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// _saved_filenames_synthesis has processed all the files in the analysis images folder
|
// _saved_filenames_synthesis has processed all the files in the analysis images folder
|
||||||
@@ -297,23 +203,8 @@ void ColorSingleAnalysis::synthesise()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
void ColorSingleAnalysis::displayresults()
|
void ColorSingleAnalysis::displayresults()
|
||||||
{
|
{
|
||||||
|
|
||||||
if(_state == STATE_STOP) return;
|
|
||||||
|
|
||||||
_show_image = true;
|
|
||||||
_image_shown = false;
|
|
||||||
|
|
||||||
//cout << "_saved_filenames_analysis[i] - " << _saved_filenames_synthesis[i] << endl;
|
|
||||||
|
|
||||||
while(!_image_shown){
|
|
||||||
Thread::sleep(2);
|
|
||||||
//cout << "!_image_shown" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
for(float i=1;i<_saved_filenames_synthesis.size();i++){
|
for(float i=1;i<_saved_filenames_synthesis.size();i++){
|
||||||
|
|
||||||
if(_state == STATE_STOP) return;
|
if(_state == STATE_STOP) return;
|
||||||
@@ -337,7 +228,6 @@ void ColorSingleAnalysis::displayresults()
|
|||||||
_image_shown = false;
|
_image_shown = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,6 +238,8 @@ void ColorSingleAnalysis::draw()
|
|||||||
switch (_state) {
|
switch (_state) {
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (_frame_cnt < _frame_cnt_max)
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -493,49 +385,9 @@ void ColorSingleAnalysis::draw()
|
|||||||
case STATE_DISPLAY_RESULTS:
|
case STATE_DISPLAY_RESULTS:
|
||||||
{
|
{
|
||||||
|
|
||||||
cout << "case STATE_DISPLAY_RESULTS = true" << endl;
|
|
||||||
|
|
||||||
int width = image1.width;
|
|
||||||
int height = image1.height;
|
|
||||||
float spacing = 10;
|
|
||||||
|
|
||||||
if (_frame_cnt > 2000)
|
|
||||||
{
|
|
||||||
_image_shown = true;
|
|
||||||
_frame_cnt=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_frame_cnt++;
|
|
||||||
|
|
||||||
if (_show_image)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
cout << "_show_image = true" << endl;
|
|
||||||
|
|
||||||
for(int x=0; x<width; x++){
|
|
||||||
|
|
||||||
float xPos = (float) x * spacing + 5;
|
|
||||||
|
|
||||||
for(int y=0; y<height; y++){
|
|
||||||
float yPos = (float)y * spacing + 5;
|
|
||||||
glPushMatrix();
|
|
||||||
ofLine(xPos, yPos, xPos+(vectorField[y*width+x].x*spacing), yPos+(vectorField[y*width+x].y*spacing));
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//this is where we save the full-frame software output to file... after the vectors, etc. are rendered...
|
|
||||||
//saveImageSynthesis(file_name, &cvColorImage1, OF_IMAGE_COLOR);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
_RUN_DONE = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
/*
|
|
||||||
//cout << "STATE_DISPLAY_RESULTS...\n" << endl;
|
//cout << "STATE_DISPLAY_RESULTS...\n" << endl;
|
||||||
|
|
||||||
|
|
||||||
if (_frame_cnt > 2)
|
if (_frame_cnt > 2)
|
||||||
{
|
{
|
||||||
_image_shown = true;
|
_image_shown = true;
|
||||||
@@ -550,9 +402,9 @@ void ColorSingleAnalysis::draw()
|
|||||||
|
|
||||||
ofEnableAlphaBlending();
|
ofEnableAlphaBlending();
|
||||||
|
|
||||||
ofSetColor(255, 255, 255);
|
ofSetColor(255, 255, 255);
|
||||||
image2.setFromPixels(image3.getPixels(),image3.width,image3.height, OF_IMAGE_COLOR);
|
image2.setFromPixels(image3.getPixels(),image3.width,image3.height, OF_IMAGE_COLOR);
|
||||||
image2.draw(0,0, ofGetWidth(), ofGetHeight());
|
image2.draw(0,0, ofGetWidth(), ofGetHeight());
|
||||||
|
|
||||||
ofDisableAlphaBlending();
|
ofDisableAlphaBlending();
|
||||||
}
|
}
|
||||||
@@ -560,11 +412,12 @@ void ColorSingleAnalysis::draw()
|
|||||||
// display results of the synthesis
|
// display results of the synthesis
|
||||||
_RUN_DONE = true;
|
_RUN_DONE = true;
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,8 +65,5 @@ protected:
|
|||||||
//this is the temporary container to allow us to convert and save out greyscale images
|
//this is the temporary container to allow us to convert and save out greyscale images
|
||||||
ofxCvColorImage cvConvertorImage;
|
ofxCvColorImage cvConvertorImage;
|
||||||
|
|
||||||
unsigned char * imagePixels;
|
|
||||||
int vectorCount;
|
|
||||||
ofVec2f * vectorField;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ using Poco::Thread;
|
|||||||
|
|
||||||
#define NUMBER_RUNS 1
|
#define NUMBER_RUNS 1
|
||||||
#define ACQUIRE_TIME 20
|
#define ACQUIRE_TIME 20
|
||||||
#define THRESHOLD 80
|
#define TRESHOLD 80
|
||||||
#define MAXBLOBS 15
|
#define MAXBLOBS 15
|
||||||
|
|
||||||
void RelaxRateAnalysis::setup(int camWidth, int camHeight)
|
void RelaxRateAnalysis::setup(int camWidth, int camHeight)
|
||||||
@@ -25,8 +25,8 @@ void RelaxRateAnalysis::setup(int camWidth, int camHeight)
|
|||||||
acq_run_time = RefractiveIndex::XML.getValue("config:analysis_time:acquiretime_relaxrate", ACQUIRE_TIME);
|
acq_run_time = RefractiveIndex::XML.getValue("config:analysis_time:acquiretime_relaxrate", ACQUIRE_TIME);
|
||||||
cout << "ACQUIRE_TIME RelaxRateAnalysis " << acq_run_time << endl;
|
cout << "ACQUIRE_TIME RelaxRateAnalysis " << acq_run_time << endl;
|
||||||
|
|
||||||
_threshold = RefractiveIndex::XML.getValue("config:relaxrate:threshold", THRESHOLD);
|
_treshold = RefractiveIndex::XML.getValue("config:relaxrate:treshold", TRESHOLD);
|
||||||
cout << "THRESHOLD RelaxRateAnalysis " << _threshold << endl;
|
cout << "TRESHOLD RelaxRateAnalysis " << _treshold << endl;
|
||||||
|
|
||||||
_maxblobs = RefractiveIndex::XML.getValue("config:relaxrate:maxblobs", MAXBLOBS);
|
_maxblobs = RefractiveIndex::XML.getValue("config:relaxrate:maxblobs", MAXBLOBS);
|
||||||
cout << "MAXBLOBS RelaxRateAnalysis " << _maxblobs << endl;
|
cout << "MAXBLOBS RelaxRateAnalysis " << _maxblobs << endl;
|
||||||
@@ -116,7 +116,7 @@ void RelaxRateAnalysis::synthesise()
|
|||||||
cvColorImage1.setFromPixels(image1.getPixels(), image1.width, image1.height);
|
cvColorImage1.setFromPixels(image1.getPixels(), image1.width, image1.height);
|
||||||
cvColorImage1.convertToGrayscalePlanarImage(cvGrayDiff1, 1);
|
cvColorImage1.convertToGrayscalePlanarImage(cvGrayDiff1, 1);
|
||||||
|
|
||||||
cvGrayDiff1.threshold(_threshold);
|
cvGrayDiff1.threshold(_treshold);
|
||||||
|
|
||||||
rfiCvContourFinder* cf = new rfiCvContourFinder();
|
rfiCvContourFinder* cf = new rfiCvContourFinder();
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ protected:
|
|||||||
int _run_cnt, _save_cnt, _synth_save_cnt, _anim_cnt;
|
int _run_cnt, _save_cnt, _synth_save_cnt, _anim_cnt;
|
||||||
float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max;
|
float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max;
|
||||||
|
|
||||||
int _threshold;
|
int _treshold;
|
||||||
int _maxblobs;
|
int _maxblobs;
|
||||||
|
|
||||||
bool _show_image, _image_shown;
|
bool _show_image, _image_shown;
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ void ShadowScapesAnalysis::setup(int camWidth, int camHeight)
|
|||||||
_show_image = false;
|
_show_image = false;
|
||||||
_image_shown = false;
|
_image_shown = false;
|
||||||
|
|
||||||
|
/*
|
||||||
image1.clear();
|
image1.clear();
|
||||||
image2.clear();
|
image2.clear();
|
||||||
image3.clear();
|
image3.clear();
|
||||||
@@ -97,6 +98,7 @@ void ShadowScapesAnalysis::setup(int camWidth, int camHeight)
|
|||||||
cvGrayDiff2.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
cvGrayDiff2.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
|
||||||
cvConvertorImage.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
cvConvertorImage.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,24 +226,116 @@ void ShadowScapesAnalysis::displayresults()
|
|||||||
if(!image3.loadImage(_saved_filenames_synthesis[i])){
|
if(!image3.loadImage(_saved_filenames_synthesis[i])){
|
||||||
//couldn't load image
|
//couldn't load image
|
||||||
cout << "didn't load image" << endl;
|
cout << "didn't load image" << endl;
|
||||||
}
|
} else {
|
||||||
|
_show_image = true;
|
||||||
|
_image_shown = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
if(image3.loadImage(_saved_filenames_synthesis[i])){
|
if(image3.loadImage(_saved_filenames_synthesis[i])){
|
||||||
image3.loadImage(_saved_filenames_synthesis[i]);
|
//image3.loadImage(_saved_filenames_synthesis[i]);
|
||||||
//cout << "_show_image = true;" << endl;
|
//cout << "_show_image = true;" << endl;
|
||||||
_show_image = true;
|
_show_image = true;
|
||||||
_image_shown = false;
|
_image_shown = false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShadowScapesAnalysis::allocate()
|
||||||
|
{
|
||||||
|
_RUN_DONE = false;
|
||||||
|
|
||||||
|
image1.clear();
|
||||||
|
image3.clear();
|
||||||
|
image4.clear();
|
||||||
|
image5.clear();
|
||||||
|
|
||||||
|
image1.setUseTexture(false);
|
||||||
|
image3.setUseTexture(false);
|
||||||
|
image4.setUseTexture(false);
|
||||||
|
image5.setUseTexture(false);
|
||||||
|
|
||||||
|
image1.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h, OF_IMAGE_COLOR);
|
||||||
|
image3.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h, OF_IMAGE_COLOR);
|
||||||
|
image4.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h, OF_IMAGE_COLOR);
|
||||||
|
image5.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h, OF_IMAGE_COLOR);
|
||||||
|
|
||||||
|
|
||||||
|
while(!_RUN_DONE && _state != STATE_STOP)
|
||||||
|
Thread::sleep(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShadowScapesAnalysis::cleanup()
|
||||||
|
{
|
||||||
|
_RUN_DONE = false;
|
||||||
|
|
||||||
|
image1.clear();
|
||||||
|
image3.clear();
|
||||||
|
image4.clear();
|
||||||
|
image5.clear();
|
||||||
|
|
||||||
|
while(!_RUN_DONE && _state != STATE_STOP)
|
||||||
|
Thread::sleep(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// the animation draw - and the output draw
|
// the animation draw - and the output draw
|
||||||
void ShadowScapesAnalysis::draw()
|
void ShadowScapesAnalysis::draw()
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (_state) {
|
switch (_state) {
|
||||||
|
case STATE_ALLOCATE:
|
||||||
|
{
|
||||||
|
image2.clear();
|
||||||
|
image2.setUseTexture(true);
|
||||||
|
image2.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h, OF_IMAGE_COLOR);
|
||||||
|
|
||||||
|
cvColorImage1.clear();
|
||||||
|
cvGrayImage1.clear();
|
||||||
|
cvGrayDiff1.clear();
|
||||||
|
|
||||||
|
cvColorImage2.clear();
|
||||||
|
cvGrayImage2.clear();
|
||||||
|
cvGrayDiff2.clear();
|
||||||
|
|
||||||
|
cvConvertorImage.clear();
|
||||||
|
|
||||||
|
cvColorImage1.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
cvGrayImage1.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
cvGrayDiff1.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
|
||||||
|
cvColorImage2.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
cvGrayImage2.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
cvGrayDiff2.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
|
||||||
|
cvConvertorImage.allocate(RefractiveIndex::_vid_w,RefractiveIndex::_vid_h);
|
||||||
|
|
||||||
|
_state = STATE_DEF;
|
||||||
|
|
||||||
|
_RUN_DONE = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case STATE_CLEANUP:
|
||||||
|
{
|
||||||
|
image2.clear();
|
||||||
|
|
||||||
|
cvColorImage1.clear();
|
||||||
|
cvGrayImage1.clear();
|
||||||
|
cvGrayDiff1.clear();
|
||||||
|
|
||||||
|
cvColorImage2.clear();
|
||||||
|
cvGrayImage2.clear();
|
||||||
|
cvGrayDiff2.clear();
|
||||||
|
|
||||||
|
_state = STATE_DEF;
|
||||||
|
|
||||||
|
_RUN_DONE = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
{
|
{
|
||||||
_line += _step;
|
_line += _step;
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ public:
|
|||||||
void acquire();
|
void acquire();
|
||||||
void synthesise();
|
void synthesise();
|
||||||
void displayresults();
|
void displayresults();
|
||||||
|
|
||||||
|
void allocate();
|
||||||
|
void cleanup();
|
||||||
|
|
||||||
void draw();
|
void draw();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user