Draft:Alpha-trimmed filter

The alpha-trimmed filter is a statistical tool used in image processing for noise reduction.: It combines elements of both median and mean filters, leveraging their advantages. The filter operates by discarding a specified number of the smallest and largest values in a dataset, guided by a trimming parameter alpha (α) which ranges from 0 to 0.5. The trimmed mean is then calculated from the remaining values, striking a balance between the median and moving average filters. This approach is particularly effective at reducing noise while maintaining the integrity of the original signal, making it a valuable technique for image enhancement and noise reduction. This is an algorithmic approach that tries to combine properties of the mean filter with properties of the median filter.

Removal of salt and pepper noise
The proposed system involves developing an adaptive alpha-trimmed median filter designed to eliminate salt and pepper noise from digital images. This filter selectively adjusts corrupted pixel values, effectively restoring images while preserving edge details. When tested across different noise levels, the filter consistently shows enhanced performance in terms of PSNR and IEF, highlighting its significant contribution to digital image processing.

Code
The alpha-trimmed mean filter algorithm takes the general formula
 * 1) Select a suitable value of alpha
 * 2) Arrange all the image pixel values in increasing or decreasing order
 * 3) Trim alpha elements from the start and end
 * 4) Take average of the remaining pixel values

The entire algorithm as function:

Ordered List
The ordered list is:


 * F = { 10, 12, 18, 19, 19, 20, 20, 21, 22 }

For α = 1
Trim 1 smallest and 1 largest elements. Remaining list:


 * { 12, 18, 19, 19, 20, 20, 21 }

Mean:


 * (12 + 18 + 19 + 19 + 20 + 20 + 21)/7 = 129/7= 18.43

For α = 2
Trim 2 smallest and 2 largest elements. Remaining list:


 * { 18, 19, 19, 20, 20 }

Mean:


 * (18 + 19 + 19 + 20 + 20)/5 = 96/5 = 19.2

For α = 3
Trim 3 smallest and 3 largest elements. Remaining list:


 * { 19, 19, 20 }

Mean:


 * (19 + 19 + 20)/3 =58/3=19.33

For α = 4
Trim 4 smallest and 4 largest elements. Remaining list:


 * { 19 }

Mean:


 * 19