Image Processing 35 - Intersection of Two Rotated Rectangles

Find out if there is any intersection between two rotated rectangles.

int cv::rotatedRectangleIntersection(const RotatedRect &rect1,
                                    const RotatedRect &rect2,
                                    OutputArray intersectingRegion
                                    )

If present, also returns the vertices of the intersected region.

Below are some examples of intersection configurations. The shaded pattern represents the intersection area and the red vertices are returned by the function.

Guess you like

Origin blog.csdn.net/u013480226/article/details/123873319