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

# FeatureConvexity

Measure the object's convexity

## SYNOPSIS

`#include "dip_measurement.h"`

dip_int dip_FeatureConvexityID ( void )

## OUTPUT DATA TYPE

`dip_float`

## FUNCTION

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

This function is a composite measurement function, that returns the ratio between `FeatureSize` and `FeatureConvexArea`. A convex object will have a convexity of 1 (or slightly smaller due to discretization issues). Convexity values smaller than 1 indicate that the object boundary has concavities or that the object has holes. This function supports 2D images only.

## 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.

## SEE ALSO

`Measure`, `ImageChainCode`, `ChainCodeConvexHull`

`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`