decodeqr-code

Decode QR-Code in scanned PDF


I'm trying to decode qr-codes in a PDF (generate by Scan2Mail with a Canon iR Scanner). I know the quality is quite poor (see attached image), but with every single iOS app for qr-code scanning I can successfully scan the code within milliseconds filming the image below with the iPhone cam.

I tried to scan with zbarimg and zxing but nothing did work. Do you have ideas what to do? maybe enhance the image somehow with imagemagick?

qr code


Solution

  • It seems counter-intuitive that an image of an image decodes, when the original image doesn't. An app is seeing a stream of slightly different versions of the image. The original is damaged and distorted. The blur that results when the camera captures it can actually help remove the noise. Yes, zxing decodes this fine -- from the Barcode Scanner app.

    Try running this through a light blur filter first.