GEOMETRIC_MEAN_CVIP

geometric_mean_cvip() - performs geometric mean filtering on an image.

Contents

SYNTAX

new_image = geometric_mean_cvip( imageP,  mask_size, ignore_zeros)

Input Parameters include :

Output Parameter include :

DESCRIPTION

Geometric mean filter is a non-linear mean filter which is better at removing gaussian type of noise and preserving edge features than the mean filter. The function scans the input image by windows of size mask_size and calculates the geometric mean of the elements in the window. The formula for geometric mean of N elements is as follows:

$$GM = (\prod_{i = 1}^{N} x_i)^{1/N}$$

Whenever there is a zero pixel in the window, the GM would be zero. Zeros can be replaced by 1 before calculation, using the optional argument ignore_zeros. The default value for ignore_zeros is 0. Any value other than 0 for ignore_zeros results in replacing zeros with 1 in the calculations.

REFERENCE

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

EXAMPLE

% Read Image

 imageP = imread('Butterfly.gaussian.tif');% Input image with gaussian noise added.

% Mask size

 mask_size = 7;

% Call function

 new_image = geometric_mean_cvip(imageP,7,1);

% Display input image

 figure;imshow(imageP);title('Input Image');

% Dispaly output image

 figure; imshow(new_image,[]);title('Output Geometric mean filtered Image');

CREDITS

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