Convert OpenCV CvRect
to a MATLAB struct
#include "opencvmex.hpp"
mxArray
*ocvCvRectToMxArray(const CvRect *in);
in
Pointer to OpenCV CvRect
.
Pointer to a MATLAB® structure, mxArray
, that represents a rectangle.
The structure must have four scalar-valued fields, x
, y
, width
,
and height
. The (x
, y
)
fields represent the upper-left corner of the rectangle.
The ocvCvRectToMxArray
function converts
a rectangle data structure from an OpenCV KeyPoint vector to a MATLAB struct.