Cv2.Line Method (InputOutputArray, Int32, Int32, Int32, Int32, Scalar, Int32, LineTypes, Int32)
|
Draws a line segment connecting two points
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic static void Line(
InputOutputArray img,
int pt1X,
int pt1Y,
int pt2X,
int pt2Y,
Scalar color,
int thickness = 1,
LineTypes lineType = LineTypes.Link8,
int shift = 0
)
Public Shared Sub Line (
img As InputOutputArray,
pt1X As Integer,
pt1Y As Integer,
pt2X As Integer,
pt2Y As Integer,
color As Scalar,
Optional thickness As Integer = 1,
Optional lineType As LineTypes = LineTypes.Link8,
Optional shift As Integer = 0
)
public:
static void Line(
InputOutputArray^ img,
int pt1X,
int pt1Y,
int pt2X,
int pt2Y,
Scalar color,
int thickness = 1,
LineTypes lineType = LineTypes::Link8,
int shift = 0
)
static member Line :
img : InputOutputArray *
pt1X : int *
pt1Y : int *
pt2X : int *
pt2Y : int *
color : Scalar *
?thickness : int *
?lineType : LineTypes *
?shift : int
(* Defaults:
let _thickness = defaultArg thickness 1
let _lineType = defaultArg lineType LineTypes.Link8
let _shift = defaultArg shift 0
*)
-> unit
OpenCvSharp.Cv2.Line = function(img, pt1X, pt1Y, pt2X, pt2Y, color, thickness, lineType, shift);
Parameters
- img
- Type: OpenCvSharp.InputOutputArray
The image. - pt1X
- Type: System.Int32
First point's x-coordinate of the line segment. - pt1Y
- Type: System.Int32
First point's y-coordinate of the line segment. - pt2X
- Type: System.Int32
Second point's x-coordinate of the line segment. - pt2Y
- Type: System.Int32
Second point's y-coordinate of the line segment. - color
- Type: OpenCvSharp.Scalar
Line color. - thickness (Optional)
- Type: System.Int32
Line thickness. [By default this is 1] - lineType (Optional)
- Type: OpenCvSharp.LineTypes
Type of the line. [By default this is LineType.Link8] - shift (Optional)
- Type: System.Int32
Number of fractional bits in the point coordinates. [By default this is 0]
See Also