Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back side of US DL #131

Open
AlibekJ opened this issue Aug 15, 2020 · 7 comments
Open

Back side of US DL #131

AlibekJ opened this issue Aug 15, 2020 · 7 comments

Comments

@AlibekJ
Copy link

AlibekJ commented Aug 15, 2020

I am still struggling with capturing the backside of the USDL.
If I use blinkIdCombinedRecognizer, I get front and back images, but not the USDL-specific data fields.

let recognizerCollection = 
new cordova.plugins.BlinkID.RecognizerCollection([mrtdSuccessFrameGrabber, 
blinkIdCombinedRecognizer]);

If I use usdlCombinedRecognizer like this:

let recognizerCollection = 
new cordova.plugins.BlinkID.RecognizerCollection([mrtdSuccessFrameGrabber, 
usdlCombinedRecognizer]);

I get all the data, but not the back image.

I tried using them both like this

let recognizerCollection = 
new cordova.plugins.BlinkID.RecognizerCollection([mrtdSuccessFrameGrabber, 
usdlCombinedRecognizer, 
blinkIdCombinedRecognizer]);

However the blinkIdCombinedRecognizer picks up the data first and usdlCombinedRecognizer.result comes back empty, so, again, I get the images but not the data.

@mparadina
Copy link
Contributor

Hello @AlibekJ

Can you please tell me which specific data fields are not being returned when using the BlinkID combined recognizer?

Regards,
Milan

@AlibekJ
Copy link
Author

AlibekJ commented Aug 17, 2020

@mparadina

Here are the critical ones

let fields = usdlCombinedRecognizer.result.fields;
let USDLKeys = cordova.plugins.BlinkID.UsdlKeys;

middleName = fields[USDLKeys.CustomerMiddleName];
veteran = fields[USDLKeys.Veteran];
ssn = fields[USDLKeys.SocialSecurityNumber];
issuingState = fields[USDLKeys.IssuingJurisdictionName];

But other DL data such as fields[USDLKeys.EyeColor] is also valuable.

@mparadina
Copy link
Contributor

Hi @AlibekJ

The data fields you've stressed out above are specific fields that are only obtainable by the USDL recognizer.

We do not support retrieving the specific fields with the BlinkID recognizer that can only be found on only one set of documents (for example eye color on the USDL), since the BlinkID recognizer is a generic recognizer, which contains a set of fields that are common for generally all types of documents that it currently supports reading.

However, it can return both front and back document images.

On the other hand, with the USDL recognizer, you can obtain the previously mentioned information, but it can not retrieve the backside image, since it only reads the barcode and extracts the information from it.

Hope this was helpful.

Regards,
Milan

@AlibekJ
Copy link
Author

AlibekJ commented Aug 18, 2020

That's right: I can have the back image or the data, but can not have both.
Now when you understand the problem, would appreciate if you could suggest any way of solving this.

Middle name is a critical piece of information.

@mparadina
Copy link
Contributor

Hi @AlibekJ

Apologies for keeping you waiting.

If your use-case requires getting the backside image, then we certainly recommend using the BlinkID recognizer.

For getting the middle name, currently, it is always displayed along with the last name, so you will need to put together your own parsing logic in order to retrieve it.

If your use-case requires obtaining the Issue state, you could obtain it with the ClassInfo.Region method.

Like I've said in my previous response, the other data is USDL specific, and for now, you would need to use the USDL recognizer in order to obtain them.

Hope this helps. Feel free to ask here or directly at [email protected] in case of any additional questions.

Regards,
Milan

@AlibekJ
Copy link
Author

AlibekJ commented Aug 22, 2020

This basically reiterates my initial comment: The problem is in the fact that I must choose between having the data or having the back side image.

I found a workaround which allows getting a raw image of the back side.
I guess it will have to do until proper solution is found.

  let usdlCombinedRecognizer = new cordova.plugins.BlinkID.UsdlCombinedRecognizer();
usdlCombinedRecognizer.returnFaceImage = true;
usdlCombinedRecognizer.returnFullDocumentImage = true;
usdlCombinedRecognizer.allowMultipleResults = true;

var frameGrabber2 = new cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(usdlCombinedRecognizer);
frameGrabber2.allowMultipleResults = true;

var recognizerCollection = new cordova.plugins.BlinkID.RecognizerCollection([ /*whatever other recognizers you use */ frameGrabber2]);

//US DL data
usdlCombinedRecognizer.result;

//front image 
usdlCombinedRecognizer.result.fullDocumentImage

//back image, raw
recognizerCollection.recognizerArray[0].result.successFrame

@mparadina
Copy link
Contributor

Hi @AlibekJ

If you've decided to use the USDL recognizer, I could also suggest using the MBCaptureHighResImage, when it comes to taking the image of the backside of the USDL.

MBCaptureHighResImage can return high-resolution MBImages with capture or still output.

Documentation: http://blinkid.github.io/blinkid-ios/Type%20Definitions.html#/c:MBRecognizerRunnerViewController.h@T@MBCaptureHighResImage

Hope this helps.

Regards,
Milan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants