Hi all.
I am looking to generate point values that would represent an image's overall brightness, contrast and degree of colour saturation.
I see the verbose identify command doesn't show these, and I haven't been able to find a definitive set of command line arguments that produce a predictable result. Can anyone advise?
Return values for overall image brightness, contrast and saturation
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Return values for overall image brightness, contrast and saturation
There are different definitions for "saturation". Personally, I use the C channel of HCL. You might prefer S of HSL, or something else.
For example:
These are on a scale of 0.0 to 1.0, although the maximum standard_deviation for small images, in recent IM, is sqrt(1/2) = 0.707107.
For example:
Code: Select all
magick toes.png -colorspace HCL -format "light=%[fx:mean.b]\ncont=%[fx:standard_deviation.b]\nsat=%[fx:mean.g]" info:
light=0.495456
cont=0.146745
sat=0.114103
snibgo's IM pages: im.snibgo.com