-1

I am using openCV on android.Now i want to take some more clear images through the camera.

I tried with the following code to change the resolution of the camera ,but all i am getting is the default 640*480 images.

Camera.Parameters params = mCamera.getParameters();
        params.setPictureSize(width,height);
        mCamera.setParameters(params);

Parameter successfully saved but still mCamera.getParameters().getPictureSize() giving the default same 640*480 resolution.

Please look into the matter !

Avijit
  • 3,834
  • 4
  • 33
  • 45
Ankur Gautam
  • 1,412
  • 5
  • 15
  • 27

1 Answers1

1

Does your camera support a larger resolution? Print the device's camera parameters and check the available resolutions.

Camera.Parameters.getSupportedPreviewSizes();
Camera.Parameters.getSupportedVideoSizes();

Do not confuse video recording resolution with picture taking resolution (latter is usually much larger).

Check this post for more details: How to set camera resolution in Android with OpenCV?

Community
  • 1
  • 1
Rui Marques
  • 8,567
  • 3
  • 60
  • 91
  • u are correct ,it is the proper way to change resolution .And my problem , i tried to set a non supportive resolution. – Ankur Gautam Feb 15 '14 at 20:51