# Shadow Removal for Enhanced Nighttime Driving Scene Generation
## 3 Proposed Method
### Partitioned Shadow Removal
In addition, throughout the entire computational process, line operations are performed consistently for the same \(x\)-coordinate. Non-overlapping regions retain the original content of either \(\Omega_{1}\) or \(\Omega_{2}\) without modification. Similarly, the vertical blending operation is expressed as:  
\[I(x,y)= \begin{cases}\Omega_{1}^{*}(x,y)&\text{if }y<y_{o}\\ \left(1-\frac{y-y_{o}}{H}\right)\Omega_{1}^{*}(x,y)+\frac{y-y_{o}}{H}\Omega_{2 }^{*}(x,y-y_{o})&\text{if }y_{o}\leq y\leq y_{o}+H\\ \Omega_{2}^{*}(x,y-y_{o})&\text{if }y>y_{o}+H\end{cases}  \tag{2}\]  
Figure 1: Examples of ISTD [8], SRD [9], and Cityscapes [60] datasets. The equation \(I(x,y)\) represents the resulting stitched image, where \(\Omega_{1}^{*}\) denotes the image positioned at the upper part, and \(\Omega_{2}^{*}\) denotes the image positioned at the lower part. \(y_{o}\) signifies the point where the overlapping region begins, and H denotes the height of the overlap. The coordinates \(x,y\) are defined with respect to the resultant image \(I\), meaning \(\Omega_{2}^{*}\) is shifted downward by \(y_{o}\). The term \(y-y_{o}\) used for weighting varies from 0 to \(H\) across the entire overlapping region based on the value of \(y\). Figure 3 illustrates that incorporating the stitching process in proposed Shadow Removal is crucial for generating results that closely resemble real-world driving scenes. In natural images, when two adjacent narrow regions are arbitrarily selected, their brightness levels typically align, resulting in similar histogram distributions. The histograms shown in Figure 3 represent the pixel distribution of the Y-channel in the YCbCr color space for two regions: a 30-pixel band above and a 30-pixel band below the vertical one-third line of the image. The blue graph corresponds to the upper region, while the red graph depicts the lower region. In contrast, as observed in (b), which shows the results without stitching, the histograms of these regions exhibit significantly different distribution shapes, a deviation from the characteristics of natural driving scenes. Table 1 further underscores this, revealing that significant differences in the mean Y-channel values between the two regions only emerge when the stitching step is excluded. Figure 3: Comparing histogram characteristics with and without stitching between partitions. Figure 2: Illustration of the proposed Partitioned Shadow Removal (the highlighted parts refer to the novelty of the paper). We measured the inference time for three state-of-the-art shadow removal models and the proposed method. The experimental environment of each model provided by the original paper has been used for fair comparison in our hardware configuration. The hardware configuration used was exactly as described in Section 4.2.1 of the Experiment and Discussion section. We selected 100 random samples and measured the inference time required for the shadow removal process, then calculated the average time. The stitching process in the proposed method, executed on a CPU environment, takes an average of 0.04 s, and this value is also included in the data shown in the table. As shown in Table 2, the proposed method generally requires more processing time compared to a baseline method. As this work has been focused on showing the feasibility of a new approach, future works need to be planned for enhancing the efficiency of conducting shadow removal.