That looks very valuable. I do see problems like this when people scan in
grayscale instead of b&w also - and the ghostscript conversion to a 1 bit
image file is full of pock-marks as appears in your example.
I will test the code below with the aim of including it in queXF - can you
please let me know if the loop you had there was just for debugging - or
will there be some value in being able to increase kludge_iterations?
On 7 March 2012 09:55, David Burke <david@...> wrote:
> I was able to improve barcode reading accuracy to a good degree. Would you
> want to include this in quexf, perhaps as a configurable option? Before I
> had issues where some printers leaving "salt and pepper" marks on a scan
> that would break it.
> In functions.barcode.php in the barcode function I added
> //imagepng($image, "/var/www/auto_before.png");
> $kludge_iterations = 1;
> for ($i = 0; $i < $kludge_iterations; $i += 1)
> imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR);
> imagefilter($image, IMG_FILTER_CONTRAST, -1000);
> //imagepng($image, "/var/www/auto_after.png");
> I saw you had a kfill_modified function for ocr. I tried this and it
> improved it but the Gaussian blur effect seems to be quicker and more
> Attached are before and after effects. On paper and to the human eye there
> the barcode does not have any holes. They are defects from a scanner. Of 3
> scanners I tested only 1 has this issue. One the troubled scanner I was
> able to get it to work usually by tweaking contrast settings, however a
> software fix is far more reliable.
> David Burke
> Software Engineer and Founder
> Burke Software and Consulting LLC
> For help requests, email help@...
> Watch announcements on Google Plus<https://plus.google.com/u/0/b/112784955559393766110/>
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> Quexf-discuss mailing list
Research and Development Officer
Australian Consortium for Social and Political Research Inc.
+61 3 9013 9653