MCPcopy Create free account
hub / github.com/creatale/node-dv / convexHull

Method convexHull

deps/opencv/modules/imgproc/src/contours.cpp:1948–1967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1946
1947
1948void cv::convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool returnPoints )
1949{
1950 Mat points = _points.getMat();
1951 int nelems = points.checkVector(2), depth = points.depth();
1952 CV_Assert(nelems >= 0 && (depth == CV_32F || depth == CV_32S));
1953
1954 if( nelems == 0 )
1955 {
1956 _hull.release();
1957 return;
1958 }
1959
1960 returnPoints = !_hull.fixedType() ? returnPoints : _hull.type() != CV_32S;
1961 Mat hull(nelems, 1, returnPoints ? CV_MAKETYPE(depth, 2) : CV_32S);
1962 CvMat _cpoints = points, _chull = hull;
1963 cvConvexHull2(&_cpoints, &_chull, clockwise ? CV_CLOCKWISE : CV_COUNTER_CLOCKWISE, returnPoints);
1964 _hull.create(_chull.rows, 1, hull.type(), -1, true);
1965 Mat dhull = _hull.getMat(), shull(dhull.size(), dhull.type(), hull.data);
1966 shull.copyTo(dhull);
1967}
1968
1969
1970void cv::convexityDefects( InputArray _points, InputArray _hull, OutputArray _defects )

Callers

nothing calls this directly

Calls 10

cvConvexHull2Function · 0.85
checkVectorMethod · 0.80
fixedTypeMethod · 0.80
getMatMethod · 0.45
depthMethod · 0.45
releaseMethod · 0.45
typeMethod · 0.45
createMethod · 0.45
sizeMethod · 0.45
copyToMethod · 0.45

Tested by

no test coverage detected