Cv2 RotatedRectangleIntersection Method (RotatedRect, RotatedRect, OutputArray)

Finds out if there is any intersection between two rotated rectangles. If there is then the vertices of the interesecting region are returned as well. Below are some examples of intersection configurations. The hatched pattern indicates the intersecting region and the red vertices are returned by the function.

Namespace: OpenCvSharp
Assembly: OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp

Syntax

public static RectanglesIntersectTypes RotatedRectangleIntersection( RotatedRect rect1, RotatedRect rect2, OutputArray intersectingRegion )
Public Shared Function RotatedRectangleIntersection ( rect1 As RotatedRect, rect2 As RotatedRect, intersectingRegion As OutputArray ) As RectanglesIntersectTypes
public: static RectanglesIntersectTypes RotatedRectangleIntersection( RotatedRect rect1, RotatedRect rect2, OutputArray^ intersectingRegion )
static member RotatedRectangleIntersection : rect1 : RotatedRect * rect2 : RotatedRect * intersectingRegion : OutputArray -> RectanglesIntersectTypes 
OpenCvSharp.Cv2.RotatedRectangleIntersection = function(rect1, rect2, intersectingRegion);

Parameters

rect1 Type: OpenCvSharp RotatedRect
First rectangle rect2 Type: OpenCvSharp RotatedRect
Second rectangle intersectingRegion Type: OpenCvSharp OutputArray
The output array of the verticies of the intersecting region. It returns at most 8 vertices. Stored as std::vector or cv::Mat as Mx1 of type CV_32FC2.

Return Value

See Also