feeder.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include <opencv\cv.h>
  3. #include <opencv\cxcore.h>
  4. #include <opencv2\opencv.hpp>
  5. #include "scan_common.h"
  6. using namespace cv;
  7. enum identyfi_type{
  8. identyfi_type_normal,
  9. identyfi_type_manualmatch,
  10. identyfi_type_reidentify,
  11. };
  12. enum SRC_IMG_HANDLE_TYPE{
  13. SRC_IMG_HANDLE_TYPE_NONE,
  14. SRC_IMG_HANDLE_TYPE_COPY,
  15. SRC_IMG_HANDLE_TYPE_SAVE,
  16. };
  17. struct feeder_param{
  18. identyfi_type type;
  19. SRC_IMG_HANDLE_TYPE srcimg_type;
  20. int paper_id;
  21. int phy_number;
  22. int schema_index;
  23. int x_s[3];
  24. int y_s[3];
  25. int x_m[3];
  26. int y_m[3];
  27. std::string img_path;
  28. };
  29. /************************************************************************/
  30. /* 图像送入器接口 */
  31. /* 2014年12月9日16:04:06 */
  32. /* 作者:唐林 */
  33. /************************************************************************/
  34. class IFeeder:public IService
  35. {
  36. public:
  37. IFeeder(void){}
  38. ~IFeeder(void){}
  39. virtual BOOL SupportPause(){return FALSE;}
  40. virtual BOOL SupportStop(){return FALSE;}
  41. virtual int SetHandlerWnd(HWND hwnd){m_hwnd = hwnd;return 0;}
  42. virtual bool GetNext(BOOL wait,IplImage* & img, feeder_param& param){
  43. img =0;
  44. return false;
  45. }
  46. void FreeImg( IplImage *& img ){cvReleaseImage(&img);}
  47. protected:
  48. HWND m_hwnd;
  49. };