Page 1 of 1

Detecting dark images in scanned pdf's

Posted: 2011-12-04T23:21:03-07:00
by MMM
Hi,

i'm printing quite a lot and wondered if there's a script way to identify dark contiguous areas, esp. black image/illustration backgrounds and distinguish them from text in order to save toner by selectively adjusting levels ...

Thanks!

Re: Detecting dark images in scanned pdf's

Posted: 2011-12-05T18:35:56-07:00
by anthony
convert the imge to greyscale (as a precaution) then look at the averge color of the image.
scanned text should have a very high (lots of white) value. Images with dark areas should stand out very well.

If you want to locate patches of dark color, I would blur the image and then do a 'fuzzy trim' with a 'white seeding color (add a white border as a starting point for trim) and see if you get anything.

See Trimming Noisy images
http://www.imagemagick.org/Usage/crop/#trim_noisy

Re: Detecting dark images in scanned pdf's

Posted: 2011-12-05T21:13:55-07:00
by MMM
Thanks. I've also found viewtopic.php?f=1&t=8331. Shadow/Highlights might work too.