[][src]Function opencv::aruco::detect_markers

pub fn detect_markers(
    image: &dyn ToInputArray,
    dictionary: &PtrOfDictionary,
    corners: &mut dyn ToOutputArray,
    ids: &mut dyn ToOutputArray,
    parameters: &PtrOfDetectorParameters,
    rejected_img_points: &mut dyn ToOutputArray,
    camera_matrix: &dyn ToInputArray,
    dist_coeff: &dyn ToInputArray
) -> Result<()>

Basic marker detection

Parameters

  • image: input image
  • dictionary: indicates the type of markers that will be searched
  • corners: vector of detected marker corners. For each marker, its four corners are provided, (e.g std::vectorstd::vectorcv::Point2f> > ). For N detected markers, the dimensions of this array is Nx4. The order of the corners is clockwise.
  • ids: vector of identifiers of the detected markers. The identifier is of type int (e.g. std::vector). For N detected markers, the size of ids is also N. The identifiers have the same order than the markers in the imgPoints array.
  • parameters: marker detection parameters
  • rejectedImgPoints: contains the imgPoints of those squares whose inner code has not a correct codification. Useful for debugging purposes.
  • cameraMatrix: optional input 3x3 floating-point camera matrix inline formula
  • distCoeff: optional vector of distortion coefficients inline formula of 4, 5, 8 or 12 elements

Performs marker detection in the input image. Only markers included in the specific dictionary are searched. For each detected marker, it returns the 2D position of its corner in the image and its corresponding identifier. Note that this function does not perform pose estimation.

See also

estimatePoseSingleMarkers, estimatePoseBoard

C++ default parameters

  • parameters: DetectorParameters::create()
  • rejected_img_points: noArray()
  • camera_matrix: noArray()
  • dist_coeff: noArray()