## 2 Extreme Learning Machine (ELM)-Based Moving Cast Shadow Detection
### Feature Extraction
#### 2.1.1 Pixel-Level Features  
Shadows are illuminated by a skylight, while non-shadows are illuminated by both skylight and sunlight. Therefore, shadows are darker than that of the surface where they are cast. Based on the Phong model [50], one of the properties related to shadows is that the intensity of shadows must be lower than that of non-shadows in each component and the chromaticity changes in a small limit.  
Figure 1: Overview of the proposed moving cast-shadow detection approach.  
According to the property, several pixel-level features derived from different color space are exploited to depict shadows as much as possible.  
(A) Color ratio in RGB color space  
Due to the intensity of shadow is lower than non-shadow in each component, the color ratio is used to represent the ratio of shadow and non-shadow in RGB color space [4]. To avoid the division by zero, the color ratio is defined as:  
\[K^{c}(x,y)=\frac{F^{c}(x,y)}{B^{c}(x,y)+1} \tag{1}\]  
where \(K^{c}(x,y)\) is the color ratio at the location \((x,y)\) in component \(c\), \(c\in\{R,G,B\}\). \(B^{c}(x,y)\) and \(F^{c}(x,y)\) are the intensity values at the location \((x,y)\) of component \(c\) in the background \(B\) and the current foreground frame \(F\).  
(B) Lightness ratio in LRGB color space  
The lightness-red-green-blue (LRGB) color model was proposed in the literature [51], in which the lightness and color components can be scaled separately. Hence, the lightness ratio calculated in LRGB color space can better describe the darkness characteristic of shadow.  
The LRGB components \((L,T_{1},T_{2},T_{3})^{T}\) are generated by transforming RGB components \((A_{1},A_{2},A_{3})^{T}\), as follows:  
\[\begin{array}{l}L=0.299\times A_{1}+0.587\times A_{2}+0.114\times A_{3}\\ T_{i}=A_{i}-L,i=1,2,3\end{array} \tag{2}\]  
Then, the lightness ratio \(L^{LRGB}\) is given by:  
\[L^{LRGB}(x,y)=\frac{F^{L}(x,y)}{B^{L}(x,y)} \tag{3}\]  
where \(F^{L}(x,y)\) and \(B^{L}(x,y)\) are the lightness values at the location \((x,y)\) in lightness components \(L\) of the foreground frame \(F\) and background image \(B\) in LRGB color space, respectively.  
(C) Color constancy in the HSV color space  
The shadow maintains the color constancy compared with the surface it is cast. Generally, the hue and saturation components in HSV color space were utilized to describe this property [7]. Meanwhile, [PERSON] [52] assumed that shadows have higher hue in HSV color space. Therefore, the color constancy can be depicted adequately by the following three features:  
\[\begin{array}{l}H(x,y)=\left|\begin{matrix}F^{h}(x,y)-B^{h}(x,y)\\ S(x,y)=\left|\begin{matrix}F^{s}(x,y)-B^{s}(x,y)\\ \end{matrix}\end{matrix}\right|\\ R(x,y)=\frac{F(x,y)}{F^{c}(x,y)+1}\end{array} \tag{4}\]  
where \(F^{h}(x,y)\), \(F^{s}(x,y)\) and \(F^{c}(x,y)\) are values at location \((x,\,y)\) in the hue, saturation and value components of foreground frame \(F\) in HSV color space, respectively. Likewise, \(B^{h}(x,y)\) and \(B^{s}(x,y)\) are values at location \((x,y)\) in the hue and saturation components of background image \(B\) in the HSV color space. \(H(x,y)\) and \(S(x,y)\) denote the hue and saturation differences between \(F\) and \(B\), respectively. \(R(x,y)\) reflects that the higher hue of shadows appears in HSV color space, which is calculated in the foreground image \(F\). In addition, \(F^{h},F^{s},F^{v},B^{h},B^{s}\in[0,1]\).