Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARActivity portrait orientation with rotated camera #129

Open
kanoe92 opened this issue Mar 25, 2021 · 1 comment
Open

ARActivity portrait orientation with rotated camera #129

kanoe92 opened this issue Mar 25, 2021 · 1 comment

Comments

@kanoe92
Copy link

kanoe92 commented Mar 25, 2021

Is it possible to use ARActivity in portrait mode? I've tried to manually setRequestedOrientation in my Activity:

this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

This changes orientation from landscape to portrait but camera view isn't rotated. Is there a way to rotate camera view and use it in fullscreen? I've seen method drawVideoSettings(int videoSourceIndex, int width, int height, boolean rotate90, boolean flipH, boolean flipV, int hAlign, int vAlign, int scalingMode, int[] viewport) in ARController. Is it something that might help?

Any help will be appreciated, thanks.

@shb3014
Copy link

shb3014 commented Feb 20, 2023

I run into the same issue. If I set the orientation to portrait and use drawVideoSettings with rotate90 as true, I'll get the right camera preview but wrong tracking. The tracking still seems to be based on a landscape camera feed. Should I rotate the image acquired by ImageReader in order to get the right tracking? or is there a better way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants