Ask Your Question
1

Portrait orientation on Android

asked 2013-04-16 17:02:44 -0500

snort gravatar image

updated 2013-04-16 17:03:54 -0500

I am building an app based on one of the OpenCV for Android samples in v2.4.4. I need to change the orientation to portrait. Supposedly, setting the rotation in the app manifest file and using the setDisplayOrientation method should do this. However, like some others who've posted, setDisplayOrientation doesn't change the orientation of the video image on my device. I can't find anything but suggestions to use that, yet there seems to be very little evidence that it works. Can someone who knows the inner workings of the OpenCV for Android stuff please comment on this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-04-17 01:10:44 -0500

rics gravatar image

This question shows how to change the screen orientation to portrait with screenOrientation="portrait" in the manifest. As the drawn image stays landscape you need a workaround to rotate the image canvas as I described in the answer referencing Lu Yu's work.

edit flag offensive delete link more

Comments

Thanks. I have seen Lu's fix, but like you I have the problem of the image being small in portrait mode rather than filling the screen. I'd really like to fix that and haven't found anything in the base classes to address it.

snort gravatar imagesnort ( 2013-04-30 14:55:45 -0500 )edit

Some code?

powder366 gravatar imagepowder366 ( 2013-08-22 15:08:41 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-04-16 17:02:44 -0500

Seen: 2,355 times

Last updated: Apr 17 '13