23 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1);
30 double theta =
CV_PI/180;
32 double minLineLength = 0;
33 double maxLineGap = 0;
34 for (
int i=1; i<nrhs; i+=2) {
35 string key(rhs[i].toString());
37 rho = rhs[i+1].toDouble();
38 else if (key ==
"Theta")
39 theta = rhs[i+1].toDouble();
40 else if (key ==
"Threshold")
42 else if (key ==
"MinLineLength")
43 minLineLength = rhs[i+1].toDouble();
44 else if (key ==
"MaxLineGap")
45 maxLineGap = rhs[i+1].toDouble();
48 "Unrecognized option %s", key.
c_str());
struct mxArray_tag mxArray
Forward declaration for mxArray.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
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.
double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)
void HoughLinesP(InputArray image, OutputArray lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0)