# Temperature invariant color space

I'd like to build a color difference metric that will be invariant to small changes in lighting conditions. In other words, I should be able to tell that a red shirt is not the same as a blue shirt, even if one image is lit differently (brighter / darker, outdoors / incandescent).

Moving to YUV space and ignoring the luminance component I can deal with changing brightness conditions by considering the metric: $$d = \sqrt{\Delta U^2 + \Delta V^2}$$ But this metric still gives large "distances" when different light sources are used, due to the change in chrominance along the Planckian locus.

My question is:

Is there a color difference metric that is invariant to temperature differences? in a sense, I'm looking for a color space in which one of the three axes is temperature. Does such a space exist?

• The following may be related: stackoverflow.com/questions/10922467/… But a canonical answer would still be appreciated. Jun 21 '13 at 3:47
• Interesting question. I guess this is what auto white balance on a camera does. I think you would apply some kind of auto-white balance, then convert to YUV? Like camera auto white balance I think there would be issues with scenes where the range of colours is not-typical. Jun 22 '13 at 10:47