MEDIAN_FILTER_CVIP

median_filter_cvip() - performs a fast histogram-method median filter.

Contents

SYNTAX

new_image = median_filter_cvip( imageP,mask_size)

Input parameters include:

Output parameter include :

DESCRIPTION

This function performs median filtering operation on a noisy image. The functions works on the image on a block-by-block basis and replaces the noisy pixels with the median of the corresponding block of the image.

REFERENCE

1.Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read Image

 imageP = imread('salt_pep.bmp');

% Mask size

 mask_size = 7;

% Calling function

 new_image = median_filter_cvip(imageP,mask_size);

% Display input image

 figure;imshow(imageP);title('Input Image with pepper noise');

% Display output image

 figure; imshow(remap_cvip(new_image,[]));title('Output image');

CREDITS

Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website