PERIMETER_CVIP

perimeter_cvip() - calculates perimeter of a binary object.

Contents

SYNTAX

p = perimeter_cvip(labeledImage, [r, c])

Input Parameters include :

Output Parameters include :

DESCRIPTION

This function calculates the perimeter of a binary object in a labeled Image specified by the Row and Column coordinates given as inputs by the user. Perimeter of an object is found by counting the number of "1" pixels in the object that have "0" pixels as neighbors. The Perimeter of an object gives us information about the shape of that object.

REFERENCE

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

EXAMPLE

% Read image

 labeledImage = label_cvip(imread('Shapes.bmp'));

% Calling function

 theta = perimeter_cvip(labeledImage,  [391  139])
theta =

   140

CREDITS

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