Ask Your Question
1

image quality opencv4android preview vs. phone camera app preview

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

jjbluesky gravatar image

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

Hi,

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
0

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

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

Comments

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 -0500 )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 (http://developer.android.com/reference/android/hardware/Camera.Parameters.html#FOCUS_MODE_CONTINUOUS_PICTURE). It must improve the situation.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-01-11 11:01:24 -0500 )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 -0500 )edit
1

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 -0500 )edit

Which one is tutorial 5? I couldn't find any with direct camera control. The only ones I have are here: http://opencv.org/platforms/android/opencv4android-samples.html

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

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

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-01-12 10:46:44 -0500 )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 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 2,010 times

Last updated: Jan 11 '13