19 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
25 vector<MxArray> rhs(prhs, prhs+nrhs);
28 Mat projMatr1(rhs[0].toMat(rhs[0].isSingle() ? CV_32F : CV_64F)),
29 projMatr2(rhs[1].toMat(rhs[1].isSingle() ? CV_32F : CV_64F)),
31 if (rhs[2].isNumeric() && rhs[3].isNumeric()) {
32 Mat projPoints1(rhs[2].toMat(rhs[2].isSingle() ? CV_32F : CV_64F)),
33 projPoints2(rhs[3].toMat(rhs[3].isSingle() ? CV_32F : CV_64F));
34 triangulatePoints(projMatr1, projMatr2, projPoints1, projPoints2,
37 else if (rhs[2].isCell() && rhs[3].isCell()) {
38 vector<Point2d> projPoints1(rhs[2].toVector<Point2d>()),
39 projPoints2(rhs[3].toVector<Point2d>());
40 triangulatePoints(projMatr1, projMatr2, projPoints1, projPoints2,
44 mexErrMsgIdAndTxt(
"mexopencv:error",
"Invalid input");
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/ouput arguments number check.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Global constant definitions.