23 nargchk(nrhs>=2 && (nrhs%2)==0 && nlhs<=3);
29 double ransacThreshold = 3.0;
30 double confidence = 0.99;
31 for (
int i=2; i<nrhs; i+=2) {
32 string key(rhs[i].toString());
33 if (key ==
"RansacThreshold")
34 ransacThreshold = rhs[i+1].toDouble();
35 else if (key ==
"Confidence")
36 confidence = rhs[i+1].toDouble();
39 "Unrecognized option %s", key.
c_str());
45 if (rhs[0].isNumeric() && rhs[1].isNumeric()) {
49 (nlhs>1 ? inliers :
noArray()), ransacThreshold, confidence);
51 else if (rhs[0].isCell() && rhs[1].isCell()) {
53 dst(rhs[1].toVector<Point3f>());
55 (nlhs>1 ? inliers :
noArray()), ransacThreshold, confidence);
int estimateAffine3D(InputArray src, InputArray dst, OutputArray out, OutputArray inliers, double ransacThreshold=3, double confidence=0.99)
struct mxArray_tag mxArray
Forward declaration for mxArray.
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.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.