Measure the object's Feret diameters
#include "dip_measurement.h"
dip_int dip_FeatureFeretID ( void )
dip_FloatArray
dip_FeatureFeretID returns the ID value of this measurement function, that is registered by Initialise.
This function measures the Feret maximum and minimum diameters of an object. The Feret diameters are found by a "rotating caliper" algorithm on the convex hull polygon, see ConvexHullGetFeret. This function supports 2D images only.
The values returned are:
FeretMax | The widest projection of the object |
FeretMin | The narrowest projection of the object |
FeretPerpMin | The width of the projection perpendicular to "FeretMin" |
FeretMaxAng | The angle of the projection for "FeretMax" |
FeretMinAng | The angle of the projection for "FeretMin" |
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.
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.
In DIPlib version 2.3 and earlier, this measure was computed from the chain code directly, using the function ChainCodeGetFeret.
Measure, ImageChainCode, ChainCodeConvexHull, ConvexHullGetFeret
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