BlinkID / blinkid-ios

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

Unable to scan USDL barcode with iPhone 14 Pro Max #380

Open ckang777 opened 1 year ago

ckang777 commented 1 year ago

Using an iPhone 14 Pro Max scanned the front successfully however, the back fails or if it does scan, barcode has empty results with the resultCode being 2 (Uncertain). Also, tried with the Vision app (1.19) from the App Store and same result.

ckang777 commented 1 year ago

IMG_0003

mparadina commented 1 year ago

Hi @ckang777

We are aware of the issue and are currently investigating what might be causing the issues with the barcode extraction on the 14 Pro devices.

Just to double-check, the issue in only happening with the 14 Pro device? Have you tried using any other iPhone to see if you could reproduce the issue?

ckang777 commented 1 year ago

Hello @mparadina Thanks for the reply. Yes, we've tried with both iPhone 14 Pro and iPhone 14 Pro Max and was able to replicate the issue. Also tried with iPhone 13 Pro and iPhone 7 Plus and was not able to reproduce the issue.

mparadina commented 1 year ago

Hi @ckang777

Following up on this thread.

After doing some additional testing on our end, we’ve figured out that the main reason why the barcode is not getting extracted is due to 14 Pro’s camera not being able to auto-focus properly on the barcode. This will be fixed in the upcoming release.

Until then, the workaround is to, if you’re using our UI, set the camera preset to ‘4K’ resolution in case the scanning device is the iPhone 14 Pro (Max).

Example:

let settings: MBBlinkIdOverlaySettings = MBBlinkIdOverlaySettings()
     settings.cameraSettings.cameraPreset = .preset4K

Please test this out and let me know if it helped.

ckang777 commented 1 year ago

@mparadina Thank you for the response. Can you give me an example code how I can achieve this using the blinkId-cordova plugin? Thank you.

edwardsmel commented 1 year ago

Which upcoming release can this be expected in?

mparadina commented 1 year ago

Hi @edwardsmel and @ckang777

The release with the fix for native iOS is available, you can find it under the 5.20.1 release.

Regarding the Cordova plugin, the official release with the fix will come out at the beginning of December. I will make a follow-up here once the release is out.

ckang777 commented 1 year ago

@mparadina Any updates on the blinkid-cordova with this fix? Thank you.

mparadina commented 1 year ago

@ckang777 the release for Cordova has been delayed, and the release will come out by the end of January. Once I get more information about a more precise date, I will make a follow-up here.

christinachimi commented 1 year ago

@mparadina any idea when this will be released for the Flutter plugin? It doesn't look like that setting is available in the recognizer we use so I think we'll need the update.

mparadina commented 1 year ago

Hi @christinachimi

Unfortunately, the release has been further delayed. However, until you wait for the official release, I am sharing the workaround the same as the one provided for native iOS.

For Flutter, in the BlinkID framework, you need to locate the MBBlinkIdOverlaySettingsSerialization.m and under line 31, add the following line: sett.cameraSettings.cameraPreset = MBCameraPreset4K;

Let me know if this helps.

christinachimi commented 1 year ago

@mparadina it looks like this is set now, right, as of Flutter release https://github.com/BlinkID/blinkid-flutter/releases/tag/v6.1.0? I'm just checking since this is still open.

mparadina commented 1 year ago

Hi @christinachimi

You are correct, a new version of the SDK has been released (for Flutter, the newest version is 6.1.2), and it contains the camera and auto-focus fix for the iPhone 14 Pro and Pro Max devices.

Feel free to test it out to see if it resolves the issue on your end!