19 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
22 nargchk(nrhs>=2 && (nrhs%2)==0 && nlhs<=1);
25 vector<MxArray> rhs(prhs, prhs+nrhs);
32 for (
int i=2; i<nrhs; i+=2) {
33 string key(rhs[i].toString());
35 angle = rhs[i+1].toInt();
36 else if (key==
"StartAngle")
37 arcStart = rhs[i+1].toInt();
38 else if (key==
"EndAngle")
39 arcEnd = rhs[i+1].toInt();
40 else if (key==
"Delta")
41 delta = rhs[i+1].toInt();
43 mexErrMsgIdAndTxt(
"mexopencv:error",
"Unrecognized option");
47 Point center(rhs[0].toPoint());
48 Size axes(rhs[1].toSize());
50 ellipse2Poly(center, axes, angle, arcStart, arcEnd, delta, pts);
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/ouput arguments number check.
Global constant definitions.