Re: Color comparison
Re: Color comparison
- Subject: Re: Color comparison
- From: Jaeho Chang <email@hidden>
- Date: Wed, 5 Jun 2002 17:34:37 +0900
Sorry... It's going to a bit OT now... but...
How about using HSV (Hue, Saturation, Value) ?
I used to use this to compare colors, but never tried CIE stuff.
Is it better?
Jaeho.
On Wednesday, June 5, 2002, at 08:45 AM, Marcel Weiher wrote:
On Tuesday, June 4, 2002, at 08:48 Uhr, Jason Harris wrote:
You could also use the Euclidean distance in whatever color space your
color
lives in. For RGB, it's
distance = sqrt( pow(r1-r2, 2.0) + pow(g1-g2, 2.0) + pow(b1-b2,
2.0) );
"distance" is a number in the same units as r,g, and b that describes
how
"close" the the two colors are.
For just equality, that probably won't be necessary. If you're
actually trying to get color difference, euclidean distance in RGB is
not a good measure, because RGB is not a perceptually uniform
color-space (not even close). For determining color-distance, use CIE
Lab color space ( or CIE Luv ). For these color-spaces, a delta-E of 1
is approximately the JND, the Just Noticeable Difference under standard
viewing conditions.
Marcel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.