Search code examples
imagemagickqr-codenoise-reduction

Imagemagick, clear noise from QR-code image


I have QR-code scanned from document, when I trying do decode it with online decoder, like http://zxing.org/w/decode.jspx or other, they not find QR-code, but when I decode with camera on smartphone, it's decode correct text. I think it's because of small noises in image, how can I clear it with ImageMagick? Qr-code scanned

There can be another QR-codes.


Solution

  • You can try a median filter like this, but you would probably be better off extracting the image from the PDF the way Kurt suggested in your previous question in order to retain more quality:

    convert qr.png -median 3 result.png
    

    enter image description here