mercuriete / android-mrz-reader

MRZ camera reader
Apache License 2.0
46 stars 28 forks source link

Support for USB camera #9

Open akeilox opened 5 years ago

akeilox commented 5 years ago

Is it possible to use USB camera connected to android tablet or phone ?

More like the USB camera stationed on desk like table lamp, so the document with MRZ is placed under it.

How one can go about implementing such in the code ?

mercuriete commented 5 years ago

to the first question using google, yes it is possible. https://source.android.com/devices/camera/external-usb-cameras The new Camera Api 2 can access to usb cameras As you can read it seems the Manufacturer of the phone should implement the HAL first and then the developer will be able to access it.

So even though I not sure if is feasible, the theory is create an app enumerating cameras with Camera API 2 and test all phones hoping one manufacturer did the support.

This request is out of my knowledge and my time, so I let you the exercise of doing it. If you accomplish that you can let me know here.

PS: You can try android x86 on a pc and this distribution is likely to have this HAL enabled. because on a pc the only way to use a camera is with v4l2.

I will leave this issue opened for the future