Image Color Summarizer

RGB, HSV, LCH & Lab image color statistics and clustering—simple and easy

Download

This is a command line tool — there is no interface. If you are unfamiliar with unpacking archives or using the command line in either Linux or Windows, please Google the topic or problem you're having. I do not provide support to get the software going.

The online version of the summarizer uses slightly different settings for clustering than the default settings in the downloadable version. To make the downloaded version perform in the same way, use

# etc/colorsummarizer.conf
<cluster>
space = lab
n     = 5
maxn  = 10
pass  = 25
</cluster>

Windows

Download colorsummarizer v0.80 for Windows

# from the directory where you unpacked the distribution
> cd C:\Documents and Settings\user\Desktop\colorsummarizer-0.80-win

# usage
> bin\colorsummarizer -help

# man page
> bin\colorsummarizer -man

# run with defaults from etc\colorsummarizer.conf
> bin\colorsummarizer.exe
img/tucan.jpg image size 500 329 crop 0 500 0 329 resampled 100 66
img/tucan.jpg cluster 0 n 2990 f 0.453030303030303 rgb 79 95 18 hex #4F5F12 hsv 73 81 37 lab 38 -18 39 lch 38 43 114 ...
img/tucan.jpg cluster 1 n 1836 f 0.278181818181818 rgb 44 49 18 hex #2C3112 hsv 69 63 19 lab 19 -8 19 lch 19 20 112 ...
img/tucan.jpg cluster 2 n 1458 f 0.220909090909091 rgb 222 208 46 hex #DED02E hsv 55 79 87 lab 82 -12 75 lch 82 76 99 ...
img/tucan.jpg cluster 3 n 316 f 0.0478787878787879 rgb 176 59 22 hex #B03B16 hsv 14 87 69 lab 42 46 46 lch 42 65 45 ...

# get detailed debugging information
> bin\colorsummarizer.exe -debug
debug sampling...
debug reading image img/tucan.jpg
debug Imager=HASH(0x1ab71bc) img/tucan.jpg 500 329
debug resized 100 66
debug xy 0 0 sample rgb 87 105 28 a 0
debug xy 0 0 convert rgb 87 105 28 hsv 74 73 41
debug xy 0 0 convert rgb 87 105 28 lab 42 -19 39
debug xy 0 0 convert rgb 87 105 28 lch 42 43 115
debug xy 1 0 sample rgb 79 100 20 a 0
debug xy 1 0 convert rgb 79 100 20 hsv 76 80 39
debug xy 1 0 convert rgb 79 100 20 lab 39 -20 40
...

# ask for some stats and no clusters
> bin\colorsummarizer.exe -stats -clusters 0
img/tucan.jpg image size 500 329 crop 0 500 0 329 resampled 100 66
img/tucan.jpg stat hsv h avg 65 1.00
img/tucan.jpg stat hsv h median 71
img/tucan.jpg stat hsv h min 0
img/tucan.jpg stat hsv h max 360
img/tucan.jpg stat hsv s avg 79
img/tucan.jpg stat hsv s median 82
img/tucan.jpg stat hsv s min 2
img/tucan.jpg stat hsv s max 100
img/tucan.jpg stat hsv v avg 46
img/tucan.jpg stat hsv v median 36
img/tucan.jpg stat hsv v min 1
img/tucan.jpg stat hsv v max 100
...

# analyze in bulk, here just asking for image dimensions with -info
> bin\colorsummarizer.exe -dir "C:\Documents and Settings\user\Desktop\colorsummarizer-0.80-win\img\*png" -info
analyzing img\evangeline.jpg
img\evangeline.jpg 500 423
analyzing img\fabric-2.jpg
img\fabric-2.jpg 300 300
analyzing img\fabric-3.jpg
img\fabric-3.jpg 300 290
analyzing img\fabric.jpg
img\fabric.jpg 250 346
analyzing img\ferns-100.jpg
img\ferns-100.jpg 100 75
analyzing img\ferns-250.jpg
img\ferns-250.jpg 250 188
analyzing img\ferns-500.jpg
img\ferns-500.jpg 500 375
analyzing img\glogo.jpg
img\glogo.jpg 200 66
analyzing img\granger.jpg
img\granger.jpg 300 225
analyzing img\square.jpg
img\square.jpg 50 50
analyzing img\swatch.jpg
img\swatch.jpg 100 100
analyzing img\tucan.jpg
img\tucan.jpg 500 329

Linux

Download colorsummarizer v0.80 for Linux

# usage
> bin/colorsummarizer -help

# man page
> bin/colorsummarizer -man

You will need Perl installed along with some modules. If you run the code and receive the error

Can't locate Some::Module.pm in @INC ...

then you're missing Some::Module. You can install this using

> cpan
> install Some::Module

The main script is bin/colorsummarizer. Feel free to explore the other scripts in the directory.