rectangle function

Mat rectangle(
  1. InputOutputArray img,
  2. Rect rect,
  3. Scalar color, {
  4. int thickness = 1,
  5. int lineType = LINE_8,
  6. int shift = 0,
})

Rectangle draws a simple, thick, or filled up-right rectangle. It renders a rectangle with the desired characteristics to the target Mat image.

For further details, please see: https:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga07d2f74cadcf8e305e810ce8eed13bc9

Implementation

Mat rectangle(
  InputOutputArray img,
  Rect rect,
  Scalar color, {
  int thickness = 1,
  int lineType = LINE_8,
  int shift = 0,
}) {
  cvRun(() => cimgproc.RectangleWithParams(img.ref, rect.ref, color.ref, thickness, lineType, shift));
  return img;
}