DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

FeaturePerimeter

Measure the object's perimeter length

SYNOPSIS

#include "dip_measurement.h"

dip_int dip_FeaturePerimeterID ( void )

OUTPUT DATA TYPE

dip_float

FUNCTION

dip_FeaturePerimeterID returns the ID value of this measurement function, that is registered by Initialise.

This measures the perimeter of 2D objects by calculating the length of the chain code of its enclosing border. This function assumes that each object has a single connected border. The used method for measuring the length of the chain code is optimal for circles, and for a collection of objects that are randomly oriented, see the referenced literature for details. This function supports 2D images only.

NOTE

If any physical dimensions are passed to this function through Measure, only the sample distance along the first dimension is used. All other dimensions are assumed to be sampled the same way. This produces incorrect results for anisotropically sampled images.

NOTE

This function uses chain codes. It expects each measured object to be compact, that is, to have only one chain code. Additional chain codes are ignored, meaning that non-compact objects are not measured properly. Take care in providing the correct connectivity value: if you object is compact only with 2-connectivity, this measure will fail if you call Measure with a value of 1 for the connectivity.

LITERATURE

A.M. Vossepoel and A.W.M. Smeulders (1982), "Vector Code Probability and Metrication Error in the Representation of Straight Lines of Finite Length", Computer Graphics and Image Processing 20: 347-364

SEE ALSO

Measure, ImageChainCode, ChainCodeGetLength

FeatureAnisotropy2D, FeatureBendingEnergy, FeatureCenter, FeatureChainCodeBendingEnergy, FeatureConvexArea, FeatureConvexPerimeter, FeatureConvexity, FeatureDimension, FeatureExcessKurtosis, FeatureFeret, FeatureGinertia, FeatureGmu, FeatureGravity, FeatureInertia, FeatureLongestChaincodeRun, FeatureMass, FeatureMaxVal, FeatureMaximum, FeatureMean, FeatureMinVal, FeatureMinimum, FeatureMu, FeatureOrientation2D, FeatureP2A, FeaturePerimeter, FeatureRadius, FeatureShape, FeatureSize, FeatureSkewness, FeatureStdDev, FeatureSum, FeatureSurfaceArea