line function

Mat line(
  1. InputOutputArray img,
  2. Point pt1,
  3. Point pt2,
  4. Scalar color, {
  5. int thickness = 1,
  6. int lineType = LINE_8,
  7. int shift = 0,
})

Line draws a line segment connecting two points.

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

Implementation

Mat line(
  InputOutputArray img,
  Point pt1,
  Point pt2,
  Scalar color, {
  int thickness = 1,
  int lineType = LINE_8,
  int shift = 0,
}) {
  cvRun(() => cimgproc.Line(img.ref, pt1.ref, pt2.ref, color.ref, thickness, lineType, shift));
  return img;
}