[][src]Function opencv::aruco::refine_detected_markers

pub fn refine_detected_markers(
    image: &dyn ToInputArray,
    board: &PtrOfBoard,
    detected_corners: &mut dyn ToInputOutputArray,
    detected_ids: &mut dyn ToInputOutputArray,
    rejected_corners: &mut dyn ToInputOutputArray,
    camera_matrix: &dyn ToInputArray,
    dist_coeffs: &dyn ToInputArray,
    min_rep_distance: f32,
    error_correction_rate: f32,
    check_all_orders: bool,
    recovered_idxs: &mut dyn ToOutputArray,
    parameters: &PtrOfDetectorParameters
) -> Result<()>

Refind not detected markers based on the already detected and the board layout

Parameters

  • image: input image
  • board: layout of markers in the board.
  • detectedCorners: vector of already detected marker corners.
  • detectedIds: vector of already detected marker identifiers.
  • rejectedCorners: vector of rejected candidates during the marker detection process.
  • cameraMatrix: optional input 3x3 floating-point camera matrix inline formula
  • distCoeffs: optional vector of distortion coefficients inline formula of 4, 5, 8 or 12 elements
  • minRepDistance: minimum distance between the corners of the rejected candidate and the reprojected marker in order to consider it as a correspondence.
  • errorCorrectionRate: rate of allowed erroneous bits respect to the error correction capability of the used dictionary. -1 ignores the error correction step.
  • checkAllOrders: Consider the four posible corner orders in the rejectedCorners array. If it set to false, only the provided corner order is considered (default true).
  • recoveredIdxs: Optional array to returns the indexes of the recovered candidates in the original rejectedCorners array.
  • parameters: marker detection parameters

This function tries to find markers that were not detected in the basic detecMarkers function. First, based on the current detected marker and the board layout, the function interpolates the position of the missing markers. Then it tries to find correspondence between the reprojected markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters. If camera parameters and distortion coefficients are provided, missing markers are reprojected using projectPoint function. If not, missing marker projections are interpolated using global homography, and all the marker corners in the board must have the same Z coordinate.

C++ default parameters

  • camera_matrix: noArray()
  • dist_coeffs: noArray()
  • min_rep_distance: 10.f
  • error_correction_rate: 3.f
  • check_all_orders: true
  • recovered_idxs: noArray()
  • parameters: DetectorParameters::create()