What is the difference between HSI and HSV color space? I want to use HSI color space but I did not find any useful material for HSI. Is HSI the same as HSV?
HSI, HSV, and HSL are all different color spaces. Hue computation is (as far as I can find) identical between the three models, and uses a 6-piece piece-wise function to determine it, or for a simpler model that is accurate to within 1.2 degrees, atan((sqrt(3)⋅(G-B))/2(R-G-B))
can be used. For the most part, these two are interchangeable, but generally HSV and HSL use the piece-wise model, where HSI usually uses the arctan model. Different equations may be used, but these usually sacrifice precision for either simplicity or faster computation.
For lightness/value/intensity, the three spaces use slightly different representations.
(1/3)⋅(R+G+B)
.(1/2)⋅(max(R,G,B) + min(R,G,B))
.max(R,G,B)
.When used in subsequent calculations, L/V/I is scaled to a decimal between 0 and 1.
Saturation is where the three models differ the most. For all 3, if I/V/L is 0, then saturation is 0 (this is for black, so that its representation is unambiguous), and HSL additionally sets saturation to 0 if lightness is maximum (because for HSL maximum lightness means white).
max(R,G,B) - min(R,G,B)
, this value is sometimes referred to as chroma (C).C/V
.C/(1-abs(2L-1))
.min(R,G,B)
into account: min(R,G,B)/I
.From the mathematical formula, the Hues are the same for HSV and HSI when you are trying to make the conversion from RGB to one of them.
Saturation in HSL is dependent on max
, min
, and Lightness, while HSV's Saturation is only max
and min
dependent. (max
and min
are the maximum and minimum pixel value among R, G, B space).
Value is max
while the Lightness is (max + min)/2
Appendix: RGB->HSV, RGB->HSL