BlinkID / blinkid-android

Everything you need to add AI-driven ID scanning into your native Android app.
https://microblink.com/identity/identity-document-scanning/
444 stars 153 forks source link

How do I get image of USDL back side? #82

Closed netdur closed 6 years ago

netdur commented 6 years ago

I do combine scan like this

USDLCombinedRecognizerSettings usdl = new USDLCombinedRecognizerSettings();
usdl.setReturnFullDocumentImage(true);
usdl.shouldReturnFullDocumentImage();
return usdl;

then start intent like this

Intent intent = new Intent(context, VerificationFlowActivity.class);
...
MetadataSettings.ImageMetadataSettings ims = new MetadataSettings.ImageMetadataSettings();
ims.setDewarpedImageEnabled(true);
intent.putExtra(ScanCard.EXTRAS_IMAGE_METADATA_SETTINGS, ims);
intent.putExtra(ScanCard.EXTRAS_IMAGE_LISTENER, new ScanImageListener());

in ScanImageListener I check for image image.getImageName() to equal USDLCombinedRecognizerSettings.FULL_DOCUMENT_IMAGE_FRONT and USDLCombinedRecognizerSettings.FULL_DOCUMENT_IMAGE_BACK, however, I cannot find USDLCombinedRecognizerSettings.FULL_DOCUMENT_IMAGE_BACK anywhere, how do I get image of back side?

for example, there is SlovakIDFrontSideRecognizerSettings.FULL_DOCUMENT_IMAGE and SlovakIDBackSideRecognizerSettings.FULL_DOCUMENT_IMAGE but US driving license doesn't have that

culoi commented 6 years ago

Hello @netdur

USDLCombinedRecognizers doesn't return an image of the back side, only results from the PDF417 barcode.

If you require an image of the back side, then you should create a Custom UI with DocumentDetector, similar that we have implemented in our BlinkID demo app from the PlayStore.

Sample app of the CustomUI can be found in our SDK, under folder BlinkIDSample.

Regards

culoi commented 6 years ago

Hello, you are able to get the image of the front side of the document and result of the PDF417 barcode with our USDLCombined Recognizer. Please check it out in our BlinkIDCustomCombinedSample: https://github.com/BlinkID/blinkid-android/tree/master/BlinkIDSample/BlinkID-CustomCombinedSample