Documentation

This is machine translation

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

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

ocvMxArrayToSize_{DataType}

Convert 2-element mxArray to cv::Size.

C++ Syntax

#include "opencvmex.hpp"
cv::Size ocvMxArrayToSize_single(const mxArray * in, bool rcInput = true);
cv::Size ocvMxArrayToSize_int32(const mxArray * in, bool rcInput = true);

Arguments

in

Pointer to a MATLAB® mxArray having 2 elements. Supported data types:

single
int32

rcInput

Boolean flag that indicates if input mxArray is of the format [r c] or [x y].

rcInputin
true (default) [r c] (height, width)
false[x y] (width, height)

Returns

OpenCV cv::Size

Description

The ocvMxArrayToSize_{DataType} function converts a 2-element mxArray to cv::Size. Empty input ([]) returns cv::Size(0,0);

See Also

mxArray, C Matrix Library API (MATLAB), C MEX Files (MATLAB)

Introduced in R2015a