Ubuntu – Convert an image from grayscale to binary

convertimage processingimagemagickpdf

I was wondering how to convert an image from grayscale to binary. The image is a one-page document in pdf format.

If I use Imagemagick's convert 1.pdf 1.eps to convert it to eps or other formats such as tif, I find the image becomes blurry. How can I preserve the clarity of the image?

Thanks!

Best Answer

Hm, it seems like that image is stored into the PDF as a bunch of long small "strips" of the complete image. It also seems like there is a filter or set of filters applied in the PDF that makes the image to be shown as b/w instead of the graylevels that it really is. You can open it in Inkscape, for example, to see some of this for yourself, as it seems like these filters aren't imported (I guess the same happened when you converted to PS or TIFF).

Turning it from a grayscale to a bitmap will probably require a bit of playing with contrast & such to get an optimal result (the scan isn't very hi-res to start with...).

You can import the PDF into The GIMP and play with various filters and colour-options, or maybe use similar functions in imagemagick to create a bitmap version. It's difficult what filter/setting will give the best results...

Related Question