9 #include "opencv2/video.hpp" 10 #include "opencv2/optflow.hpp" 22 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
28 vector<MxArray> rhs(prhs, prhs+nrhs);
31 Mat from(rhs[0].toMat(CV_8U)), to(rhs[1].toMat(CV_8U)), flow;
32 Ptr<DenseOpticalFlow> p = createOptFlow_DeepFlow();
34 mexErrMsgIdAndTxt(
"mexopencv:error",
35 "Failed to create OpticalFlowDeepFlow");
36 p->calc(from, to, flow);
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.
Global constant definitions.