You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problems to detect face in mode portrait using opencv Android sdk #5058
|| Fabian Hoyos on 2015-07-03 21:49
|| Priority: Normal
|| Affected: 2.4.9 (latest release)
|| Category: None
|| Tracker: Bug
|| Difficulty: Medium
|| PR:
|| Platform: ARM / Android
Problems to detect face in mode portrait using opencv Android sdk
I am working in detect faces using the opencv Android SDK 2.4.11. The application shows the video preview in portrait mode, I modified the opencv Android SDK to adapt to the video preview in a portrait mode, this change was done in the onCameraFrame method and It consists in rotate 90 degree the inputFrame.rgba()
public void onCameraViewStarted(int width, int height) {
//mGray = new Mat();
// mRgba = new Mat();
mRgba = new Mat(height, width, CvType.CV_8UC4);
mRgbaF = new Mat(height, width, CvType.CV_8UC4);
mRgbaT = new Mat(width, width, CvType.CV_8UC4);
}
public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
mRgba = inputFrame.rgba();
mGray = inputFrame.gray();
//rotate 90 degree
Core.transpose(mRgba, mRgbaT);
Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0, 0, 0);
Core.flip(mRgbaF, mRgba,1);
}
The video preview adapts to the phone orientation. But the face detection only works in right landscape orientation. Also I look at the stored pictures and they aren't rotated to portrait, no matter the phone rotation.
Activity
fh127 commentedon Jan 7, 2016
HI, do I want to to know if this bug is solved in the opencv 3 Android SDK?
tudor-pop commentedon Dec 3, 2016
@lailton I'm using 3.1 & still can't rotate the preview and the issue is still opened