1

I want to build auto-zoom feature for QR scanner app. I'm using android google vision library.

When user align camera to QR code, if distance from camera to QR code is so far, library cannot decode it, I want camera auto zoom-in into QR code to it can decode. I think camera need to know objects similar with QR. Are there any way to do it? Following this sample https://github.com/googlesamples/android-vision

Tung Tran
  • 2,885
  • 2
  • 17
  • 24

2 Answers2

1

I tried to work with Google Vision, but it just hasn't worked out for me. My use case was simply to read a QR code.

I ended up using Zxing library, and it was really painless if I may add.

I should only mention that, afaik, if you want to read QR code that is perhaps too small, zooming might not help.

mdzeko
  • 932
  • 10
  • 19
0

[ How can I add zoom in/out gesture in Android vision CameraSource ]

This question might have what you are looking for. They recommend making a call to startSmoothZoom(int) that zooms the physical camera for (int) seconds. You will probably have to modify the CameraSource.cs script in android-vision.

Note: This was depcrecated in API level 21. If this affects you, use the Camera2 api. This is discussed here: [ android camera2 handle zoom ]. Camera2 is recommended for new applications.

ohmyhevans
  • 23
  • 6