[−][src]Function opencv::imgproc::rectangle
pub fn rectangle(
img: &mut Mat,
rec: Rect,
color: Scalar,
thickness: i32,
line_type: i32,
shift: i32
) -> Result<()>
Draws a simple, thick, or filled up-right rectangle.
The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners are pt1 and pt2.
Parameters
- img: Image.
- pt1: Vertex of the rectangle.
- pt2: Vertex of the rectangle opposite to pt1 .
- color: Rectangle color or brightness (grayscale image).
- thickness: Thickness of lines that make up the rectangle. Negative values, like #FILLED, mean that the function has to draw a filled rectangle.
- lineType: Type of the line. See #LineTypes
- shift: Number of fractional bits in the point coordinates.
Overloaded parameters
use rec
parameter as alternative specification of the drawn rectangle: r.tl() and r.br()-Point(1,1)
are opposite corners
C++ default parameters
- thickness: 1
- line_type: LINE_8
- shift: 0