| 1946 | |
| 1947 | |
| 1948 | void 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 | |
| 1970 | void cv::convexityDefects( InputArray _points, InputArray _hull, OutputArray _defects ) |
nothing calls this directly
no test coverage detected