Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Computes a metric that represents the colorfulness of an image |
last modified: December 15, 2018
USAGE: colorfulness infile -h or -help .... Displays help information PURPOSE: To compute a metric that represents the colorfulness of an image. DESCRIPTION: COLORFULNESS computes a metric that represents the colorfulness of an image. Values range between 0 and about 81. When normalized, then the values are modified by a scaling factor of (1/81) so they range from 0 to 1. Both values are presented as "unnormalized (normalized)". The largest colorfulness appears to correspond to equal parts red, green and blue.
References: CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
Image Vs. Colorfulness Vs. Average Saturation | ||
Original Image |
Colorfulness |
Average Saturation |
0 (0) |
0 |
|
0 |
0 |
|
10.4686 (0.129242) |
0.292073 |
|
17.4206 (0.215069) |
0.4168 |
|
19.9562 (0.246373) |
0.120912 |
|
20.0449 (0.247468) |
0.242725 |
|
23.1143 (0.285362) |
0.515007 |
|
23.4763 (0.289831) |
0.284321 |
|
24.3854 (0.301054) |
0.521614 |
|
24.4009 (0.301246) |
0.551431 |
|
31.0724 (0.38361) |
0.338277 |
|
33.5412 (0.414089) |
1 |
|
43.6767 (0.539219) |
0.684382 |
|
69.4047 (0.856848) |
0.996429 |
|
80.6267 (0.995391) |
1 |
Saturation Vs. Colorfulness | |
Original Image |
Saturation Vs. Colorfulness |
Iterate saturation from 0 to 100 in steps of 10:
saturation=0 colorfulness=0 (0)
saturation=10 colorfulness=7.94012 (0.0980262) saturation=20 colorfulness=16.1978 (0.199973) saturation=30 colorfulness=24.4557 (0.301922) saturation=40 colorfulness=32.3959 (0.399949) saturation=50 colorfulness=40.336 (0.497975) saturation=60 colorfulness=48.5938 (0.599923) saturation=70 colorfulness=56.8517 (0.701873) saturation=80 colorfulness=65.1093 (0.803819) saturation=90 colorfulness=72.7319 (0.897925) saturation=100 colorfulness=80.9897 (0.999873) |
What the script does is as follows:
This is equivalent to the following IM commands for a graylevel image:
|