Detecting multiple QR codes
I'm trying to use the library to detect multiple QR codes in a webcam stream. I realized during testing that it does not work. Also the library also does not return the location of a detected code, so I wouldn't be able to distinguish between multiple detected codes anyway.
What I'm thinking now is letting the user give a hint by touching the desired code in the video, so the QR scanner could limit its detection area to the area around the "touch". Is there any way to limit the detection area? Or would I have to do this myself, by using the library in single image mode, and getting a video frame and cropping it around the touch point?
Hello. Detecting multiple QR codes in a single image is currently not supported.
Restricting the search region is supported for single image scanning and for web cam scanning semi supported.
For single image scanning, I added documentation to the readme.
For web cam scanning, an area around the video center is used by default. You can overwrite _sourceRect and _updateSourceRect on the scanner instance to change this. Note that the source rect should be a square for web cam scanning.
Note that by now, specifying the scan region is supported by the lib without ugly hacks :D See https://github.com/nimiq/qr-scanner#2-create-a-qrscanner-instance
Maybe this feature will be coming in the future if I support additional scanner engines.