GetFeretsDiameter example for C++ Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TPoint * pPoints;
L_UINT uSize, uFeretsDiam, uFstIndex, uSndIndex;
/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );
LEADImage1->SetRgnEllipse( LEADImage1->BitmapWidth / 4, LEADImage1->BitmapHeight / 4, LEADImage1->BitmapWidth, LEADImage1->BitmapHeight, L_RGN_SET);
LEADImage1->GetRgnContourPoints(pPoints, uSize);
L_INT nRet= LEADImage1->GetFeretsDiameter(pPoints, uSize, uFeretsDiam, uFstIndex, uSndIndex);
if ( nRet == SUCCESS )
ShowMessage ( "Number of points = " + IntToStr(uSize));
}