BlinkID / blinkid-ios

Everything you need to add AI-driven ID scanning into your native iOS app.
https://microblink.com/products/blinkid
386 stars 89 forks source link

dewarpedImage not returned for eudl #50

Closed mvayngrib closed 7 years ago

mvayngrib commented 7 years ago

maybe i'm not clear on the difference between:

settings.metadataSettings.dewarpedImage = YES

and

eudlRecognizerSettings.showFullDocument = YES

i'm currently using the former, but i guess should be using both? I don't see a corresponding value for usdl. Is that because on the usdl only the barcode is scanned?

culoi commented 7 years ago

Hello mvayngrib,

The line

   settings.metadataSettings.dewarpedImage = YES

will enable receiving of PPImageMetadata in ScanDelegate's didOutputMetada. Without this enabled, images will not arrive to the callback.

The line

   eudlRecognizerSettings.showFullDocument = YES

will tell EUDL recognizer to send the image of the full document to the ScanDelegate. So, you need both those enabled to be able to obtain images.

Considering the USDL, since USDL recognizer reads all information from PDF417 barcode, it does not have support for returning dewarped image of the document, since the barcode can be read directly in the original image - no dewarping required.

However, if you still need to obtain the full document image of the US Driver's License, you can use Detector recognizer. You can see an example of how this can be done in this demo app.

mvayngrib commented 7 years ago

@culoi awesome, that clears things up for me!