[−][src]Function opencv::imgproc::rotated_rectangle_intersection
pub fn rotated_rectangle_intersection(
rect1: &RotatedRect,
rect2: &RotatedRect,
intersecting_region: &mut dyn ToOutputArray
) -> Result<i32>
Finds out if there is any intersection between two rotated rectangles.
If there is then the vertices of the intersecting 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.
Parameters
- rect1: First rectangle
- rect2: Second rectangle
- intersectingRegion: The output array of the vertices 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.
Returns
One of #RectanglesIntersectTypes