Exemple #1
0
            public static void UndistortImage(Mat distorted, out Mat undistorted, Mat cameraMatrix, Mat distCoeffs,
                                              Mat xi, Rectifify flags,
                                              Mat newCameraMatrix)
            {
                var newSize = new Size();

                UndistortImage(distorted, out undistorted, cameraMatrix, distorted, xi, flags, newCameraMatrix,
                               newSize);
            }
Exemple #2
0
            public static void UndistortImage(Mat distorted, out Mat undistorted, Mat cameraMatrix, Mat distCoeffs,
                                              Mat xi, Rectifify flags,
                                              Mat newCameraMatrix, Size newSize)
            {
                var R = new Mat(3, 3, Type.CV_64F, new double[9] {
                    1, 0, 0, 0, 1, 0, 0, 0, 1
                });

                UndistortImage(distorted, out undistorted, cameraMatrix, distorted, xi, flags, newCameraMatrix, newSize,
                               R);
            }
Exemple #3
0
      public static void InitUndistortRectifyMap(Mat cameraMatrix, Mat distCoeffs, Mat xi, Mat R, Mat newCameraMatrix, Size size, Type m1type,
        out Mat map1, out Mat map2, Rectifify flags)
      {
        Exception exception = new Exception();
        IntPtr map1Ptr, map2Ptr;

        au_cv_ccalib_omnidir_initUndistortRectifyMap(cameraMatrix.CppPtr, distCoeffs.CppPtr, xi.CppPtr, R.CppPtr, newCameraMatrix.CppPtr, size.CppPtr,
          (int)m1type, out map1Ptr, out map2Ptr, (int)flags, exception.CppPtr);
        map1 = new Mat(map1Ptr);
        map2 = new Mat(map2Ptr);

        exception.Check();
      }
Exemple #4
0
            public static void UndistortImage(Mat distorted, out Mat undistorted, Mat cameraMatrix, Mat distCoeffs,
                                              Mat xi, Rectifify flags,
                                              Mat newCameraMatrix, Size newSize, Mat R)
            {
                var    exception = new Exception();
                IntPtr undistortedPtr;

                au_cv_ccalib_omnidir_undistortImage(distorted.CppPtr, out undistortedPtr, cameraMatrix.CppPtr,
                                                    distCoeffs.CppPtr, xi.CppPtr, (int)flags,
                                                    newCameraMatrix.CppPtr, newSize.CppPtr, R.CppPtr, exception.CppPtr);
                undistorted = new Mat(undistortedPtr);

                exception.Check();
            }
Exemple #5
0
 public static void UndistortImage(Mat distorted, out Mat undistorted, Mat cameraMatrix, Mat distCoeffs, Mat xi, Rectifify flags)
 {
     UndistortImage(distorted, out undistorted, cameraMatrix, distorted, xi, flags, cameraMatrix);
 }