Skip to content

Camera preview orientation locked to landscape? #24

@rringham

Description

@rringham

I'm seeing the classic Android OpenCV landscape orientation issue with this library - basically, there doesn't seem to be a way to force the camera preview into portrait orientation, short of an extremely expensive, per frame rotation that results in an absolutely massive performance drop - e.g.:

        public Mat OnCameraFrame(CameraBridgeViewBase.ICvCameraViewFrame inputFrame)
        {
            var frame = inputFrame.Rgba();
            Mat frameTranspose = frame.T();
            Imgproc.Resize(frameTranspose, frameTranspose, frame.Size());
            return frameTranspose;
        }

There has to be another solution - but I'm not seeing it. There does not seem to be a way to get a reference to the underlying Camera object, to be able to call setDisplayOrientation().

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions