ImageEn, unit IEVision

TIEVisionMath.convexHullIndices

TIEVisionMath.convexHullIndices

Declaration

function convexHullIndices(points: TIEVisionVectorPoint; clockwise: bool32 = False): TIEVisionVectorInt32; overload; safecall;
function convexHullIndices(points: TIEVisionVectorPoint2f; clockwise: bool32 = False): TIEVisionVectorInt32; overload; safecall;

Description

Returns the convex hull of a point set as indices into points (in order around the hull), rather than as points.
This is useful when two point lists correspond (e.g. the same landmarks on two faces): the hull of one list can be applied to the other.

See convexHull for the parameters.

Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr

Example

// Get the same hull on two sets of corresponding points
hullIdx := IEVisionLib().createMath().convexHullIndices( points2 );
hull1 := IEVisionLib().createVectorPoint2f();
hull2 := IEVisionLib().createVectorPoint2f();
for i := 0 to hullIdx.size() - 1 do
begin
  hull1.push_back( points1.getPoint( hullIdx.getInt32( i )));
  hull2.push_back( points2.getPoint( hullIdx.getInt32( i )));
end;

See Also

◼convexHull