简体   繁体   English

在Android CameraBridgeViewBase类中,如何在全屏模式下将opencv相机设置为纵向方向

[英]In Android CameraBridgeViewBase class, How to set opencv camera for Portrait orientation in Full screen mode

I was using opencv cameraBridgeViewBase Class, in Normal portrait mode camera angle is rotated. 我使用的是opencv cameraBridgeViewBase类,在“普通”肖像模式下,摄像机角度已旋转。 so i use to traspose and flip, camera angle rotated to normal portrait mode. 因此,我习惯于转置和翻转,将相机角度旋转到正常人像模式。

Core.transpose(mRgba, mRgbaT);
Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0,0, 0);
Core.flip(mRgbaF, mRgba, 0);

But camera view is center of the screen , not able to get full screen mode. 但是相机视图是屏幕的中心,无法获得全屏模式。 Is anything possible to change full screen mode or without transpose and flip to change full screen mode for portrait please justify me thank you.. 是否有可能更改全屏模式或不进行换位和翻转以更改肖像的全屏模式,请为我辩护。

I'm not sure if I understood your problem. 我不确定我是否理解您的问题。 But if you want to keep your OpenCV application full screen no matter if you tilt/rotate your phone, one easy thing to do in order to overcome this problem would be: Go to your Android manifest and add android:screenOrientation="landscape" before the line: android:label="@string/app_name" 但是,如果您想使您的OpenCV应用程序保持全屏显示,而无论您倾斜/旋转手机,为解决此问题都可以做的一件简单的事情是:转到您的Android清单,并在之前添加android:screenOrientation =“ landscape”该行: android:label =“ @ string / app_name”

Keep us updated if it worked for you 如果适合您,请及时通知我们

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何设置OpenCV的摄像头以纵向和全屏显示预览 - How to set OpenCV's camera to display preview in both portrait orientation and full screen Android + OpenCV:如何在使用CameraBridgeViewBase时设置相机分辨率 - Android + OpenCV: How to set camera resolution when using CameraBridgeViewBase OpenCV Android人像模式全屏设置 - OpenCV Android Portrait Mode Full Screen setting Android TV App如何设置竖屏模式? - How to set screen orientation to portrait mode on Android TV App? 在具有Opencv的Android中,CvCameraViewListener2类的显示方向为纵向模式,可以在全屏模式下查看相机 - In Android with Opencv, CvCameraViewListener2 class, Display orientation is portrait mode is anything Possible to camera view in Fullscreen Android中人像模式下的相机方向 - Camera orientation in Portrait mode in android 如何在Android上将相机方向锁定为纵向 - How to set camera orientation locked to portrait on android 在Android 4.3上以纵向模式全屏摄像头预览 - Full screen camera preview in portrait mode on Android 4.3 OpenCV - 如何在 Android 中设置全屏相机视图? - OpenCV - How to set a Full Screen Camera view in Android? Android:纵向模式下的相机预览方向 - Android: Camera preview orientation in portrait mode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM