diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/testApp.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/testApp.cpp b/src/testApp.cpp index 5928ee5..312aa57 100755 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -19,8 +19,8 @@ void testApp::setup(){ vidGrabber.setVerbose(true); bGrab=vidGrabber.initGrabber(gw,gh); //base grab size - - learningRate = 0.01f; + + learningRate = 0.001f; colorImg.allocate(gw,gh); grayImage.allocate(gw,gh); @@ -28,7 +28,6 @@ void testApp::setup(){ grayDiff.allocate(gw,gh); mode=DISPLAY_FG; - method=METHOD_SIMPLE; bLearnBakground = true; @@ -123,7 +122,7 @@ void testApp::draw(){ grayDiff.draw(0,0,gw,gh); //(ofGetHeight()-gh)/2,gw,ofGetHeight()+((gh-ofGetHeight())/2)); break; } - + for (int i = 0; i < contourFinder.nBlobs; i++){ contourFinder.blobs[i].draw(0,0); //(ofGetHeight()-gh)/2); } @@ -301,6 +300,7 @@ void testApp::loadSettings(string filename){ invert=(XML.getAttribute("figgis","invert",0,0)==1); threshold = XML.getAttribute("figgis","threshold",80,0); volume = XML.getAttribute("figgis","volume",1.0,0); + method= XML.getAttribute("figgis","method",4,0); if(XML.pushTag("boundaries")) { for (int i=0;i<XML.getNumTags("boundary");i++){ boundaries.push_back(boundary(XML.getAttribute("boundary","filename","",i))); @@ -321,6 +321,7 @@ void testApp::saveSettings(string filename){ XML.setAttribute("figgis","flip",bFlip,0); XML.setAttribute("figgis","threshold",threshold,0); XML.setAttribute("figgis","volume",volume,0); + XML.setAttribute("figgis","method",method,0); if (XML.tagExists("boundaries")) XML.removeTag("boundaries"); XML.addTag("boundaries"); if(XML.pushTag("boundaries")) { |
