コード例 #1
0
ファイル: CharucoBoard.cs プロジェクト: brehm/aruco-unity
            public static double CalibrateCameraCharuco(Std.VectorVectorPoint2f charucoCorners, Std.VectorVectorInt charucoIds, CharucoBoard board, Cv.Core.Size imageSize,
                                                        Cv.Core.Mat cameraMatrix, Cv.Core.Mat distCoeffs)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();

                double reProjectionError = au_calibrateCameraCharuco5(charucoCorners.cppPtr, charucoIds.cppPtr, board.cppPtr, imageSize.cppPtr, cameraMatrix.cppPtr,
                                                                      distCoeffs.cppPtr, exception.cppPtr);

                exception.Check();
                return(reProjectionError);
            }
コード例 #2
0
ファイル: CharucoBoard.cs プロジェクト: brehm/aruco-unity
            public static double CalibrateCameraCharuco(Std.VectorVectorPoint2f charucoCorners, Std.VectorVectorInt charucoIds, CharucoBoard board, Cv.Core.Size imageSize,
                                                        Cv.Core.Mat cameraMatrix, Cv.Core.Mat distCoeffs, out Std.VectorMat rvecs, out Std.VectorMat tvecs)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecsPtr, tvecsPtr;

                double reProjectionError = au_calibrateCameraCharuco3(charucoCorners.cppPtr, charucoIds.cppPtr, board.cppPtr, imageSize.cppPtr, cameraMatrix.cppPtr,
                                                                      distCoeffs.cppPtr, out rvecsPtr, out tvecsPtr, exception.cppPtr);

                rvecs = new Std.VectorMat(rvecsPtr);
                tvecs = new Std.VectorMat(tvecsPtr);

                exception.Check();
                return(reProjectionError);
            }
コード例 #3
0
ファイル: Aruco.cs プロジェクト: holyris/CodeMiner
 public static double CalibrateCameraCharuco(Std.VectorVectorPoint2f charucoCorners, Std.VectorVectorInt charucoIds, CharucoBoard board,
                                             Cv.Size imageSize, Cv.Mat cameraMatrix, Cv.Mat distCoeffs, out Std.VectorMat rvecs, out Std.VectorMat tvecs, Cv.Calib flags = 0)
 {
     Cv.TermCriteria criteria = new Cv.TermCriteria(Cv.TermCriteria.Type.Count | Cv.TermCriteria.Type.Eps, 30, Cv.EPSILON);
     return(CalibrateCameraCharuco(charucoCorners, charucoIds, board, imageSize, cameraMatrix, distCoeffs, out rvecs, out tvecs, flags, criteria));
 }
コード例 #4
0
ファイル: Aruco.cs プロジェクト: holyris/CodeMiner
 public static double CalibrateCameraCharuco(Std.VectorVectorPoint2f charucoCorners, Std.VectorVectorInt charucoIds, CharucoBoard board,
                                             Cv.Size imageSize, Cv.Mat cameraMatrix, Cv.Mat distCoeffs)
 {
     Std.VectorMat rvecs;
     return(CalibrateCameraCharuco(charucoCorners, charucoIds, board, imageSize, cameraMatrix, distCoeffs, out rvecs));
 }
コード例 #5
0
ファイル: Aruco.cs プロジェクト: holyris/CodeMiner
        public static double CalibrateCameraCharuco(Std.VectorVectorPoint2f charucoCorners, Std.VectorVectorInt charucoIds, CharucoBoard board,
                                                    Cv.Size imageSize, Cv.Mat cameraMatrix, Cv.Mat distCoeffs, out Std.VectorMat rvecs, out Std.VectorMat tvecs, Cv.Calib flags,
                                                    Cv.TermCriteria criteria)
        {
            Cv.Exception exception = new Cv.Exception();
            IntPtr       rvecsPtr, tvecsPtr;

            double reProjectionError = au_calibrateCameraCharuco(charucoCorners.CppPtr, charucoIds.CppPtr, board.CppPtr, imageSize.CppPtr,
                                                                 cameraMatrix.CppPtr, distCoeffs.CppPtr, out rvecsPtr, out tvecsPtr, (int)flags, criteria.CppPtr, exception.CppPtr);

            rvecs = new Std.VectorMat(rvecsPtr);
            tvecs = new Std.VectorMat(tvecsPtr);

            exception.Check();
            return(reProjectionError);
        }