This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Convert a MATLAB struct representing a rectangle to an OpenCV CvRect

C++ Syntax

#include "opencvmex.hpp"
CvRect ocvMxArrayToCvRect(const mxArray *in);



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.


OpenCV CvRect.


The ocvMxArrayToCvRect function converts a rectangle data structure from a MATLAB struct to an OpenCV KeyPoint vector.

Introduced in R2015a