#pragma once

 
#include "marklocater.h"
#include <cali\ContourBlob.h>

class CNCCLS_API CBlobLocater :	public CMarkLocater
{
public:
	CBlobLocater(void);
	virtual ~CBlobLocater(void);

	virtual BOOL Serialize(HANDLE device, BOOL bIn );
	virtual CUCObj* Clone(  CUCObj *twin) ;
	virtual void Show(CDelegate* pDelegate, int mode, BOOL bForced);

	virtual BOOL  Create( const TCHAR* strName = NULL, UINT id =-1, int style = RV_UC_DEFAULT_STYLE) ;
	virtual void  Destroy()   ;

	//学习的时候，如果成功，将采集模板图
	virtual BOOL    Learn(const RvImage image, double machPosX, double machPosY, int* pErrCode  )  ;
	virtual BOOL    Locate(const RvImage image, RvPoint_f* pResult, int* pErrCode ) ;

	virtual void Shot(int mode , const RvImage image   )  ;
	virtual void ShotEx( int mode, const RvImage image , int left, int top) ;

	virtual void   SetCtrlRect(int left, int top, UINT width, UINT height) ;

	virtual RvRect GetPatternRect()  ;
	virtual RvRect GetSearchRect()  ;

	virtual void SetPatternRect(RvRect rect) ;
	virtual void SetSearchRect(RvRect rect) ;

//	virtual CCaliber* GetOperator() {return &m_cb;};
	 
public:
	float         m_nMinCircular;
	int           m_nMinDiameter, m_nMaxDiameter;
protected:
	
	CContourBlob  m_cb;
	 

};

