Better preview frame quality and autofocus question
1,080 views
Skip to first unread message
luki
unread,
Jan 3, 2012, 11:09:40 AM1/3/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to zxing
Hi
I write an application for Motorola Xoom tablet with Android 3.1 for
my master thesis that can scan multiple QR Codes in real time with
it's camera and that displays additional information in the display
over recognised QR Codes.
The recognition is done with the ZXing android app, I basically just
changed the code of the ZXing app so that it can recognise multiple QR
Codes at the same time and can do this scan continually, without
freezing after a successful scan like the original app does. So my app
is basically the ZXing app with continous scanning of multiple QR
Codes.
But I'm facing two problems:
1. The recognition rate of QR Codes with the built in camera is not
very good. The ZXing app uses the pictures that it gets from the
camera preview. But these pictures do not have a very good
quality.
Is there any possibility to make the camera preview making better
quality pictures?
P.S. I also tried to make real snapshots with camera.takePicture()
to get a better quality, but it takes too long to take the picture
so the real time experience for the user is lost.
2. The ZXing app makes some sort of continous autofocus. It starts
the
autofocus and when it is finished it automatically starts the
autofocus again. But this method somehow makes the camera
brightness
settings too bright, so that the camera cannot recognize the QR
Codes because the image is almost totally white. Disabling the
autofocus solves the problem, but I need autofocus because otherwise
the recognition of the QR Codes is only possible at a certain
distance.
- How can I change the brightness settings of the camera?
- Does somebody know another possibility for autofocus?
Any help is highly appreciated!
Thanks.
Sean Owen
unread,
Jan 3, 2012, 11:17:04 AM1/3/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to zx...@googlegroups.com
The app can't change the 'quality' of the camera preview: do you mean resolution? resolution is not the limiting factor. Maybe your app is selecting a particularly low resolution; at some point it doesn't help. But scanning 800x600 should be more than enough for QR codes.
Auto-focus is unrelated to brightness. The camera driver itself is always automatically adjusting exposure. The app does not control this, and can't; the best you can do is modify the exposure setting in later versions of the Android API.
luki
unread,
Jan 11, 2012, 12:12:47 PM1/11/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to zxing
Hi
As already said here http://stackoverflow.com/questions/8714899/zxing-autofocus-issue,
Thanks for the answer! You pointed me into the right direction. The
exposure is the problem that the image is too bright. Normally the
camera has auto-exposure, but during autofocus, the auto-exposure is
stopped. And as my app always directly restarts the autofocus when it
has finished, auto-exposure never works. I have to figure out how I
can solve this problem. Maybe waiting a moment between auto-focus
cycles.