#pragma once

#ifndef _FACE_CLASSIFIER_
#define _FACE_CLASSIFIER_

#include <macros.h>

#include <opencv/highgui.h>
#include <opencv/ml.h>

#include <list>
#include <map>
#include <string>

namespace face {

class FACE_API FaceClassifier
{
public:
	FaceClassifier();
	FaceClassifier(const std::string name, const std::map<float, std::string> classLabel);
	~FaceClassifier();

	virtual float Classify(const IplImage * const img) = 0;
	virtual void Train(const std::string modelFile, const std::list<std::string> trainFiles, const std::list<float> trainResponses) = 0;
	virtual void Test(const std::string modelFile, const std::list<std::string> testFiles, const std::list<float> testResponses) = 0;

	std::string getClassLabel(const float key);
	std::string getName();
	int getNOfFeatures();

	CvMat *CreateFeatureVector(const IplImage * const img);
	virtual void CreateFeatureVector(const IplImage * const img, CvMat * const fv) = 0;

protected:
	void init(const std::string name, const std::map<float, std::string> classLabel);

protected:
	/// 
	std::string name;
	std::map<float, std::string> classLabel;
	int nOfFeatures;

};

}

#endif
