this post was submitted on 10 May 2026
14 points (88.9% liked)
Programming
26913 readers
362 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
QR codes come with (differing levels of) error correction. You could decode it and take the amount of corrected errors as a score.
I don't know what unit/chunk of data the error correction works on but you could alternatively dive a bit into information theory and calculate how close any of the chunks are to an uncorrectable error and use that as a score.
Since the first uncorrectable error will cause the scan to fail this would match your problem definition fairly well.
One benefit of this approach would be that it's a single scan and done vs searching n permutations of the same code.
Or maybe you'd want to scan it a couple of times to rule out any additional errors introduced by the camera or environment.