30 nargchk(nrhs>=2 && (nrhs%2)==0 && nlhs<=2);
36 Mat cameraMatrix = Mat::eye(3, 3,
CV_64F);
40 for (
int i=2; i<nrhs; i+=2) {
41 string key(rhs[i].toString());
42 if (key ==
"CameraMatrix")
43 cameraMatrix = rhs[i+1].toMat(
CV_64F);
44 else if (key ==
"Method")
45 method = (rhs[i+1].isChar()) ?
46 Method[rhs[i+1].toString()] : rhs[i+1].toInt();
47 else if (key ==
"Confidence")
48 prob = rhs[i+1].toDouble();
49 else if (key ==
"Threshold")
53 "Unrecognized option %s", key.
c_str());
58 if (rhs[0].isNumeric() && rhs[1].isNumeric()) {
64 else if (rhs[0].isCell() && rhs[1].isCell()) {
66 points2(rhs[1].toVector<Point2d>());
struct mxArray_tag mxArray
Forward declaration for mxArray.
const ConstMap< string, int > Method
Estimation methods for option processing.
InputOutputArray noArray()
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)
std::map wrapper with one-line initialization and lookup method.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Mat findEssentialMat(InputArray points1, InputArray points2, InputArray cameraMatrix, int method=RANSAC, double prob=0.999, double threshold=1.0, OutputArray mask=noArray())