Ask Your Question

image quality opencv4android preview vs. phone camera app preview

asked 2013-01-10 03:12:12 -0600

jjbluesky gravatar image

updated 2013-01-11 10:48:24 -0600


maybe it's a silly question...anyway:

I compared the image/video quality of the preview image of the camera app of an android phone (samsung galaxy s3) and the example apps which come with the opencv4android framework.

So why is it that the preview of the camera app is so much better then the preview of the opencv4android apps? I hope it's visible on the screenshots --> the fonts in the camera app are a lot sharper than in the opencv4android app.

Thanks :)!

I attached 2 pictures for a better understanding. The font in the camera app screenshot is so much clearer than the opencv4android screenshot.

Is there a way to change it?

camera app screenshot: camera app screenshot

opencv4android screenshot: opencv4android screenshot

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-01-10 04:23:28 -0600

The possible reason is different focus modes. All OpenCV examples with Java camera and VideoCapture class uses CONTINUES_VIDEO mode for camera focusing. It is supported by most of devices and is not aggressive. You need wait a bit to get more clear images. Alternatively you can set up focus mode in your code.

edit flag offensive delete link more


Well I waited patiently for the focus...but it's not only the focus. There is a big different....I attached two pictures as an example. Just look at the font. I can't imagine how this is happening...the camera has 8 mpx.

jjbluesky gravatar imagejjbluesky ( 2013-01-11 10:52:41 -0600 )edit
  1. Android Camera Application differs on different devices and works with whole camera stack and additional vendor features directly. So, potentially you cannot get the same quality.

  2. Try to set focus mode to CONTINUOUS_PICTURE ( It must improve the situation.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-01-11 11:01:24 -0600 )edit

Can you tell me where I can set the focus mode? I'm using the opencv4android sample projects as a basis ...and there is no direct camera access. Everything works via CameraBridgeViewBase.

jjbluesky gravatar imagejjbluesky ( 2013-01-12 08:34:38 -0600 )edit

You need to create your own class that is inherited from OpenCV JavaCameraView class. Use tutorial-5 as an example of direct camera control.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-01-12 09:55:37 -0600 )edit

Which one is tutorial 5? I couldn't find any with direct camera control. The only ones I have are here:

jjbluesky gravatar imagejjbluesky ( 2013-01-12 10:14:11 -0600 )edit

Try to update OpenCV SDK up to This sample was introduced in one of the latest releases.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-01-12 10:46:44 -0600 )edit

Oh wow! I totally missed the update. That's a cool new tutorial. Thanks for telling me! Unfortunately I can't set the focus mode to continuous picture.

jjbluesky gravatar imagejjbluesky ( 2013-01-12 14:56:52 -0600 )edit

Question Tools

1 follower


Asked: 2013-01-10 03:12:12 -0600

Seen: 2,147 times

Last updated: Jan 11 '13