1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Add documentation and example program for intersectConvexConvex

This commit is contained in:
Steve Nicholson
2019-05-08 17:54:17 -07:00
parent 938d8dce06
commit acb3b3bd4d
2 changed files with 178 additions and 1 deletions
+17 -1
View File
@@ -4149,7 +4149,23 @@ without self-intersections. Otherwise, the function output is undefined.
*/
CV_EXPORTS_W bool isContourConvex( InputArray contour );
//! finds intersection of two convex polygons
/** @example samples/cpp/intersectExample.cpp
Examples of how intersectConvexConvex works
*/
/** @brief Finds intersection of two convex polygons
@param _p1 First polygon
@param _p2 Second polygon
@param _p12 Output polygon describing the intersecting area
@param handleNested When true, an intersection is found if one of the polygons is fully enclosed in the other.
When false, no intersection is found. If the polygons share a side or the vertex of one polygon lies on an edge
of the other, they are not considered nested and an intersection will be found regardless of the value of handleNested.
@returns Absolute value of area of intersecting polygon
@note intersectConvexConvex doesn't confirm that both polygons are convex and will return invalid results if they aren't.
*/
CV_EXPORTS_W float intersectConvexConvex( InputArray _p1, InputArray _p2,
OutputArray _p12, bool handleNested = true );