|
| 1 | +# Median Filtering on Image(SMF) |
| 2 | +Median Filtering is a neighborhood filtering technique used in order to remove noise from images and enhance its quality. |
| 3 | + |
| 4 | +Often during Image capturing and acquisition(specially in medical images) the image is disturbed by Salt and Pepper Noise(SPN)[Original pixel replaced by either maximum intenstiy pixel |
| 5 | +or minimum intensity pixel] which mainly occurs due to certain faults in sensors |
| 6 | +while capturing the image. Having noise in image makes it difficult for Computer Aided Detection(CAD). Nowadays, many Machine Learning and Deep Learning techniques are being applied on |
| 7 | +medical images for computer aided diagnosis to reduce human error. Image Preprocessing is an important stage before the image can be fed to the model. Not restricting to that itself, |
| 8 | +Image Enhancement plays an important role in improving the quality of images and removing errors/noises from them. |
| 9 | + |
| 10 | +## Algorithm |
| 11 | +The main idea of the median filter is to run through the signal entry by entry, replacing each entry with the median of neighboring entries. |
| 12 | +The pattern of neighbors is called the "window", which slides, entry by entry, over the entire signal. For one-dimensional signals, the most obvious window is just the |
| 13 | +first few preceding and following entries, whereas for two-dimensional (or higher-dimensional) data the window |
| 14 | +must include all entries within a given radius or ellipsoidal region (i.e. the median filter is not a separable filter). |
| 15 | + |
| 16 | +In Median filtering the edge detection becomes a bit difficult but that again is improved as we switch to fuzzy removal of noise. Median Filter is the most commonly used filter |
| 17 | +just for the fact that it is computationally faster than other existing techniques. |
| 18 | + |
| 19 | +## Metric Calculation |
| 20 | +The popular metrics for judging the quality of enhancement technique are - RMSE, PSNR, SSIM, & IEF. |
| 21 | + |
| 22 | +These are statistical measures that judge the quality of output relying on data and mathematics. |
| 23 | + |
| 24 | +Check on the links to have a brief idea about the concepts. In *Median_Filter.c* these concepts are applied for images where each pixel acts as a data point. |
| 25 | + |
| 26 | +1. Root Mean Squared Error(RMSE) - [Click To Know More](https://en.wikipedia.org/wiki/Root-mean-square_deviation) |
| 27 | + |
| 28 | +2. Peak Signal to Noise Ratio(PSNR) - [Click To Know More](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio) |
| 29 | + |
| 30 | +3. Structural Similarity(SSIM) - [Click To Know More](https://en.wikipedia.org/wiki/Structural_similarity) |
| 31 | + |
| 32 | +4. Image Enhancement Factor(IEF) - [Click To Know More](https://in.mathworks.com/matlabcentral/answers/450377-how-to-calculate-enhancement-factor-for-an-image) |
| 33 | + |
| 34 | +## Results |
| 35 | +The SMF technique is used for removal of Salt and Pepper Noise but works well with other noises as well. SMF works well for upto 60% noise percentage. Above that it fails, new algorithms such as |
| 36 | +fuzzy median technique, Adaptive Weighted Mean Filtering technique and a lot more have been introduced as an add on of this algorithm and that works upto 85% noise. |
0 commit comments