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;
59 cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess);
struct mxArray_tag mxArray
Forward declaration for mxArray.
Common definitions for the aruco module.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
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.
bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds, const Ptr< CharucoBoard > &board, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false)
cv::Ptr< cv::aruco::CharucoBoard > create_CharucoBoard(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of CharucoBoard using options in arguments.