#ifdef _CH_
#pragma package <opencv>
#endif

#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include "Histogram.h"
#endif

#ifndef _ART_H
#define _ART_H

class ART
{
protected:
	double **R;
	double **ALPHA;
	double **CReal;
	double **CIm;
	int originX;
	int originY;
	int N;
	int M;
	int radius;
	int diameter;
	int subwidth;
	int subheight;

public:
	ART();
	~ART();

	void artTransform(IplImage *whole1, IplImage *sub1);
	void pCoordinates(IplImage *M, double **r2, double **alpha2, bool isSub=true); 
	void ComputeC(double **r1, double **alpha1, IplImage *input, double **CnmR, double **CnmI);
	void findMatch(IplImage *whole1, double *SubC, double *SubI);	//subC is subimage C arrray

	double *MatrixArray(double **mat);	//convert from matrix to array
	void exit();
	void init();
	void iquicksort(double a[], int fst, int lst);
	IplImage *drawCircle(IplImage *source, double **R, int x, int y);

	double *MinkPrep(double *realarr);
	double Minkovski(double *ar1, double *ar2, int p, int length);

private:

};

#endif

#ifdef _EiC
main(1,"ART.cpp");
#endif