1 | initial version |
Instead of modifying the source file you can also use the setCameraIndex() function in the CameraBridgeViewBase.
mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.fd_activity_surface_view);
mOpenCvCameraView.setCameraIndex(1);
mOpenCvCameraView.setCvCameraViewListener(this);
Default camera index is -1. But before setting the front camera check whether front camera is available or not.