[][src]Function opencv::aruco::detect_charuco_diamond

pub fn detect_charuco_diamond(
    image: &dyn ToInputArray,
    marker_corners: &dyn ToInputArray,
    marker_ids: &dyn ToInputArray,
    square_marker_length_rate: f32,
    diamond_corners: &mut dyn ToOutputArray,
    diamond_ids: &mut dyn ToOutputArray,
    camera_matrix: &dyn ToInputArray,
    dist_coeffs: &dyn ToInputArray
) -> Result<()>

Detect ChArUco Diamond markers

Parameters

  • image: input image necessary for corner subpixel.
  • markerCorners: list of detected marker corners from detectMarkers function.
  • markerIds: list of marker ids in markerCorners.
  • squareMarkerLengthRate: rate between square and marker length: squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
  • diamondCorners: output list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vectorstd::vectorcv::Point2f> > ).
  • diamondIds: ids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.
  • cameraMatrix: Optional camera calibration matrix.
  • distCoeffs: Optional camera distortion coefficients.

This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection but can slightly reduce the detection rate.

C++ default parameters

  • camera_matrix: noArray()
  • dist_coeffs: noArray()