// Tracking.h
// Chris Pocock 2014

#ifndef TRACKING_H_
#define TRACKING_H_

#include <opencv/cv.h>
#include <opencv/highgui.h>
#include "Erosion.h"
#include "Dilation.h"
#include "Masking.h"
#include "MotionDetector.h"
#include "Thresholding.h"

using namespace cv;

class Tracking {

private:

	// Class variables
	string video;
	std::ofstream* outputstream;
	bool showProcessing;

	int cnt;
	int resetTimer;
	int max_resetTimer;

	Mat differenceImage;
	Mat maskedImage;
	Mat dilatedImage;
	Mat erodedImage;
	Mat thresholdedImage;
	Mat origImage;

	Mat result;
	Mat prev_frame;
	Mat current_frame;
	Mat next_frame;

	VideoCapture capture;

	Mat d1;
	Mat d2;
	Mat motion;

public:

	// Class methods
	Tracking(String, std::ofstream*, bool);
	virtual ~Tracking();
	int track();
	void setupUi();
	void onMouse( int , int , int , int, void*);
};

#endif
