ORIENTATION_CVIP
orientation_cvip() - calculates the axis of least second moment for a binary object
Contents
SYNTAX
theta = orientation_cvip(labeledImage,[ r, c])
Input Parameter 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 Parameter include :
- theta - The orientation of the binary object.
DESCRIPTION
This function calculates the orientation of a binary object about an axis or calculates the axis of least second moment of the binary object. This axis corresponds to the line about which it takes the least amount of energy to spin an object of like shape or the axis of least inertia.
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')); % Call function theta = orientation_cvip(labeledImage, [391 139])
theta = 0
CREDITS
Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website