コード例 #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, out Std.VectorMat rvecs)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecsPtr;

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

                rvecs = new Std.VectorMat(rvecsPtr);

                exception.Check();
                return(reProjectionError);
            }
コード例 #2
0
ファイル: ArucoUnity.cs プロジェクト: brehm/aruco-unity
            public static double CalibrateCameraAruco(Std.VectorVectorPoint2f corners, Std.VectorInt ids, Std.VectorInt counter, Board board, Cv.Core.Size imageSize,
                                                      Cv.Core.Mat cameraMatrix, Cv.Core.Mat distCoeffs, out Std.VectorMat rvecs, out Std.VectorMat tvecs, Cv.Calib3d.Calib flags)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecsPtr, tvecsPtr;

                double reProjectionError = au_calibrateCameraAruco2(corners.cppPtr, ids.cppPtr, counter.cppPtr, board.cppPtr, imageSize.cppPtr, cameraMatrix.cppPtr,
                                                                    distCoeffs.cppPtr, out rvecsPtr, out tvecsPtr, (int)flags, 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,
                                                    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);
        }
コード例 #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, out Std.VectorMat rvecs)
 {
     Std.VectorMat tvecs;
     return(CalibrateCameraCharuco(charucoCorners, charucoIds, board, imageSize, cameraMatrix, distCoeffs, out rvecs, out tvecs));
 }
コード例 #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 = 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));
 }
コード例 #6
0
ファイル: Aruco.cs プロジェクト: holyris/CodeMiner
 public static double CalibrateCameraAruco(Std.VectorVectorPoint2f corners, Std.VectorInt ids, Std.VectorInt counter, Board board,
                                           Cv.Size imageSize, Cv.Mat cameraMatrix, Cv.Mat distCoeffs, out Std.VectorMat rvecs)
 {
     Std.VectorMat tvecs;
     return(CalibrateCameraAruco(corners, ids, counter, board, imageSize, cameraMatrix, distCoeffs, out rvecs, out tvecs));
 }