#pragma once #include "scan_common.h" #include "basic_struct_private.h" #include "..\Identifier\Identifier.h" class CIdentifyWorker:public IService { public: enum IDENTIFY_STATE { IS_WAITING, IS_IDENTIFING }; public: CIdentifyWorker(void); ~CIdentifyWorker(void); void SetUseQr(bool bUseQr, const std::string&strQr); IDENTIFY_STATE GetIdentifyState(){ return m_identify_state;} BOOL Identify(const IplImage * img, OMR_RESULT * out_result, result_buffer_state * presult_buffer_state); BOOL Identify(const IplImage * img, OMR_RESULT * out_result, result_buffer_state * presult_buffer_state, int schema_index, const std::vector& muban, const std::vector& shijuan); void LoadSchema(const boost::shared_ptr& schema); private: IDENTIFY_STATE m_identify_state; identify::CIdentifier m_Identifier; IplImage * m_img; OMR_RESULT * m_out_result; result_buffer_state * m_presult_buffer_state; int m_schema_index; std::vector m_muban; std::vector m_shijuan; enum IDENTIFY_TASK_TYPE{ ITT_NORMARL, ITT_MANUALMATCH, }m_identify_task_type; public: virtual BOOL Start(void); protected: virtual ServiceState OnRunning( void ); virtual ServiceState OnStarting( void ); };