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