1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #24827 from alexlyulkov:al/java-camera-view-orientation

Added any screen orientation support for JavaCameraView
This commit is contained in:
Alexander Smorkalov
2024-01-11 10:19:02 +03:00
committed by GitHub
4 changed files with 101 additions and 32 deletions
@@ -11,7 +11,6 @@
android:exported="true"
android:name="FaceDetectActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -184,8 +184,9 @@ public class FaceDetectActivity extends CameraActivity implements CvCameraViewLi
mRgba = inputFrame.rgba();
if (mInputSize == null) {
mInputSize = new Size(Math.round(mRgba.cols()/mScale), Math.round(mRgba.rows()/mScale));
Size inputSize = new Size(Math.round(mRgba.cols()/mScale), Math.round(mRgba.rows()/mScale));
if (mInputSize == null || !mInputSize.equals(inputSize)) {
mInputSize = inputSize;
mFaceDetector.setInputSize(mInputSize);
}
@@ -12,7 +12,6 @@
android:exported="true"
android:name="Tutorial1Activity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />