21 const Vec3d& eulerAngles)
23 const char* fieldnames[] = {
"Qx",
"Qy",
"Qz",
"eulerAngles"};
28 s.
set(
"eulerAngles", eulerAngles);
40 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
46 vector<MxArray> rhs(prhs, prhs+nrhs);
49 Mat M(rhs[0].toMat(rhs[0].isSingle() ? CV_32F : CV_64F)),
51 Vec3d eulerAngles = RQDecomp3x3(M, R, Q,
52 (nlhs>2 ? Qx : noArray()),
53 (nlhs>2 ? Qy : noArray()),
54 (nlhs>2 ? Qz : noArray()));
59 plhs[2] =
toStruct(Qx, Qy, Qz, eulerAngles);
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.
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.
static MxArray Struct(const char **fields=NULL, int nfields=0, mwSize m=1, mwSize n=1)
Create a new struct array.
Global constant definitions.