19 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
22 nargchk(nrhs>=4 && (nrhs%2)==0 && nlhs<=3);
25 vector<MxArray> rhs(prhs, prhs+nrhs);
29 for (
int i=4; i<nrhs; i+=2) {
30 string key(rhs[i].toString());
32 threshold = rhs[i+1].toDouble();
34 mexErrMsgIdAndTxt(
"mexopencv:error",
"Unrecognized option");
38 Mat F(rhs[2].toMat(CV_64F));
39 Size imgSize(rhs[3].toSize());
42 if (rhs[0].isNumeric() && rhs[1].isNumeric()) {
43 Mat points1(rhs[0].toMat(CV_64F)),
44 points2(rhs[0].toMat(CV_64F));
45 b = stereoRectifyUncalibrated(points1, points2, F, imgSize, H1, H2,
48 else if (rhs[0].isCell() && rhs[1].isCell()) {
49 vector<Point2d> points1(rhs[0].toVector<Point2d>()),
50 points2(rhs[1].toVector<Point2d>());
51 b = stereoRectifyUncalibrated(points1, points2, F, imgSize, H1, H2,
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.