23 nargchk(nrhs>=3 && (nrhs%2)==1 && nlhs<=5);
31 TermCriteria criteria(TermCriteria::COUNT+TermCriteria::EPS, 100, DBL_EPSILON);
32 for (
int i=3; i<nrhs; i+=2) {
33 string key(rhs[i].toString());
34 if (key ==
"CameraMatrix")
35 K = rhs[i+1].toMat(
CV_64F);
36 else if (key ==
"DistCoeffs")
37 D = rhs[i+1].toMat(
CV_64F);
38 else if (key ==
"UseIntrinsicGuess")
40 else if (key ==
"RecomputeExtrinsic")
42 else if (key ==
"CheckCond")
44 else if (key ==
"FixSkew")
46 else if (key ==
"FixK1")
48 else if (key ==
"FixK2")
50 else if (key ==
"FixK3")
52 else if (key ==
"FixK4")
54 else if (key ==
"FixPrincipalPoint")
56 else if (key ==
"Criteria")
57 criteria = rhs[i+1].toTermCriteria();
60 "Unrecognized option %s", key.
c_str());
66 Size imageSize(rhs[2].toSize());
69 objectPoints, imagePoints, imageSize, K, D,
CALIB_FIX_PRINCIPAL_POINT
double calibrate(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, const Size &image_size, InputOutputArray K, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, int flags=0, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 100, DBL_EPSILON))
struct mxArray_tag mxArray
Forward declaration for mxArray.
CALIB_USE_INTRINSIC_GUESS
InputOutputArray noArray()
#define UPDATE_FLAG(NUM, TF, BIT)
set or clear a bit in flag depending on bool value
LIBMWMEX_API_EXTERN_C void mexErrMsgIdAndTxt(const char *identifier, const char *err_msg,...)
Issue formatted error message with corresponding error identifier and return to MATLAB prompt...
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
Global constant definitions.
CALIB_RECOMPUTE_EXTRINSIC
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.