1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #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<Point2f>& muban, const std::vector<Point2f>& shijuan);
- void LoadSchema(const boost::shared_ptr<const ISCH_Schema>& 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<Point2f> m_muban;
- std::vector<Point2f> 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 );
- };
|