Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Poor Image Quality Android Camera takePicture()

I went through almost all the stackoverflow answers, but my problem is a bit different I believe, The image quality is not that bad as in some of the questions. But as you see the image, you can see the curves. It is not smooth image. enter image description here

Here is my parameter setting code.

Camera.Parameters params=mCamera.getParameters();

List<Camera.Size> sizes = params.getSupportedPictureSizes();
Camera.Size size = sizes.get(0);
//Camera.Size size1 = sizes.get(0);
for(int i=0;i<sizes.size();i++)
{

    if(sizes.get(i).width > size.width)
        size = sizes.get(i);


}

//System.out.println(size.width + "mm" + size.height);
params.setPictureSize(size.width, size.height);
params.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO);
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
params.setSceneMode(Camera.Parameters.SCENE_MODE_AUTO);
params.setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO);
params.setExposureCompensation(0);
params.setPictureFormat(ImageFormat.JPEG);
params.setJpegQuality(10);
params.setRotation(90);


mCamera.setParameters(params);

I am using mCamera.takePicture(null, null, mPicture);

like image 514
Bhavya Arora Avatar asked Sep 12 '15 23:09

Bhavya Arora


1 Answers

Try params.setJpegQuality(100) instead of params.setJpegQuality(10).

like image 188
CommonsWare Avatar answered Nov 02 '22 19:11

CommonsWare