ImageEn

TIEVisionMath.convexHull Code Samples


Code samples for convexHull (Automatically generated by the Every Method demo).

// Automated test of convexHull - Typical Values
// TIEVisionMath.convexHull - Points: 20, Hull: 7
hull := IEVisionLib().createMath().convexHull( pts );  // 20 points -> 7 hull points
contours := IEVisionLib().createVectorObjRef();
contours.push_back( hull );
IEVisionLib().createDrawing().drawContours( ImageEnView1.IEBitmap.GetIEVisionImage(), contours, IEVisionScalar( 0, 0, 255 ), -1, 2, 16 );
ImageEnView1.Update();



// Automated test of convexHull - Alpha Channel - Typical Values
// TIEVisionMath.convexHull - Points: 20, Hull: 7
hull := IEVisionLib().createMath().convexHull( pts );  // 20 points -> 7 hull points
contours := IEVisionLib().createVectorObjRef();
contours.push_back( hull );
IEVisionLib().createDrawing().drawContours( ImageEnView1.IEBitmap.GetIEVisionImage(), contours, IEVisionScalar( 0, 0, 255 ), -1, 2, 16 );
ImageEnView1.Update();



// Automated test of convexHull - Random Values
// TIEVisionMath.convexHull - Points: 118, Hull: 16
hull := IEVisionLib().createMath().convexHull( pts );  // 118 points -> 16 hull points
IEVisionLib().createDrawing().fillConvexPoly( ImageEnView1.IEBitmap.GetIEVisionImage(), hull, IEVisionScalar( 255, 255, 0 ), 16 );
ImageEnView1.Update();



// Automated test of convexHull - Alpha Channel - Random Values
// TIEVisionMath.convexHull - Points: 118, Hull: 16
hull := IEVisionLib().createMath().convexHull( pts );  // 118 points -> 16 hull points
IEVisionLib().createDrawing().fillConvexPoly( ImageEnView1.IEBitmap.GetIEVisionImage(), hull, IEVisionScalar( 255, 255, 0 ), 16 );
ImageEnView1.Update();