25 nargchk(nrhs>=2 && (nrhs%2)==0 && nlhs<=3);
32 Mat cameraMatrix, distCoeffs;
33 for (
int i=2; i<nrhs; i+=2) {
34 string key(rhs[i].toString());
35 if (key ==
"DetectorParameters")
37 else if (key ==
"CameraMatrix")
38 cameraMatrix = rhs[i+1].toMat(
CV_64F);
39 else if (key ==
"DistCoeffs")
40 distCoeffs = rhs[i+1].toMat(
CV_64F);
43 "Unrecognized option %s", key.
c_str());
54 (nlhs==3) ? rejectedImgPoints :
noArray(), cameraMatrix, distCoeffs);
59 plhs[2] =
MxArray(rejectedImgPoints);
struct mxArray_tag mxArray
Forward declaration for mxArray.
void detectMarkers(InputArray image, const Ptr< Dictionary > &dictionary, OutputArrayOfArrays corners, OutputArray ids, const Ptr< DetectorParameters > ¶meters=DetectorParameters::create(), OutputArrayOfArrays rejectedImgPoints=noArray(), InputArray cameraMatrix=noArray(), InputArray distCoeff=noArray())
Common definitions for the aruco module.
InputOutputArray noArray()
cv::Ptr< cv::aruco::Dictionary > MxArrayToDictionary(const MxArray &arr)
Convert MxArray to cv::Ptr<cv::aruco::Dictionary>
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.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
cv::Ptr< cv::aruco::DetectorParameters > MxArrayToDetectorParameters(const MxArray &s)
Convert MxArray to cv::Ptr<cv::aruco::DetectorParameters>
void create(int arows, int acols, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false)