AndroidOpenCVCamera
AndroidOpenCVCamera copied to clipboard
How to resize image output from camera?
Hello. Size of image output = (h,w) = (554, 960) How to resize or get size with default camera Thanks
Hi @AnhQuanTran. I believe the preview image size can be changed by modifying line 77 in CameraActivity.java:
mView.setMaxCameraPreviewSize(1280, 920);
By changing these arguments, you can set the max width and height (in pixels) of the camera preview image.
I want to resize image got from frame camera, not image preview. I tried changing these arguments
mView.setMaxCameraPreviewSize(1920, 1080);
But output image size still is 554x960
glReadPixels(0, 0, m.cols, m.rows, GL_RGBA, GL_UNSIGNED_BYTE, m.getMat(ACCESS_WRITE).data);