16 (
"SVD", cv::DECOMP_SVD)
17 (
"EIG", cv::DECOMP_EIG)
18 (
"Cholesky", cv::DECOMP_CHOLESKY);
28 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
31 nargchk(nrhs>=1 && (nrhs%2)==1 && nlhs<=2);
34 vector<MxArray> rhs(prhs, prhs+nrhs);
37 int method = cv::DECOMP_LU;
38 for (
int i=1; i<nrhs; i+=2) {
39 string key(rhs[i].toString());
41 method = InvMethods[rhs[i+1].toString()];
43 mexErrMsgIdAndTxt(
"mexopencv:error",
44 "Unrecognized option %s", key.c_str());
48 Mat src(rhs[0].toMat(rhs[0].isSingle() ? CV_32F : CV_64F)), dst;
49 double d = invert(src, dst, method);
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.
std::map wrapper with one-line initialization and lookup method.