minAreaRect
import { minAreaRect } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
The function calculates and returns the minimum-area bounding rectangle (possibly rotated) for a
specified point set. The angle of rotation represents the angle between the line connecting the starting
and ending points (based on the clockwise order with greatest index for the corner with greatest y)
and the horizontal axis. This angle always falls between [-90, 0) because, if the object
rotates more than a rect angle, the next edge is used to measure the angle. The starting and ending points change
as the object rotates.Developer should keep in mind that the returned RotatedRect can contain negative
indices when data is close to the containing Mat element boundary.
minAreaRect(points: Mat): RotatedRect;pointsInput vector of 2D points, stored in std::vector<> or Mat
The RotatedRect result.
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.