MATLAB: Detect colors close to white

colorcolor differencecolor spacedelta eimage processing

Which color space should I use if I need to find pixels close to white. For example, I start with RGB space, where white would be (255,255,255). So, anything close to it would be white. But, how much difference is tolerable. Is it OK to go to 230 in R domain; and 220 in Blue etc. (these values are just examples) while keeping other color components constant.
Or is there a better color space than RGB where I can go. And how to find colors closer to white there.

Best Answer

RGB is not sufficiently uniform to be usable here.
Convert to L*a*b*. Then just compute the Euclidean distance (often called delta E) from white. Anything within a given radius will be "close". You need only choose the radius then.