Example #1
 internal static extern double cveArucoCalibrateCameraAruco(
    IntPtr corners, IntPtr ids, IntPtr counter, IntPtr board,
    ref Size imageSize, IntPtr cameraMatrix, IntPtr distCoeffs,
    IntPtr rvecs, IntPtr tvecs, CalibType flags,
    ref MCvTermCriteria criteria);
Example #2
 /// <summary>
 /// Calibrate a camera using aruco markers.
 /// </summary>
 /// <param name="corners">Vector of detected marker corners in all frames. The corners should have the same format returned by detectMarkers</param>
 /// <param name="ids">List of identifiers for each marker in corners</param>
 /// <param name="counter">Number of markers in each frame so that corners and ids can be split</param>
 /// <param name="board">Marker Board layout</param>
 /// <param name="imageSize">Size of the image used only to initialize the intrinsic camera matrix.</param>
 /// <param name="cameraMatrix">Output 3x3 floating-point camera matrix. </param>
 /// <param name="distCoeffs">Output vector of distortion coefficients (k1,k2,p1,p2[,k3[,k4,k5,k6],[s1,s2,s3,s4]]) of 4, 5, 8 or 12 elements</param>
 /// <param name="rvecs">Output vector of rotation vectors (see Rodrigues ) estimated for each board view (e.g. std::vector&lt;cv::Mat&gt;>). That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the board pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the board pattern in the k-th pattern view (k=0.. M -1).</param>
 /// <param name="tvecs">Output vector of translation vectors estimated for each pattern view.</param>
 /// <param name="flags">Flags Different flags for the calibration process</param>
 /// <param name="criteria">Termination criteria for the iterative optimization algorithm.</param>
 /// <returns>The final re-projection error.</returns>
 public static  double CalibrateCameraAruco(
    IInputArray corners, IInputArray ids, IInputArray counter, IBoard board, Size imageSize,
    IInputOutputArray cameraMatrix, IInputOutputArray distCoeffs, IOutputArray rvecs, IOutputArray tvecs,
    CalibType flags, MCvTermCriteria criteria)
    using (InputArray iaCorners = corners.GetInputArray())
    using (InputArray iaIds = ids.GetInputArray())
    using (InputArray iaCounter = counter.GetInputArray())
    using (InputOutputArray ioaCameraMatrix = cameraMatrix.GetInputOutputArray())
    using (InputOutputArray ioaDistCoeffs = distCoeffs.GetInputOutputArray())
    using (OutputArray oaRvecs = rvecs == null ? OutputArray.GetEmpty() : rvecs.GetOutputArray())
    using (OutputArray oaTvecs = tvecs == null ? OutputArray.GetEmpty() : tvecs.GetOutputArray())
       return cveArucoCalibrateCameraAruco(iaCorners, iaIds, iaCounter, board.BoardPtr, ref imageSize,
          ioaCameraMatrix, ioaDistCoeffs, oaRvecs, oaTvecs, flags, ref criteria);