## 3 Motion Vehicle Target Extraction
### MD-SILBP Shadow Removal Algorithm  
Shadows in images are caused by objects blocking direct sunlight, resulting in a slight drop in brightness relative to the object. Since video is usually a sequence of RGB images, the high correlation and redundancy between the R, G, and B components make it challenging to eliminate shadows from the foreground image. To overcome this, the image is converted to the YCbCr color space, which can effectively reduce shadow interference. \[\left[ \begin{array}{c}M_{Y}\\ M_{cb}\\ M_{cr}\\ 1\end{array} \right]=\left[ \begin{array}{cccc}0.2290&0.5870&0.114&0\\ -0.1687&-0.3313&0.5&128\\ 0.5&-0.4187&-0.0813&128\\ 0&0&0&0\end{array} \right]\times\left[ \begin{array}{c}R\\ G\\ B\\ 1\end{array} \right] \tag{11}\]  
where \(M_{Y}\) denotes the pixel luminance, \(M_{cb}\) denotes the blue chromaticity component of the pixel, and \(M_{cr}\) denotes the red chromaticity component of the pixel. In YCbCr color space, the change in luminance does not cause a change in the values of the two chromaticity components. Using the relationship between the three components of \(M_{Y}\), \(M_{cb}\), and \(M_{cr}\), the real foreground can be roughly distinguished from the shadows so that  
Figure 8: (**a–d**) Background modeling of four scenarios. the effect of shadows can be eliminated. If the pixel satisfies the following formula, it will be judged as the shaded part. \[ \begin{array}{l}\left|Q_{Y}(x,y)-B_{Y}(x,y)\right|\leq T_{Y}\\ \left|Q_{CB}(x,y)-B_{CB}(x,y)\right|\leq T_{CB}\\ \left|Q_{CR}(x,y)-B_{CR}(x,y)\right|\leq T_{CR}\end{array}  \tag{12}\]  
In the formula: \(Q_{Y}(x,y)\), \(Q_{CB}(X,Y)\), and \(Q_{CR}(x,y)\) are the three chromaticities of the current pixel in the YCbCr color space; \(B_{Y}(x,y)\), \(B_{CB}(x,y)\) and \(B_{CR}(x,y)\) are the three chromaticities of the background corresponding to the pixel in the YCbCr color space. \(T_{Y}\) is the luminance threshold, \(T_{CB}\) is the blue component chrominance threshold, and \(T_{CB}\) is the red component chrominance threshold. When all three component chromaticities satisfy Equation (6), the shadow part can be roughly determined. The identified shadow regions are subsequently processed using the local binary pattern (LBP) operator, which describes local texture features. However, LBP is susceptible to image noise. To address this issue, the scale-invariant LBP (SILBP) operator is utilized, which is robust against scale changes but still insensitive to noise. Furthermore, the MD-SILBP operator is applied to handle both scale transformation and image noise problems. The operator arranges the central pixel with its neighbors in ascending order, finds the median, and compares it with the remaining pixel values to produce the encoding result. The three operators, LBP, LTP, and SILTP, are susceptible to random noise and equal-scale variation interference, leading to different coding results. The MD-SILTP coding method [25] can effectively mitigate these two interferences, indicating that the operator is robust to image noise and scale variation. \(p_{c}\) is the pixel value of the central pixel in the pixel region and \(p_{n}\) is the pixel value of the central pixel neighborhood in the pixel region. The following equation calculates the MD-SILBP operator. \[T_{MD-SILBP(r_{c},s_{c})}=concat\{T(\mu)(mid\{p_{c}\},p_{n})\}_{1}^{NUM} \tag{13}\]  
where \(T(\mu)\) is the threshold function of the scale factor \(\mu\), \(mid\{p_{c}\}\) is the median of all pixels in each pixel block, \(concat\{\cdot\}\) is the splicing operator of the binary string, and \(NUM\) is the number of neighborhood pixels in each sub-block. The threshold function is expressed as:  
\[T^{\mu}\big{(}p_{c^{\prime}},p_{n}\big{)}=\left\{ \begin{array}{l}10;p_{n}<(1 -\mu)mid\{p_{c}\}\\ 01;p_{n}>(1+\mu)mid\{p_{c}\}\\ 00;otherwise\end{array} \right. \tag{14}\]  
The texture histogram \(p_{s}\) is constructed by computing the MD-SILBP operator for each 8-neighborhood process with the probability of the occurrence of the whole image operator.