rotatedRectangleIntersection
import { rotatedRectangleIntersection } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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.

rotatedRectangleIntersection(rect1: RotatedRect, rect2: RotatedRect, intersectingRegion: Mat): number;rect1First rectangle
rect2Second rectangle
intersectingRegionOutput destination, filled by the native operation. 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.
One of #RectanglesIntersectTypes
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.