## 3 Materials and Methods
### EIM Data Processing and Classification
#### 3.3.2 Fusion Methods  
A. The CLAHE fusion method enhanced the local contrast of the EIM images. CLAHE was applied individually to each layer; subsequently, the final fused image was generated using a weighted integration scheme. Equation (4) shows how the fusion was performed, where \(I_{k}^{\text{CLAHE}}\) represents the \(k\)th EIM layer (\(N=7\)) after applying CLAHE, and the parameter \(\alpha_{k}\) corresponds to the weight assigned to each layer, determining its relative contribution to the final image. \[C=\sum_{k=1}^{N}\alpha_{k}\cdot I_{k}^{\text{CLAHE}} \tag{4}\]  
Since greater importance was given to the superficial layers, the weight assignment was based on a decreasing linear sequence, in which the first value was the highest and the last was the lowest. This sequence was defined as a uniform arithmetic progression starting at 1.0 and ending at 0.1, evenly distributed among the \(N=7\) layers. The increment between each term was calculated using the following expression, which corresponds to the difference between the extremes divided by the number of intervals:  
\[\Delta=\frac{1.0-0.1}{N-1}=0.15 \tag{5}\]  
Subsequently, the weights were defined and then normalized so that their sum would equal 1. The complete normalization shown in Equation (6) was used:  
\[\alpha_{k}=\frac{1.0-(k-1)\cdot\Delta}{\sum_{j=1}^{N}(1.0-(j-1)\cdot\Delta)} \tag{6}\]  
The total sum of the unnormalized weights was  
Figure 3: Scheme of EIM integration using \(C_{\text{RMS}}\). \[\sum_{j=1}^{7}(1.0-(j-1)\cdot 0.15)=3.85\]  
Thus, the final values of \(\alpha_{k}\) that we used were  
\[\alpha=[0.2597,\ 0.2208,\ 0.1818,\ 0.1429,\ 0.1039,\ 0.0649,\ 0.0260]\]  
A recent implementation of CLAHE with automatic parameter selection--designed especially for contrast enhancement--combined with fusion schemes was demonstrated by [PERSON] et al. (2018), who introduced automatic Contrast-Limited Adaptive Histogram Equalization with dual gamma correction targeting both contrast and luminance preservation [36]. B. The Gaussian pyramid fusion method is based on the multiscale decomposition of each image, allowing for an integrated representation that preserves both the local and global features of the EIM. To optimize the method's performance, the number of pyramid levels was set to \(L=4\), ensuring a balance between information retention and computational efficiency through progressive subsampling. Each image was hierarchically decomposed using its corresponding Gaussian pyramid, where at each level, \(L\), a smoothing filter was applied, followed by image downsampling. The fusion process assumed an equal contribution from all decomposition levels, assigning a uniform weight of \(w^{L}=\frac{1}{7}\) to each of the seven images. As shown in Equation (7), the fused pixel value \(G_{f}^{L}(x,y)\) at position \((x,y)\) and level \(L\) was computed as the sum of the corresponding pixel values, \(G_{i}^{L}(x,y)\), from each image, \(i\), weighted by \(w^{L}\):  
\[G_{f}^{L}(x,y)=\sum_{i=1}^{7}w^{L}\cdot G_{i}^{L}(x,y) \tag{7}\]  
Afterward, an inverse pyramid reconstruction was performed to obtain the final fused image. This process began at the lowest resolution level and progressively upsampled each level through interpolation, adding the fused details from the higher resolution level at each step. This procedure, defined by the Inverse Pyramid Reconstruction Equation, is expressed as  
\[I^{(l)}=\text{Expand}(I^{(l+1)})+G_{f}^{(l)} \tag{8}\]  
where \(I^{(l)}\) is the reconstructed image at level \(l\), \(\text{Expand}(I^{(l+1)})\) represents the image from level \(l+1\) upsampled to match the size of the image from level \(l\), and \(G_{f}^{(l)}\) is the fused image at level \(l\). The inverse pyramid reconstruction approach was originally introduced by [PERSON] and [PERSON] [37]. The complete Gaussian pyramid fusion process is illustrated in Figure 4. This method enables the generation of a multiscale, integrated representation of breast tissue, dynamically adapted to the image size, ensuring efficient and robust fusion.