next up previous
Next: Color processing examples Up: color_processing Previous: Conversion from RGB to

Conversion from HSI to RGB

Given $H$, $S$ and $I$, we can first find $r$, $g$, and $b$ on the RGB triangle, and the find $R$, $G$, and $B$. Consider three possible cases in terms of the hue angle $H$:

In summary, given the H, S, and I values, we can obtain the R, G, and B components by

\begin{displaymath}b=(1-S)/3 \end{displaymath}


\begin{displaymath}r =\frac{1}{3}\left[1+\frac{S\cos H}{\cos(60- H)}\right] \end{displaymath}


\begin{displaymath}g=1-b-r \end{displaymath}

and

\begin{displaymath}R=3Ir,\;\;\;\;\;G=3Ig,\;\;\;\;\;B=3Ib \end{displaymath}

HSI2RGBcode.gif

Note that after the HSI to RGB conversion, we need to convert the R, G, and B values from the range of $(0,\;1)$ back to the three components for a pixel in a color image in the range of $(0,\;255)$.


next up previous
Next: Color processing examples Up: color_processing Previous: Conversion from RGB to
Ruye Wang 2013-10-18