Created
July 19, 2019 05:05
-
-
Save zaagan/0696daf3cc3053ca291d92208dfd51e8 to your computer and use it in GitHub Desktop.
ZkScanner Matching Users Fingerprint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Matching fingerprint tempates | |
// Continuation to https://github.com/zaagan/ZKTecoFingerPrintScanner-Implementation | |
// | |
/* | |
Step 1 : Load the fingerprint templates to the device memory | |
1.1 Convert base64 encoded template to byte array | |
1.2 Add the template to device memory along with users unique ID | |
*/ | |
int fID = 1; // Can be the users unique ID | |
byte[] regTemplate = zkfp.Base64String2Blob("Users fingerprint"); | |
DataHolder.fpInstance.AddRegTemplate(fID, regTemplate); | |
/* | |
Step 2 : Fingerprint matching (After the user has provided his/her fingerprint) | |
This snippet should be used after line 217 in | |
https://github.com/zaagan/ZKTecoFingerPrintScanner-Implementation/blob/master/ZKTecoFingerPrintScanner-Implementation/Controls/FingerPrintControl.cs | |
*/ | |
byte[] CapTmp = new byte[2048]; | |
int fid = 0; | |
int score = 0; | |
int ret = DataHolder.fpInstance.Identify(CapTmp, ref fid, ref score); | |
if (fid > 0) | |
{ | |
// Match successful. | |
} | |
else | |
{ | |
// Match failed. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi how will I get the reg template in memory after 3 finger prints has been registered as one? I want to display it as an image?
The image is return black and not a image?
` if (RegisterCount >= REGISTER_FINGER_COUNT && !bIdentify)
{