finding highest point of contrast?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

contrast is a relative term, defineing the difference between the foreground and background levels.

It is also a very hard thing to differentiate, and not something you can easilly automate.

the best way may be to take a copy of the the image, blur it slightly, reduce it to two colors without dither, then use that to define what is 'foreground', using a trim.

See IM Example sections
Two Color Quantization
http://www.cit.gu.edu.au/~anthony/graph ... colors_two
And 'blurred trim'
http://www.cit.gu.edu.au/~anthony/graph ... #trim_blur

And please let us know how it goes, and what your final solution is..
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply