1 | initial version |
You are right about camera resolution selection. CamereView classes select the maximum resolution that you view can fit. What version of OpenCV4Android SDK do you use? In 2.4.5 automatic resize on frame drawing was introduced. CameraBridgeViewBase scales frame up to fit it to view. It was done for resolutions, that are smaller then view to improve performance on some devices with hd screens. Resolution selection logic is the same. If you want to work with higher resolution then your view size you need to use OpenCV4Android 2.4.5 and implement superclass of JavaCameraView
or NativeCameraView
and overload calculateCameraFrameSize
method. It implements resolution selection logic. If camera resolution is greater then view size frame will be scaled automatically with the same aspect ratio. Find the default implementation in src/org/opencv/android/CameraBridgeViewBase.java:457.
2 | No.2 Revision |
You are right about camera resolution selection. CamereView classes select the maximum resolution that you view can fit. What version of OpenCV4Android SDK do you use? In 2.4.5 automatic resize on frame drawing was introduced. CameraBridgeViewBase scales frame up to fit it to view. It was done for resolutions, that are smaller then view to improve performance on some devices with hd screens. Resolution selection logic is the same. If you want to work with higher resolution then your view size you need to use OpenCV4Android 2.4.5 and implement superclass subclass of JavaCameraView
or NativeCameraView
and overload calculateCameraFrameSize
method. It implements resolution selection logic. If camera resolution is greater then view size frame will be scaled automatically with the same aspect ratio. Find the default implementation in src/org/opencv/android/CameraBridgeViewBase.java:457.