FingerPrint_impl.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef LIBFRAMEWORK_FINGERPRINT_IMPL_H
  2. #define LIBFRAMEWORK_FINGERPRINT_IMPL_H
  3. #include "FingerPrintClass.h"
  4. #include <string>
  5. #include "DeviceSimulator.h"
  6. #define EntityName "FingerPrint"
  7. class FingerPrintImpl : public FingerPrintClass
  8. {
  9. public:
  10. FingerPrintImpl();
  11. ~FingerPrintImpl();
  12. static void HttpsLogCallBack(const char* logtxt) {}
  13. //DeviceBaseClass
  14. ErrorCodeEnum GetDevCategory(DevCategoryInfo& devCategory);
  15. ErrorCodeEnum Reset();
  16. ErrorCodeEnum DevClose();
  17. ErrorCodeEnum GetLastErr(DevErrorInfo& devErrInfo);
  18. // Open Device
  19. ErrorCodeEnum DevOpen(DWORD dwPort, DWORD dwBaudRate);
  20. //采集指纹图片及对应特征值,imagePath保存图片名,lpbFeature保存对应特征,iLength:输入代表特征lpbFeature最大可用长度,输出为特征lpbFeature实际长度
  21. //imagePath为传入的图片名,采集到的指纹图像请按此名称保存在dep目录下,lpbFeature为对应指纹图像特征
  22. //Compute features
  23. ErrorCodeEnum Image2Feature(const char* imageName, LPBYTE lpbFeature, int& iLength);
  24. //生成特征模板(注册时使用)
  25. //imagePath1、imagePath2、imagePath3表示生成特征需要输入的三张图片名称,由应用传入,lpbTemplate表示输出特征模板,iLength表示模板长度
  26. ErrorCodeEnum Image2Template(const char* imagePath1, const char* imagePath2, const char* imagePath3, LPBYTE lpbTemplate, int& iLength);
  27. //比对校验
  28. //lpbTemplate和iTemplateLen分别表示输入的一组特征模板及其对应的长度,templateNum为数组长度(即模板个数)
  29. //lbpFeature表示待校验的指纹特征,iFeatureLen表示其长度,level表示校验等级,默认取3
  30. ErrorCodeEnum Match(LPBYTE lpbTemplate[], int iTemplateLen[], int templateNum, LPBYTE lbpFeature, int& iFeatureLen, int level = 3);
  31. //取消采集指纹
  32. ErrorCodeEnum Cancel();
  33. };
  34. #endif //LIBFRAMEWORK_FINGERPRINT_IMPL_H