I need process scanned book images and remove the gray background.
I want to find a correct -level operator values for the Imagemagick script.
To do this, I need to make a series of tests and compare the results.
like this:
convert file.tif -normalize -level 10%,90% outfile1.tif
convert file.tif -normalize -level 15%,75% outfile2.tif
convert file.tif -normalize -level 27%,76% outfile3.tif
and so on. Let's say 10 tests with -level values starting from 10% and adding a 2% step to increase: 10%, 12%, 14% and so on. The same for other value, only with step 5%: 70%, 75%, 80%,85%, 90%. How to make bash script that will run this tests and create single PDF file containg all these tests on the output? Then I will compare the results and choose the best one.