params.setRecordingHint(true) breaks camera preview on Samsung Galaxy S2 (Bugfix #3705)
Description
The camera preview using OpenCV is broken on my Samsung Galaxy S2 running Android 4.4.2 (Cyanogenmod 11) - see attached screenshot.
The problem can be fixed in OpenCV 2.4.9 by changing line 150 in org.opencv.android.JavaCameraView.java to params.setRecordingHint(false); (see attached file).
This is a known problem which is also described here: http://answers.opencv.org/question/27600/camera-distorted-on-android-442/
Associated revisions
Merge pull request #3705 from SpecLad:unused-nNull
Bugfix #3705: params.setRecordingHint(true) breaks camera preview on Samsung Galaxy S2
History
Updated by Dmitry Retinskiy almost 11 years ago
Hi Simon,
thanks for the fix. Could you submit it as a pullrequest?
See instruction here: http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute
- Assignee changed from Alexander Smorkalov to Simon Ismair
- Status changed from New to Open
Updated by Simon Ismair almost 11 years ago
Pull request: https://github.com/Itseez/opencv/pull/2815
Updated by Alexander Smorkalov over 10 years ago
- Pull request set to https://github.com/Itseez/opencv/pull/2815
- Status changed from Open to Done
Updated by Robert Nitsch over 10 years ago
I would like to add that there are more affected devices, for example the LG G3. Also, please note that it's not just the preview that is broken by this issue; instead, the camera frames themselves are broken (they're stretched like hell). This means that it can break detection of QR codes etc. It seems that some manufacturers have completely messed up the setRecordingHint functionality.
By the way: On our devices, turning off setRecordingHint reduced the performance on a single device only (Nexus 4, performance dropped in half). All other devices were unaffected.