summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/data/settings.xml2
-rw-r--r--figgis_detect.layout8
-rwxr-xr-xfiggis_detect.workspace9
-rwxr-xr-xsrc/testApp.cpp9
4 files changed, 10 insertions, 18 deletions
diff --git a/bin/data/settings.xml b/bin/data/settings.xml
index 3fcd6ea..d5554e5 100755
--- a/bin/data/settings.xml
+++ b/bin/data/settings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<figgis volume="0.282353" threshold="42" invert="0" flip="0" />
+<figgis volume="0.282353" threshold="42" invert="0" flip="0" method="5"/>
<boundaries>
<boundary filename="hook.wav">
<point x="556.000000" y="28.000000"></point>
diff --git a/figgis_detect.layout b/figgis_detect.layout
index 52953b7..87bde8e 100644
--- a/figgis_detect.layout
+++ b/figgis_detect.layout
@@ -4,8 +4,8 @@
<File name="addons.make" open="0" top="0" tabpos="3">
<Cursor position="24" topLine="0" />
</File>
- <File name="bin/data/settings.xml" open="0" top="0" tabpos="5">
- <Cursor position="506" topLine="0" />
+ <File name="bin/data/settings.xml" open="1" top="0" tabpos="2">
+ <Cursor position="802" topLine="0" />
</File>
<File name="config.make" open="0" top="0" tabpos="1">
<Cursor position="376" topLine="18" />
@@ -19,8 +19,8 @@
<File name="src/main.cpp" open="0" top="0" tabpos="1">
<Cursor position="437" topLine="0" />
</File>
- <File name="src/testApp.cpp" open="1" top="1" tabpos="0">
- <Cursor position="2081" topLine="25" />
+ <File name="src/testApp.cpp" open="1" top="1" tabpos="1">
+ <Cursor position="524" topLine="0" />
</File>
<File name="src/testApp.h" open="0" top="0" tabpos="2">
<Cursor position="1870" topLine="54" />
diff --git a/figgis_detect.workspace b/figgis_detect.workspace
deleted file mode 100755
index 7588a6e..0000000
--- a/figgis_detect.workspace
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_workspace_file>
- <Workspace title="v8test">
- <Project filename="v8test.cbp" active="1">
- <Depends filename="../openFrameworks/libs/openFrameworksCompiled/project/linux/libopenFrameworks.cbp" />
- </Project>
- <Project filename="../openFrameworks/libs/openFrameworksCompiled/project/linux/libopenFrameworks.cbp" />
- </Workspace>
-</CodeBlocks_workspace_file>
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")) {