Cv2Rectangle Method (Mat, Rect, Scalar, Int32, LineType, Int32) OpenCvSharp Class Library
Draws simple, thick or filled rectangle

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

public static void Rectangle(
	Mat img,
	Rect rect,
	Scalar color,
	int thickness = 1,
	LineType lineType = LineType.Link8,
	int shift = 0
)

Parameters

img
Type: OpenCvSharp.CPlusPlusMat
Image.
rect
Type: OpenCvSharp.CPlusPlusRect
Rectangle.
color
Type: OpenCvSharp.CPlusPlusScalar
Line color (RGB) or brightness (grayscale image).
thickness (Optional)
Type: SystemInt32
Thickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle. [By default this is 1]
lineType (Optional)
Type: OpenCvSharpLineType
Type of the line, see cvLine description. [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