Topic: The running Max and min filters are the two extremes of the rank-order filters. They are very effective in removing pepper noise and salt noise, respectively, from an image, but perform very poorly in removing mixed impulse noise, such as salt and pepper noise, since they tend to amplify the bright and dark regions of the image, respectively.
Exercise: Create a Python script file and perform the following tasks:
- Import OpenCV and NumPy libraries.
- Create a function that takes as input an image and the size of the running Max filter and performs running Max filtering on the image. Then, it returns the filtered image. You can add any extra parameters you desire.
- Create a function that takes as input an image and the size of the running min filter and performs running min filtering on the image. Then, it returns the filtered image. You can add any extra parameters you desire.
- Read an image.
- Corrupt the image with salt and pepper, salt, or pepper noise.
- Apply either running Max or running min filtering to the noise image.
- Finally, display the noise image alongside the filtered one.
Instructions and Material for solution: Click Noise_Functions & Image download the exercise material.
Help (if needed): Click Pdf download the exercise help.
Lecture for better understanding: https://icarus.csd.auth.gr/image-filtering-lecture/
This exercise was developed by C. Georgiadis.
————————————————————————————————————–
For the solutions to the exercises, please contact koroniioanna@csd.auth.gr