[][src]Function opencv::aruco::estimate_pose_single_markers

pub fn estimate_pose_single_markers(
    corners: &dyn ToInputArray,
    marker_length: f32,
    camera_matrix: &dyn ToInputArray,
    dist_coeffs: &dyn ToInputArray,
    rvecs: &mut dyn ToOutputArray,
    tvecs: &mut dyn ToOutputArray,
    _obj_points: &mut dyn ToOutputArray
) -> Result<()>

Pose estimation for single markers

Parameters

  • corners: vector of already detected markers corners. For each marker, its four corners are provided, (e.g std::vectorstd::vectorcv::Point2f> > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise.

See also

detectMarkers

  • markerLength: the length of the markers' side. The returning translation vectors will be in the same unit. Normally, unit is meters.
  • cameraMatrix: input 3x3 floating-point camera matrix inline formula
  • distCoeffs: vector of distortion coefficients inline formula of 4, 5, 8 or 12 elements
  • rvecs: array of output rotation vectors ( Rodrigues) (e.g. std::vectorcv::Vec3d). Each element in rvecs corresponds to the specific marker in imgPoints.
  • tvecs: array of output translation vectors (e.g. std::vectorcv::Vec3d). Each element in tvecs corresponds to the specific marker in imgPoints.
  • _objPoints: array of object points of all the marker corners

This function receives the detected markers and returns their pose estimation respect to the camera individually. So for each marker, one rotation and translation vector is returned. The returned transformation is the one that transforms points from each marker coordinate system to the camera coordinate system. The marker corrdinate system is centered on the middle of the marker, with the Z axis perpendicular to the marker plane. The coordinates of the four corners of the marker in its own coordinate system are: (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0), (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0)

C++ default parameters

  • _obj_points: noArray()