boxPoints function

VecPoint2f boxPoints(
  1. RotatedRect rect, {
  2. VecPoint2f? pts,
})

BoxPoints finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.

return: bottom left, top left, top right, bottom right For further Details, please see: https:///docs.opencv.org/3.3.0/d3/dc0/group__imgproc__shape.html#gaf78d467e024b4d7936cf9397185d2f5c

Implementation

VecPoint2f boxPoints(RotatedRect rect, {VecPoint2f? pts}) {
  if (pts == null) {
    final p = calloc<cvg.VecPoint2f>();
    cvRun(() => cffi.BoxPoints(rect.ref, p));
    return VecPoint2f.fromPointer(p);
  }
  cvRun(() => cffi.BoxPoints(rect.ref, pts.ptr));
  return pts;
}