Adjust White Balance In Scanned Images on Linux

October 4, 2015

I had some black and white images that were scanned off of a flatbed scanner that came out looking more like black and gray. On the left is a clip of the original, and on the right is the fixed version.


I did this with the following script using convert from ImageMagick to set a white threshold and convert. The value you need here may vary.

for f in *.tiff
    convert -white-threshold 85% -monochrome $f $f-fixed.tiff

If you don't have convert installed, install it with:

sudo apt-get install imagemagick

Related Posts