Hello I am using OpenCV4Android face detection sample. I would like to know how can I get my resolution of camera and set it to other value. In this example CameraBridgeViewBase.
I see that on object
private CameraBridgeViewBase mOpenCvCameraView;
I can use
mOpenCvCameraView.setLayoutParams();
but every time I try to use it in some way I'm doing it wrong and my program crashes. Please help me with that problem.
try mOpenCvCameraView.setMaxFrameSize(width, height);
in the OnCreate()
after mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial2_activity_surface_view);
I try and success in 2.4.6 tutorial 2.
BTW, check your phone camera supporting resolutions first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With