Mesuring the "colorfullness" of a image vs its saturation

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
nmaisonneuve
Posts: 1
Joined: 2015-07-02T05:56:23-07:00
Authentication code: 1151

Mesuring the "colorfullness" of a image vs its saturation

Post by nmaisonneuve »

Hi,

What are the common practices to measure the "colorfullness" of an image? (which might be different from its saturation since the white color is a fully saturated one)

colorfull image
http://b.visuels.poliris.com/b600/b/6/e ... 5-9540.jpg

white but not so colorfull image
http://e.visuels.poliris.com/bigs/e/b/8 ... 8-4453.jpg

Best,
nico
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Mesuring the "colorfullness" of a image vs its saturation

Post by snibgo »

In all definitions that I know of, the saturation of black, gray and white is zero.

Code: Select all

convert input.jpg -colorspace HSL -format %[fx:mean.g] info:
This gives the average saturation, on a scale of 0.0 to 1.0.

EDIT: I should add that HSL is a simple arithmetic calculation of saturation. One of the other colorspaces may give a measure that is closer to subjective opinion.
snibgo's IM pages: im.snibgo.com
Post Reply