opencv::objdetect

Function draw_detected_markers_def

Source
pub fn draw_detected_markers_def(
    image: &mut impl ToInputOutputArray,
    corners: &impl ToInputArray,
) -> Result<()>
Expand description

Draw detected markers in image

§Parameters

  • image: input/output image. It must have 1 or 3 channels. The number of channels is not altered.
  • corners: positions of marker corners on input image. (e.g std::vector<std::vectorcv::Point2f > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.
  • ids: vector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.
  • borderColor: color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

§Note

This alternative version of draw_detected_markers function uses the following default values for its arguments:

  • ids: noArray()
  • border_color: Scalar(0,255,0)