## 4 Experimental Results and Discussion
### Results and Discussion
#### 4.2.2 Contrastive Denoising with Continuous Increase in Noise Density
In order to verify the advantages in image detail reservation ability using the proposed TSETMF algorithm, a partial Lena image with the addition of 95% salt and pepper noise was utilized to perform denoising, as illustrated in Figure 8. By employing two-dimensional maximum Shannon entropy coupled with pixel difference mean, an image detail can be judged to determine whether it is noise. The filtering processes for a local area in Figure 8b are presented in Figure 8c-e. Pixel 255 in Row 1 and Column 5 in Figure 8c is judged as  
Figure 7: Change map of SSIM with continuously increasing noise density for different algorithms processing Lena. the image detail; however, the central pixel in Row 3 and Column 3 is judged as the noise. The central pixel value is then changed to 127 in Figure 8d. After gradual processing of all pixel values in the red area, the replacement results are exhibited in Figure 8e. As can be seen from the filtering of the partial Lena image shown in Figure 8f, the proposed TSETMF algorithm can clearly achieve a better filtering effect by retaining the image details when denoising high-density-noise images. In terms of visual effects, the denoising of the Lena image using the proposed TSETMF algorithm with various added salt and pepper noise densities of 30%, 50%, 70%, and 90% is shown in Figure 9. The results demonstrate that the quality of each denoised image increases remarkably and there are minor influences regardless of the changes in noise density. This may be interpreted using the high-efficiency noise judgment and recursion method, where highly efficient noise judgment can be accomplished using the two-dimensional maximum Shannon entropy threshold values. By utilizing the recursion method to achieve median replacement, filtering can be conducted by the processed adjacent pixels. This can induce the effects of the noise on an image immensely. The experiments indicated that the proposed TSETMF possesses strong robustness and is highly efficient in reducing high-density salt and pepper noise. By utilizing the three classical algorithms, the PSNR and SSIM parameters were utilized to evaluate the abilities of the proposed improved TSETMF algorithm while processing the second classical image, Cameraman. Table S3 represents PSNR comparison data from different algorithms processing Cameraman with increasing noise density. Figure 10 presents the change map of PSNR with continuously increasing noise density for different algorithms processing Cameraman. Figure 10 shows that when the noise density varies from 5% to 95% in Cameraman, the PSNR values of the PDBTMF, MDBMF, and ADTMF algorithms decline steeply from 33.95 dB to 9.64 dB, from 34.81 dB to 15.02 dB, and from 22.96 dB to 5.77 dB, respectively. However, the decrease in the PSNR values of the proposed improved TSETMF algorithm is relatively minor, from 23.1 dB to 20.61 dB, with a mere  
Figure 8: Experimental verification of image detail reservation ability using the proposed TSETMF algorithm. (**a**) Original Lena image. (**b**) Partial Lena image with the addition of 95% salt and pepper noise. (**c**) Pixel point inside (**b**), processed using the proposed TSETMF. (**d**) Replacement result of central pixel value inside (**c**). (**e**) Replacement results of pixel values in the red area after gradual processing. (**f**) The filtering effect of partial Lena image using the proposed TSETMF. 10.78% decline ratio. This can directly demonstrate that the proposed improved TSETMF algorithm has the most stable ability to process high-density noise. In other words, it works independently of noise density effects to accomplish the high-quality denoising of grayscale images. In addition, Table S4 represents SSIM comparison data from different algorithms processing Cameraman with increasing noise density. Figure 11 presents a change map of SSIM with continuously increasing noise density for different algorithms processing Cameraman.