9 #include "opencv2/optflow.hpp" 21 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[])
27 vector<MxArray> rhs(prhs, prhs+nrhs);
30 Mat mhi(rhs[0].toMat(CV_32F)), segmask;
31 vector<Rect> boundingRects;
32 double timestamp = rhs[1].toDouble(),
33 segThresh = rhs[2].toDouble();
34 segmentMotion(mhi, segmask, boundingRects, timestamp, segThresh);
37 plhs[1] =
MxArray(boundingRects);
mxArray object wrapper for data conversion and manipulation.
void nargchk(bool cond)
Alias for input/ouput arguments number check.
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
Main entry called from Matlab.
Global constant definitions.