MORPHOPEN_CVIP

morphopen_cvip() - perform morphological opening of a grayscale or color image.

Contents

SYNTAX

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

Input Parameters include :

Output Parameter includes:

DESCRIPTION

The function performs morphological opening of a grayscale image. Morphological Opening is the combination of Erosion followed by Dilation. 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 = morphopen_cvip(I);        %Square kernel with size 3

% Call function using user specified parameters and get two outputs (output image and kernel)

 [O2, kernel] = morphopen_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