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

# FeatureP2A

Measure the circularity of the object

## SYNOPSIS

`#include "dip_measurement.h"`

dip_int dip_FeatureP2AID ( void )

## OUTPUT DATA TYPE

`dip_float`

## FUNCTION

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

This function is a composite measurement function, that uses `FeatureSize`, `FeaturePerimeter`, and `FeatureSurfaceArea` to determine the circularity of an object by calculating: 2D: `P2A = perimeter^2 / (4Pi * size)` 3D: `P2A = surface-area^1.5 / (6 Sqrt(Pi) * size)`

## NOTE

This function ignores any physical dimensions passed through the `Measure` function. The units are always pixels.

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

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