Other custom utilities includedoptimize2bw: Reads shaded, color or gray image files and does perform automatic thresholding and optional scaling on the data. It is useful for long term archiving of documents that have to be stored in sub-byte black and white data to reduce storage requirements.
optimize2bw -i logo.jpg -o logo.tif
148 113 - 3
>res: 72, yres: 72
RGB -> Gray convertion
lowest: 16 - highest: 249
a: 1.09375 b: -17.5
-0.130 -0.229 -0.322 -0.360 -0.322 -0.229 -0.130
-0.229 -0.404 -0.567 -0.635 -0.567 -0.404 -0.229
-0.322 -0.567 -0.797 -0.893 -0.797 -0.567 -0.322
-0.360 -0.635 -0.893 44.645 -0.893 -0.635 -0.360
-0.322 -0.567 -0.797 -0.893 -0.797 -0.567 -0.322
-0.229 -0.404 -0.567 -0.635 -0.567 -0.404 -0.229
-0.130 -0.229 -0.322 -0.360 -0.322 -0.229 -0.130
Divisor: 22.823
Scale: 0
the default is a bit verbose due to some information debug output ...
empty-page: Counts the dark pixels of a black and white TIFF and
decides with a threshold whether the page is most probably empty, and
thus can be removed from the image processing stream:
empty-page -i test.tif
The image has 75461 dark pixels from a total of 1060992 (7.11231%).
non-empty 
|