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!
Detecting dark images in scanned pdf's
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Detecting dark images in scanned pdf's
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Detecting dark images in scanned pdf's
Thanks. I've also found viewtopic.php?f=1&t=8331. Shadow/Highlights might work too.