Set a specific resolution on the tutorial-3-CameraControl in OpenCV4Android SDK
Oke, so basically tutorial-3-CameraControl
in the OpenCV4Android SDK gives back a list of all the resolutions available for your device. But it starts at a 960 x 720
resolution for my device. What I want is that the application starts with a 320 x 240
resolution instead of having to switch manually every time from 960 x 720 too 320 x 240.
I have tried the following: Changed the size.height too 320 and the size.height too 240 in the JavaCameraView.java. This worked (it now opens at 320 x 240) BUT when I try to set it to a different resolution, it always stays 320 x 240 (cause it returns those values every time, I get that)
Is there any way to resolve this problem, and still make the application start with a 320 x 240 resolution?
public int getWidth(Object obj) {
Camera.Size size = (Camera.Size) obj;
return 320;
}
public int getHeight(Object obj) {
Camera.Size size = (Camera.Size) obj;
return 240;
}