From ed539c88af8e18ae3b505e324319b956944e0d91 Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 29 Jan 2013 17:23:14 +0000 Subject: working with accumulation --- src/testApp.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/testApp.h') diff --git a/src/testApp.h b/src/testApp.h index bea746c..c8db7f2 100755 --- a/src/testApp.h +++ b/src/testApp.h @@ -8,9 +8,12 @@ #include "ofxFensterManager.h" #include "ofxGui.h" -#define COLOUR 1 -#define GREY 2 -#define DIFF 3 +#define DISPLAY_FG 1 +#define DISPLAY_BG 2 +#define DISPLAY_DIFF 3 + +#define METHOD_SIMPLE 4 +#define METHOD_ACCUM 5 //12-10-12 //each area will trigger 'once and once only' ? @@ -20,6 +23,10 @@ //tweak opencv stuff //test performance +//size factor +//continuous background +//abs diff? + class guiWindow; @@ -49,16 +56,18 @@ class testApp : public ofxFensterListener{ ofVideoGrabber vidGrabber; int gw,gh; + + float learningRate,startTime; - ofxCvColorImage colorImg; - + cv::Mat accumulator,outmat; + ofxCvColorImage colorImg; ofxCvGrayscaleImage grayImage; ofxCvGrayscaleImage grayBg; ofxCvGrayscaleImage grayDiff; ofxCvContourFinder contourFinder; - int mode; + int mode,method; bool bLearnBakground; bool flip,invert; @@ -80,11 +89,13 @@ class testApp : public ofxFensterListener{ // ie: // ofAddListener(addon.newIntEvent, this, &Class::method) void volumeChanged(float &v); + void resetBG(bool &chg); bool bGrab; vector boundaries; int selectedBoundary; + int selectedPoint; vector clicks; }; -- cgit v1.2.3