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

ChainCodeGetFeret

Chain code measurement function

SYNOPSIS

#include "dip_chaincode.h"

dip_Error dip_ChainCodeGetFeret ( chaincode, stepSize, feret )

FUNCTION

This function measures the longest and shortest projections of the object encoded by chaincode. The chain code is rotated in stepSize degree intervals and the length of the projection on the x and y axes is computed for each orientation. The sizes of maximum and minimum projections, as well as the rotation at which they were obtained, are returned in the feret structure, which contains the following elements:

Data typeNameDescription
dip_floatmaxDiameterThe widest projection of the object
dip_floatminDiameterThe narrowest projection of the object
dip_floatmaxPerpendicularThe width of the projection perpendicular to minDiameter
dip_floatmaxAngleThe angle of the projection for maxDiameter
dip_floatminAngleThe angle of the projection for minDiameter

ChainCodeGetFeret is the function formerly used by Measure for the FeatureFeret measurement. This measurement now uses ConvexHullGetFeret instead.

ARGUMENTS

Data typeNameDescription
dip_ChainCodechaincodeInput chain code
dip_floatstepSizeThe step size, in degrees
dip_Feret *feretOutput measurement

CREDITS

The original code on which the current implementation is based, was donated by Gerie van der Heijden.

SEE ALSO

ImageChainCode, ChainCodeNew, ChainCodeFree, ChainCodeGetLength, ChainCodeGetLongestRun, ChainCodeGetRadius