25 nargchk(nrhs>=4 && (nrhs%2)==0 && nlhs<=2);
31 Mat cameraMatrix, distCoeffs;
32 for (
int i=4; i<nrhs; i+=2) {
33 string key(rhs[i].toString());
34 if (key ==
"CameraMatrix")
35 cameraMatrix = rhs[i+1].toMat(
CV_64F);
36 else if (key ==
"DistCoeffs")
37 distCoeffs = rhs[i+1].toMat(
CV_64F);
40 "Unrecognized option %s", key.
c_str());
47 float squareMarkerLengthRate = rhs[3].toFloat();
51 diamondCorners, diamondIds,
54 plhs[0] =
MxArray(diamondCorners);
void detectCharucoDiamond(InputArray image, InputArrayOfArrays markerCorners, InputArray markerIds, float squareMarkerLengthRate, OutputArrayOfArrays diamondCorners, OutputArray diamondIds, InputArray cameraMatrix=noArray(), InputArray distCoeffs=noArray())
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
struct mxArray_tag mxArray
Forward declaration for mxArray.
Common definitions for the aruco module.
InputOutputArray noArray()
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.