(colormap-distance colormap1 colormap2)
This procedure computes the Manhattan distance between both colormaps with same dimensions (widthheight). Each color channel is treated as a separate dimension (e.g. a given colormap of 100100 is a point in a space of 30000 dimensions)
The distance measure is returned as an exact number.
> (define a (colormap-create 100 100))
a
> (define b (colormap-create 100 100))
b
> (colormap-distance a b)
0.000000
> (colormap-randomize! b)
#<colormap orow:-1 ocol:-1 xres:-1 yres:-1 w:100 h:100>
> (colormap-distance a b)
648766165.000000
>