## 3 Proposed Method
### EIG (Exposure Image Generator)  
For static scenes, multiple low dynamic range images with different exposure settings can be combined to produce a single high dynamic range image. The question of how to obtain the exposed images involved in the fusion becomes a critical one. If the exposure setting of the image is changed on a pixel-by-pixel basis, the exposure of each pixel can be adjusted independently, allowing direct tone mapping without the need to construct intermediate HDR images. We were inspired to design the Exposure Image Generator (EIG). The EIG consists of three main steps. The first is to determine the optimal exposure factor for each pixel, and the second is to recombine the luminance and hue information using spatial bilateral filters, while estimating the pixel contribution by the difference between the intensity of each pixel and the intensity of the central pixel. EIG as an image processing algorithm greatly saves computational resources and avoids the deterioration of fusion results due to the unavailability of information from some images in the multiexposure image sequence. Next, the details of each step are described in detail. **Exposure factor:** A prerequisite for acquiring exposure-corrected images is the need to determine the number of dimensions of the low-light image and the exposure factor corresponding to each pixel. Compared with the multiexposure image acquisition process, EIG can select the optimal exposure factor for each pixel, expanding the dynamic range and reducing noise within the spatial neighborhood at the pixel level. Moreover, it exposes hidden details in the scene that are barely visible. How to obtain the exposure factor matrix \(K_{H\times W}\) corresponding to the original input image? First, spatial Gaussian blur is used to reduce the noise in the luminance component of the low-light image. The spatially uniform tone mapping function \(T(x,\mu)\) is applied to the spatial Gaussian blur result of the image to obtain the exposure factor \(\lambda\) for each pixel. The role of \(\lambda\) is to multiply with the spatial domain kernel and pixel domain kernel in the bilateral filter and the pixel values to obtain the contribution value of each pixel. \(T(x,\mu)\) is a nonlinear mapping function, where the parameters are independent parameters used in the tone-mapping process to attenuate the image detail layer and adjust the contrast of the global layer features. \[T(x,u)=\frac{\log\{\frac{x}{xMax}(\mu-1)+1\}}{\log(\mu)} \tag{1}\]  
where \(xMax\) is the parameter that controls the input brightness level, and \(u\) is the parameter that controls the decay curve. The hue mapping function \(T(x,\mu)\) is similar to the conventional gamma function, but at pixel intensities close to 0, \(T(x,\mu)\), it does not suffer from severe slope disappearance like gamma correction, nor does it overemphasize dark areas. **Spatial Bilateral Filter (SBF):** SBF is a nonlinear filter that performs a weighted average of neighboring pixels to represent the intensity of the central pixel. Each pixel after filtering is a weighted average of its domain pixels (as shown in figure 3). Since the spatial bilateral filter combines the spatial proximity and pixel value similarity of the central pixel, while considering the spatial domain information and grayscale similarity, it achieves the effect of preserving edge information and noise reduction and smoothing. In this study, the exposure factor is multiplied with the central pixel and its spatial domain kernel value and pixel domain kernel value in the SBF to readjust the pixel intensity of each pixel. We introduce a pixel intensity difference value \(R(m,p)\) in the bilateral filter to estimate the contribution of a pixel by the difference between the intensity of each pixel and the intensity of the central pixel.