I am currently experimenting with the openCV's java example on face detection in android. However, the view created by the camera is not in mirror imaging.I tried setting the android:screenOrientation
to reverseLandscape
but it did not work. I would like to try to achieve this, any suggestions?
Code in layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<org.opencv.android.JavaCameraView
android:id="@+id/fd_activity_surface_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:screenOrientation="reverseLandscape"
/>
instantiating
private CameraBridgeViewBase mOpenCvCameraView;
on OpenCV loaded
mOpenCvCameraView.setCameraIndex(1);
mOpenCvCameraView.enableView();
onCreate() method
mOpenCvCameraView = findViewById(R.id.fd_activity_surface_view);
mOpenCvCameraView.setCvCameraViewListener(this);
mOpenCvCameraView did not contain a setDisplayOrientation() method and setRotation(180) returned me with a black display.