Confused about HSI and HSL color spaces I am reading a book for image processing algorithms (Andreas Koschan, Mongi Abidi: Digital Color Image Processing) and for the contrast algorithm it says that I can either go RGB-&gt;HSL or RGB-&gt;HSI first and than apply a contrast technique for grayscale images, on the lightness component.

Then it gives this formula only, not other formulas for color conversion:

$$L(x,y) = 0.299*R(x,y) + 0.587*G(x,y) + 0.114*B(x,y)$$

This formula is neither for the L in HSL, neither for the I in HSI and that is what confuses me.

Can you explain what this formula stands for, and maybe help with the appropriate conversion formulas?

Thanks
L(x,y) here is a function for luma, a non-linear approximation of luminance. As you can see, it's the weighted sum of the R'G'B' values. The prime symbol (') indicates that they have been gamma-corrected for perceptual uniformity. The coefficients used in this case are standardized by ITU-R Recommendation BT.601. Other standards, such as BT.709 (which may be preferred for its higher accuracy), exist as well.

See: http://en.wikipedia.org/wiki/HSL_and_HSV#Lightness. I can't answer whether you can use luma and still say that it's a component of HSL or HSI. If the author of the book gave you that formula, I suspect you can assume so, at least for that text.