Ask Your Question

Revision history [back]

problems to detect face and save the image in mode portrait in Android opencv

I have a problem to detect face and save the image in mode portrait using Android sdk opencv. I open the camera and recevied the data to detect faces but in mode portrait, I receive the data (mRgba) in the preview appears the image rotated and when the image is saved is equal, please, I need help to rotate the preview and save the image in way correct.

I detect faces and save the photo with data received in this method:

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    mRgba = inputFrame.rgba();
    mGray = inputFrame.gray();
 }