Skip to content

opencv 3.2 Android: CameraBridgeViewBase.java camera preview does not respect orientation #9269

Closed

Description

@stuaxo
  • 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.

Activity

  1. stuaxo commented on Jan 1, 2018

    @stuaxo
    Author

    @rajkumarmishra fixing this bug is the only way to get better fps, all the other solutions are workarounds that add extra work.

  2. self-assigned this
    on Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions