threshold filter makes text blocky

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
atariZen
Posts: 25
Joined: 2016-02-09T12:58:42-07:00
Authentication code: 1151

threshold filter makes text blocky

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: threshold filter makes text blocky

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply