[][src]Function opencv::imgproc::rectangle_points

pub fn rectangle_points(
    img: &mut dyn ToInputOutputArray,
    pt1: Point,
    pt2: Point,
    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.

C++ default parameters

  • thickness: 1
  • line_type: LINE_8
  • shift: 0