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:
@@ -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" />
|
||||
|
||||
+3
-2
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user