adapt_median_filter_cvip() - a ranked-order based adaptive median filter.
new_image = adapt_median_filter_cvip( imageP,wmax)
Input Parameters Include :
- imageP - Input image can be gray image or rgb image of MxN size.
- wmax - The maximum value for filter block size. An odd integer between 3-11.
Output Parameter Include :
- new_image - The output image after adaptive contrast filtering
The function removes the positive and negative impulse noises in the input image. It works on the image block by block and applies the filter.The blocks are of the user specified size.Positive and Negative impulse noises are the Salt and Pepper noises present in the Image.
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
% Read Image , Input Image with salt and pepper noise added. imageP = imread('Flowers.bmp_saltpepper3.bmp'); % Maximum value of filter block size. wmax = 11; % Call function new_image = adapt_median_filter_cvip( imageP,11); % Display Input Image figure;imshow(imageP);title('Input Image'); % Display output image figure; imshow(remap_cvip(new_image));title('Output Image');