23 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1);
33 for (
int i=1; i<nrhs; i+=2) {
34 string key(rhs[i].toString());
35 if (key ==
"DistType")
36 distType =
DistType[rhs[i+1].toString()];
37 else if (key ==
"Param")
38 param = rhs[i+1].toDouble();
39 else if (key ==
"RadiusEps")
40 reps = rhs[i+1].toDouble();
41 else if (key ==
"AngleEps")
42 aeps = rhs[i+1].toDouble();
45 "Unrecognized option %s", key.
c_str());
50 if (rhs[0].isNumeric()) {
54 else if (rhs[0].isCell() && !rhs[0].isEmpty()) {
struct mxArray_tag mxArray
Forward declaration for mxArray.
void fitLine(InputArray points, OutputArray line, int distType, double param, double reps, double aeps)
void line(InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)
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.
const ConstMap< std::string, int > DistType
Distance types for Distance Transform and M-estimators.
Global constant definitions.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.