## 4 Experimental Results and Discussion
### Results and Discussion
#### 4.2.2 Contrastive Denoising with Continuous Increase in Noise Density  
To visually illustrate the contrastive denoising effects achieved using the different algorithms, a continuous artificial increase in the noise density from 5% to 95% in increments of 5% was carried out to exhibit the denoising effects. The three classical algorithms with the parameters of PSNR and SSIM were utilized to evaluate the ability of the proposed improved TSETMF algorithm to process the first classical image, Lena. Table S1 represents PSNR comparison data from different algorithms processing Lena with increasing noise density. Figure 6 presents a change map of the PSNR with continuously increasing noise density according to the different algorithms' processing of Lena. As can be seen from Figure 6, the PSNR values of the PDBTMF algorithm when processing the Lena image begin to slowly decline after around 20% noise density and the decline accelerates rapidly after 70% noise density. The PSNR values of the MDBMF algorithm begin to slowly decline after around 20% noise density and, then, the decline accelerates after 50% noise density. The stability of MDBMF's processing effects is a little worse than that of PDBTMF. Although the PSNR values of the ADTMF algorithm show a relatively smooth declining tendency, the processing of the salt and pepper noise in the Lena image is poor. Compared with the other three filtering algorithms, the PSNR values of the proposed improved TSETMF algorithm at a 95% high-noise density reach 24.97 dB, which is much higher than that of PDBTMF at 10.63 dB, MDBMF at 18.11 dB, and ADTMF at 6.17 dB. In summary, the PSNR values of the proposed improved TSETMF algorithm always stabilize at around 25 dB and decline slowly with increasing noise density. This demonstrates that the proposed improved TSETMF algorithm can effectively enhance denoising stability when processing different noise densities. Figure 6: Change map of PSNR with continuously increasing noise density for different algorithms processing Lena. In addition, Table S2 represents SSIM comparison data from different algorithms processing Lena with increasing noise density. Figure 7 presents the change map of the SSIM with continuously increasing noise density for the different algorithms processing Lena. For low-density noise, the PDBTMF algorithm exhibits relatively stable SSIM; however, it drops rapidly after around 40% noise density. The MDBMF algorithm obtains relatively higher SSIM but drops rapidly after around 60% noise density. The ADTMF algorithm possesses the highest SSIM under around 20% noise density. In summary, the SSIM values of the proposed improved TSETMF algorithm always stabilize above 0.81 with continuously increasing noise density. This demonstrates that the proposed improved TSETMF algorithm can effectively maintain the quality of the processed image at different noise densities, especially for high-density salt and pepper noise. It should be noted that the required running time of the proposed TSETMF algorithm is basically around 3.7 s, which is much faster than of the ADTMF algorithm. Differing from the other algorithms, although the proposed TSETMF algorithm has a relatively larger running time than that of the PDBTMF and MDBMF algorithms, it exhibits relatively stable states with increasing noise density, especially for high-density noise. Hence, this also demonstrates that the proposed TSETMF algorithm is insensitive to variable noise density. To calculate the values of PSNR and SSIM, parameter variance is adopted. For the noise density calculations of the image, local variance in different areas, such as the noise index, can be utilized to analyze the grayscale image. Calculating the pixel value variance in each area can obtain the noise level in different areas. That is, a higher variance usually exhibits relatively stronger noise density. As a result, the noise levels of the whole grayscale image can be calculated to acquire the values of PSNR and SSIM for further comparison of the denoising effects of the algorithms.