23 const char* fieldnames[] = {
"R",
"t",
"n"};
25 s.
set(
"R", rotations);
26 s.
set(
"t", translations);
52 plhs[0] =
toStruct(rotations, translations, normals);
MxArray toStruct(const vector< Mat > &rotations, const vector< Mat > &translations, const vector< Mat > &normals)
Create a new MxArray from decomposed homography matrix.
struct mxArray_tag mxArray
Forward declaration for mxArray.
void set(mwIndex index, const T &value)
Template for numeric array element write accessor.
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/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.
int decomposeHomographyMat(InputArray H, InputArray K, OutputArrayOfArrays rotations, OutputArrayOfArrays translations, OutputArrayOfArrays normals)
Global constant definitions.