¿Cómo mostrar la cámara frontal OpenCV JavaCameraView en una imagen espejo (Android)?
Actualmente estoy experimentando con el ejemplo de Java de openCV sobre detección de rostros en Android. Sin embargo, la vista creada por la cámara no está en imágenes de espejo. Intenté configurar elandroid:screenOrientation
areverseLandscape
Pero no funcionó. Me gustaría intentar lograr esto, ¿alguna sugerencia?
Código en diseño:
<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"
/>
instanciando
private CameraBridgeViewBase mOpenCvCameraView;
en OpenCV cargado
mOpenCvCameraView.setCameraIndex(1);
mOpenCvCameraView.enableView();
Método onCreate ()
mOpenCvCameraView = findViewById(R.id.fd_activity_surface_view);
mOpenCvCameraView.setCvCameraViewListener(this);
mOpenCvCameraView no contenía un método setDisplayOrientation () y setRotation (180) me devolvió una pantalla negra.