PERIMETER_CVIP
perimeter_cvip() - calculates perimeter of a binary object.
Contents
SYNTAX
p = perimeter_cvip(labeledImage, [r, c])
Input Parameters include :
- labelImage - Label image of MxN size with single object or multiple objects. Each object has unique gray value.
- r - The row number of a pixel on the object. positive integer.
- c - The column number of a pixel on the object. positive integer.
Output Parameters include :
- p - The perimeter of the binary object.
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