Page 1 of 1

threshold filter makes text blocky

Posted: 2016-05-21T04:56:40-07:00
by atariZen
I have a receipt that was scanned at 600dpi (because it has fine print). It looks good, until I try to bi-level it like this:

Code: Select all

convert -density 900 -threshold 60% -type bilevel receipt.png show:
At first I did not use the "-density 900" option, but I tried adding that to improve the quality and it did not help. I've noticed that resolution can be quite low when an image is color or gray, but when an image is monotone it's important for it to be high-resolution. Normally the scanner can be set to scan at 600dpi monotone for this kind of receipt, and it does well. But I had to scan in color this time. I even tried "-density 2500" which seems to have no effect. Why isn't more than enough?

Re: threshold filter makes text blocky

Posted: 2016-05-21T07:12:15-07:00
by snibgo
Changing the density of a raster image doesn't change the pixels, and won't change the legibility.

Removing data, for example by thresholding, tends to reduce legibility.

Your command is in the wrong order. It might work under v6, but won't under v7. You should read input, process it, and write the output.