22 const Mat& rotMatrZ,
const Mat& eulerAngles)
24 const char* fieldnames[] = {
25 "rotMatrX",
"rotMatrY",
"rotMatrZ",
"eulerAngles"};
27 s.
set(
"rotMatrX", rotMatrX);
28 s.
set(
"rotMatrY", rotMatrY);
29 s.
set(
"rotMatrZ", rotMatrZ);
30 s.
set(
"eulerAngles", eulerAngles);
52 cameraMatrix, rotMatrix, transVect,
53 rotMatrX, rotMatrY, rotMatrZ, eulerAngles;
55 (nlhs>3 ? rotMatrX :
noArray()),
56 (nlhs>3 ? rotMatrY :
noArray()),
57 (nlhs>3 ? rotMatrZ :
noArray()),
58 (nlhs>3 ? eulerAngles :
noArray()));
59 plhs[0] =
MxArray(cameraMatrix);
65 plhs[3] =
toStruct(rotMatrX, rotMatrY, rotMatrZ, eulerAngles);
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
struct mxArray_tag mxArray
Forward declaration for mxArray.
void set(mwIndex index, const T &value)
Template for numeric array element write accessor.
InputOutputArray noArray()
void decomposeProjectionMatrix(InputArray projMatrix, OutputArray cameraMatrix, OutputArray rotMatrix, OutputArray transVect, OutputArray rotMatrixX=noArray(), OutputArray rotMatrixY=noArray(), OutputArray rotMatrixZ=noArray(), OutputArray eulerAngles=noArray())
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/output arguments number check.
static MxArray Struct(const char **fields=NULL, int nfields=0, mwSize m=1, mwSize n=1)
Create a new struct array.
MxArray toStruct(const Mat &rotMatrX, const Mat &rotMatrY, const Mat &rotMatrZ, const Mat &eulerAngles)
Create a new MxArray from decomposed projection matrix.
Global constant definitions.