Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's an example to start with: ImageMagick's -threshold or -adaptive-threshold (depending on the image's lighting) are what you want to look at, e.g. try something like

    magick input.jpg \
      -colorspace Gray \
      -adaptive-threshold 8x8+10% \
      candidate.png


And if you wanna go even lower, you'll "raw" read the image pixel by pixel to normalise colour to black/white and then read that matrix for the QR pattern.

And then, cause there are some inverted colour QRs, flip and scan again.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: