mexopencv  0.1
mex interface for opencv library
testMxArray_.cpp
1 #include "mexopencv.hpp"
2 using namespace std;
3 using namespace cv;
4 
5 void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
6 {
7  nargchk(nrhs==1 && nlhs==2);
8  Mat mat(MxArray(prhs[0]).toMat());
9  MatND matnd(MxArray(prhs[0]).toMatND());
10  plhs[0] = MxArray(mat);
11  plhs[1] = MxArray(matnd);
12 }
mxArray object wrapper for data conversion and manipulation.
Definition: MxArray.hpp:123
void nargchk(bool cond)
Alias for input/ouput arguments number check.
Definition: mexopencv.hpp:166
Global constant definitions.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.