THINNESS_CVIP

thinness_cvip() - calculate the thinness ratio of a binary object.

Contents

SYNTAX

t = thinness_cvip(labeledImage, [r, c])

Input Parameter include :

Output Parameter include :

DESCRIPTION

This function calculates the Thinness ratio of a binary object. The binary object in the Labeled Image is specified by the row and column coordinates given as inputs by the user. Thinness ratio is the measure of roundness of the binary object. It is calculated as the ratio of the Area and the perimeter of the object. As the perimeter increases relative to the area of the object, the object gets thinner. It can also be used to measure the regularity of an object. Regular objects have higher thinness ratio than irregular ones.

REFERENCE

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

EXAMPLE

% Read image

 img = imread('shapes.bmp');

% Call function

 lab_image = label_cvip(img);

 ir = thinness_cvip(lab_image, [33  27]);   % a point on the ellipse in the top left corner

% Display input image

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

 fprintf('Thinness ratio: %d',ir);
Thinness ratio: 6.051554e-01

CREDITS

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