AREA_CVIP

area_cvip() - calculates the area of an object.

Contents

SYNTAX

a =  area_cvip(labeledImage, [r, c])

Input Parameters include :

Output Parameter Include :

DESCRIPTION

Area_cvip gets the sum of pixels whose gray level value equals to a specific label. This label is the gray level value of the point of the co-ordinates on the labeled image.

REFERENCE

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

EXAMPLE

% Read image

 input_img = imread('Shapes.bmp');

% Label image

 lab_image = label_cvip(input_img);

% Calling function

 area = area_cvip(lab_image, [125,125]);

% Display input image

 figure; imshow(input_img,[]);

 fprintf('Area of the binary object: %d',area);
Area of the binary object: 3209

CREDITS

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