-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
opencv 3.2 Android: CameraBridgeViewBase.java camera preview does not respect orientation #9269
Description
- OpenCV => 3.2
- Operating System / Platform => Ubuntu 17.04 64 bit
- Compiler => n/a (used sdk download)
This may be similar to #8866.
Symptons: If the Android applications orientation is fixed to landscape then everything is displayed correctly, if not then the preview will be in the wrong orientation except when the phone is held in landscape.
There are various solutions in https://stackoverflow.com/questions/16669779/opencv-camera-orientation-issue with different levels of performance - some rotate the image after receiving it, others patch CameraBridgeViewBase.
The versions that patch CameraBridgeViewBase tend to keep track of the orientation and patch deliverAndDrawFrame.
I'm using Henry Doans answer https://stackoverflow.com/questions/16669779/opencv-camera-orientation-issue/34541529#34541529 it seemed the most reasonable on a really quick look, but no idea if this is 100% efficient.
Phone seems to be a bit more laggy, but not as slow as some of the other solutions.