GetFeretsDiameter example for Delphi
procedure TForm1.Button1Click(Sender: TObject);
var
nRet: L_INT;
pPoints: pPoint;
uSize: L_UINT;
uFeretsDiam: L_UINT;
uFstIndex: L_UINT;
uSndIndex: L_UINT;
begin
{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );
LEADImage1.SetRgnEllipse( Trunc(LEADImage1.BitmapWidth / 4), Trunc(LEADImage1.BitmapHeight / 4), Trunc(LEADImage1.BitmapWidth), Trunc(LEADImage1.BitmapHeight), L_RGN_SET);
LEADImage1.GetRgnContourPoints (pPoints, uSize);
nRet:= LEADImage1.GetFeretsDiameter( pPoints, uSize, uFeretsDiam, uFstIndex, uSndIndex );
if ( nRet = SUCCESS ) then
ShowMessage ( 'Number of points = ' + IntToStr(uSize));
end;