Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I solved the same problem by changing following lines in JavaCameraView.java (in OpenCV4Android Library):

1) Size frameSize = calculateCameraFrameSize(sizes, new JavaCameraSizeAccessor(), width, height);

to

Size frameSize = new Size(width,height);

2) Log.d(TAG, "Set preview size to " + Integer.valueOf((int)frameSize.width) + "x" + Integer.valueOf((int)frameSize.height));

to

Log.d(TAG, "Set preview size to " + Integer.valueOf(640) + "x" + Integer.valueOf(480));

3) params.setPreviewSize((int)frameSize.width, (int)frameSize.height);

to

params.setPreviewSize((int)640, (int)480);