We will start in the usual way and try to remove the salt & pepper noise from our image, using the median filtering function offered by MATLAB.
>> img = imread('holiday_image2.bmp'), >> snp = imnoise(img,'salt & pepper'),
>> denoised = medfilt2(snp,[5,5]);figure >> subplot(1,3,1),imshow(img),title('Original image') >> subplot(1,3,2),imshow(snp),title('Noisy image (Salt&Pepper)') >> subplot(1,3,3),imshow(denoised),title('Denoised image')
This is much better. It seems that we have found our preferred filtering solution for the case of salt and pepper noise. The only thing we did was to apply median filtering to our image that was distorted by salt and pepper noise, using a 5x5 kernel.
Now that you have learned most of the filters for noise removal, it is time to put them to the test with real noise. You should download problematic pictures, for example, taken with a high ISO setting, or bad JPEG compression artifacts and then try to find which filter can de-noise them more successfully. A simple search for noisy images on the internet should provide a multitude of examples to work on.