25 nargchk(nrhs>=5 && (nrhs%2)==1 && nlhs<=3);
32 bool useExtrinsicGuess =
false;
33 for (
int i=5; i<nrhs; i+=2) {
34 string key(rhs[i].toString());
36 rvec = rhs[i+1].toMat(
CV_64F);
37 else if (key ==
"Tvec")
38 tvec = rhs[i+1].toMat(
CV_64F);
39 else if (key ==
"UseExtrinsicGuess")
40 useExtrinsicGuess = rhs[i+1].toBool();
43 "Unrecognized option %s", key.
c_str());
46 useExtrinsicGuess =
true;
55 rvec, tvec, useExtrinsicGuess);
struct mxArray_tag mxArray
Forward declaration for mxArray.
Common definitions for the aruco module.
cv::Ptr< cv::aruco::Board > MxArrayToBoard(const MxArray &arr)
Convert MxArray to cv::Ptr<cv::aruco::Board>
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.
int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr< Board > &board, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false)
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.