27 const Mat& dr3dt1,
const Mat& dr3dr2,
const Mat& dr3dt2,
const Mat& dt3dr1,
28 const Mat& dt3dt1,
const Mat& dt3dr2,
const Mat& dt3dt2)
30 const char* fieldnames[] = {
"rvec3",
"tvec3",
"dr3dr1",
"dr3dt1",
31 "dr3dr2",
"dr3dt2",
"dt3dr1",
"dt3dt1",
"dt3dr2",
"dt3dt2"};
33 s.
set(
"rvec3", rvec3);
34 s.
set(
"tvec3", tvec3);
35 s.
set(
"dr3dr1", dr3dr1);
36 s.
set(
"dr3dt1", dr3dt1);
37 s.
set(
"dr3dr2", dr3dr2);
38 s.
set(
"dr3dt2", dr3dt2);
39 s.
set(
"dt3dr1", dt3dr1);
40 s.
set(
"dt3dt1", dt3dt1);
41 s.
set(
"dt3dr2", dt3dr2);
42 s.
set(
"dt3dt2", dt3dt2);
54 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
60 vector<MxArray> rhs(prhs, prhs+nrhs);
63 Mat rvec1(rhs[0].toMat(rhs[0].isSingle() ? CV_32F : CV_64F)),
64 tvec1(rhs[1].toMat(rhs[1].isSingle() ? CV_32F : CV_64F)),
65 rvec2(rhs[2].toMat(rhs[2].isSingle() ? CV_32F : CV_64F)),
66 tvec2(rhs[3].toMat(rhs[3].isSingle() ? CV_32F : CV_64F)),
68 dr3dr1, dr3dt1, dr3dr2, dr3dt2,
69 dt3dr1, dt3dt1, dt3dr2, dt3dt2;
70 composeRT(rvec1, tvec1, rvec2, tvec2, rvec3, tvec3,
71 dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2, dt3dt2);
73 dr3dr1, dr3dt1, dr3dr2, dr3dt2, dt3dr1, dt3dt1, dt3dr2, dt3dt2);
void set(mwIndex index, const T &value)
Template for numeric array element write accessor.
MxArray toStruct(const std::vector< cv::ml::DTrees::Node > &nodes)
Convert tree nodes to struct array.
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/ouput arguments number check.
static MxArray Struct(const char **fields=NULL, int nfields=0, mwSize m=1, mwSize n=1)
Create a new struct array.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Global constant definitions.