MORPH_HITMISS_CVIP

morph_hitmiss_cvip() - perfoms morphological hit-miss transform of a binary image.

Contents

SYNTAX

[outImage] = morph_hitmiss_cvip(inImage, hitmissFilt)

Input Parameters include :

Output Parameter includes:

DESCRIPTION

The function performs morphological hit-miss transform on a binary image. If input image is a color or gray-scale image, binary thresholding is performed before the hit-miss operation. The hit-miss filter is a structuring element containing 0's, 1's and NaN's or "don't care". Don't care element is represented by NaN value in this case. And, don't care elements in the structuring element match with either 0s or 1s.

REFERENCE

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

EXAMPLE

% Read image

 I = imread('shapes.bmp');

% Call function using default hit-miss filter

 O1 = morph_hitmiss_cvip(I);

% Call function using user specified hit-miss filter

 kernel = [0 0 0; nan 1 nan; 1 nan 1];

 O2 = morph_hitmiss_cvip(I,kernel);

% Display input image

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

% Display output image

 figure;imshow(O1,[]);title('Output image using default hit-miss filter');

 figure;imshow(O2,[]);title('Output image using user-specified hit-miss filter');

CREDITS

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