43 #ifndef __OPENCV_CALIB3D_HPP__
44 #define __OPENCV_CALIB3D_HPP__
66 float* rotation_matrix,
float* translation_vector);
73 int model_points,
int max_iters );
78 #define CV_FM_7POINT 1
79 #define CV_FM_8POINT 2
84 #define CV_FM_LMEDS_ONLY CV_LMEDS
85 #define CV_FM_RANSAC_ONLY CV_RANSAC
86 #define CV_FM_LMEDS CV_LMEDS
87 #define CV_FM_RANSAC CV_RANSAC
90 CvMat* fundamental_matrix,
93 CvMat* status CV_DEFAULT(NULL) );
100 const
CvMat* fundamental_matrix,
101 CvMat* correspondent_lines );
118 const
CvMat* dist_coeffs,
119 CvSize image_size,
double alpha,
120 CvMat* new_camera_matrix,
122 CvRect* valid_pixel_ROI CV_DEFAULT(0) );
130 const
CvMat* dst_points,
138 CvMat *matrixQx CV_DEFAULT(NULL),
139 CvMat *matrixQy CV_DEFAULT(NULL),
140 CvMat *matrixQz CV_DEFAULT(NULL),
146 CvMat *rotMatrX CV_DEFAULT(NULL),
147 CvMat *rotMatrY CV_DEFAULT(NULL),
148 CvMat *rotMatrZ CV_DEFAULT(NULL),
167 const
CvMat* translation_vector, const
CvMat* camera_matrix,
168 const
CvMat* distortion_coeffs,
CvMat* image_points,
172 double aspect_ratio CV_DEFAULT(0));
177 const
CvMat* image_points,
178 const
CvMat* camera_matrix,
179 const
CvMat* distortion_coeffs,
180 CvMat* rotation_vector,
181 CvMat* translation_vector,
182 int use_extrinsic_guess CV_DEFAULT(0) );
187 const
CvMat* image_points,
189 CvMat* camera_matrix,
190 double aspect_ratio CV_DEFAULT(1.) );
192 #define CV_CALIB_CB_ADAPTIVE_THRESH 1
193 #define CV_CALIB_CB_NORMALIZE_IMAGE 2
194 #define CV_CALIB_CB_FILTER_QUADS 4
195 #define CV_CALIB_CB_FAST_CHECK 8
208 int* corner_count CV_DEFAULT(NULL),
215 int count,
int pattern_was_found );
217 #define CV_CALIB_USE_INTRINSIC_GUESS 1
218 #define CV_CALIB_FIX_ASPECT_RATIO 2
219 #define CV_CALIB_FIX_PRINCIPAL_POINT 4
220 #define CV_CALIB_ZERO_TANGENT_DIST 8
221 #define CV_CALIB_FIX_FOCAL_LENGTH 16
222 #define CV_CALIB_FIX_K1 32
223 #define CV_CALIB_FIX_K2 64
224 #define CV_CALIB_FIX_K3 128
225 #define CV_CALIB_FIX_K4 2048
226 #define CV_CALIB_FIX_K5 4096
227 #define CV_CALIB_FIX_K6 8192
228 #define CV_CALIB_RATIONAL_MODEL 16384
233 const
CvMat* image_points,
234 const
CvMat* point_counts,
236 CvMat* camera_matrix,
237 CvMat* distortion_coeffs,
238 CvMat* rotation_vectors CV_DEFAULT(NULL),
239 CvMat* translation_vectors CV_DEFAULT(NULL),
240 int flags CV_DEFAULT(0) );
246 double aperture_width CV_DEFAULT(0),
247 double aperture_height CV_DEFAULT(0),
248 double *fovx CV_DEFAULT(NULL),
249 double *fovy CV_DEFAULT(NULL),
250 double *focal_length CV_DEFAULT(NULL),
252 double *pixel_aspect_ratio CV_DEFAULT(NULL));
254 #define CV_CALIB_FIX_INTRINSIC 256
255 #define CV_CALIB_SAME_FOCAL_LENGTH 512
261 const
CvMat* image_points2, const
CvMat* npoints,
265 CvMat* E CV_DEFAULT(0),
CvMat* F CV_DEFAULT(0),
270 #define CV_CALIB_ZERO_DISPARITY 1024
275 const
CvMat* dist_coeffs1, const
CvMat* dist_coeffs2,
278 CvMat* Q CV_DEFAULT(0),
280 double alpha CV_DEFAULT(-1),
281 CvSize new_image_size CV_DEFAULT(cvSize(0,0)),
282 CvRect* valid_pix_ROI1 CV_DEFAULT(0),
283 CvRect* valid_pix_ROI2 CV_DEFAULT(0));
296 #define CV_STEREO_BM_NORMALIZED_RESPONSE 0
297 #define CV_STEREO_BM_XSOBEL 1
334 #define CV_STEREO_BM_BASIC 0
335 #define CV_STEREO_BM_FISH_EYE 1
336 #define CV_STEREO_BM_NARROW 2
339 int numberOfDisparities CV_DEFAULT(0));
347 int numberOfDisparities,
int SADWindowSize );
350 int minDisparity,
int numberOfDisparities,
351 int disp12MaxDiff CV_DEFAULT(1) );
354 #define CV_STEREO_GC_OCCLUDED SHRT_MAX
382 int useDisparityGuess CV_DEFAULT(0) );
387 int handleMissingValues CV_DEFAULT(0) );
401 bool completeSymmFlag=
false );
405 bool completeSymmFlag=
false );
407 bool updateAlt(
const CvMat*& param,
CvMat*& JtJ,
CvMat*& JtErr,
double*& errNorm );
411 enum { DONE=0, STARTED=1, CALC_J=2, CHECK_ERR=3 };
455 const
Mat& dstPoints,
456 int method=0,
double ransacReprojThreshold=3 );
472 Mat& rotMatrix,
Mat& transVect );
490 const
Mat& rvec2, const
Mat& tvec2,
500 const
Mat& cameraMatrix,
507 const
Mat& cameraMatrix,
508 const
Mat& distCoeffs,
516 const
Mat& imagePoints,
517 const
Mat& cameraMatrix,
518 const
Mat& distCoeffs,
520 bool useExtrinsicGuess=false );
524 const vector<vector<
Point2f> >& imagePoints,
525 Size imageSize,
double aspectRatio=1. );
533 CV_OUT vector<Point2f>& corners,
540 bool patternWasFound );
543 const vector<Point2f>& corners,
544 bool patternWasFound );
579 double apertureWidth,
580 double apertureHeight,
583 CV_OUT double& focalLength,
589 const vector<vector<Point2f> >& imagePoints1,
590 const vector<vector<Point2f> >& imagePoints2,
602 const Mat& cameraMatrix2,
const Mat& distCoeffs2,
603 Size imageSize,
const Mat& R,
const Mat& T,
610 const Mat& cameraMatrix2,
const Mat& distCoeffs2,
611 Size imageSize,
const Mat& R,
const Mat& T,
614 double alpha,
Size newImageSize=
Size(),
620 const Mat& F,
Size imgSize,
626 const Mat& cameraMatrix2,
const Mat& distCoeffs2,
627 const Mat& cameraMatrix3,
const Mat& distCoeffs3,
628 const vector<vector<Point2f> >& imgpt1,
629 const vector<vector<Point2f> >& imgpt3,
630 Size imageSize,
const Mat& R12,
const Mat& T12,
631 const Mat& R13,
const Mat& T13,
634 double alpha,
Size newImgSize,
668 int whichImage,
const Mat& F,
681 enum { PREFILTER_NORMALIZED_RESPONSE = 0, PREFILTER_XSOBEL = 1,
682 BASIC_PRESET=0, FISH_EYE_PRESET=1, NARROW_PRESET=2 };
687 CV_WRAP StereoBM(
int preset,
int ndisparities=0,
int SADWindowSize=21);
689 void init(
int preset,
int ndisparities=0,
int SADWindowSize=21);
712 CV_WRAP StereoSGBM(
int minDisparity,
int numDisparities,
int SADWindowSize,
713 int P1=0,
int P2=0,
int disp12MaxDiff=0,
714 int preFilterCap=0,
int uniquenessRatio=0,
715 int speckleWindowSize=0,
int speckleRange=0,
718 virtual ~StereoSGBM();
744 int minDisparity,
int numberOfDisparities,
749 int minDisparity,
int numberOfDisparities,
750 int disp12MaxDisp=1 );
755 bool handleMissingValues=false );