#ifndef _TEST_APP
#define _TEST_APP


#include "ofMain.h"
#include <vector>
#include <iostream>

#define OF_ADDON_USING_OFXOPENCV
#define OF_ADDON_USING_OFXVECTORMATH

#include "ofAddons.h"
#include "ofCvBlobTracker.h"
#include "ofCvTrackedBlob.h"


class testApp : public ofSimpleApp{
	
	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();
		
		void reactToBlobs();
		void printDebug();
				
		int cwidth;
		int cheight;
		ofVideoGrabber  vidGrabber;
		ofxCvColorImage  colorImg;
		ofxCvGrayscaleImage  grayImg;
		ofxCvGrayscaleImage  bgImg;

		ofxCvContourFinder  contourFinder;
		ofCvBlobTracker  blobTracker;
		
		int threshold;
		bool bLearnBakground;
		bool debug;
		
};

#endif
	
