TSL color space

From Wikipedia, the free encyclopedia
Jump to: navigation, search

TSL (Tint, Saturation, and Luminance) is a color space due to (Terrillon & Akamatsu 2000) that is used in face detection and based on hue (“teint” in French), saturation and luma.

The transformation from RGB to TSL is:

T =
\begin{cases}
\frac{1}{2\pi} \arctan{\frac{r'}{g'}} + \frac{1}{4}, & \mbox{if}~g'>0 \\
\frac{1}{2\pi} \arctan{\frac{r'}{g'}} + \frac{3}{4}, & \mbox{if}~g'<0 \\
0,                                         & \mbox{if}~g'=0 \\
\end{cases}

S = \sqrt{\frac{9}{5}\left( r'^2 + g'^2 \right)}

L = 0.299R + 0.587G + 0.114B

where:

r' = r - \tfrac{1}{3}

g' = g - \tfrac{1}{3}

r = \tfrac{R}{R+G+B}

g = \tfrac{G}{R+G+B}


The reverse transformation from TSL to RGB is:

R = k \cdot r

G = k \cdot g

B = k \cdot (1-r-g)


where:


r =
\begin{cases}
\frac{\sqrt{5}}{3} S, & \mbox{if}~T=0 \\
x \cdot g + \frac{1}{3}, & \mbox{if}~T \ne 0 \\
\end{cases}

g =
\begin{cases}
- \sqrt{\frac{5}{9(x^2+1)}} \cdot S, & \mbox{if}~T>\frac{1}{2} \\
\sqrt{\frac{5}{9(x^2+1)}} \cdot S, & \mbox{if}~T<\frac{1}{2} \\
0,                                         & \mbox{if}~T=0 \\
\end{cases}

k = \frac{1}{0.185r + 0.473g + 0.114}

x = - \cot ({2\pi \cdot T})

[edit] See also

[edit] References


Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export