#pragma once

#include "cvcls.h"
 

class CVCLS_API COrbMatch
{
public:
	COrbMatch(void);
	virtual ~COrbMatch(void);

	BOOL   GenPattern(const RvImage image, const RvMask mask, int offsX, int offsY, int maxCount = 30);

	//顶点数组为4
	double  Do(const RvImage image, const RvMask mask,  double distThres , RvPoint* pVts, int count );

	double  Compare(void* pSceneFeature, double distThres ,  RvPoint* pVts, int count );


	void Reset(void);

	void* GetFeature(){ return m_pPattern;};
	BOOL  IsFeatureExist(){
	     return (NULL != m_pPattern);
	}
	int      GetKeyPointCount();
	RvPoint  GetKeyPointPosAt(int index);

	double GetMinDist();
	double GetMaxDist();

public:

	//特征参数
	int   m_nFeatureCount;
	float m_nScaleFactor ;
	int   m_nLevels;
	int   m_edgeThreshold;
	int   m_nFirstLevel;
	int   m_nWTA_K;
	int   m_scoreType;
	int   m_nPatchSize;

	//匹配参数


protected:
	void* m_pPattern;

    double  m_nMinDist;
	double  m_nMaxDist;
 //	int   m_nMaxCount ;

};

