23 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=1);
30 double theta =
CV_PI/180;
35 double max_theta =
CV_PI;
36 for (
int i=1; i<nrhs; i+=2) {
37 string key(rhs[i].toString());
39 rho = rhs[i+1].toDouble();
40 else if (key ==
"Theta")
41 theta = rhs[i+1].toDouble();
42 else if (key ==
"Threshold")
44 else if (key ==
"SRN")
45 srn = rhs[i+1].toDouble();
46 else if (key ==
"STN")
47 stn = rhs[i+1].toDouble();
48 else if (key ==
"MinTheta")
49 min_theta = rhs[i+1].toDouble();
50 else if (key ==
"MaxTheta")
51 max_theta = rhs[i+1].toDouble();
54 "Unrecognized option %s", key.
c_str());
61 min_theta, max_theta);
void HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0, double min_theta=0, double max_theta=CV_PI)
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)