Note that it is not allowed to use OpenCV Java calls or load the native libraries that call OpenCV native functions before invoking this callback.
The Tutorial1Activity class implements the CvCameraViewListener2 interface that allows the app to subscribe to the onCameraFrame callback. This callback delivers a new frame from the camera for processing before displaying it. The subscription is done with the following call: