summaryrefslogtreecommitdiff
path: root/cvtest/src/testApp.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-05-14 19:00:08 +0100
committerTim Redfern <tim@eclectronics.org>2012-05-14 19:00:08 +0100
commitdbf9692b03ac2485f771993184222f7170e71cf2 (patch)
tree9a17e44304856b5daa9d91172eb40f6e1783b1da /cvtest/src/testApp.h
parente333ec0659a74899fbd75c5ed490089d0fd7d244 (diff)
working on background segmentation
Diffstat (limited to 'cvtest/src/testApp.h')
-rw-r--r--cvtest/src/testApp.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/cvtest/src/testApp.h b/cvtest/src/testApp.h
new file mode 100644
index 0000000..4ec8fe5
--- /dev/null
+++ b/cvtest/src/testApp.h
@@ -0,0 +1,88 @@
+#pragma once
+
+#include <set>
+
+#include "ofMain.h"
+#include "tesselator.h"
+
+#include "ofxOpenCv.h"
+//#include "ofxOpenCvUtilsForeground.h"
+#include <opencv2/opencv.hpp>
+
+#include "ofxBlobsManager.h"
+
+#define CAM_WIDTH_FG 640
+#define CAM_HEIGHT_FG 480
+
+
+class testApp : public ofBaseApp{
+
+ public:
+ void setup();
+ void update();
+ void draw();
+
+ void keyPressed(int key);
+ void keyReleased(int key);
+ void mouseMoved(int x, int y );
+ void mouseDragged(int x, int y, int button);
+ void mousePressed(int x, int y, int button);
+ void mouseReleased(int x, int y, int button);
+ void windowResized(int w, int h);
+ void dragEvent(ofDragInfo dragInfo);
+ void gotMessage(ofMessage msg);
+
+ int windowWidth, windowHeight;
+
+ ofVideoPlayer vidPlayer;
+
+ //matrix types in ofxOpenCv\libs\opencv\include\opencv2\core\types_c.h
+ //cv::Mat is dynamic
+
+ //try to accumulate background using SHORT datatype ie CV_16UC / 4 (would 4 be faster, 64 bits)
+
+ cv::Mat accumulator,outmat,output; // background accumulation
+
+ ofxCvColorImage currentFrame;
+ ofxCvColorImage background;
+
+ ofxCvColorImage mogoutput;
+
+ ofxCvGrayscaleImage grayFrame;
+ ofxCvGrayscaleImage grayBg;
+ ofxCvGrayscaleImage grayDiff;
+
+ float learningRate;
+ bool bFirstFrame;
+
+ ofxCvContourFinder contourFinder;
+
+ float threshold;
+
+ cv::BackgroundSubtractorMOG mog;
+
+ float mogf;
+
+ /*
+ ofxOpenCvUtilsForeground* fg;
+ ofxOpenCvUtilsMeanShift* meanShift;
+
+
+ ofxCvColorImage blobFrame;
+ ofxCvColorImage trackFrame;
+ ofxCvGrayscaleImage resultFrame;
+
+
+
+ float blockSize;
+ float minBlobSize;
+ float maxBlobSize;
+ float shadowThreshold;
+ float blur;
+ bool selectEnabled;
+ bool useMoG;
+ bool isTracking;
+ */
+
+};
+