Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

123456789012

123456789012Ok, I found the answer.

In order to solve this problem without change any settings or change JavaCameraView.java file, just add this line to "onCameraFrame" function:

 public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     mRgba = inputFrame.rgba();
     Mat mRgbaT = mRgba.t();
     Core.flip(mRgba.t(), mRgbaT, 1);
     Imgproc.resize(mRgbaT, mRgbaT, mRgba.size());
     return mRgbaT;
 }

Little explanation: first i load the input matrix, then i made a matrix pattern with the new size, then i flip it (so the image flip by 90 degrees) and finally i return to the original matrix size.