Question

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 !

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top