## 2 Extreme Learning Machine (ELM)-Based Moving Cast Shadow Detection
### Feature Extraction
#### 2.1.2 Region-Level Features  
The other property of shadow is that the texture of the shadow is similar to the surface where it is cast (called background) and is different from the foreground. It is noticed that pixel-level featuresare sensitive to noises. To overcome the drawback for shadow detection, region-level features are developed to describe the texture consistency of shadow, which are explored by the spatial correlations of neighboring pixels, such as normalized cross-correlation (\(NCC\)), Gabor features and modified local binary patterns (\(MLBP\)). (A) Normalized cross-correlation (NCC) in the LRGB color space  
In fact, the shadow is the approximate scale version with respect to the background because of its darkness [50]. It is proved that the normalized cross-correlation (\(NCC\)) [53] is useful to adequately reflect the similarity between shadow and corresponding background, which is obtained in a neighboring region and is robust to noise. As noticed by the literature [51], the lightness can be scaled very well in LRGB color space. Given one pixel \(p\) at the location \((x,y)\), its neighboring pixel \(q\) at the location \((i,j)\), and the set of its neighboring pixels is denoted as \(\Omega_{p}\), in which \((i,j)\in\Omega_{p}\). Hence, the \(NCC\) is formulated as:  
\[NCC(x,y)=\frac{M^{\text{FB}}(x,y)}{M^{\text{B}}(x,y)\cdot M^{\text{F}}(x,y)} \tag{5}\]  
where  
\[ \begin{array}{l}M^{\text{FB}}(x,y)=\sum_{(i,j)\in\Omega_{p}}F^{L}(i,j)\cdot B ^{L}(i,j)\\ M^{\text{B}}(x,y)=\sum_{(i,j)\in\Omega_{p}}B^{L}(i,j)\cdot B^{L}(i,j)\\ M^{\text{F}}(x,y)=\sum_{(i,j)\in\Omega_{p}}F^{L}(i,j)\cdot F^{L}(i,j)\end{array}  \tag{6}\]  
where \(F^{L}(i,j)\) and \(B^{L}(i,j)\) are the foreground lightness value and the background lightness value of a neighboring pixel at location \((i,j)\) in the lightness component \(L\) of LRGB color model, respectively. (B) Illumination invariant Gabor features within the current frame of the RGB color space  
The 2D Gabor filter [54] depicts the intensity variation with a range of scales and orientations for one pixel in its neighborhood. The generated Gabor texture descriptor is illumination invariant which is powerful to further express the texture information of shadow and non-shadow regions. Given one pixel at location \((x,y)\), and its neighborhood \(D(x,y)\) centered at \((x,y)\). Its Gabor transform is defined over P scales and Q orientations by the convolution:  
\[G_{pq}^{c}(x,y)=\sum_{i}^{l-1}\sum_{j}^{l-1}D(x-i,y-j)\cdot g_{pq}(i,j) \tag{7}\]  
where \(I\) and \(J\) represent the dimensions of Gabor kernel \(g_{pq}\), and \(G_{pq}^{c}(x,y)\) is the Gabor coefficient at the location \((x,y)\) in component \(c\), \(c\in\{R,G,B\}\). Here, the Gabor kernel \(g_{pq}\) is:  
\[g_{pq}(x,y,f,\theta)=a^{-p}\Bigg{(}\frac{1}{2\pi\alpha_{x}\alpha_{y}}\Bigg{)} \exp\Bigg{(}-\frac{1}{2}\Bigg{[}\frac{x\alpha}{\alpha_{x}^{2}}+\frac{y\alpha }{\alpha_{y}^{2}}\Bigg{]}\Bigg{)}\times\cos(2\pi fx_{\theta}) \tag{8}\]  
where  
\[ \begin{array}{l}x\alpha=a^{-p}(x\cos\theta+y\sin\theta)\\ y\alpha=a^{-p}(-x\sin\theta+y\cos\theta)\end{array}  \tag{9}\]  
where \(\alpha_{x}\) and \(\alpha_{y}\) denote the sizes of the Gaussian envelope in the x and y directions, respectively. f is the base frequency of the sinusoid, p is the scale factor (\(p=0,1,\ldots,P-1\) for a \(>1\)) and q is the orientation factor (\(q=0,1,\ldots,Q-1\)). Therefore, the filter orientation \(\theta=\frac{q\pi}{Q}\). In our work, we extract the Gabor features with \(P=0\) and \(Q=4\). Particularly, the texture information is described in the current foreground frame \(F\) with \(\theta\in[0^{\circ},45^{\circ},90^{\circ},135^{\circ}]\) for \(R,G,B\) three components in RGB color space. (C) Modified local binary patterns (MLBP) in the RGB color space  
The modified local binary pattern (_MLBP_) [55] is significant to represent the texture information of shadow. This is because the _MLBP_ is not only illumination invariant but also is robust to flat regions. Besides, it is fast for computation.