From d798394793cc04c8a1c9b77316124b7e3b54180e Mon Sep 17 00:00:00 2001 From: Tom Schofield Date: Mon, 20 Feb 2012 12:33:13 +0000 Subject: [PATCH] final check and commit before merge with master --- example/RefractiveIndex.cpp | 10 +++++----- src/CamNoiseAnalysis.cpp | 12 +++++++++--- src/ColorMultiAnalysis.cpp | 12 +++++++++--- src/ColorSingleAnalysis.cpp | 12 +++++++++--- src/DiffNoiseAnalysis.cpp | 11 ++++++++--- src/IResponseAnalysis.cpp | 11 ++++++++--- src/RelaxRateAnalysis.cpp | 13 +++++++++---- src/ShadowScapesAnalysis.cpp | 11 ++++++++--- src/ShapeFromShadingAnalysis.cpp | 11 ++++++++--- src/StrobeAnalysis.cpp | 11 ++++++++--- 10 files changed, 81 insertions(+), 33 deletions(-) diff --git a/example/RefractiveIndex.cpp b/example/RefractiveIndex.cpp index 03e38f9..d8242dc 100644 --- a/example/RefractiveIndex.cpp +++ b/example/RefractiveIndex.cpp @@ -101,19 +101,19 @@ void RefractiveIndex::setup() // _analysisVector.push_back(new ShadowScapesAnalysis(H)); // _analysisVector.push_back(new ShadowScapesAnalysis(D)); - // _analysisVector.push_back(new RelaxRateAnalysis()); + _analysisVector.push_back(new RelaxRateAnalysis()); - // _analysisVector.push_back(new IResponseAnalysis()); + _analysisVector.push_back(new IResponseAnalysis()); _analysisVector.push_back(new ShapeFromShadingAnalysis()); // _analysisVector.push_back(new StrobeAnalysis()); - // _analysisVector.push_back(new CamNoiseAnalysis()); + _analysisVector.push_back(new CamNoiseAnalysis()); - // _analysisVector.push_back(new ColorSingleAnalysis()); + _analysisVector.push_back(new ColorSingleAnalysis()); - // _analysisVector.push_back(new ColorMultiAnalysis()); + _analysisVector.push_back(new ColorMultiAnalysis()); _analysisVector.push_back(new DiffNoiseAnalysis()); diff --git a/src/CamNoiseAnalysis.cpp b/src/CamNoiseAnalysis.cpp index ce5bb85..e597b0e 100755 --- a/src/CamNoiseAnalysis.cpp +++ b/src/CamNoiseAnalysis.cpp @@ -65,17 +65,23 @@ void CamNoiseAnalysis::synthesise() whichMesh=0; int index=0; - + float iterator=1; //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. - bool debug=false; + bool debug=true; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; diff --git a/src/ColorMultiAnalysis.cpp b/src/ColorMultiAnalysis.cpp index 6c57f22..42de749 100755 --- a/src/ColorMultiAnalysis.cpp +++ b/src/ColorMultiAnalysis.cpp @@ -92,16 +92,22 @@ void ColorMultiAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-2;i+=2){ + + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; ofImage image2; diff --git a/src/ColorSingleAnalysis.cpp b/src/ColorSingleAnalysis.cpp index f4845e4..02210ad 100755 --- a/src/ColorSingleAnalysis.cpp +++ b/src/ColorSingleAnalysis.cpp @@ -70,16 +70,22 @@ void ColorSingleAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=1;i<_saved_filenames.size()-2;i+=2){ + + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; ofImage image2; diff --git a/src/DiffNoiseAnalysis.cpp b/src/DiffNoiseAnalysis.cpp index a85df19..f278a4e 100755 --- a/src/DiffNoiseAnalysis.cpp +++ b/src/DiffNoiseAnalysis.cpp @@ -65,17 +65,22 @@ void DiffNoiseAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; diff --git a/src/IResponseAnalysis.cpp b/src/IResponseAnalysis.cpp index 6376173..028a91a 100755 --- a/src/IResponseAnalysis.cpp +++ b/src/IResponseAnalysis.cpp @@ -66,17 +66,22 @@ void IResponseAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index bddc6ec..af2fc93 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -18,7 +18,7 @@ using Poco::Thread; void RelaxRateAnalysis::setup(int camWidth, int camHeight) { - DELTA_T_SAVE = 1300; + DELTA_T_SAVE = 130; NUM_PHASE = 1; NUM_RUN = 1; NUM_SAVE_PER_RUN = 100; @@ -67,17 +67,22 @@ void RelaxRateAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; diff --git a/src/ShadowScapesAnalysis.cpp b/src/ShadowScapesAnalysis.cpp index 52f3e9b..8c48dd4 100755 --- a/src/ShadowScapesAnalysis.cpp +++ b/src/ShadowScapesAnalysis.cpp @@ -95,17 +95,22 @@ void ShadowScapesAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; diff --git a/src/ShapeFromShadingAnalysis.cpp b/src/ShapeFromShadingAnalysis.cpp index 010c40a..de92f70 100755 --- a/src/ShapeFromShadingAnalysis.cpp +++ b/src/ShapeFromShadingAnalysis.cpp @@ -86,17 +86,22 @@ void ShapeFromShadingAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1; diff --git a/src/StrobeAnalysis.cpp b/src/StrobeAnalysis.cpp index 42a3edb..5152284 100755 --- a/src/StrobeAnalysis.cpp +++ b/src/StrobeAnalysis.cpp @@ -70,17 +70,22 @@ void StrobeAnalysis::synthesise() whichMesh=0; int index=0; - - //if you want to see what this looks like with real data ignore the new filenames and load teh old ones. + float iterator=1; bool debug=false; if(debug){ _saved_filenames.clear(); _saved_filenames=getListOfImageFilePaths("MIDDLESBOROUGH", _name); + + //hack to limit number of meshes. + if(_saved_filenames.size()>100){ + iterator= _saved_filenames.size() /100; + } + } //clear vector so we don't add to it on successive runs meshes.clear(); - for(int i=0;i<_saved_filenames.size()-1;i++){ + for(float i=0;i<_saved_filenames.size()-1;i+=iterator){ ofImage image1;