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

Can i get both front and back image of a document that i scanned. #310

Closed ssshah closed 4 years ago

ssshah commented 4 years ago

Can i get the back image of the card that i have scanned? i can get the front image of a card by using following encodedFullDocumentImage in MBEncodedFullDocumentImageResult but i am unable to find the documentation of how can i get the back image of a card a well.

dCubelic commented 4 years ago

Hi @ssshah ,

are you using the combined recognizer which scans both sides of the document?

You just need to set returnFullDocumentImage to true:

recognizer = MBBlinkIdCombinedRecognizer()
recognizer.returnFullDocumentImage = true

And then when the scanning finishes you can get the front and back images like this:

let frontImage = recognizer.result.fullDocumentFrontImage?.image
let backImage = recognizer.result.fullDocumentBackImage?.image

Hope this answers you question.

Best regards, Dominik

ssshah commented 4 years ago

thanks for repose, but i am using MBUsdlCombinedRecognizer which does not have these two fullDocumentFrontImage fullDocumentBackImage

mparadina commented 4 years ago

Hi @ssshah

The MBUsdlCombinedRecognizer does not have an option for returning the backside image, just the image from the front side.

So, in order to get the front image you will need to put the following line: let image = recognizer.result.fullDocumentImage?.image

In order to get both sides of the document, we recommend using the BlinkIDCombined Recognizer and then use the code that @dCubelic provided in his previous response.

Hope this helped.

Regards, Milan

ssshah commented 4 years ago

Hi @mparadina @dCubelic Thanks for repose

But MBBlinkIdCombinedRecognizer does not have following method

I am also getting the values by using these keys (AddressStreet, AddressStreet2,.AddressCity,.AddressPostalCode,.AddressJurisdictionCode)

Is it possible that i can get both sides images along with the values provided by above key in MBUsdlCombinedRecognizerResult

ssshah commented 4 years ago

hi @mparadina @dCubelic any response?

Cerovec commented 4 years ago

Hi @ssshah,

You're right. At this moment, we don't have out-of-the box functionality that would allow you to get both front and back side images, and also detailed data from the barcode.

We will be adding that in the future releases.

In the meantime, I would suggest you use both BlinkID Combined Recognizer and USDL Recognizer in parallel. And wait for valid results from both recognizers.

From BlinkID Combined Recognizer you would get the images. And from the USDL recognizer you would get all the data.

Does this make sense?

Jurica.

mparadina commented 4 years ago

Hi @ssshah

Just following up on this thread.

Did you manage to implement both BlinkID and USDL recognizers into your project for getting the document images with the wanted results?

In case of any additional questions, feel free to ask.

Regards, Milan

mparadina commented 4 years ago

Hi @ssshah

As this issue is inactive, I am closing it.

Let me know if anything comes up by reopening the issue, or contacting us directly at support@microblink.com.

Regards, Milan