[OT] a good color distance function

"Jérôme M. Berger" jeberger at free.fr
Sat Oct 16 03:10:02 PDT 2010


Justin Johansson wrote:
> Can anyone please suggest a decent algorithm for
> determining a "color distance" metric between
> two colors?  The requirement is to come up with
> a good algorithm for contrasting a computed color
> from another color.
> 
> Should this algorithm (function) be dependent upon
> whether the color model be additive (aka RGB) or
> subtractive (aka CMYK) or other?
> 
	In the imaging industry (printers, scanners and screens), we
usually use the L*a*b* [1] or L*u*v* [2] color spaces. Pythagorean
distances in these spaces give reasonably good results, but more
advanced measures have been developed [3] if you need more precision.

		Jerome

[1] http://en.wikipedia.org/wiki/Lab_color_space
[2] http://en.wikipedia.org/wiki/CIELUV_color_space
[3] http://en.wikipedia.org/wiki/Color_difference
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101016/7389e7c1/attachment.pgp>


More information about the Digitalmars-d mailing list