| zkfinger sdk document V5.0

函数
libzkfp.h 文件参考

## 详细描述

作者
  scar chen

日期
  2016-04-12

版本
  5.0

版权：
  ZKTeco

历史版本

注解

## 函数
ZKINTERFACE int APICALL | ZKFPM_Init ()
ZKINTERFACE int APICALL | ZKFPM_Terminate ()
ZKINTERFACE int APICALL | ZKFPM_GetDeviceCount ()
ZKINTERFACE int APICALL | ZKFPM_GetDeviceInfoList (int devNum, TZKFPDeviceInfo devInfoList[])
ZKINTERFACE int APICALL | ZKFPM_GetDeviceInfo (int index, PZKFPDeviceInfo pDevInfo)
ZKINTERFACE HANDLE APICALL | ZKFPM_OpenDevice (int index)
ZKINTERFACE int APICALL | ZKFPM_CloseDevice (HANDLE hDevice)
ZKINTERFACE int APICALL | ZKFPM_GetCaptureParams (HANDLE hDevice, PZKFPCapParams pCapParams)
ZKINTERFACE int APICALL | ZKFPM_SetParameters (HANDLE hDevice, int nParamCode, unsigned char *paramValue, unsigned int cbParamValue)
ZKINTERFACE int APICALL | ZKFPM_GetParameters (HANDLE hDevice, int nParamCode, unsigned char *paramValue, unsigned int *cbParamValue)
ZKINTERFACE int APICALL | ZKFPM_AcquireFingerprint (HANDLE hDevice, unsigned char *fpImage, unsigned int cbFPImage, unsigned char *fpTemplate, unsigned int *cbTemplate)
ZKINTERFACE HANDLE APICALL | ZKFPM_CreateDBCache ()
ZKINTERFACE int APICALL | ZKFPM_CloseDBCache (HANDLE hDBCache)
ZKINTERFACE int APICALL | ZKFPM_GenRegTemplate (HANDLE hDBCache, unsigned char *temp1, unsigned char *temp2, unsigned char *temp3, unsigned char *regTemp, unsigned int *cbRegTemp)
ZKINTERFACE int APICALL | ZKFPM_AddRegTemplateToDBCache (HANDLE hDBCache, unsigned int fid, unsigned char *fpTemplate, unsigned int cbTemplate)
ZKINTERFACE int APICALL | ZKFPM_DelRegTemplateFromDBCache (HANDLE hDBCache, unsigned int fid)
ZKINTERFACE int APICALL | ZKFPM_ClearDBCache (HANDLE hDBCache)
ZKINTERFACE int APICALL | ZKFPM_GetDBCacheCount (HANDLE hDBCache, unsigned int *fpCount)
ZKINTERFACE int APICALL | ZKFPM_Identify (HANDLE hDBCache, unsigned char *fpTemplate, unsigned int cbTemplate, unsigned int *FID, unsigned int *score)
ZKINTERFACE int APICALL | ZKFPM_VerifyByID (HANDLE hDBCache, unsigned int fid, unsigned char *fpTemplate, unsigned int cbTemplate)
ZKINTERFACE int APICALL | ZKFPM_MatchFinger (HANDLE hDBCache, unsigned char *template1, unsigned int cbTemplate1, unsigned char *template2, unsigned int cbTemplate2)

## 函数说明

ZKINTERFACE int APICALL ZKFPM_Init | ( |  | ) |

初始化库

参数

  | 无

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_Terminate | ( |  | ) |

释放库

参数

  | 无

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_GetDeviceCount | ( |  | ) |

获取设备数

参数

  | 无

返回
  返回值说明如下： 当前接入指静脉仪设备数

注解

ZKINTERFACE int APICALL ZKFPM_GetDeviceInfoList | ( | int | devNum,
|  | TZKFPDeviceInfo | devInfoList[]
| ) |  |

获取设备信息数组

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  devNum | int | [in] | 设备数
  devInfoList | TZKFPDeviceInfo[] | [out] | 设备信息数组

返回
  返回值说明如下： 返回获取设备信息数

注解
  目前为预留接口

ZKINTERFACE int APICALL ZKFPM_GetDeviceInfo | ( | int | index,
|  | PZKFPDeviceInfo | pDevInfo
| ) |  |

获取设备信息

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  index | int | [in] | 设备索引
  pDevInfo | PZKFPDeviceInfo | [out] | 设备信息结构体指针

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解
  目前为预留接口

ZKINTERFACE HANDLE APICALL ZKFPM_OpenDevice | ( | int | index | ) |

打开设备

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  index | int | [in] | 设备索引

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  NULL | HANDLE | 失败
  其他 | HANDLE | 成功

注解

ZKINTERFACE int APICALL ZKFPM_CloseDevice | ( | HANDLE | hDevice | ) |

关闭设备

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDevice | HANDLE | [in] | 设备操作实例指针

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_GetCaptureParams | ( | HANDLE | hDevice,
|  | PZKFPCapParams | pCapParams
| ) |  |

获取采集参数

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDevice | HANDLE | [in] | 设备操作实例指针
  pCapParams | PZKFPCapParams | [out] | 采集参数

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_SetParameters | ( | HANDLE | hDevice,
|  | int | nParamCode,
|  | unsigned char * | paramValue,
|  | unsigned int | cbParamValue
| ) |  |

设置参数

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDevice | HANDLE | [in] | 设备操作实例指针
  nParamCode | int | [in] | 参数类型
  paramValue | unsigned char* | [in] | 参数值
  cbParamValue | unsigned int | [in] | 参数数据长度

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_GetParameters | ( | HANDLE | hDevice,
|  | int | nParamCode,
|  | unsigned char * | paramValue,
|  | unsigned int * | cbParamValue
| ) |  |

获取参数

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDevice | HANDLE | [in] | 设备操作实例指针
  nParamCode | int | [in] | 参数类型
  paramValue | unsigned char* | [out] | 参数值
  cbParamValue | unsigned int* | [out] | 参数数据长度

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_AcquireFingerprint | ( | HANDLE | hDevice,
|  | unsigned char * | fpImage,
|  | unsigned int | cbFPImage,
|  | unsigned char * | fpTemplate,
|  | unsigned int * | cbTemplate
| ) |  |

获取指纹(图像/模板）

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDevice | HANDLE | [in] | 设备操作实例指针
  fpImage | unsigned char* | [out] | 指纹图像
  cbFPImage | unsigned int | [in] | fpImage内存大小
  fpTemplate | unsigned char* | [out] | 指纹模板
  cbTemplate | unsigned int* | [in/out] | 指纹模板长度

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE HANDLE APICALL ZKFPM_CreateDBCache | ( |  | ) |

创建算法操作实例

参数

  | 无

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  NULL | HANDLE | 失败
  其他 | HANDLE | 成功

注解

ZKINTERFACE int APICALL ZKFPM_CloseDBCache | ( | HANDLE | hDBCache | ) |

释放算法操作实例

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_GenRegTemplate | ( | HANDLE | hDBCache,
|  | unsigned char * | temp1,
|  | unsigned char * | temp2,
|  | unsigned char * | temp3,
|  | unsigned char * | regTemp,
|  | unsigned int * | cbRegTemp
| ) |  |

将3个指纹模板合成登记模板

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  temp1 | unsigned char* | [in] | 指纹模板1
  temp2 | unsigned char* | [in] | 指纹模板2
  temp3 | unsigned char* | [in] | 指纹模板3
  regTemp | unsigned char* | [out] | 登记模板
  cbRegTemp | unsigned int* | [in/out] | 登记模板长度

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_AddRegTemplateToDBCache | ( | HANDLE | hDBCache,
|  | unsigned int | fid,
|  | unsigned char * | fpTemplate,
|  | unsigned int | cbTemplate
| ) |  |

添加指纹模板到缓存

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  fid | unsigned int | [in] | 手指ID
  fpTemplate | unsigned char* | [in] | 指纹模板
  cbTemplate | unsigned int | [in] | 指纹模板长度

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_DelRegTemplateFromDBCache | ( | HANDLE | hDBCache,
|  | unsigned int | fid
| ) |  |

从缓存删除指纹模板

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  fid | unsigned int | [in] | 手指ID

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_ClearDBCache | ( | HANDLE | hDBCache | ) |

清空算法缓存

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_GetDBCacheCount | ( | HANDLE | hDBCache,
|  | unsigned int * | fpCount
| ) |  |

获取缓存模板数

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  fpCount | unsigned int* | [out] | 指纹模板数

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_Identify | ( | HANDLE | hDBCache,
|  | unsigned char * | fpTemplate,
|  | unsigned int | cbTemplate,
|  | unsigned int * | FID,
|  | unsigned int * | score
| ) |  |

指纹识别(1:N)

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  fpTemplate | unsigned char* | [in] | 指纹模板
  cbTemplate | unsigned int | [in] | 指纹模板大小
  FID | unsigned int* | [out] | 指静脉ID
  score | unsigned int* | [out] | 分数

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  0 | int | 成功
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_VerifyByID | ( | HANDLE | hDBCache,
|  | unsigned int | fid,
|  | unsigned char * | fpTemplate,
|  | unsigned int | cbTemplate
| ) |  |

1:1比对用户指纹

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  fpTemplate | unsigned char* | [in] | 指纹模板
  cbTemplate | unsigned int | [in] | 指纹模板大小

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  >0 | int | 分数
  其他 | int | 失败

注解

ZKINTERFACE int APICALL ZKFPM_MatchFinger | ( | HANDLE | hDBCache,
|  | unsigned char * | template1,
|  | unsigned int | cbTemplate1,
|  | unsigned char * | template2,
|  | unsigned int | cbTemplate2
| ) |  |

比对两枚指纹

参数

  | 参数说明如下表
  name | type | param direction | description of param
  --- | --- | --- | ---
  hDBCache | HANDLE | [in] | 算法操作实例指针
  template1 | unsigned char* | [in] | 指纹模板1
  cbTemplate1 | unsigned int | [in] | 指纹模板1大小
  template2 | unsigned char* | [in] | 指纹模板2
  cbTemplate2 | unsigned int | [in] | 指纹模板2大小

返回
  返回值说明如下：

  value | type | description of value
  --- | --- | ---
  >0 | int | 分数
  其他 | int | 失败

注解