# Multi-Exposure Image Fusion Based on Weighted Average Adaptive Factor and Local Detail Enhancement
## 3 Proposed Methods
### Local Detail Enhancement
#### 3.4.2. _FLLF-Based Enhancement of Brighter_ and Darker Regions  
For each input image \(Y_{k}\), we use the traditional Laplacian pyramid method to construct an initial Laplacian pyramid \(L\big{\{}Y_{k}(x,y)\big{\}}^{d}\), where \(d\) represents the number of pyramid levels, defined as follows:  
\[d=log_{2}(\min(h,w)) \tag{12}\]  
where \(h\) and \(w\) represent \(Y_{k}\) length and width. For the DoE region in the over-exposed image(OEI) and the BoE region in the low-exposure image (LEI), we use FLLF to enhance the details of the two regions. Firstly, calculate the Gaussian pyramid \(g=G(x,y)\) of the OEI and LEI, and then use a set of \(\sigma_{j}\) from small to large (\(\sigma_{1}<\sigma_{2}<\ldots<\sigma_{s}\)) to regularly sample the value range of \(g\), where \(1\leq j\leq s\) and \(s\) is the sampling time. For a sampled value \(\sigma_{j}\) of \(g\) in the DoE and BoE, calculate the local Laplacian pyramid coefficient  
Figure 7: Local detail-enhancement framework.  
\(L\bigg{\{}R\big{(}Y_{k}^{DoE,BoE}(x,y)\big{)}_{\sigma_{j}}\bigg{\}}^{d}\), where \(R(i)\) represents the remapping function of \(g\), defined as follows:  
\[R(i)=g+\tau\frac{i-g}{|i-g|}\bigg{(}\frac{i-g}{\tau}\bigg{)}^{\alpha} \tag{13}\]  
where \(\tau\) is used to distinguish edges from details, and \(\alpha\) is a parameter used to control the amount of detail enhancement. In this paper, \(\tau\) and \(\alpha\) are set to 0.5 and 0.25, respectively. For the pyramid coefficient of a specific \(g\) at the \((x,\,y)\) position of the \(d\) layer, under the condition that \(\sigma_{j}\leq g\leq\sigma_{j+1}\), use \(g=(1-a)\sigma_{j}+a\sigma_{j+1}\) calculate the interpolation parameter \(a\), and then use linear interpolation to calculate the corresponding pyramid coefficients in the DoE and BoE:  
\[L\Big{\{}O_{OEI}^{DoE}(x,y)\Big{\}}_{i}^{d}=(1-a)L\bigg{\{}R\big{(}Y_{OEI}^{ DoE}(x,y)\big{)}_{\sigma_{j}}\bigg{\}}_{i}^{d}+aL\bigg{\{}R\big{(}Y_{OEI}^{ DoE}(x,y)\big{)}_{\sigma_{j+1}}\bigg{\}}_{i}^{d} \tag{14}\]  
\[L\Big{\{}O_{LEI}^{BoE}(x,y)\Big{\}}_{q}^{d}=(1-a)L\bigg{\{}R\big{(}Y_{LEI}^{ BoE}(x,y)\big{)}_{\sigma_{j}}\bigg{\}}_{q}^{d}+aL\bigg{\{}R\big{(}Y_{LEI}^{ BoE}(x,y)\big{)}_{\sigma_{j+1}}\bigg{\}}_{q}^{d} \tag{15}\]  
where \(L\big{\{}O_{OEI}^{DoE}(x,y)\big{\}}_{i}^{d}\) represents the enhancement coefficient value of the \(d\) layer pyramid of the \(i\)th over-exposed image in the DoE area. To make the fused image have better details, take the maximum value of the coefficient values of the same pyramid level:  
\[L\Big{\{}O_{OEI}^{DoE}(x,y)\Big{\}}_{Max}^{d}=Max\bigg{\{}L\Big{\{}O_{OEI}^{ DoE}(x,y)\Big{\}}_{i}^{d}\bigg{\}} \tag{16}\]  
\[L\Big{\{}O_{LEI}^{BoE}(x,y)\Big{\}}_{Max}^{d}=Max\bigg{\{}L\Big{\{}O_{LEI}^{ BoE}(x,y)\Big{\}}_{q}^{d}\bigg{\}} \tag{17}\]  
Figure 8: Analysis of areas of interest. (**a**) Over-exposed image. (**b**) Normal-exposure image. (**c**) Low-exposure image. (**d**) Pixel intensity analysis of the red region in (**a**–**c**). (**e**) Pixel intensity analysis of the yellow area in (**a**–**c**). (**f**) Brightest area. (**g**) Darkest area.