MORPHCLOSE_CVIP

morphclose_cvip() - perform morphological closing of a grayscale or color image.

Contents

SYNTAX

[outImage, struct_el] = morphclose_cvip(inImage, kType, kSize, kArgs)

Input Parameters include :

Output Parameter include :

DESCRIPTION

The function performs morphological closing of a grayscale image. Morphological closing operation is the combination of dilation followed by an erosion. The user can specify the kernel and its parameters, otherwise the default kernel and kernel parameters are selected.

REFERENCE

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

EXAMPLE

% Read image

 I = imread('cam.bmp');

% Call function using default parameters

  O1 = morphclose_cvip(I);      %Square kernel with size 3

% Call function using user specified parameters

 [O2, kernel] = morphclose_cvip(I,3,5,[5 3]); %5*5 rectangle kernel with rectangle width 5 and rectangle height 3

% Display input image

 figure;imshow(I);title('Input image');

% Display output image

 figure;imshow(O1,[]);title('Output image using default parameters');

 figure;imshow(O2,[]);title('Output image user specified parameters');

CREDITS

Author: Norsang Lama, June 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website