Cv2Line Method (Mat, Int32, Int32, Int32, Int32, Scalar, Int32, LineType, Int32) OpenCvSharp Class Library
Draws a line segment connecting two points

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static void Line(
	Mat img,
	int pt1X,
	int pt1Y,
	int pt2X,
	int pt2Y,
	Scalar color,
	int thickness = 1,
	LineType lineType = LineType.Link8,
	int shift = 0
)

Parameters

img
Type: OpenCvSharp.CPlusPlusMat
The image.
pt1X
Type: SystemInt32
First point's x-coordinate of the line segment.
pt1Y
Type: SystemInt32
First point's y-coordinate of the line segment.
pt2X
Type: SystemInt32
Second point's x-coordinate of the line segment.
pt2Y
Type: SystemInt32
Second point's y-coordinate of the line segment.
color
Type: OpenCvSharp.CPlusPlusScalar
Line color.
thickness (Optional)
Type: SystemInt32
Line thickness. [By default this is 1]
lineType (Optional)
Type: OpenCvSharpLineType
Type of the line. [By default this is LineType.Link8]
shift (Optional)
Type: SystemInt32
Number of fractional bits in the point coordinates. [By default this is 0]
See Also

Reference