Does this code require the Digital Persona One Touch RTE (Runtime environment) to work?:
DPFPVerification verifier = DPFPGlobal.getVerificationFactory().createVerification();
If so, is there another way to verify Digital Persona SampleFeatures (serialized) against a Digital Persona Template (serialized) using only the dpfp JARs?
Reason: We plan to have our DPFP verifier on a Web Service provided by TIBCO.
Any help is greatly appreciated!
I get a Java JNI exception with this sample test main code:
import com.digitalpersona.onetouch.DPFPFeatureSet;
import com.digitalpersona.onetouch.DPFPFeatureSetFactory;
import com.digitalpersona.onetouch.DPFPGlobal;
import com.digitalpersona.onetouch.DPFPTemplate;
import com.di开发者_如何学Gogitalpersona.onetouch.DPFPTemplateFactory;
import com.digitalpersona.onetouch.verification.DPFPVerification;
import com.digitalpersona.onetouch.verification.DPFPVerificationResult;
public class Main {
/**
* fingerScanTemplate is from WC DB
* sample is from the WS input parameters
*/
public boolean performVerification(byte[] fingerScanTemplate, byte[] sampleFeatures) {
DPFPTemplateFactory templateFactory = DPFPGlobal.getTemplateFactory();
DPFPFeatureSetFactory featureSetFactory = DPFPGlobal.getFeatureSetFactory();
DPFPVerification verifier = DPFPGlobal.getVerificationFactory().createVerification();
// Deserialize template & sampleFeature
DPFPTemplate deserializedTemplate = templateFactory.createTemplate(fingerScanTemplate);
DPFPFeatureSet features = featureSetFactory.createFeatureSet(sampleFeatures);
//Compare the feature set with the template, based on which finger was captured
DPFPVerificationResult result = null;
result = verifier.verify(features, deserializedTemplate);
return result != null && result.isVerified();
}
/**
* @param args
*/
public static void main(String[] args) {
new Main().performVerification(null, null);
}
}
No you should not need some sort of RTE. I do know that I had to have the One Touch SDK installed because it runs a windows service called Biometric scanning or something similar. The main problem I see with your code is that:
DPFPVerificationResult result = null;
result = verifier.verify(features, deserializedTemplate);
Needs to be:
DPFP.Verification.Verification.Result result = new DPFP.Verification.Verification.Result();
verifier.verify(features, template, ref result );
At least that is what got my code to start verifying correctly. I also had to fix a programmer's mistake in creating the FeatureSet which needs to be done like this:
DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Verification);
I have a feeling you are using an older SDK than I am but maybe this will help out some.
精彩评论