## 3 Method
### Target Area Extraction  
The first link of reflection removal is to extract the reflection region to be removed, because the position of the reflection region only changes with the light position during the vehicle travel; the reflection image on the front windshield of the vehicle generally does not change. But the reflection region cannot be completely identified according to the intensity of light, and the phenomenon is shown in Figure 4. This paper defines the region of interest \(A=\{A_{1},A_{2},\ldots,A_{n}\}\) as a region of interest based on graying the detection area, pre-setting the selection threshold range \([S_{i},S_{j}]\), and selecting regions with similar grayscale values. The area of this region needs to be larger than the set threshold range. By calculating the edge gradient difference of the target area in each image \(T_{i}\) in image sequence \(T=\{T_{1},T_{2},\ldots,T_{n}\}\), we compare the edge gradient difference \(D\) of the target reflection area with the set range threshold \(D_{c}\). If \(D\leq D_{c}\), we reduce the brightness in the region of interest except for the target reflection area and reassign the weight of the image; if \(D>D_{c}\), there is no need for lighting compensation. Then, the MSER algorithm is used to calculate the regional range difference \(AN_{i}\). The regional set spacing is \(DN_{j}\)[32], and the extraction of the maximally stable extremal regions is represented by \(Q_{-}\{i^{*}\}\). The specific procedure is as follows. Step 1: Video framing. The acquired video is frame separated to obtain image sequence \(T=\{T_{1},T_{2},\ldots,T_{n}\}\). Step 2: Region of interest (ROI) extraction. According to the grayscale processing of the detection region \(G=\{G_{1},G_{2},\ldots,G_{n}\}\), the selection threshold range \([S_{i},S_{j}]\) is preset, and a region of a similar grayscale value is selected. The area of the region needs to be larger than the set threshold range \([S_{i},S_{j}]\). The region is defined as the region of interest \(A=\{A_{1},A_{2},\ldots,A_{n}\}\). Step 3: Illumination compensation. By calculating the edge gradient difference of the target region in each picture \(T_{i}\) in the image sequence \(T=\{T_{1},T_{2},\ldots,T_{n}\}\), the edge gradient difference \(D\) of the target reflective region is compared with the set range threshold \(D_{c}\). If its gradient difference \(D\leq D_{c}\), the luminance in the region of interest other than the target reflective region is reduced, whereas the luminance is normalized. The luminance component coefficient is set by the luminance influence factor, and the luminance estimate \(B_{0}(x,y)\) is obtained. The luminance is adjustment based and combined with the gamma correction function \(I_{f}(x,y)\) to assign weights to the images acquired in YUV space, as well as HSV space, to obtain the processed image \(D>D_{c}\). Step 4: The MSER algorithm is used to extract the maximum stable extreme value region \(Q_{-}\{i^{*}\}\). Among them, steps 5-7 are the specific operating steps for MSER. Step 5: Region range difference \(AN_{i}\) calculation. For the two frames acquired in the experiment, the set of MSER regions for the before and after frames are assumed to be \(Af=\{Af_{1},Af_{2},\ldots,Af_{n}\}\) and \(As=\{As_{1},As_{2},\ldots,As_{n}\}\), respectively. \(A_{i}\) is the set of the differences between the \(i\)th MSER region range in the previous frame and the unmatched  
Figure 4: A diagram of the unchanged reflection area. region in the next frame. The set \(A_{i}\) is normalized, and the effect of normalization is denoted by \(AN_{i}\), where \(AN_{i}=\frac{A_{i}-\min(A_{i})}{\max(A_{i})-\min(A_{i})}\). Step 6: The region set spacing \(DN_{j}\) is calculated. Suppose the set of MSER region masses in the front and back images are \(Df=\{Df_{1},Df_{2},\ldots,Df_{m}\}\) and \(Ds=\{Ds_{1},Ds_{2},\ldots,Ds_{m}\}\), respectively, \(D_{j}\) is the set of distances between the \(j\)th MSER region range in the former image and the unmatched region in the latter image.