diff --git a/src/AbstractAnalysis.cpp b/src/AbstractAnalysis.cpp index 4989f2b..7b5fd06 100644 --- a/src/AbstractAnalysis.cpp +++ b/src/AbstractAnalysis.cpp @@ -97,17 +97,15 @@ void AbstractAnalysis::create_dir_allocate_images() //////////////////////////////ALLOCATE IMAGES ////////////////////////////////////////////////// - ofImage myColorImage1; myColorImage1.clear(); myColorImage1.setUseTexture(false); myColorImage1.allocate(RefractiveIndex::_vid_w, RefractiveIndex::_vid_h, OF_IMAGE_COLOR); - //ofxCvImage myColorCvImage2; myColorImage2.clear(); myColorImage2.setUseTexture(false); myColorImage2.allocate(RefractiveIndex::_vid_w, RefractiveIndex::_vid_h, OF_IMAGE_COLOR); - //ofxCvImage myGrayCvImage1; + myGrayImage1.clear(); myGrayImage1.setUseTexture(false); myGrayImage1.allocate(RefractiveIndex::_vid_w, RefractiveIndex::_vid_h, OF_IMAGE_GRAYSCALE); @@ -153,11 +151,11 @@ void AbstractAnalysis::saveImageAnalysis(string filename) void AbstractAnalysis::saveImageSynthesis(string filename, ofxCvImage* newPixels, ofImageType newType) { -#ifdef TARGET_OSX +//#ifdef TARGET_OSX - // ofSaveImage(newPixels->getPixelsRef(), _whole_file_path_synthesis+"/"+filename, OF_IMAGE_QUALITY_BEST); +// ofSaveImage(newPixels->getPixelsRef(), _whole_file_path_synthesis+"/"+filename, OF_IMAGE_QUALITY_BEST); -#elif defined(TARGET_WIN32) +//#elif defined(TARGET_WIN32) if (newType == OF_IMAGE_COLOR){ myColorImage2.setUseTexture(false); @@ -171,7 +169,7 @@ void AbstractAnalysis::saveImageSynthesis(string filename, ofxCvImage* newPixels // THIS IS HOW YOU HAVE TO SAVE OUT THE GREYSCALE IMAGES on WINDOWS FOR SOME REASON --> i.e.: as an OF_IMAGE_COLOR // But they don't save properly - they're spatially translated and generally f'd up myGrayImage1.setFromPixels(newPixels->getPixels(), newPixels->getWidth(), newPixels->getHeight(), OF_IMAGE_GRAYSCALE); - myGrayImage1.setImageType(OF_IMAGE_COLOR); + //myGrayImage1.setImageType(OF_IMAGE_COLOR); // THIS DOESN' SEEM TO SAVE OUT IMAGES AT ALL ON WINDOWS //myGrayImage1.setFromPixels(newPixels->getPixels(), newPixels->getWidth(), newPixels->getHeight(), OF_IMAGE_GRAYSCALE); @@ -179,7 +177,7 @@ void AbstractAnalysis::saveImageSynthesis(string filename, ofxCvImage* newPixels myGrayImage1.saveImage(_whole_file_path_synthesis+"/"+filename); } -#endif +//#endif _saved_filenames_synthesis.push_back(_whole_file_path_synthesis+"/"+filename); diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index 8ef163f..1ba57e5 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -139,8 +139,7 @@ void RelaxRateAnalysis::synthesise() ///////////////////////// PROCESS THE SAVED CAMERA IMAGES OF SHIT TO THE IMAGES ////////////////////////// cvColorImage1.setFromPixels(image1.getPixels(), image1.width, image1.height); - - cvColorImage1.convertToGrayscalePlanarImage(cvGrayImage1, 1); + cvColorImage1.convertToGrayscalePlanarImage(cvGrayDiff1, 1); cvGrayDiff1.threshold(_treshold); diff --git a/src/ShadowScapesAnalysis.cpp b/src/ShadowScapesAnalysis.cpp index 584e33c..f85b517 100755 --- a/src/ShadowScapesAnalysis.cpp +++ b/src/ShadowScapesAnalysis.cpp @@ -143,6 +143,9 @@ void ShadowScapesAnalysis::synthesise() cvColorImage1.setFromPixels(image1.getPixels(), image1.width, image1.height); cvColorImage2.setFromPixels(image5.getPixels(), image5.width, image5.height); + //cvGrayImage1 = cvColorImage1; + //cvGrayImage2 = cvColorImage2; + cvColorImage1.convertToGrayscalePlanarImage(cvGrayImage1, 1); cvColorImage2.convertToGrayscalePlanarImage(cvGrayImage2, 1);