OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.CalibModule.Calib Class Reference

Static Public Member Functions

static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, int flags)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, int flags, in Vec3d criteria)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, int flags)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, int flags, in(double type, double maxCount, double epsilon) criteria)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, int flags)
 
static double calibrateCamera (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, int flags, TermCriteria criteria)
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags, in Vec3d criteria)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags, in(double type, double maxCount, double epsilon) criteria)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraExtended (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors, int flags, TermCriteria criteria)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, int flags)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, int flags, in Vec3d criteria)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, int flags)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, int flags, in(double type, double maxCount, double epsilon) criteria)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, int flags)
 
static double calibrateCameraRO (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, int flags, TermCriteria criteria)
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags, in Vec3d criteria)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags, in(double type, double maxCount, double epsilon) criteria)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double calibrateCameraROExtended (List< Mat > objectPoints, List< Mat > imagePoints, Size imageSize, int iFixedPoint, Mat cameraMatrix, Mat distCoeffs, List< Mat > rvecs, List< Mat > tvecs, Mat newObjPoints, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat stdDeviationsObjPoints, Mat perViewErrors, int flags, TermCriteria criteria)
 Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs, int flags)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, in Vec2d image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs, int flags, in Vec3d criteria)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs, int flags)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, in(double width, double height) image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs, int flags, in(double type, double maxCount, double epsilon) criteria)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, Size image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, Size image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs, int flags)
 Performs camera calibration.
 
static double fisheye_calibrate (List< Mat > objectPoints, List< Mat > imagePoints, Size image_size, Mat K, Mat D, List< Mat > rvecs, List< Mat > tvecs, int flags, TermCriteria criteria)
 Performs camera calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in Vec2d imageSize, Mat R, Mat T)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in Vec2d imageSize, Mat R, Mat T, int flags)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in Vec2d imageSize, Mat R, Mat T, int flags, in Vec3d criteria)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in Vec2d imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in Vec2d imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs, int flags)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in Vec2d imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs, int flags, in Vec3d criteria)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in(double width, double height) imageSize, Mat R, Mat T)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in(double width, double height) imageSize, Mat R, Mat T, int flags)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in(double width, double height) imageSize, Mat R, Mat T, int flags, in(double type, double maxCount, double epsilon) criteria)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in(double width, double height) imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in(double width, double height) imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs, int flags)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, in(double width, double height) imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs, int flags, in(double type, double maxCount, double epsilon) criteria)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags, TermCriteria criteria)
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs, int flags)
 Performs stereo calibration.
 
static double fisheye_stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, List< Mat > rvecs, List< Mat > tvecs, int flags, TermCriteria criteria)
 Performs stereo calibration.
 
static Mat initCameraMatrix2D (List< MatOfPoint3f > objectPoints, List< MatOfPoint2f > imagePoints, in Vec2d imageSize)
 Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
 
static Mat initCameraMatrix2D (List< MatOfPoint3f > objectPoints, List< MatOfPoint2f > imagePoints, in Vec2d imageSize, double aspectRatio)
 Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
 
static Mat initCameraMatrix2D (List< MatOfPoint3f > objectPoints, List< MatOfPoint2f > imagePoints, in(double width, double height) imageSize)
 Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
 
static Mat initCameraMatrix2D (List< MatOfPoint3f > objectPoints, List< MatOfPoint2f > imagePoints, in(double width, double height) imageSize, double aspectRatio)
 Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
 
static Mat initCameraMatrix2D (List< MatOfPoint3f > objectPoints, List< MatOfPoint2f > imagePoints, Size imageSize)
 Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
 
static Mat initCameraMatrix2D (List< MatOfPoint3f > objectPoints, List< MatOfPoint2f > imagePoints, Size imageSize, double aspectRatio)
 Finds an initial camera intrinsic matrix from 3D-2D point correspondences.
 
static double registerCameras (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors)
 
static double registerCameras (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags)
 
static double registerCameras (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, in Vec3d criteria)
 
static double registerCameras (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, in(double type, double maxCount, double epsilon) criteria)
 
static double registerCameras (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, TermCriteria criteria)
 
static double registerCamerasExtended (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors)
 Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.
 
static double registerCamerasExtended (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags)
 Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.
 
static double registerCamerasExtended (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags, in Vec3d criteria)
 Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.
 
static double registerCamerasExtended (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags, in(double type, double maxCount, double epsilon) criteria)
 Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.
 
static double registerCamerasExtended (List< Mat > objectPoints1, List< Mat > objectPoints2, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, int cameraModel1, Mat cameraMatrix2, Mat distCoeffs2, int cameraModel2, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags, TermCriteria criteria)
 Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, int flags)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, int flags, in Vec3d criteria)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, in Vec3d criteria)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, int flags)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, int flags, in(double type, double maxCount, double epsilon) criteria)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, in(double type, double maxCount, double epsilon) criteria)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, int flags, TermCriteria criteria)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags)
 
static double stereoCalibrate (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, Mat perViewErrors, int flags, TermCriteria criteria)
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in Vec2d imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags, in Vec3d criteria)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, in(double width, double height) imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags, in(double type, double maxCount, double epsilon) criteria)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 
static double stereoCalibrateExtended (List< Mat > objectPoints, List< Mat > imagePoints1, List< Mat > imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F, List< Mat > rvecs, List< Mat > tvecs, Mat perViewErrors, int flags, TermCriteria criteria)
 Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.
 

Static Public Attributes

const int CALIB_CHECK_COND = (1 << 24)
 C++: enum <unnamed>
 
const int CALIB_DISABLE_SCHUR_COMPLEMENT = (1 << 18)
 C++: enum <unnamed>
 
const int CALIB_FIX_ASPECT_RATIO = 0x00002
 C++: enum <unnamed>
 
const int CALIB_FIX_FOCAL_LENGTH = 0x00010
 C++: enum <unnamed>
 
const int CALIB_FIX_INTRINSIC = 0x00100
 C++: enum <unnamed>
 
const int CALIB_FIX_K1 = 0x00020
 C++: enum <unnamed>
 
const int CALIB_FIX_K2 = 0x00040
 C++: enum <unnamed>
 
const int CALIB_FIX_K3 = 0x00080
 C++: enum <unnamed>
 
const int CALIB_FIX_K4 = 0x00800
 C++: enum <unnamed>
 
const int CALIB_FIX_K5 = 0x01000
 C++: enum <unnamed>
 
const int CALIB_FIX_K6 = 0x02000
 C++: enum <unnamed>
 
const int CALIB_FIX_PRINCIPAL_POINT = 0x00004
 C++: enum <unnamed>
 
const int CALIB_FIX_S1_S2_S3_S4 = 0x10000
 C++: enum <unnamed>
 
const int CALIB_FIX_SKEW = (1 << 25)
 C++: enum <unnamed>
 
const int CALIB_FIX_TANGENT_DIST = 0x200000
 C++: enum <unnamed>
 
const int CALIB_FIX_TAUX_TAUY = 0x80000
 C++: enum <unnamed>
 
const int CALIB_HAND_EYE_ANDREFF = 3
 C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)
 
const int CALIB_HAND_EYE_DANIILIDIS = 4
 C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)
 
const int CALIB_HAND_EYE_HORAUD = 2
 C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)
 
const int CALIB_HAND_EYE_PARK = 1
 C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)
 
const int CALIB_HAND_EYE_TSAI = 0
 C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)
 
const int CALIB_MODEL_FISHEYE = 1
 C++: enum CameraModel (cv.CameraModel)
 
const int CALIB_MODEL_PINHOLE = 0
 C++: enum CameraModel (cv.CameraModel)
 
const int CALIB_RATIONAL_MODEL = 0x04000
 C++: enum <unnamed>
 
const int CALIB_RECOMPUTE_EXTRINSIC = (1 << 23)
 C++: enum <unnamed>
 
const int CALIB_ROBOT_WORLD_HAND_EYE_LI = 1
 C++: enum RobotWorldHandEyeCalibrationMethod (cv.RobotWorldHandEyeCalibrationMethod)
 
const int CALIB_ROBOT_WORLD_HAND_EYE_SHAH = 0
 C++: enum RobotWorldHandEyeCalibrationMethod (cv.RobotWorldHandEyeCalibrationMethod)
 
const int CALIB_SAME_FOCAL_LENGTH = 0x00200
 C++: enum <unnamed>
 
const int CALIB_STEREO_REGISTRATION = (1 << 26)
 C++: enum <unnamed>
 
const int CALIB_THIN_PRISM_MODEL = 0x08000
 C++: enum <unnamed>
 
const int CALIB_TILTED_MODEL = 0x40000
 C++: enum <unnamed>
 
const int CALIB_USE_EXTRINSIC_GUESS = (1 << 22)
 C++: enum <unnamed>
 
const int CALIB_USE_INTRINSIC_GUESS = 0x00001
 C++: enum <unnamed>
 
const int CALIB_USE_LU = (1 << 17)
 C++: enum <unnamed>
 
const int CALIB_USE_QR = 0x100000
 C++: enum <unnamed>
 
const int CALIB_ZERO_DISPARITY = 0x00400
 C++: enum <unnamed>
 
const int CALIB_ZERO_TANGENT_DIST = 0x00008
 C++: enum <unnamed>
 

Member Function Documentation

◆ calibrateCamera() [1/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [2/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [3/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
in Vec3d criteria )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [4/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [5/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [6/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [7/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [8/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCamera() [9/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCamera ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
TermCriteria criteria )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraExtended() [1/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [2/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors,
int flags )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [3/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors,
int flags,
in Vec3d criteria )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [4/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [5/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors,
int flags )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [6/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [7/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [8/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors,
int flags )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraExtended() [9/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat perViewErrors,
int flags,
TermCriteria criteria )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

Parameters
objectPointsIn the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space (e.g. std::vector<std::vector<cv::Vec3f>>). The outer vector contains as many elements as the number of pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns or even different patterns in different views. Then, the vectors will be different. Although the points are 3D, they all lie in the calibration pattern's XY coordinate plane (thus 0 in the Z-coordinate), if the used calibration pattern is a planar rig. In the old interface all the vectors of object points from different views are concatenated together.
imagePointsIn the new interface it is a vector of vectors of the projections of calibration pattern points (e.g. std::vector<std::vector<cv::Vec2f>>). imagePoints.size() and objectPoints.size(), and imagePoints[i].size() and objectPoints[i].size() for each i, must be equal, respectively. In the old interface all the vectors of object points from different views are concatenated together.
imageSizeSize of the image used only to initialize the camera intrinsic matrix.
cameraMatrixInput/output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO, CALIB_FIX_PRINCIPAL_POINT or CALIB_FIX_FOCAL_LENGTH are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
distCoeffsInput/output vector of distortion coefficients \(\distcoeffs\).
rvecsOutput vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vector<cv::Mat>>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description above.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. Order of deviations values: \((f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3, s_4, \tau_x, \tau_y)\) If one of parameters is not estimated, it's deviation is equals to zero.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \((R_0, T_0, \dotsc , R_{M - 1}, T_{M - 1})\) where M is the number of pattern views. \(R_i, T_i\) are concatenated 1x3 vectors.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion. Note, that if intrinsic parameters are known, there is no need to use this function just to estimate extrinsic parameters. Use solvePnP instead.
  • CALIB_DISABLE_SCHUR_COMPLEMENT Disable Schur complement and use the Bouguet calibration engine ([Zhang2000], [BouguetMCT]).
  • CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when CALIB_USE_INTRINSIC_GUESS is set too.
  • CALIB_FIX_ASPECT_RATIO The functions consider only fy as a free parameter. The ratio fx/fy stays the same as in the input cameraMatrix . When CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are ignored, only their ratio is computed and used further.
  • CALIB_ZERO_TANGENT_DIST Tangential distortion coefficients \((p_1, p_2)\) are set to zeros and stay zero.
  • CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization if CALIB_USE_INTRINSIC_GUESS is set.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 The corresponding radial distortion coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Coefficients k4, k5, and k6 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients or more.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients or more.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. By default, the optimization follows a sparse bundle adjustment formulation with Schur complement; see [Triggs2000_bundle_adjustment] and [Lourakis2009_sba] for background. Use CALIB_DISABLE_SCHUR_COMPLEMENT to switch to the Bouguet calibration engine. The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved by using an object with known geometry and easily detectable feature points. Such an object is called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as a calibration rig (see findChessboardCorners). Currently, initialization of intrinsic parameters (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also be used as long as initial cameraMatrix is provided.

The algorithm performs the following steps:

  • Compute the initial intrinsic parameters (the option only available for planar calibration patterns) or read them from the input parameters. The distortion coefficients are all set to zeros initially unless some of CALIB_FIX_K? are specified.
  • Estimate the initial camera pose as if the intrinsic parameters have been already known. This is done using solvePnP .
  • Run the global Levenberg-Marquardt optimization algorithm to minimize the reprojection error, that is, the total sum of squared distances between the observed feature points imagePoints and the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details.
  • In practice, robust acquisition is essential for stable results: use multiple board poses with significant tilt, avoid collecting all views at a single working distance, span the expected working-distance range (a larger board with larger squares can help for longer distances).
Note
If you use a non-square (i.e. non-N-by-N) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, \(c_x\) and \(c_y\) very far from the image center, and/or large differences between \(f_x\) and \(f_y\) (ratios of 10:1 or more)), then you are probably using patternSize=cvSize(rows,cols) instead of using patternSize=cvSize(cols,rows) in findChessboardCorners.
The function may throw exceptions, if unsupported combination of parameters is provided or the system is underconstrained.
See also
calibrateCameraRO, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraRO() [1/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [2/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
int flags )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [3/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
int flags,
in Vec3d criteria )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [4/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [5/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
int flags )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [6/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [7/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [8/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
int flags )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraRO() [9/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraRO ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
int flags,
TermCriteria criteria )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ calibrateCameraROExtended() [1/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [2/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors,
int flags )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [3/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors,
int flags,
in Vec3d criteria )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [4/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [5/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors,
int flags )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [6/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [7/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [8/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors,
int flags )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ calibrateCameraROExtended() [9/9]

static double OpenCVForUnity.CalibModule.Calib.calibrateCameraROExtended ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size imageSize,
int iFixedPoint,
Mat cameraMatrix,
Mat distCoeffs,
List< Mat > rvecs,
List< Mat > tvecs,
Mat newObjPoints,
Mat stdDeviationsIntrinsics,
Mat stdDeviationsExtrinsics,
Mat stdDeviationsObjPoints,
Mat perViewErrors,
int flags,
TermCriteria criteria )
static

Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern.

This function is an extension of calibrateCamera with the method of releasing object which was proposed in [strobl2011iccv]. In many common cases with inaccurate, unmeasured, roughly planar targets (calibration plates), this method can dramatically improve the precision of the estimated camera parameters. Both the object-releasing method and standard method are supported by this function. Use the parameter iFixedPoint for method selection. In the internal implementation, calibrateCamera is a wrapper for this function.

Parameters
objectPointsVector of vectors of calibration pattern points in the calibration pattern coordinate space. See calibrateCamera for details. If the method of releasing object to be used, the identical calibration board must be used in each view and it must be fully visible, and all objectPoints[i] must be the same and all points should be roughly close to a plane. The calibration target has to be rigid, or at least static if the camera (rather than the calibration target) is shifted for grabbing images.
imagePointsVector of vectors of the projections of calibration pattern points. See calibrateCamera for details.
imageSizeSize of the image used only to initialize the intrinsic camera matrix.
iFixedPointThe index of the 3D object point in objectPoints[0] to be fixed. It also acts as a switch for calibration method selection. If object-releasing method to be used, pass in the parameter in the range of [1, objectPoints[0].size()-2], otherwise a value out of this range will make standard calibration method selected. Usually the top-right corner point of the calibration board grid is recommended to be fixed when object-releasing method being utilized. According to [strobl2011iccv], two other points are also fixed. In this implementation, objectPoints[0].front and objectPoints[0].back.z are used. With object-releasing method, accurate rvecs, tvecs and newObjPoints are only possible if coordinates of these three fixed points are accurate enough.
cameraMatrixOutput 3x3 floating-point camera matrix. See calibrateCamera for details.
distCoeffsOutput vector of distortion coefficients. See calibrateCamera for details.
rvecsOutput vector of rotation vectors estimated for each pattern view. See calibrateCamera for details.
tvecsOutput vector of translation vectors estimated for each pattern view.
newObjPointsThe updated output vector of calibration pattern points. The coordinates might be scaled based on three fixed points. The returned coordinates are accurate only if the above mentioned three fixed points are accurate. If not needed, noArray() can be passed in. This parameter is ignored with standard calibration method.
stdDeviationsIntrinsicsOutput vector of standard deviations estimated for intrinsic parameters. See calibrateCamera for details.
stdDeviationsExtrinsicsOutput vector of standard deviations estimated for extrinsic parameters. See calibrateCamera for details.
stdDeviationsObjPointsOutput vector of standard deviations estimated for refined coordinates of calibration pattern points. It has the same size and order as objectPoints[0] vector. This parameter is ignored with standard calibration method.
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of some predefined values. See calibrateCamera for details. If the method of releasing object is used, the calibration time may be much longer. CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with potentially less precise and less stable in some rare cases.
criteriaTermination criteria for the iterative optimization algorithm.
Returns
the overall RMS re-projection error.

The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The object-releasing extension follows [strobl2011iccv] and uses the same optimization core as calibrateCamera. See calibrateCamera for other detailed explanations.

See also
calibrateCamera, findChessboardCorners, solvePnP, initCameraMatrix2D, stereoCalibrate, undistort

◆ fisheye_calibrate() [1/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [2/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [3/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
in Vec2d image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
in Vec3d criteria )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [4/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [5/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [6/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
in(double width, double height) image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [7/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [8/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_calibrate() [9/9]

static double OpenCVForUnity.CalibModule.Calib.fisheye_calibrate ( List< Mat > objectPoints,
List< Mat > imagePoints,
Size image_size,
Mat K,
Mat D,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
TermCriteria criteria )
static

Performs camera calibration.

Parameters
objectPointsvector of vectors of calibration pattern points in the calibration pattern coordinate space.
imagePointsvector of vectors of the projections of calibration pattern points. imagePoints.size() and objectPoints.size() and imagePoints[i].size() must be equal to objectPoints[i].size() for each i.
image_sizeSize of the image used only to initialize the camera intrinsic matrix.
KOutput 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If cv::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
DOutput vector of distortion coefficients \(\distcoeffsfisheye\).
rvecsOutput vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
tvecsOutput vector of translation vectors estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_USE_INTRINSIC_GUESS cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
  • cv::CALIB_FIX_PRINCIPAL_POINT The principal point is not changed during the global optimization. It stays at the center or at a different location specified when cv::CALIB_USE_INTRINSIC_GUESS is set too.
  • cv::CALIB_FIX_FOCAL_LENGTH The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when cv::CALIB_USE_INTRINSIC_GUESS is set too.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [1/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in Vec2d imageSize,
Mat R,
Mat T )
static

◆ fisheye_stereoCalibrate() [2/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in Vec2d imageSize,
Mat R,
Mat T,
int flags )
static

◆ fisheye_stereoCalibrate() [3/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in Vec2d imageSize,
Mat R,
Mat T,
int flags,
in Vec3d criteria )
static

◆ fisheye_stereoCalibrate() [4/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in Vec2d imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [5/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in Vec2d imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [6/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in Vec2d imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
in Vec3d criteria )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [7/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in(double width, double height) imageSize,
Mat R,
Mat T )
static

◆ fisheye_stereoCalibrate() [8/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in(double width, double height) imageSize,
Mat R,
Mat T,
int flags )
static

◆ fisheye_stereoCalibrate() [9/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in(double width, double height) imageSize,
Mat R,
Mat T,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

◆ fisheye_stereoCalibrate() [10/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in(double width, double height) imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [11/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in(double width, double height) imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [12/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
in(double width, double height) imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [13/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
Size imageSize,
Mat R,
Mat T )
static

◆ fisheye_stereoCalibrate() [14/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
Size imageSize,
Mat R,
Mat T,
int flags )
static

◆ fisheye_stereoCalibrate() [15/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
Size imageSize,
Mat R,
Mat T,
int flags,
TermCriteria criteria )
static

◆ fisheye_stereoCalibrate() [16/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
Size imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [17/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
Size imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs,
int flags )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ fisheye_stereoCalibrate() [18/18]

static double OpenCVForUnity.CalibModule.Calib.fisheye_stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat K1,
Mat D1,
Mat K2,
Mat D2,
Size imageSize,
Mat R,
Mat T,
List< Mat > rvecs,
List< Mat > tvecs,
int flags,
TermCriteria criteria )
static

Performs stereo calibration.

Parameters
objectPointsVector of vectors of the calibration pattern points.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera.
K1Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of cv::CALIB_USE_INTRINSIC_GUESS , cv::CALIB_FIX_INTRINSIC are specified, some or all of the matrix components must be initialized.
D1Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements.
K2Input/output second camera intrinsic matrix. The parameter is similar to K1 .
D2Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 .
imageSizeSize of the image used only to initialize camera intrinsic matrix.
ROutput rotation matrix between the 1st and the 2nd camera coordinate systems.
TOutput translation vector between the coordinate systems of the cameras.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
flagsDifferent flags that may be zero or a combination of the following values:
  • cv::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.
  • cv::CALIB_USE_INTRINSIC_GUESS K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.
  • cv::CALIB_RECOMPUTE_EXTRINSIC Extrinsic will be recomputed after each iteration of intrinsic optimization.
  • cv::CALIB_CHECK_COND The functions will check validity of condition number.
  • cv::CALIB_FIX_SKEW Skew coefficient (alpha) is set to zero and stay zero.
  • cv::CALIB_FIX_K1,..., cv::CALIB_FIX_K4 Selected distortion coefficients are set to zeros and stay zero.
criteriaTermination criteria for the iterative optimization algorithm.

◆ initCameraMatrix2D() [1/6]

static Mat OpenCVForUnity.CalibModule.Calib.initCameraMatrix2D ( List< MatOfPoint3f > objectPoints,
List< MatOfPoint2f > imagePoints,
in Vec2d imageSize )
static

Finds an initial camera intrinsic matrix from 3D-2D point correspondences.

Parameters
objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both \(f_x\) and \(f_y\) are estimated independently. Otherwise, \(f_x = f_y \cdot \texttt{aspectRatio}\) .

The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.

◆ initCameraMatrix2D() [2/6]

static Mat OpenCVForUnity.CalibModule.Calib.initCameraMatrix2D ( List< MatOfPoint3f > objectPoints,
List< MatOfPoint2f > imagePoints,
in Vec2d imageSize,
double aspectRatio )
static

Finds an initial camera intrinsic matrix from 3D-2D point correspondences.

Parameters
objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both \(f_x\) and \(f_y\) are estimated independently. Otherwise, \(f_x = f_y \cdot \texttt{aspectRatio}\) .

The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.

◆ initCameraMatrix2D() [3/6]

static Mat OpenCVForUnity.CalibModule.Calib.initCameraMatrix2D ( List< MatOfPoint3f > objectPoints,
List< MatOfPoint2f > imagePoints,
in(double width, double height) imageSize )
static

Finds an initial camera intrinsic matrix from 3D-2D point correspondences.

Parameters
objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both \(f_x\) and \(f_y\) are estimated independently. Otherwise, \(f_x = f_y \cdot \texttt{aspectRatio}\) .

The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.

◆ initCameraMatrix2D() [4/6]

static Mat OpenCVForUnity.CalibModule.Calib.initCameraMatrix2D ( List< MatOfPoint3f > objectPoints,
List< MatOfPoint2f > imagePoints,
in(double width, double height) imageSize,
double aspectRatio )
static

Finds an initial camera intrinsic matrix from 3D-2D point correspondences.

Parameters
objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both \(f_x\) and \(f_y\) are estimated independently. Otherwise, \(f_x = f_y \cdot \texttt{aspectRatio}\) .

The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.

◆ initCameraMatrix2D() [5/6]

static Mat OpenCVForUnity.CalibModule.Calib.initCameraMatrix2D ( List< MatOfPoint3f > objectPoints,
List< MatOfPoint2f > imagePoints,
Size imageSize )
static

Finds an initial camera intrinsic matrix from 3D-2D point correspondences.

Parameters
objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both \(f_x\) and \(f_y\) are estimated independently. Otherwise, \(f_x = f_y \cdot \texttt{aspectRatio}\) .

The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.

◆ initCameraMatrix2D() [6/6]

static Mat OpenCVForUnity.CalibModule.Calib.initCameraMatrix2D ( List< MatOfPoint3f > objectPoints,
List< MatOfPoint2f > imagePoints,
Size imageSize,
double aspectRatio )
static

Finds an initial camera intrinsic matrix from 3D-2D point correspondences.

Parameters
objectPointsVector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See calibrateCamera for details.
imagePointsVector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
imageSizeImage size in pixels used to initialize the principal point.
aspectRatioIf it is zero or negative, both \(f_x\) and \(f_y\) are estimated independently. Otherwise, \(f_x = f_y \cdot \texttt{aspectRatio}\) .

The function estimates and returns an initial camera intrinsic matrix for the camera calibration process. Currently, the function only supports planar calibration patterns, which are patterns where each object point has z-coordinate =0.

◆ registerCameras() [1/5]

static double OpenCVForUnity.CalibModule.Calib.registerCameras ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors )
static

◆ registerCameras() [2/5]

static double OpenCVForUnity.CalibModule.Calib.registerCameras ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags )
static

◆ registerCameras() [3/5]

static double OpenCVForUnity.CalibModule.Calib.registerCameras ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags,
in Vec3d criteria )
static

◆ registerCameras() [4/5]

static double OpenCVForUnity.CalibModule.Calib.registerCameras ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

◆ registerCameras() [5/5]

static double OpenCVForUnity.CalibModule.Calib.registerCameras ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags,
TermCriteria criteria )
static

◆ registerCamerasExtended() [1/5]

static double OpenCVForUnity.CalibModule.Calib.registerCamerasExtended ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors )
static

Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.

Parameters
objectPoints1Vector of vectors of the calibration pattern points for camera 1. A similar structure as objectPoints in calibrateCamera and for each pattern view, both cameras do not need to see the same object points. objectPoints1.size(), imagePoints1.size() nees to be equal,as well as objectPoints1[i].size(), imagePoints1[i].size() need to be equal for each i.
objectPoints2Vector of vectors of the calibration pattern points for camera 2. A similar structure as objectPoints1. objectPoints2.size(), and imagePoints2.size() nees to be equal, as well as objectPoints2[i].size(), imagePoints2[i].size() need to be equal for each i. However, objectPoints1[i].size() and objectPoints2[i].size() are not required to be equal.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraModel1Flag reflecting the type of model for camera 1 (pinhole / fisheye):
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
cameraModel2Flag reflecting the type of model for camera 2 (pinhole / fisheye). See description for cameraModel1.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to the camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras similar to stereo pair calibration. The principle follows closely to stereoCalibrate. To understand the problem of estimating the relative pose between a camera pair, please refer to the description there. The difference for this function is that, camera intrinsics are not optimized and two cameras are not required to have overlapping fields of view as long as they are observing the same calibration target and the absolute positions of each object point are known.

The above illustration shows an example where such a case may become relevant. Additionally, it supports a camera pair with the mixed model (pinhole / fisheye). Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras.

Returns
the final value of the re-projection error.
See also
calibrateCamera, stereoCalibrate

◆ registerCamerasExtended() [2/5]

static double OpenCVForUnity.CalibModule.Calib.registerCamerasExtended ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags )
static

Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.

Parameters
objectPoints1Vector of vectors of the calibration pattern points for camera 1. A similar structure as objectPoints in calibrateCamera and for each pattern view, both cameras do not need to see the same object points. objectPoints1.size(), imagePoints1.size() nees to be equal,as well as objectPoints1[i].size(), imagePoints1[i].size() need to be equal for each i.
objectPoints2Vector of vectors of the calibration pattern points for camera 2. A similar structure as objectPoints1. objectPoints2.size(), and imagePoints2.size() nees to be equal, as well as objectPoints2[i].size(), imagePoints2[i].size() need to be equal for each i. However, objectPoints1[i].size() and objectPoints2[i].size() are not required to be equal.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraModel1Flag reflecting the type of model for camera 1 (pinhole / fisheye):
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
cameraModel2Flag reflecting the type of model for camera 2 (pinhole / fisheye). See description for cameraModel1.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to the camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras similar to stereo pair calibration. The principle follows closely to stereoCalibrate. To understand the problem of estimating the relative pose between a camera pair, please refer to the description there. The difference for this function is that, camera intrinsics are not optimized and two cameras are not required to have overlapping fields of view as long as they are observing the same calibration target and the absolute positions of each object point are known.

The above illustration shows an example where such a case may become relevant. Additionally, it supports a camera pair with the mixed model (pinhole / fisheye). Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras.

Returns
the final value of the re-projection error.
See also
calibrateCamera, stereoCalibrate

◆ registerCamerasExtended() [3/5]

static double OpenCVForUnity.CalibModule.Calib.registerCamerasExtended ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags,
in Vec3d criteria )
static

Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.

Parameters
objectPoints1Vector of vectors of the calibration pattern points for camera 1. A similar structure as objectPoints in calibrateCamera and for each pattern view, both cameras do not need to see the same object points. objectPoints1.size(), imagePoints1.size() nees to be equal,as well as objectPoints1[i].size(), imagePoints1[i].size() need to be equal for each i.
objectPoints2Vector of vectors of the calibration pattern points for camera 2. A similar structure as objectPoints1. objectPoints2.size(), and imagePoints2.size() nees to be equal, as well as objectPoints2[i].size(), imagePoints2[i].size() need to be equal for each i. However, objectPoints1[i].size() and objectPoints2[i].size() are not required to be equal.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraModel1Flag reflecting the type of model for camera 1 (pinhole / fisheye):
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
cameraModel2Flag reflecting the type of model for camera 2 (pinhole / fisheye). See description for cameraModel1.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to the camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras similar to stereo pair calibration. The principle follows closely to stereoCalibrate. To understand the problem of estimating the relative pose between a camera pair, please refer to the description there. The difference for this function is that, camera intrinsics are not optimized and two cameras are not required to have overlapping fields of view as long as they are observing the same calibration target and the absolute positions of each object point are known.

The above illustration shows an example where such a case may become relevant. Additionally, it supports a camera pair with the mixed model (pinhole / fisheye). Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras.

Returns
the final value of the re-projection error.
See also
calibrateCamera, stereoCalibrate

◆ registerCamerasExtended() [4/5]

static double OpenCVForUnity.CalibModule.Calib.registerCamerasExtended ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.

Parameters
objectPoints1Vector of vectors of the calibration pattern points for camera 1. A similar structure as objectPoints in calibrateCamera and for each pattern view, both cameras do not need to see the same object points. objectPoints1.size(), imagePoints1.size() nees to be equal,as well as objectPoints1[i].size(), imagePoints1[i].size() need to be equal for each i.
objectPoints2Vector of vectors of the calibration pattern points for camera 2. A similar structure as objectPoints1. objectPoints2.size(), and imagePoints2.size() nees to be equal, as well as objectPoints2[i].size(), imagePoints2[i].size() need to be equal for each i. However, objectPoints1[i].size() and objectPoints2[i].size() are not required to be equal.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraModel1Flag reflecting the type of model for camera 1 (pinhole / fisheye):
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
cameraModel2Flag reflecting the type of model for camera 2 (pinhole / fisheye). See description for cameraModel1.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to the camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras similar to stereo pair calibration. The principle follows closely to stereoCalibrate. To understand the problem of estimating the relative pose between a camera pair, please refer to the description there. The difference for this function is that, camera intrinsics are not optimized and two cameras are not required to have overlapping fields of view as long as they are observing the same calibration target and the absolute positions of each object point are known.

The above illustration shows an example where such a case may become relevant. Additionally, it supports a camera pair with the mixed model (pinhole / fisheye). Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras.

Returns
the final value of the re-projection error.
See also
calibrateCamera, stereoCalibrate

◆ registerCamerasExtended() [5/5]

static double OpenCVForUnity.CalibModule.Calib.registerCamerasExtended ( List< Mat > objectPoints1,
List< Mat > objectPoints2,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
int cameraModel1,
Mat cameraMatrix2,
Mat distCoeffs2,
int cameraModel2,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags,
TermCriteria criteria )
static

Calibrates a camera pair set up. This function finds the extrinsic parameters between the two cameras.

Parameters
objectPoints1Vector of vectors of the calibration pattern points for camera 1. A similar structure as objectPoints in calibrateCamera and for each pattern view, both cameras do not need to see the same object points. objectPoints1.size(), imagePoints1.size() nees to be equal,as well as objectPoints1[i].size(), imagePoints1[i].size() need to be equal for each i.
objectPoints2Vector of vectors of the calibration pattern points for camera 2. A similar structure as objectPoints1. objectPoints2.size(), and imagePoints2.size() nees to be equal, as well as objectPoints2[i].size(), imagePoints2[i].size() need to be equal for each i. However, objectPoints1[i].size() and objectPoints2[i].size() are not required to be equal.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraModel1Flag reflecting the type of model for camera 1 (pinhole / fisheye):
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
cameraModel2Flag reflecting the type of model for camera 2 (pinhole / fisheye). See description for cameraModel1.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to the camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras similar to stereo pair calibration. The principle follows closely to stereoCalibrate. To understand the problem of estimating the relative pose between a camera pair, please refer to the description there. The difference for this function is that, camera intrinsics are not optimized and two cameras are not required to have overlapping fields of view as long as they are observing the same calibration target and the absolute positions of each object point are known.

The above illustration shows an example where such a case may become relevant. Additionally, it supports a camera pair with the mixed model (pinhole / fisheye). Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras.

Returns
the final value of the re-projection error.
See also
calibrateCamera, stereoCalibrate

◆ stereoCalibrate() [1/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F )
static

◆ stereoCalibrate() [2/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
int flags )
static

◆ stereoCalibrate() [3/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
int flags,
in Vec3d criteria )
static

◆ stereoCalibrate() [4/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors )
static

◆ stereoCalibrate() [5/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags )
static

◆ stereoCalibrate() [6/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags,
in Vec3d criteria )
static

◆ stereoCalibrate() [7/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F )
static

◆ stereoCalibrate() [8/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
int flags )
static

◆ stereoCalibrate() [9/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

◆ stereoCalibrate() [10/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors )
static

◆ stereoCalibrate() [11/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags )
static

◆ stereoCalibrate() [12/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

◆ stereoCalibrate() [13/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F )
static

◆ stereoCalibrate() [14/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
int flags )
static

◆ stereoCalibrate() [15/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
int flags,
TermCriteria criteria )
static

◆ stereoCalibrate() [16/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors )
static

◆ stereoCalibrate() [17/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags )
static

◆ stereoCalibrate() [18/18]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrate ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
Mat perViewErrors,
int flags,
TermCriteria criteria )
static

◆ stereoCalibrateExtended() [1/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [2/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [3/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in Vec2d imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags,
in Vec3d criteria )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [4/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [5/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [6/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
in(double width, double height) imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags,
in(double type, double maxCount, double epsilon) criteria )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [7/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [8/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

◆ stereoCalibrateExtended() [9/9]

static double OpenCVForUnity.CalibModule.Calib.stereoCalibrateExtended ( List< Mat > objectPoints,
List< Mat > imagePoints1,
List< Mat > imagePoints2,
Mat cameraMatrix1,
Mat distCoeffs1,
Mat cameraMatrix2,
Mat distCoeffs2,
Size imageSize,
Mat R,
Mat T,
Mat E,
Mat F,
List< Mat > rvecs,
List< Mat > tvecs,
Mat perViewErrors,
int flags,
TermCriteria criteria )
static

Calibrates a stereo camera set up. This function finds the intrinsic parameters for each of the two cameras and the extrinsic parameters between the two cameras.

Parameters
objectPointsVector of vectors of the calibration pattern points. The same structure as in calibrateCamera. For each pattern view, both cameras need to see the same object points. Therefore, objectPoints.size(), imagePoints1.size(), and imagePoints2.size() need to be equal as well as objectPoints[i].size(), imagePoints1[i].size(), and imagePoints2[i].size() need to be equal for each i.
imagePoints1Vector of vectors of the projections of the calibration pattern points, observed by the first camera. The same structure as in calibrateCamera.
imagePoints2Vector of vectors of the projections of the calibration pattern points, observed by the second camera. The same structure as in calibrateCamera.
cameraMatrix1Input/output camera intrinsic matrix for the first camera, the same as in calibrateCamera. Furthermore, for the stereo case, additional flags may be used, see below.
distCoeffs1Input/output vector of distortion coefficients, the same as in calibrateCamera.
cameraMatrix2Input/output second camera intrinsic matrix for the second camera. See description for cameraMatrix1.
distCoeffs2Input/output lens distortion coefficients for the second camera. See description for distCoeffs1.
imageSizeSize of the image used only to initialize the camera intrinsic matrices.
ROutput rotation matrix. Together with the translation vector T, this matrix brings points given in the first camera's coordinate system to points in the second camera's coordinate system. In more technical terms, the tuple of R and T performs a change of basis from the first camera's coordinate system to the second camera's coordinate system. Due to its duality, this tuple is equivalent to the position of the first camera with respect to the second camera coordinate system.
TOutput translation vector, see description above.
EOutput essential matrix.
FOutput fundamental matrix.
rvecsOutput vector of rotation vectors ( Rodrigues ) estimated for each pattern view in the coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space of the first camera of the stereo pair.
tvecsOutput vector of translation vectors estimated for each pattern view, see parameter description of previous output parameter ( rvecs ).
perViewErrorsOutput vector of the RMS re-projection error estimated for each pattern view.
flagsDifferent flags that may be zero or a combination of the following values:
  • CALIB_SAME_FOCAL_LENGTH Enforce \(f^{(0)}_x=f^{(1)}_x\) and \(f^{(0)}_y=f^{(1)}_y\) .
  • CALIB_ZERO_TANGENT_DIST Set tangential distortion coefficients for each camera to zeros and fix there.
  • CALIB_FIX_K1,..., CALIB_FIX_K6 Do not change the corresponding radial distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_RATIONAL_MODEL Enable coefficients k4, k5, and k6. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the rational model and return 8 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_THIN_PRISM_MODEL Coefficients s1, s2, s3 and s4 are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the thin prism model and return 12 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_S1_S2_S3_S4 The thin prism distortion coefficients are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
  • CALIB_TILTED_MODEL Coefficients tauX and tauY are enabled. To provide the backward compatibility, this extra flag should be explicitly specified to make the calibration function use the tilted sensor model and return 14 coefficients. If the flag is not set, the function computes and returns only 5 distortion coefficients.
  • CALIB_FIX_TAUX_TAUY The coefficients of the tilted sensor model are not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
criteriaTermination criteria for the iterative optimization algorithm.

The function estimates the transformation between two cameras making a stereo pair. If one computes the poses of an object relative to the first camera and to the second camera, ( \(R_1\), \(T_1\) ) and ( \(R_2\), \(T_2\)), respectively, for a stereo camera where the relative position and orientation between the two cameras are fixed, then those poses definitely relate to each other. This means, if the relative position and orientation ( \(R\), \(T\)) of the two cameras is known, it is possible to compute ( \(R_2\), \(T_2\)) when ( \(R_1\), \(T_1\)) is given. This is what the described function does. It computes ( \(R\), \(T\)) such that:

\[R_2=R R_1\]

\[T_2=R T_1 + T.\]

Therefore, one can compute the coordinate representation of a 3D point for the second camera's coordinate system when given the point's coordinate representation in the first camera's coordinate system:

\[\begin{bmatrix} X_2 \\ Y_2 \\ Z_2 \\ 1 \end{bmatrix} = \begin{bmatrix} R & T \\ 0 & 1 \end{bmatrix} \begin{bmatrix} X_1 \\ Y_1 \\ Z_1 \\ 1 \end{bmatrix}.\]

Optionally, it computes the essential matrix E:

\[E= \vecthreethree{0}{-T_2}{T_1}{T_2}{0}{-T_0}{-T_1}{T_0}{0} R\]

where \(T_i\) are components of the translation vector \(T\) : \(T=[T_0, T_1, T_2]^T\) . And the function can also compute the fundamental matrix F:

\[F = cameraMatrix2^{-T}\cdot E \cdot cameraMatrix1^{-1}\]

Besides the stereo-related information, the function can also perform a full calibration of each of the two cameras. However, due to the high dimensionality of the parameter space and noise in the input data, the function can diverge from the correct solution. If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters. Otherwise, if all the parameters are estimated at once, it makes sense to restrict some parameters, for example, pass CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a reasonable assumption.

Similarly to calibrateCamera, the function minimizes the total re-projection error for all the points in all the available views from both cameras. The function returns the final value of the re-projection error.

Member Data Documentation

◆ CALIB_CHECK_COND

const int OpenCVForUnity.CalibModule.Calib.CALIB_CHECK_COND = (1 << 24)
static

C++: enum <unnamed>

◆ CALIB_DISABLE_SCHUR_COMPLEMENT

const int OpenCVForUnity.CalibModule.Calib.CALIB_DISABLE_SCHUR_COMPLEMENT = (1 << 18)
static

C++: enum <unnamed>

◆ CALIB_FIX_ASPECT_RATIO

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_ASPECT_RATIO = 0x00002
static

C++: enum <unnamed>

◆ CALIB_FIX_FOCAL_LENGTH

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_FOCAL_LENGTH = 0x00010
static

C++: enum <unnamed>

◆ CALIB_FIX_INTRINSIC

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_INTRINSIC = 0x00100
static

C++: enum <unnamed>

◆ CALIB_FIX_K1

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_K1 = 0x00020
static

C++: enum <unnamed>

◆ CALIB_FIX_K2

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_K2 = 0x00040
static

C++: enum <unnamed>

◆ CALIB_FIX_K3

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_K3 = 0x00080
static

C++: enum <unnamed>

◆ CALIB_FIX_K4

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_K4 = 0x00800
static

C++: enum <unnamed>

◆ CALIB_FIX_K5

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_K5 = 0x01000
static

C++: enum <unnamed>

◆ CALIB_FIX_K6

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_K6 = 0x02000
static

C++: enum <unnamed>

◆ CALIB_FIX_PRINCIPAL_POINT

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_PRINCIPAL_POINT = 0x00004
static

C++: enum <unnamed>

◆ CALIB_FIX_S1_S2_S3_S4

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_S1_S2_S3_S4 = 0x10000
static

C++: enum <unnamed>

◆ CALIB_FIX_SKEW

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_SKEW = (1 << 25)
static

C++: enum <unnamed>

◆ CALIB_FIX_TANGENT_DIST

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_TANGENT_DIST = 0x200000
static

C++: enum <unnamed>

◆ CALIB_FIX_TAUX_TAUY

const int OpenCVForUnity.CalibModule.Calib.CALIB_FIX_TAUX_TAUY = 0x80000
static

C++: enum <unnamed>

◆ CALIB_HAND_EYE_ANDREFF

const int OpenCVForUnity.CalibModule.Calib.CALIB_HAND_EYE_ANDREFF = 3
static

C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)

◆ CALIB_HAND_EYE_DANIILIDIS

const int OpenCVForUnity.CalibModule.Calib.CALIB_HAND_EYE_DANIILIDIS = 4
static

C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)

◆ CALIB_HAND_EYE_HORAUD

const int OpenCVForUnity.CalibModule.Calib.CALIB_HAND_EYE_HORAUD = 2
static

C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)

◆ CALIB_HAND_EYE_PARK

const int OpenCVForUnity.CalibModule.Calib.CALIB_HAND_EYE_PARK = 1
static

C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)

◆ CALIB_HAND_EYE_TSAI

const int OpenCVForUnity.CalibModule.Calib.CALIB_HAND_EYE_TSAI = 0
static

C++: enum HandEyeCalibrationMethod (cv.HandEyeCalibrationMethod)

◆ CALIB_MODEL_FISHEYE

const int OpenCVForUnity.CalibModule.Calib.CALIB_MODEL_FISHEYE = 1
static

C++: enum CameraModel (cv.CameraModel)

◆ CALIB_MODEL_PINHOLE

const int OpenCVForUnity.CalibModule.Calib.CALIB_MODEL_PINHOLE = 0
static

C++: enum CameraModel (cv.CameraModel)

◆ CALIB_RATIONAL_MODEL

const int OpenCVForUnity.CalibModule.Calib.CALIB_RATIONAL_MODEL = 0x04000
static

C++: enum <unnamed>

◆ CALIB_RECOMPUTE_EXTRINSIC

const int OpenCVForUnity.CalibModule.Calib.CALIB_RECOMPUTE_EXTRINSIC = (1 << 23)
static

C++: enum <unnamed>

◆ CALIB_ROBOT_WORLD_HAND_EYE_LI

const int OpenCVForUnity.CalibModule.Calib.CALIB_ROBOT_WORLD_HAND_EYE_LI = 1
static

C++: enum RobotWorldHandEyeCalibrationMethod (cv.RobotWorldHandEyeCalibrationMethod)

◆ CALIB_ROBOT_WORLD_HAND_EYE_SHAH

const int OpenCVForUnity.CalibModule.Calib.CALIB_ROBOT_WORLD_HAND_EYE_SHAH = 0
static

C++: enum RobotWorldHandEyeCalibrationMethod (cv.RobotWorldHandEyeCalibrationMethod)

◆ CALIB_SAME_FOCAL_LENGTH

const int OpenCVForUnity.CalibModule.Calib.CALIB_SAME_FOCAL_LENGTH = 0x00200
static

C++: enum <unnamed>

◆ CALIB_STEREO_REGISTRATION

const int OpenCVForUnity.CalibModule.Calib.CALIB_STEREO_REGISTRATION = (1 << 26)
static

C++: enum <unnamed>

◆ CALIB_THIN_PRISM_MODEL

const int OpenCVForUnity.CalibModule.Calib.CALIB_THIN_PRISM_MODEL = 0x08000
static

C++: enum <unnamed>

◆ CALIB_TILTED_MODEL

const int OpenCVForUnity.CalibModule.Calib.CALIB_TILTED_MODEL = 0x40000
static

C++: enum <unnamed>

◆ CALIB_USE_EXTRINSIC_GUESS

const int OpenCVForUnity.CalibModule.Calib.CALIB_USE_EXTRINSIC_GUESS = (1 << 22)
static

C++: enum <unnamed>

◆ CALIB_USE_INTRINSIC_GUESS

const int OpenCVForUnity.CalibModule.Calib.CALIB_USE_INTRINSIC_GUESS = 0x00001
static

C++: enum <unnamed>

◆ CALIB_USE_LU

const int OpenCVForUnity.CalibModule.Calib.CALIB_USE_LU = (1 << 17)
static

C++: enum <unnamed>

◆ CALIB_USE_QR

const int OpenCVForUnity.CalibModule.Calib.CALIB_USE_QR = 0x100000
static

C++: enum <unnamed>

◆ CALIB_ZERO_DISPARITY

const int OpenCVForUnity.CalibModule.Calib.CALIB_ZERO_DISPARITY = 0x00400
static

C++: enum <unnamed>

◆ CALIB_ZERO_TANGENT_DIST

const int OpenCVForUnity.CalibModule.Calib.CALIB_ZERO_TANGENT_DIST = 0x00008
static

C++: enum <unnamed>


The documentation for this class was generated from the following files: