Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

1) Try to show the camera on full screen, I think that OpenCV use the best resolution to the surface size.

First use this code to see if 1280x720 is really suppoted:

List<Size> sizes = mOpenCvCameraView.getSupportedPreviewSizes();

Some of the devices support different resolution on recording mode and display mode(Like Galaxy s3 that support 720p in display mode and 1080p in recording video mode).

Second you can try using this code to set the minimum and maximum resolution:

 mOpenCvCameraView.setMinimumHeight(720);
 mOpenCvCameraView.setMinimumWidth(1280);
 mOpenCvCameraView.setMaxFrameSize(1280, 720);

2)I believe that if your device support 720p he will save the image as 720p.

Another option is to change matrix size before saving but then you get a bad image.