Grayscale to B&W images

Advice and Help

Moderator: kcleung

Marceloh.
Posts: 3
Joined: Fri Aug 29, 2014 12:23 pm
notabot: 42
notabot2: Human

Grayscale to B&W images

Postby Marceloh. » Fri Aug 29, 2014 12:37 pm

Hi,

I have some grayscale score images [for example, 2454 x 3473 pixels (297 dpi) scanned by BNF] and would like to convert them to 600dpi B&W images (using Irfanview's CCITT Fax 4 compression). Can someone help me?
Thanks!

Marceloh.

Marceloh.
Posts: 3
Joined: Fri Aug 29, 2014 12:23 pm
notabot: 42
notabot2: Human

Re: Grayscale to B&W images

Postby Marceloh. » Fri Aug 29, 2014 1:46 pm

My procedure:

1) Open the grayscale image in Irfanview. Go to menu Image>Resize/Resample...;
2) Set new size (Width and Height) - Units: pixels
3) Select these boxes: (Preserve aspect ratio (proporcional) and Apply sharpen after Resample
4) DPI: 600
5) Size method: Resample (better quality) / Resample filter (enlarging only): Lanczos (slowest)
6) Press OK.
7) Go to File>Save as... (CCITT Fax 4 TIFF compression checked)
Finally, open the created image in Gimp program just to make rotate corrections and cut the exceeding margins. Save again with CCITT Fax 4 TIFF compression.

Any sugestions to obtain better results?

cypressdome
active poster
Posts: 425
Joined: Fri Aug 27, 2010 1:10 am
notabot: 42
notabot2: Human
Location: the piney woods of Florida

Re: Grayscale to B&W images

Postby cypressdome » Fri Aug 29, 2014 10:24 pm

I use Imagemagick with a script in the following format that I run under Cygwin on my Windows 7 machine:

Code: Select all

for f in *.jpg
do convert $f -filter lanczos -resize 200% -threshold 63% -density 600x600 -compress Group4 600bwtif/$f.tif
done


The 600bwtif is sub-directory of the directory containing the images. The 200% is so that re-sampling the 300dpi images will result in images that are now 600dpi. The threshold can vary of course depending on the darkness/contrast of the original image but most seem to fall in the range of the mid-50s to the mid-70s. I test various settings on single images before running the batch job. The single image conversion script is this:

Code: Select all

convert filename.jpg -filter lanczos -resize 200% -threshold 63% -density 600x600 -compress Group4 filename.jpg.tif


Once converted I then run them through Scan Tailor which will de-skew the images and set uniform margins. After that images that need it get manually cleaned in Photoshop. It is possible to batch process the original jpg images in Scan Tailor and have it re-sample the images to 600dpi, de-skew them, set uniform margins, and convert them to black and white. Scan Tailor's resulting tif images are compressed using LZW but can be converted to CCITT Group 4 fax compression during the PDF creation process.

Perhaps I'm missing something but from what I've been able to determine there is no way for the user to control the black/white threshold setting in Irfanview. To me, that is a deal breaker.

Marceloh.
Posts: 3
Joined: Fri Aug 29, 2014 12:23 pm
notabot: 42
notabot2: Human

Re: Grayscale to B&W images

Postby Marceloh. » Sun Aug 31, 2014 3:02 pm

Unfortunatelly, the BnF sheet music scanning procedure is to make grayscale tiff images. I don't have enough knowledge about the best procedure to convert this kind of images to B&W images.
Concerning my own printed sheet music, I always scan them to make 600dpi B&W images.

cypressdome
active poster
Posts: 425
Joined: Fri Aug 27, 2010 1:10 am
notabot: 42
notabot2: Human
Location: the piney woods of Florida

Re: Grayscale to B&W images

Postby cypressdome » Mon Sep 01, 2014 3:10 am

The Imagemagick method will work with tiff/tif files and a great many other file types. You just have to change the file extension in the scripts to tiff or tif as the case may be. I used jpg in the example because the 300 and 400dpi files (color and grayscale) that I have been able to download form BNF have been in jpg format.


Return to “Scanning and PDF Creation”

Who is online

Users browsing this forum: No registered users and 1 guest