亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

中控智慧將3個指紋C#與ZKFingerSDK合并

中控智慧將3個指紋C#與ZKFingerSDK合并

C#
慕村225694 2023-08-13 16:02:10
我一直在開發一個小應用程序,用于在掃描 3 次后獲取指紋。我使用了 ZKFingerSDK,當嘗試獲取注冊指紋時,它會將圖像恢復為黑色。我使用的是ZK9500設備if (RegisterCount >= REGISTER_FINGER_COUNT && !bIdentify){    RegisterCount = 0;    ret = GenerateRegisteredFingerPrint();   // <--- GENERATE FINGERPRINT TEMPLATE    if (zkfp.ZKFP_ERR_OK == ret)    {        ret = AddTemplateToMemory();        //  <--- LOAD TEMPLATE TO MEMORY        if (zkfp.ZKFP_ERR_OK == ret)         // <--- ENROLL SUCCESSFULL        {            string fingerPrintTemplate = string.Empty;            zkfp.Blob2Base64String(newRegTmp, cbCapTmp, ref fingerPrintTemplate);            newRegTmp =  zkfp.Base64String2Blob(fingerPrintTemplate);            Bitmap bmp2;            MemoryStream ms2 = new MemoryStream();                BitmapFormat.GetBitmap(newRegTmp, mfpWidth, mfpHeight, ref ms2);                bmp2 = new Bitmap(ms2);                this.pictureBox1.Image = bmp2;            Console.WriteLine("finger print" + fingerPrintTemplate);            textRes.AppendText("merged " + fingerPrintTemplate + "\n");        }    }}
查看完整描述

1 回答

?
森林海

TA貢獻2011條經驗 獲得超2個贊

我假設ret = AddTemplateToMemory();將模板加載到 newRegTmp 中。

zkfp.Blob2Base64String(newRegTmp, cbCapTmp, ref fingerPrintTemplate);從這一行我了解到您在 newRegTmp 處擁有指紋的原始數據,并且您正在將 cbCapTmp 的大小提取到 FingerPrintTemplate 中。

在這種情況下,您不應在下一行中使用 newRegTmp newRegTmp =zkfp.Base64String2Blob(fingerPrintTemplate);,這會用 Base64 字符串覆蓋實際數據。您可以使用 Base64 字符串在帶有 img 標簽的網頁上顯示圖像。但要將原始數據轉換為圖像,您需要將實際數據傳遞給 GetBitMap。

如果上述建議不起作用,請分享AddTemplateToMemory的實現。


查看完整回答
反對 回復 2023-08-13
  • 1 回答
  • 0 關注
  • 251 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號