FingerPrint API: Difference between revisions

From wizarPOS
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Functions ==
== API Overview ==
When the third party application to use these apis, it must creat its' store space to store the fingerpirnts. The apis are some utility methods.
When the third party application to use these API, it must create its' store space to store the fingerpirnt. The API are some utility methods.
=== open ===
=== <big>open</big> ===
  int fp_open()
  <syntaxhighlight lang="c">int fp_open()</syntaxhighlight >
Open the fingerprint.
Open the fingerprint.


'''Parameters'''
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  int || The result code, >= 0, success; <0 [[Error_code|error code]].
|}


'''Returns'''
=== <big>close</big> ===
  <syntaxhighlight lang="c">int fp_close()</syntaxhighlight >
Close the fingerprint device.
The open and close API are pair operations. If you don’t want to use this device, you should call the close API to release this device.


The result code, >= 0, success; <0 [[Error_code|error code]].
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  int || The result code, >= 0, success; <0 [[Error_code|error code]].
|}
   
   
=== close ===
  int fp_close()
Close the fingerprint device.
The open and close apis are pair operations. If you don’t want to use this device, you should call the close api to release this device.
'''Parameters'''


'''Returns'''
=== <big>get_fea</big>===
 
   <syntaxhighlight lang="c">int fp_get_fea(unsigned char *pFeaBuffer, int nFeaLength, int *pRealFeaLength, int n_TimeOut_S)</syntaxhighlight >
The result code, >= 0, success; <0 [[Error_code|error code]].
=== get_fea===
   int fp_get_fea(unsigned char *pFeaBuffer, int nFeaLength, int *pRealFeaLength, int n_TimeOut_S)
Get the feature of fingerprint.
Get the feature of fingerprint.
When the finger touch the fingerprint device, the feature of the fingerprint will be return.
When the finger touch the fingerprint device, the feature of the fingerprint will be return.
'''Parameters'''
{|class="wizarpostable"
{|
|-
! scope="row" colspan="2" | Parameters
|-
| pFeaBuffer || '''char *:''' The buffer to store the feature, not null
|-
|-
| ''pFeaBuffer'' || char * || The buffer to store the feature, not null
| nFeaLength || '''int:''' The length of the buffer
|-
|-
| ''nFeaLength'' || int || The length of the buffer
| pRealFeaLength || '''int *:''' Reture the real length of the buffer
|-
|-
| ''pRealFeaLength'' || int * || Reture the real length of the buffer
| nTimeOut_S || '''int:''' Timeout, unit of time:s
|}
{|
|-
|-
| ''nTimeOut_S'' || int || Timeout, unit of time:s
|  
|}
|}


'''Returns'''
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  int || The result code, >= 0, success; <0 [[Error_code|error code]].
|}


The result code, >= 0, success; <0 [[Error_code|error code]].
=== <big>getLastImage</big>===
   <syntaxhighlight lang="c">int fp_getLastImage(unsigned char *pImgBuffer,int nImgLength, int *pRealImaLength, int *pImgWidth, int *pImgHeight)</syntaxhighlight >
=== getLastImage===
   int fp_getLastImage(unsigned char *pImgBuffer,int nImgLength, int *pRealImaLength, int *pImgWidth, int *pImgHeight)
Get the image of fingerprint.
Get the image of fingerprint.
When the finger touch the fingerprint device, the image of the fingerprint will be return.
When the finger touch the fingerprint device, the image of the fingerprint will be return.


 
{|class="wizarpostable"
'''Parameters'''
|-
{|
! scope="row" colspan="2" | Parameters
|-
| pImgBuffer || '''char *:''' The image buffer
|-
| nImgLength || '''int:''' The length of image buffer
|-
| pRealImaLength || '''int *:''' The real length of the image buffer
|-
|-
| ''pImgBuffer'' || char * || The image buffer
| pImgWidth || '''int *:''' The width of the image
|-
|-
| ''nImgLength'' || int || The length of image buffer
| pImgHeight || '''int *:''' The height of the image
|}
{|
|-
|-
| ''pRealImaLength'' || int * || The real length of the image buffer
|  
|}
 
{|class="wizarpostable"
|-
|-
| ''pImgWidth'' || int * || The width of the image
!  scope="row" colspan="2" | Returns
|-
|-
| ''pImgHeight'' || int * || The height of the image
| int || The result code, >= 0, success; <0 [[Error_code|error code]].
|}
|}
'''Returns'''


The result code, >= 0, success; <0 [[Error_code|error code]].


=== match===
=== <big>match</big>===
   int fp_match(unsigned char *pFeaBuffer1, int nFea1Length, unsigned char *pFealBuffer2, int nFea2Length)
   <syntaxhighlight lang="c">int fp_match(unsigned char *pFeaBuffer1, int nFea1Length, unsigned char *pFealBuffer2, int nFea2Length)</syntaxhighlight >
Match the fingerprint.
Match the fingerprint.
Input the two feature of the fingerprint, it will get the result of match .
Input the two feature of the fingerprint, it will get the result of match .


'''Parameters'''
{|class="wizarpostable"
{|
|-
! scope="row" colspan="2" | Parameters
|-
|-
| ''pFeaBuffer1'' || char * || The feature of the old fingerprint
| pFeaBuffer1 || '''char *:''' The feature of the old fingerprint
|-
|-
| ''nFea1Length'' || int || The length of the feature
| nFea1Length || '''int:''' The length of the feature
|-
|-
| ''pFeaBuffer2'' || char * || The feature of the new fingerprint
| pFeaBuffer2 || '''char *:''' The feature of the new fingerprint
|-
|-
| ''nFea2Lenghth'' || int || The length of the feature
| nFea2Lenghth || '''int:''' The length of the feature
|}
{|
|-
|}
|}
'''Returns'''


The result code, >= 0, success; <0 [[Error_code|error code]].
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  int || The result code, >= 0, success, the percent of matched similarity; <0 [[Error_code|error code]].
|}


=== cancel===
=== <big>cancel</big>===
   int fp_cancel ()
   <syntaxhighlight lang="c">int fp_cancel ()</syntaxhighlight >
Cancel the fingerprint device operation.
Cancel the fingerprint device operation.


 
{|class="wizarpostable"
'''Parameters'''
|-
 
!  scope="row" colspan="2" | Returns
'''Returns'''
|-
 
|  int || The result code, >= 0, success; <0 [[Error_code|error code]].
The result code, >= 0, success; <0 [[Error_code|error code]].
|}

Latest revision as of 09:33, 11 March 2019

API Overview

When the third party application to use these API, it must create its' store space to store the fingerpirnt. The API are some utility methods.

open

int fp_open()

Open the fingerprint.

Returns
int The result code, >= 0, success; <0 error code.


close

int fp_close()

Close the fingerprint device. The open and close API are pair operations. If you don’t want to use this device, you should call the close API to release this device.

Returns
int The result code, >= 0, success; <0 error code.


get_fea

int fp_get_fea(unsigned char *pFeaBuffer, int nFeaLength, int *pRealFeaLength, int n_TimeOut_S)

Get the feature of fingerprint. When the finger touch the fingerprint device, the feature of the fingerprint will be return.

Parameters
pFeaBuffer char *: The buffer to store the feature, not null
nFeaLength int: The length of the buffer
pRealFeaLength int *: Reture the real length of the buffer
nTimeOut_S int: Timeout, unit of time:s
Returns
int The result code, >= 0, success; <0 error code.


getLastImage

int fp_getLastImage(unsigned char *pImgBuffer,int nImgLength, int *pRealImaLength, int *pImgWidth, int *pImgHeight)

Get the image of fingerprint. When the finger touch the fingerprint device, the image of the fingerprint will be return.

Parameters
pImgBuffer char *: The image buffer
nImgLength int: The length of image buffer
pRealImaLength int *: The real length of the image buffer
pImgWidth int *: The width of the image
pImgHeight int *: The height of the image
Returns
int The result code, >= 0, success; <0 error code.


match

int fp_match(unsigned char *pFeaBuffer1, int nFea1Length, unsigned char *pFealBuffer2, int nFea2Length)

Match the fingerprint. Input the two feature of the fingerprint, it will get the result of match .

Parameters
pFeaBuffer1 char *: The feature of the old fingerprint
nFea1Length int: The length of the feature
pFeaBuffer2 char *: The feature of the new fingerprint
nFea2Lenghth int: The length of the feature
Returns
int The result code, >= 0, success, the percent of matched similarity; <0 error code.

cancel

int fp_cancel ()

Cancel the fingerprint device operation.

Returns
int The result code, >= 0, success; <0 error code.