Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Camera 'zoomed-in' in landscape mode with Camera2 #10

Open
thiyagab opened this issue Nov 19, 2017 · 3 comments
Open

Camera 'zoomed-in' in landscape mode with Camera2 #10

thiyagab opened this issue Nov 19, 2017 · 3 comments

Comments

@thiyagab
Copy link

thiyagab commented Nov 19, 2017

When we use the sample in landscape mode, the whole sample starts to act weird and the camera preview seems to be zoomed in, I tried the same with Camera1 mode manually overriden, it worked fine, there is something wrong with Camera2 implementation in landscape mode.
Otherwise the code is really great and helpful

@brittonjg
Copy link

@thiyagab what is your Camera2 error in landscape mode?

I am finding that getBestAspectPictureSize doesn't find a suitable aspect ratio, so it fails to work. Is that the same issue you are finding? I'm trying to scope out how much work this would be to solve.

@EzequielAdrianM
Copy link
Owner

Sorry, the app was originally not intended to be used in landscape mode. As seen on the AndroidManifest.xml activity android:screenOrientation="portrait" the orientation is locked to portrait so you can expect several bugs using it landscape mode. You will also notice the face detector does only catch faces while holding your phone on portrait mode.
If you are interested in helping the project to support landscape mode, pull requests are welcome. Thanks.

@brittonjg
Copy link

Thanks for your reply @EzequielAdrianM.

Having looked at it further, I see you're definitely correct that the Face Detector only picks up face in portrait (which makes sense). Although that could be overcome by making sure the detector is seeing the face in portrait. If I get a chance, I'll look into this further and make a PR if I can.

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

No branches or pull requests

3 participants