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

selectSizePair method get the first valid preview size #5

Open
NasH5169 opened this issue Jun 19, 2018 · 1 comment
Open

selectSizePair method get the first valid preview size #5

NasH5169 opened this issue Jun 19, 2018 · 1 comment

Comments

@NasH5169
Copy link

Hi here !

Thanks for your work on the Google Sample. It really improves the original project.

https://github.com/wax911/Vision-Barcode-Scanner/blob/master/barcode-reader/app/src/main/java/com/google/android/gms/samples/vision/barcodereader/ui/camera/CameraSource.java#L845

Just one issue about selectSizePair method, you take the first one but:

On Huawei ALE-L21, the first one is the lowest resolution. So the preview is really blur and ugly.

On ZTE B2017G, it's ok, the best resolution is the first one.

For now I chcck the max edge (width or heigh) and take the tallest pair but it is not a really smart algorithm.

I think the best algorithm to develop is to get the closest preview size from the desiredWidth / desiredHeight (e.g. screen size).

Thanks again for your time spend on this.

@wax911
Copy link
Owner

wax911 commented Jun 19, 2018

Thanks for the heads up, I never had the chance to test with a lot of devices. Amazing observation, I think that would definitely help and will work on a patch for that.

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

No branches or pull requests

2 participants