BlinkID / blinkid-android

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

Warning: This feature is not supported on camera without autofocus #293

Closed YudizAndroidHardik closed 1 year ago

YudizAndroidHardik commented 1 year ago

Description

I am following your repo and running the code of BlinkId-ImagesSample.

When I click on Scan Document, it shows a warning as mentioned above.

As a Recogniser, I am using BlinkIdSingleSideRecognizer. when I call requiresAutofocus(), it will return true. means this is a mandatory thing

So Is there any way to prevent this issue?

Environment Details

BlinkID version: V6.1.1

Device model: Samsung Galaxy Tab A

Device Android version: 9

Device ABI (processor architecture, e.g. ARMv7):

Brankacro commented 1 year ago

Hello @YudizAndroidHardik. You can only check if the end user has a device with autofocus. If the camera is without the autofocus, you will get the described alert. Having a device that has a camera with autofocus is one of our requirements. Please let us know if we can be of any additional help. Best.

YudizAndroidHardik commented 1 year ago

Thank you for your response

Can we do it without autofocus?

On Mon, 20 Mar, 2023, 9:32 pm Brankacro, @.***> wrote:

Hello @YudizAndroidHardik https://github.com/YudizAndroidHardik. You can only check if the end user has a device with autofocus. If the camera is without the autofocus, you will get the described alert. Having a device that has a camera with autofocus is one of our requirements. Please let us know if we can be of any additional help. Best.

— Reply to this email directly, view it on GitHub https://github.com/BlinkID/blinkid-android/issues/293#issuecomment-1476510797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILIDM6BTK62T32RAWYKGHTW5B5PZANCNFSM6AAAAAAWA5ILJM . You are receiving this because you were mentioned.Message ID: @.***>

Brankacro commented 1 year ago

Hello @YudizAndroidHardik. A camera with autofocus is required. If there is anything else that we can assist you with, please let us know. Best.

Brankacro commented 1 year ago

Hello @YudizAndroidHardik. The only alternative that we can suggest is direct API. More precisely, that the end user directly uploads the image from the gallery to the SDK for processing.

More you can find on this link and here you can find the link for the sample.

Hope this info helps. Please let us know in case of any additional questions.

Brankacro commented 1 year ago

Hello @YudizAndroidHardik. Since this topic is inactive, we'll be closing it. If anything comes up feel free to reach out. You can also contact us at support@microblink.com. We'll be glad to hear from you. Best.

albert0m commented 1 year ago

Hi, I'm commenting this thread because it's kind of related. I'm trying to test your framework on an android tv with an usb camera attached to it. Everything works as expected, if I programmatically check for autofocus

if(pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS)){
            // True 
        }

it returns true meaning that the autofocus works (it's a Logitech C930e), if I use the camera app I can see the camera autofocusing.

The blinkid app crashes though:

com.microblink.blinkid.hardware.camera.AutoFocusRequiredButNotSupportedException: Autofocus is required, but not supported on this camera

what kind of strategies do you check to see if autofocus really works?

Brankacro commented 1 year ago

Hello @albert0m and thank you for waiting for our reply.

Setups with external cameras are currently not supported. Our camera management supports only the device's internal cameras. We can suggest that you use direct API, where the end user directly uploads the image from the gallery to the SDK for processing. More you can find on this link and here you can find the link for the sample.

Hope this info was helpful. For any other questions, feel free to contact us.

Brankacro commented 1 year ago

Hello @albert0m. Since this topic is inactive we'll be closing it. In case of any additional questions, please let us know. Also, feel free to reach out to us at support@microblink.com. We'll be glad to assist. Best.