Improve QR Code Recognition with ImageMagick
Posted: 2015-11-03T05:58:58-07:00
Hello,
I'm a software engineer working on a application designed to scan QR Codes from documents (PDF) to store them in the right place. I'm using ImageMagick with the command line tool to extract the pages of the documents as .PNG files and then Zbar to discover QR Codes. It works fine as long as the original document is well printed/scanned but as soon as the symbol is "damaged", Zbar can't discover anything anymore.
I'm processing the whole page but even with a focus on the QR Code, if it's not good enough, there's nothing to recover. I was wondering if there was any "magick" tool to improve the recognition.
For example, this one is damaged
But the same one with its markings improved is recognized
My knowledge with image processing is limited so I don't know if it's possible at all, but I was wondering if you could contrast and/or remove the with within the black lines to automatically get something close to the improved image.
Many thanks for any advice !
Jean-François
I'm a software engineer working on a application designed to scan QR Codes from documents (PDF) to store them in the right place. I'm using ImageMagick with the command line tool to extract the pages of the documents as .PNG files and then Zbar to discover QR Codes. It works fine as long as the original document is well printed/scanned but as soon as the symbol is "damaged", Zbar can't discover anything anymore.
I'm processing the whole page but even with a focus on the QR Code, if it's not good enough, there's nothing to recover. I was wondering if there was any "magick" tool to improve the recognition.
For example, this one is damaged
But the same one with its markings improved is recognized
My knowledge with image processing is limited so I don't know if it's possible at all, but I was wondering if you could contrast and/or remove the with within the black lines to automatically get something close to the improved image.
Many thanks for any advice !
Jean-François