sz3 / libcimbar

Optimized implementation for color-icon-matrix barcodes
https://cimbar.org
Mozilla Public License 2.0
4.22k stars 306 forks source link

take photos and decode #102

Open zhjygit opened 2 months ago

zhjygit commented 2 months ago

If i am far away to the target computer,like 20 meters. I want to take photos by camera, I can get a picture like a.png. And then, i decode like: cimbar a.png -o . however i get nothing. how to solve the problem?

troilus commented 2 months ago
  1. The QR code is dynamic, so taking a single picture does not capture all the data needed for decoding. A video should be recorded instead.
  2. A distance of 20 meters places high demands on both the display and the recording device.
sz3 commented 2 months ago

20 meters is far, so I would hope the screen is very large and/or the camera is very hi-res. As a rule of thumb you're going to need something like 700x700 real barcode pixels to make progress -- that's where the recommendation to "fill up as much of the image with the barcode as you can" comes from on e.g. a 1080p video feed.

The other simple rule of thumb is if you can't manually make out the individual symbols/colors in the captured image, the decoder probably can't do it either. The data (in the form of the symbols/colors) has to make it across the gap for anything to work.

zhjygit commented 2 months ago
  1. The QR code is dynamic, so taking a single picture does not capture all the data needed for decoding. A video should be recorded instead.
  2. A distance of 20 meters places high demands on both the display and the recording device. Why is it dynamic?how can i encode to a video and decode,can you give me some examples,thanks.