Click or drag to resize

Cv2RotatedRectangleIntersection 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: 1.0.0
Syntax
public static RectanglesIntersectTypes RotatedRectangleIntersection(
	RotatedRect rect1,
	RotatedRect rect2,
	OutputArray intersectingRegion
)

Parameters

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

Return Value

Type: RectanglesIntersectTypes

[Missing <returns> documentation for "M:OpenCvSharp.Cv2.RotatedRectangleIntersection(OpenCvSharp.RotatedRect,OpenCvSharp.RotatedRect,OpenCvSharp.OutputArray)"]

See Also