mirror of
https://github.com/opencv/opencv.git
synced 2025-07-25 22:57:53 +08:00
Merge pull request #9503 from sovrasov:convex_hull_disable_inplace
This commit is contained in:
commit
964dda2ef2
@ -3977,6 +3977,8 @@ returns convex hull points. Otherwise, it returns indices of the convex hull poi
|
|||||||
output array is std::vector, the flag is ignored, and the output depends on the type of the
|
output array is std::vector, the flag is ignored, and the output depends on the type of the
|
||||||
vector: std::vector\<int\> implies returnPoints=false, std::vector\<Point\> implies
|
vector: std::vector\<int\> implies returnPoints=false, std::vector\<Point\> implies
|
||||||
returnPoints=true.
|
returnPoints=true.
|
||||||
|
|
||||||
|
@note `points` and `hull` should be different arrays, inplace processing isn't supported.
|
||||||
*/
|
*/
|
||||||
CV_EXPORTS_W void convexHull( InputArray points, OutputArray hull,
|
CV_EXPORTS_W void convexHull( InputArray points, OutputArray hull,
|
||||||
bool clockwise = false, bool returnPoints = true );
|
bool clockwise = false, bool returnPoints = true );
|
||||||
|
@ -130,6 +130,7 @@ void convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool ret
|
|||||||
{
|
{
|
||||||
CV_INSTRUMENT_REGION()
|
CV_INSTRUMENT_REGION()
|
||||||
|
|
||||||
|
CV_Assert(_points.getObj() != _hull.getObj());
|
||||||
Mat points = _points.getMat();
|
Mat points = _points.getMat();
|
||||||
int i, total = points.checkVector(2), depth = points.depth(), nout = 0;
|
int i, total = points.checkVector(2), depth = points.depth(), nout = 0;
|
||||||
int miny_ind = 0, maxy_ind = 0;
|
int miny_ind = 0, maxy_ind = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user