Beispiel #1
0
 public static void RefineDetectedMarkers(Cv.Core.Mat image, Board board, Std.VectorVectorPoint2f detectedCorners, Std.VectorInt detectedIds,
                                          Std.VectorVectorPoint2f rejectedCorners)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     au_refineDetectedMarkers8(image.cppPtr, board.cppPtr, detectedCorners.cppPtr, detectedIds.cppPtr, rejectedCorners.cppPtr, exception.cppPtr);
     exception.Check();
 }
Beispiel #2
0
 public Cv.Core.Vec4i At(uint pos)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     Cv.Core.Vec4i     element   = new Cv.Core.Vec4i(au_std_vectorVec4i_at(cppPtr, pos, exception.cppPtr), DeleteResponsibility.False);
     exception.Check();
     return(element);
 }
Beispiel #3
0
 static public GridBoard Create(int markersX, int markersY, float markerLength, float markerSeparation, Dictionary dictionary)
 {
     Cv.Core.Exception exception    = new Cv.Core.Exception();
     System.IntPtr     gridBoardPtr = au_GridBoard_create2(markersX, markersY, markerLength, markerSeparation, dictionary.cppPtr, exception.cppPtr);
     exception.Check();
     return(new GridBoard(gridBoardPtr));
 }
Beispiel #4
0
 public static Dictionary GenerateCustomDictionary(int nMarkers, int markerSize, Dictionary baseDictionary)
 {
     Cv.Core.Exception exception     = new Cv.Core.Exception();
     System.IntPtr     dictionaryPtr = au_generateCustomDictionary2(nMarkers, markerSize, baseDictionary.cppPtr, exception.cppPtr);
     exception.Check();
     return(new Dictionary(dictionaryPtr));
 }
Beispiel #5
0
 static public Cv.Core.Mat GetBitsFromByteList(Cv.Core.Mat byteList, int markerSiz)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     Cv.Core.Mat       bits      = new Cv.Core.Mat(au_Dictionary_getBitsFromByteList(byteList.cppPtr, markerSiz, exception.cppPtr));
     exception.Check();
     return(bits);
 }
Beispiel #6
0
 public static void DrawDetectedMarkers(Cv.Core.Mat image, Std.VectorVectorPoint2f corners, Color borderColor)
 {
     Cv.Core.Exception exception         = new Cv.Core.Exception();
     Cv.Core.Scalar    borderColorScalar = borderColor;
     au_drawDetectedMarkers4(image.cppPtr, corners.cppPtr, borderColorScalar.cppPtr, exception.cppPtr);
     exception.Check();
 }
Beispiel #7
0
                public bool Identify(Dictionary dictionary, Cv.Core.Mat onlyBits, out int idx, out int rotation, double maxCorrectionRate)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    bool result = au_Dictionary_identify(cppPtr, onlyBits.cppPtr, out idx, out rotation, maxCorrectionRate, exception.cppPtr);

                    exception.Check();
                    return(result);
                }
Beispiel #8
0
                public int At(uint pos)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    int element = au_std_vectorInt_at(cppPtr, pos, exception.cppPtr);

                    exception.Check();
                    return(element);
                }
                public VectorPoint2f At(uint pos)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    VectorPoint2f     element   = new VectorPoint2f(au_std_vectorVectorPoint2f_at(cppPtr, pos, exception.cppPtr), DeleteResponsibility.False);

                    exception.Check();
                    return(element);
                }
Beispiel #10
0
 public static void RefineDetectedMarkers(Cv.Core.Mat image, Board board, Std.VectorVectorPoint2f detectedCorners, Std.VectorInt detectedIds,
                                          Std.VectorVectorPoint2f rejectedCorners, Cv.Core.Mat cameraMatrix, Cv.Core.Mat distCoeffs, float minRepDistance)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     au_refineDetectedMarkers5(image.cppPtr, board.cppPtr, detectedCorners.cppPtr, detectedIds.cppPtr, rejectedCorners.cppPtr, cameraMatrix.cppPtr,
                               distCoeffs.cppPtr, minRepDistance, exception.cppPtr);
     exception.Check();
 }
Beispiel #11
0
                public int GetDistanceToId(Dictionary dictionary, Cv.Core.Mat bits, int id)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    int distanceToId            = au_Dictionary_getDistanceToId2(cppPtr, bits.cppPtr, id, exception.cppPtr);

                    exception.Check();
                    return(distanceToId);
                }
Beispiel #12
0
 static public CharucoBoard Create(int squaresX, int squaresY, float squareLength, float markerLength, Dictionary dictionary)
 {
     Cv.Core.Exception exception       = new Cv.Core.Exception();
     System.IntPtr     charucoBoardPtr = au_CharucoBoard_create(squaresX, squaresY, squareLength, markerLength, dictionary.cppPtr,
                                                                exception.cppPtr);
     exception.Check();
     return(new CharucoBoard(charucoBoardPtr));
 }
Beispiel #13
0
 public static void RefineDetectedMarkers(Cv.Core.Mat image, Board board, Std.VectorVectorPoint2f detectedCorners, Std.VectorInt detectedIds,
                                          Std.VectorVectorPoint2f rejectedCorners, Cv.Core.Mat cameraMatrix, Cv.Core.Mat distCoeffs, float minRepDistance, float errorCorrectionRate,
                                          bool checkAllOrders, Std.VectorInt recoveredIdxs)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     au_refineDetectedMarkers2(image.cppPtr, board.cppPtr, detectedCorners.cppPtr, detectedIds.cppPtr, rejectedCorners.cppPtr, cameraMatrix.cppPtr,
                               distCoeffs.cppPtr, minRepDistance, errorCorrectionRate, checkAllOrders, recoveredIdxs.cppPtr, exception.cppPtr);
     exception.Check();
 }
Beispiel #14
0
                public void Draw(Cv.Core.Size outSize, out Cv.Core.Mat img, int marginSize, int borderBits)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    System.IntPtr     imgPtr;

                    au_CharucoBoard_draw1(cppPtr, outSize.cppPtr, out imgPtr, marginSize, borderBits, exception.cppPtr);
                    img = new Cv.Core.Mat(imgPtr);

                    exception.Check();
                }
Beispiel #15
0
                public void Draw(Cv.Core.Size outSize, out Cv.Core.Mat img, int marginSize)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    System.IntPtr     imgPtr;

                    au_GridBoard_draw2(cppPtr, outSize.cppPtr, out imgPtr, marginSize, exception.cppPtr);
                    img = new Cv.Core.Mat(imgPtr);

                    exception.Check();
                }
Beispiel #16
0
                public void Draw(Cv.Core.Size outSize, out Cv.Core.Mat img)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    System.IntPtr     imgPtr;

                    au_CharucoBoard_draw3(cppPtr, outSize.cppPtr, out imgPtr, exception.cppPtr);
                    img = new Cv.Core.Mat(imgPtr);

                    exception.Check();
                }
Beispiel #17
0
            public static void DrawCharucoDiamond(Dictionary dictionary, Cv.Core.Vec4i ids, int squareLength, int markerLength, out Cv.Core.Mat image)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     imagePtr;

                au_drawCharucoDiamond3(dictionary.cppPtr, ids.cppPtr, squareLength, markerLength, out imagePtr, exception.cppPtr);
                image = new Cv.Core.Mat(imagePtr);

                exception.Check();
            }
Beispiel #18
0
                public void DrawMarker(int id, int sidePixels, out Cv.Core.Mat img, int borderBits)
                {
                    Cv.Core.Exception exception = new Cv.Core.Exception();
                    System.IntPtr     imgPtr;

                    au_Dictionary_drawMarker(cppPtr, id, sidePixels, out imgPtr, borderBits, exception.cppPtr);
                    img = new Cv.Core.Mat(imgPtr);

                    exception.Check();
                }
Beispiel #19
0
            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);
            }
Beispiel #20
0
            public static void DetectMarkers(Cv.Core.Mat image, Dictionary dictionary, out Std.VectorVectorPoint2f corners, out Std.VectorInt ids)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     cornersPtr, idsPtr;

                au_detectMarkers3(image.cppPtr, dictionary.cppPtr, out cornersPtr, out idsPtr, exception.cppPtr);
                corners = new Std.VectorVectorPoint2f(cornersPtr);
                ids     = new Std.VectorInt(idsPtr);

                exception.Check();
            }
Beispiel #21
0
            public static void EstimatePoseSingleMarkers(Std.VectorVectorPoint2f corners, float markerLength, Cv.Core.Mat cameraMatrix, Cv.Core.Mat distCoeffs,
                                                         out Std.VectorVec3d rvecs, out Std.VectorVec3d tvecs)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecsPtr, tvecsPtr;

                au_estimatePoseSingleMarkers(corners.cppPtr, markerLength, cameraMatrix.cppPtr, distCoeffs.cppPtr, out rvecsPtr, out tvecsPtr, exception.cppPtr);
                rvecs = new Std.VectorVec3d(rvecsPtr);
                tvecs = new Std.VectorVec3d(tvecsPtr);

                exception.Check();
            }
Beispiel #22
0
            public static void DetectCharucoDiamond(Cv.Core.Mat image, Std.VectorVectorPoint2f markerCorners, Std.VectorInt markerIds, float squareMarkerLengthRate,
                                                    out Std.VectorVectorPoint2f diamondCorners, out Std.VectorVec4i diamondIds)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     diamondCornersPtr, diamondIdsPtr;

                au_detectCharucoDiamond3(image.cppPtr, markerCorners.cppPtr, markerIds.cppPtr, squareMarkerLengthRate, out diamondCornersPtr,
                                         out diamondIdsPtr, exception.cppPtr);
                diamondCorners = new Std.VectorVectorPoint2f(diamondCornersPtr);
                diamondIds     = new Std.VectorVec4i(diamondIdsPtr);

                exception.Check();
            }
Beispiel #23
0
            public static void DetectMarkers(Cv.Core.Mat image, Dictionary dictionary, out Std.VectorVectorPoint2f corners, out Std.VectorInt ids,
                                             DetectorParameters parameters, out Std.VectorVectorPoint2f rejectedImgPoints)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     cornersPtr, idsPtr, rejectedPtr;

                au_detectMarkers1(image.cppPtr, dictionary.cppPtr, out cornersPtr, out idsPtr, parameters.cppPtr, out rejectedPtr, exception.cppPtr);
                corners           = new Std.VectorVectorPoint2f(cornersPtr);
                ids               = new Std.VectorInt(idsPtr);
                rejectedImgPoints = new Std.VectorVectorPoint2f(rejectedPtr);

                exception.Check();
            }
Beispiel #24
0
            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)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecsPtr;

                double reProjectionError = au_calibrateCameraAruco4(corners.cppPtr, ids.cppPtr, counter.cppPtr, board.cppPtr, imageSize.cppPtr, cameraMatrix.cppPtr,
                                                                    distCoeffs.cppPtr, out rvecsPtr, exception.cppPtr);

                rvecs = new Std.VectorMat(rvecsPtr);

                exception.Check();
                return(reProjectionError);
            }
Beispiel #25
0
            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.Calib3d.Calib flags)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecsPtr, tvecsPtr;

                double reProjectionError = au_calibrateCameraCharuco2(charucoCorners.cppPtr, charucoIds.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);
            }
Beispiel #26
0
            public static int InterpolateCornersCharuco(Std.VectorVectorPoint2f markerCorners, Std.VectorInt markerIds, Cv.Core.Mat image, CharucoBoard board,
                                                        out Std.VectorPoint2f charucoCorners, out Std.VectorInt charucoIds)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     charucoCornersPtr, charucoIdsPtr;

                int interpolateCorners = au_interpolateCornersCharuco3(markerCorners.cppPtr, markerIds.cppPtr, image.cppPtr, board.cppPtr,
                                                                       out charucoCornersPtr, out charucoIdsPtr, exception.cppPtr);

                charucoCorners = new Std.VectorPoint2f(charucoCornersPtr);
                charucoIds     = new Std.VectorInt(charucoIdsPtr);
                exception.Check();

                return(interpolateCorners);
            }
Beispiel #27
0
            public static bool EstimatePoseCharucoBoard(Std.VectorPoint2f charucoCorners, Std.VectorInt charucoIds, CharucoBoard board, Cv.Core.Mat cameraMatrix,
                                                        Cv.Core.Mat distCoeffs, out Cv.Core.Vec3d rvec, out Cv.Core.Vec3d tvec)
            {
                Cv.Core.Exception exception = new Cv.Core.Exception();
                System.IntPtr     rvecPtr, tvecPtr;

                bool valid = au_estimatePoseCharucoBoard(charucoCorners.cppPtr, charucoIds.cppPtr, board.cppPtr, cameraMatrix.cppPtr, distCoeffs.cppPtr,
                                                         out rvecPtr, out tvecPtr, exception.cppPtr);

                rvec = new Cv.Core.Vec3d(rvecPtr);
                tvec = new Cv.Core.Vec3d(tvecPtr);

                exception.Check();
                return(valid);
            }
Beispiel #28
0
 public static void DrawDetectedDiamonds(Cv.Core.Mat image, Std.VectorVectorPoint2f diamondCorners)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     au_drawDetectedDiamonds3(image.cppPtr, diamondCorners.cppPtr, exception.cppPtr);
     exception.Check();
 }
Beispiel #29
0
 public static void DrawDetectedDiamonds(Cv.Core.Mat image, Std.VectorVectorPoint2f diamondCorners, Std.VectorVec4i diamondIds, Cv.Core.Scalar borderColor)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     au_drawDetectedDiamonds1(image.cppPtr, diamondCorners.cppPtr, diamondIds.cppPtr, borderColor.cppPtr, exception.cppPtr);
     exception.Check();
 }
Beispiel #30
0
 public static void DrawDetectedCornersCharuco(Cv.Core.Mat image, Std.VectorPoint2f charucoCorners)
 {
     Cv.Core.Exception exception = new Cv.Core.Exception();
     au_drawDetectedCornersCharuco3(image.cppPtr, charucoCorners.cppPtr, exception.cppPtr);
     exception.Check();
 }