#include "cv.h"
#include "cvtypes.h"
#include "filter.h"

// Data Structures
typedef struct {

	float x, y, width, height; // relative position of object window
	int Smin, Vmin;
	int nSamples;
	int view;

} CvCondensParams;

// Global Variables
//CvCamShiftTracker m_cCamShift;
CvConDensation *ConDens;
CvCondensParams m_params;
CvRect m_object, m_Indicat1;
bool IsInit;

void initFilter() {
	m_params.nSamples = 64;
	m_params.x = 0.4f;
	m_params.y = 0.3f;
	m_params.width = 0.2f;
	m_params.height = 0.3f;

	m_params.Smin = 20;
	m_params.Vmin = 40;
	m_params.view = 0;

	m_Indicat1.x = 0;
	m_Indicat1.y = 0;
	m_Indicat1.width = 100;
	m_Indicat1.height = 60;
	IsInit = false;

	ConDens = cvCreateConDensation(4, 4, m_params.nSamples);
	CvMat Dyn = cvMat(4, 4, CV_MAT4x4_32F, ConDens->DynamMatr);
	cvmSetIdentity(&Dyn);
	cvmSet(&Dyn, 0, 1, 0.9);
	cvmSet(&Dyn, 2, 3, 0.9);
	
}
