I need to test some basic image processing techniques in Matlab. I need to test and compare especially two types of filters: mean filter and median filter.
To smooth image using median filtering, there is a great funtion medfilt2
from image processing toolbox. Is there any similar function for mean filter? Or how to use the filter2
function to create the mean filter?
One of the most important things for me is to have the possibility of setting radius of the filter. I.e. for median filter, if I want the [3 x 3] radius (mask), I just use
imSmoothed = medfilt2(img, [3 3]);
I would like to achieve something similar for mean filter.