Method Rectangle
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Rectangle(InputOutputArray, Point, Point, Scalar, int, LineTypes, int)
Draws simple, thick or filled rectangle
public static void Rectangle(InputOutputArray img, Point pt1, Point pt2, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, int shift = 0)
Parameters
imgInputOutputArrayImage.
pt1PointOne of the rectangle vertices.
pt2PointOpposite rectangle vertex.
colorScalarLine color (RGB) or brightness (grayscale image).
thicknessintThickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle. [By default this is 1]
lineTypeLineTypesType of the line, see cvLine description. [By default this is LineType.Link8]
shiftintNumber of fractional bits in the point coordinates. [By default this is 0]
Rectangle(InputOutputArray, Rect, Scalar, int, LineTypes, int)
Draws simple, thick or filled rectangle
public static void Rectangle(InputOutputArray img, Rect rect, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, int shift = 0)
Parameters
imgInputOutputArrayImage.
rectRectRectangle.
colorScalarLine color (RGB) or brightness (grayscale image).
thicknessintThickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle. [By default this is 1]
lineTypeLineTypesType of the line, see cvLine description. [By default this is LineType.Link8]
shiftintNumber of fractional bits in the point coordinates. [By default this is 0]
Rectangle(Mat, Rect, Scalar, int, LineTypes, int)
Draws simple, thick or filled rectangle
public static void Rectangle(Mat img, Rect rect, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, int shift = 0)
Parameters
imgMatImage.
rectRectRectangle.
colorScalarLine color (RGB) or brightness (grayscale image).
thicknessintThickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle. [By default this is 1]
lineTypeLineTypesType of the line, see cvLine description. [By default this is LineType.Link8]
shiftintNumber of fractional bits in the point coordinates. [By default this is 0]
Rectangle(Mat, Point, Point, Scalar, int, LineTypes, int)
Draws simple, thick or filled rectangle
public static void Rectangle(Mat img, Point pt1, Point pt2, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, int shift = 0)
Parameters
imgMatImage.
pt1PointOne of the rectangle vertices.
pt2PointOpposite rectangle vertex.
colorScalarLine color (RGB) or brightness (grayscale image).
thicknessintThickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle. [By default this is 1]
lineTypeLineTypesType of the line, see cvLine description. [By default this is LineType.Link8]
shiftintNumber of fractional bits in the point coordinates. [By default this is 0]