diff --git a/example/RefractiveIndex.cpp b/example/RefractiveIndex.cpp index ae0364a..73406a0 100644 --- a/example/RefractiveIndex.cpp +++ b/example/RefractiveIndex.cpp @@ -19,7 +19,7 @@ #define CAMERA_ACQU_WIDTH 640 #define CAMERA_ACQU_HEIGHT 480 -#define LOCATION "BRADFORD" +#define LOCATION "MANCHESTER" #define ISTATE_UNDEF 0xEEEE #define ISTATE_START 0xAAAA @@ -216,7 +216,7 @@ void RefractiveIndex::draw() if(_currentAnalysis){ _currentAnalysis->draw(); - cout<<_currentAnalysis->meshIsComplete<meshIsComplete){ fbo.begin(); @@ -231,7 +231,7 @@ void RefractiveIndex::draw() fbo.end(); ofPixels pixels; fbo.readToPixels(pixels); - cout<<_currentAnalysis->meshFileName<meshFileName, OF_IMAGE_QUALITY_BEST); //saving jpgs doesn't work maybe because of of_image_quality diff --git a/src/IResponseAnalysis.cpp b/src/IResponseAnalysis.cpp index df3c795..969fdd4 100755 --- a/src/IResponseAnalysis.cpp +++ b/src/IResponseAnalysis.cpp @@ -195,7 +195,9 @@ void IResponseAnalysis::synthesise() setMeshFromPixels(make3DZmap(image1, image5, _background), image1,image5, aMesh); //with jpgs this was refusing to save out meshFileName = _whole_file_path_synthesis+"/"+ofToString(_synth_save_cnt, 2)+"_IResponseSynthesis_"+ofToString(_run_cnt,2)+".png"; - //flag that we are finished + _saved_filenames_synthesis.push_back(meshFileName); + + //flag that we are finished meshIsComplete=true; _synth_save_cnt++; } @@ -484,10 +486,11 @@ ofPixels IResponseAnalysis::make3DZmap(ofImage &image1, ofImage &image2, ofImage ofColor colourImage2 = imagePixels2.getColor(x, y); float _distanceToCentre=ofDist(imagePixels1.getWidth()/2, imagePixels1.getHeight()/2, x, y); - float _presumedBrightness=ofMap( sqrt(_distanceToCentre), 0, sqrt(_maxPossibleDistanceToCentre), 0, 255); - + float _presumedBrightness=ofMap( sqrt(_maxPossibleDistanceToCentre)-sqrt(_distanceToCentre), 0, sqrt(_maxPossibleDistanceToCentre), 0, 255); + //float _presumedBrightness=255; int thisDiff=abs(colourImage1.getBrightness()-_presumedBrightness); - + //cout<