Skip to content

Android: Camera2Renderer ignores display and sensor rotation #8866

Closed

Description

@PhilLab

The Camera2Renderer Android class does not rotate the preview image if the camera's sensor is rotated (this can happen with some smartglasses, e.g. with the Vuzix M300 where the sensor is mounted upside-down). The result is that the preview image is rotated by 180 degrees.

The Camera2Sample by Android uses

 characteristics.get(CameraCharacteristics.SENSOR_ORIENTATION);

to query the sensor rotation and

activity.getWindowManager().getDefaultDisplay().getRotation();

to query the display rotation but I did not succeed in integrating this into OpenCV's Camera2Renderer.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions