CvSeq* cvConvexHull2( const CvArr* input, void* hull_storage=NULL,
int orientation=CV_CLOCKWISE, int return_points=0 );
points
Sequence or array of 2D points with 32-bit integer or floating-point coordinates.
hull_storage
The destination array (CvMat*) or memory storage (CvMemStorage*) that will store the convex hull. If it is array, it should be 1d and have the same number of elements as the input array/sequence. On output the header is modified: the number of columns/rows is truncated down to the hull size.
orientation
Desired orientation of convex hull: CV_CLOCKWISE or CV_COUNTER_CLOCKWISE.
return_points
If non-zero, the points themselves will be stored in the hull instead of indices if hull_storage is array, or pointers if hull_storage is memory storage.
The function cvConvexHull2 finds convex hull of 2D point set using Sklansky’s algorithm. If hull_storage is memory storage, the function creates a sequence containing the hull points or pointers to them, depending on return_points value and returns the sequence on output.