C API
// typedefs typedef struct CvPOSITObject CvPOSITObject; // enums enum { @140::CV_ITERATIVE = 0, @140::CV_EPNP = 1, @140::CV_P3P = 2, @140::CV_DLS = 3, }; // structs struct CvStereoBMState; // global functions void cvCalcMatMulDeriv( const CvMat* A, const CvMat* B, CvMat* dABdA, CvMat* dABdB ); double cvCalibrateCamera2( const CvMat* object_points, const CvMat* image_points, const CvMat* point_counts, CvSize image_size, CvMat* camera_matrix, CvMat* distortion_coeffs, CvMat* rotation_vectors = NULL, CvMat* translation_vectors = NULL, int flags = 0, CvTermCriteria term_crit = cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 30, DBL_EPSILON) ); void cvCalibrationMatrixValues( const CvMat* camera_matrix, CvSize image_size, double aperture_width = 0, double aperture_height = 0, double* fovx = NULL, double* fovy = NULL, double* focal_length = NULL, CvPoint2D64f* principal_point = NULL, double* pixel_aspect_ratio = NULL ); int cvCheckChessboard( IplImage* src, CvSize size ); void cvComposeRT( const CvMat* _rvec1, const CvMat* _tvec1, const CvMat* _rvec2, const CvMat* _tvec2, CvMat* _rvec3, CvMat* _tvec3, CvMat* dr3dr1 = 0, CvMat* dr3dt1 = 0, CvMat* dr3dr2 = 0, CvMat* dr3dt2 = 0, CvMat* dt3dr1 = 0, CvMat* dt3dt1 = 0, CvMat* dt3dr2 = 0, CvMat* dt3dt2 = 0 ); void cvComputeCorrespondEpilines( const CvMat* points, int which_image, const CvMat* fundamental_matrix, CvMat* correspondent_lines ); void cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst ); void cvCorrectMatches( CvMat* F, CvMat* points1, CvMat* points2, CvMat* new_points1, CvMat* new_points2 ); CvPOSITObject* cvCreatePOSITObject( CvPoint3D32f* points, int point_count ); CvStereoBMState* cvCreateStereoBMState( int preset = 0, int numberOfDisparities = 0 ); void cvDecomposeProjectionMatrix( const CvMat* projMatr, CvMat* calibMatr, CvMat* rotMatr, CvMat* posVect, CvMat* rotMatrX = NULL, CvMat* rotMatrY = NULL, CvMat* rotMatrZ = NULL, CvPoint3D64f* eulerAngles = NULL ); void cvDrawChessboardCorners( CvArr* image, CvSize pattern_size, CvPoint2D32f* corners, int count, int pattern_was_found ); int cvFindChessboardCorners( const void* image, CvSize pattern_size, CvPoint2D32f* corners, int* corner_count = NULL, int flags = 1+2 ); void cvFindExtrinsicCameraParams2( const CvMat* object_points, const CvMat* image_points, const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvMat* rotation_vector, CvMat* translation_vector, int use_extrinsic_guess = 0 ); int cvFindFundamentalMat( const CvMat* points1, const CvMat* points2, CvMat* fundamental_matrix, int method = 8, double param1 = 3., double param2 = 0.99, CvMat* status = NULL ); int cvFindHomography( const CvMat* src_points, const CvMat* dst_points, CvMat* homography, int method = 0, double ransacReprojThreshold = 3, CvMat* mask = 0, int maxIters = 2000, double confidence = 0.995 ); void cvFindStereoCorrespondenceBM( const CvArr* left, const CvArr* right, CvArr* disparity, CvStereoBMState* state ); void cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix, const CvMat* dist_coeffs, CvSize image_size, double alpha, CvMat* new_camera_matrix, CvSize new_imag_size = cvSize(0, 0), CvRect* valid_pixel_ROI = 0, int center_principal_point = 0 ); CvRect cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity, int numberOfDisparities, int SADWindowSize ); void cvInitIntrinsicParams2D( const CvMat* object_points, const CvMat* image_points, const CvMat* npoints, CvSize image_size, CvMat* camera_matrix, double aspect_ratio = 1. ); void cvPOSIT( CvPOSITObject* posit_object, CvPoint2D32f* image_points, double focal_length, CvTermCriteria criteria, float* rotation_matrix, float* translation_vector ); void cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector, const CvMat* translation_vector, const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvMat* image_points, CvMat* dpdrot = NULL, CvMat* dpdt = NULL, CvMat* dpdf = NULL, CvMat* dpdc = NULL, CvMat* dpddist = NULL, double aspect_ratio = 0 ); int cvRANSACUpdateNumIters( double p, double err_prob, int model_points, int max_iters ); void cvReleasePOSITObject(CvPOSITObject** posit_object); void cvReleaseStereoBMState(CvStereoBMState** state); void cvReprojectImageTo3D( const CvArr* disparityImage, CvArr* _3dImage, const CvMat* Q, int handleMissingValues = 0 ); int cvRodrigues2( const CvMat* src, CvMat* dst, CvMat* jacobian = 0 ); void cvRQDecomp3x3( const CvMat* matrixM, CvMat* matrixR, CvMat* matrixQ, CvMat* matrixQx = NULL, CvMat* matrixQy = NULL, CvMat* matrixQz = NULL, CvPoint3D64f* eulerAngles = NULL ); double cvStereoCalibrate( const CvMat* object_points, const CvMat* image_points1, const CvMat* image_points2, const CvMat* npoints, CvMat* camera_matrix1, CvMat* dist_coeffs1, CvMat* camera_matrix2, CvMat* dist_coeffs2, CvSize image_size, CvMat* R, CvMat* T, CvMat* E = 0, CvMat* F = 0, int flags = 256, CvTermCriteria term_crit = cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 30, 1e-6) ); void cvStereoRectify( const CvMat* camera_matrix1, const CvMat* camera_matrix2, const CvMat* dist_coeffs1, const CvMat* dist_coeffs2, CvSize image_size, const CvMat* R, const CvMat* T, CvMat* R1, CvMat* R2, CvMat* P1, CvMat* P2, CvMat* Q = 0, int flags = 1024, double alpha = -1, CvSize new_image_size = cvSize(0, 0), CvRect* valid_pix_ROI1 = 0, CvRect* valid_pix_ROI2 = 0 ); int cvStereoRectifyUncalibrated( const CvMat* points1, const CvMat* points2, const CvMat* F, CvSize img_size, CvMat* H1, CvMat* H2, double threshold = 5 ); void cvTriangulatePoints( CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMat* projPoints2, CvMat* points4D ); void cvValidateDisparity( CvArr* disparity, const CvArr* cost, int minDisparity, int numberOfDisparities, int disp12MaxDiff = 1 ); // macros #define CV_CALIB_CB_ADAPTIVE_THRESH #define CV_CALIB_CB_FAST_CHECK #define CV_CALIB_CB_FILTER_QUADS #define CV_CALIB_CB_NORMALIZE_IMAGE #define CV_CALIB_FIX_ASPECT_RATIO #define CV_CALIB_FIX_FOCAL_LENGTH #define CV_CALIB_FIX_INTRINSIC #define CV_CALIB_FIX_K1 #define CV_CALIB_FIX_K2 #define CV_CALIB_FIX_K3 #define CV_CALIB_FIX_K4 #define CV_CALIB_FIX_K5 #define CV_CALIB_FIX_K6 #define CV_CALIB_FIX_PRINCIPAL_POINT #define CV_CALIB_FIX_S1_S2_S3_S4 #define CV_CALIB_FIX_TAUX_TAUY #define CV_CALIB_NINTRINSIC #define CV_CALIB_RATIONAL_MODEL #define CV_CALIB_SAME_FOCAL_LENGTH #define CV_CALIB_THIN_PRISM_MODEL #define CV_CALIB_TILTED_MODEL #define CV_CALIB_USE_INTRINSIC_GUESS #define CV_CALIB_ZERO_DISPARITY #define CV_CALIB_ZERO_TANGENT_DIST #define CV_FM_7POINT #define CV_FM_8POINT #define CV_FM_LMEDS #define CV_FM_LMEDS_ONLY #define CV_FM_RANSAC #define CV_FM_RANSAC_ONLY #define CV_LMEDS #define CV_RANSAC #define CV_STEREO_BM_BASIC #define CV_STEREO_BM_FISH_EYE #define CV_STEREO_BM_NARROW #define CV_STEREO_BM_NORMALIZED_RESPONSE #define CV_STEREO_BM_XSOBEL