从序列化数据创建数字人物指纹模板
这是一个非常具体的问题,可能会为我赢得风滚草徽章,但如果可以的话请回答
我已将 DigitalPersona sdk dll 作为类型库导入到 Delphi 中,并正在尝试验证我已经得到的指纹作为序列化数据存储在数据库中,它的工作非常出色。注册似乎工作正常,但我无法将指纹中的二进制数据转回 DPFPTemplate 对象。每次尝试使用 TDPFPTemplate 对象的 defaultinterface 属性时,我都会收到 OLEException。
我想知道 Digital Persona 如何期望您使用他们的 SDK 来重新创建指纹。他们的说明是这样的:
1. *Retrieve serialized fingerprint template data from a fingerprint data storage subsystem. 2. Deserialize a DPFPTemplate object by calling the Deserialize method (VB page 40, C++ page 83). 3. Return a DPFPTemplate object.
制作 DPFPTemplate 的所有方法似乎只包括使用指纹读取器本身。
这是一种行不通的方法
Result := CreateOleObject('DPFPShrX.DPFPTemplate.1') as IDPFPTemplate;
Result.Deserialize(string(AUserFinRecPtr.FingerBuffer));
,这是另一种方法
DPFPTemplate := TDPFPTemplate.Create(nil);
DPFPTemplate.DefaultInterface.Deserialize(String(AUserFinREcPtr.FingerBuffer));
This is a very specific question which will probably earn me the tumbleweed badge, but please answer if you can
I've imported DigitalPersona sdk dll's as type libraries into Delphi and am trying to verify fingerprints which I've stored as serialized data in a database, it's working very awesomely. Enrollment seems to work fine, but I can't turn the binary data from the finger prints back into DPFPTemplate objects. I keep getting an OLEException every time I try to used the defaultinterface property of a TDPFPTemplate object.
What I'm wondering is how Digital Persona expects you to use their SDK to recreate fingerprints. This is what their instructions say:
1. *Retrieve serialized fingerprint template data from a fingerprint data storage subsystem. 2. Deserialize a DPFPTemplate object by calling the Deserialize method (VB page 40, C++ page 83). 3. Return a DPFPTemplate object.
All the ways of making a DPFPTemplate seem to only include using the fingerprint reader itself.
Here's one way that doesn't work
Result := CreateOleObject('DPFPShrX.DPFPTemplate.1') as IDPFPTemplate;
Result.Deserialize(string(AUserFinRecPtr.FingerBuffer));
and here's another
DPFPTemplate := TDPFPTemplate.Create(nil);
DPFPTemplate.DefaultInterface.Deserialize(String(AUserFinREcPtr.FingerBuffer));
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了一个 pdf 文档,其中 Deserialize 方法被输入一个字节数组。您的 FingerBuffer 是一个 PAnsiChar,它是一个字节数组。但随后您将其转换为一个字符串,该字符串会自动转换为 OleString(当您将字符串分配给 OleVariant 时,Delphi 会将其转换为 OleString)。所以你不再有字节数组了。
你可以尝试做什么(我不会保证:)):
I found a pdf document where the Deserialize method is feaded a byte array. Your FingerBuffer is a PAnsiChar, which is an array of bytes. But then you cast it to a string which is automatically converted to an OleString (Delphi converts a string to an OleString when you assign it to an OleVariant). So you don't have an array of bytes anymore.
What you can try to do (I won't garantee it :) ):