27 nargchk(nrhs>=3 && (nrhs%2)==1 && nlhs<=1);
34 for (
int i=3; i<nrhs; i+=2) {
35 string key(rhs[i].toString());
36 if (key ==
"BorderBits")
37 borderBits = rhs[i+1].toInt();
40 "Unrecognized option %s", key.
c_str());
45 int id = rhs[1].toInt(),
46 sidePixels = rhs[2].toInt();
48 drawMarker(dictionary,
id, sidePixels, img, borderBits);
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.
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 drawMarker(Mat &img, Point position, const Scalar &color, int markerType=MARKER_CROSS, int markerSize=20, int thickness=1, int line_type=8)