Main Content

ocvMxArrayFromVector_{DataType}

Convert numeric vectorT to mxArray

C++ Syntax

#include "opencvmex.hpp"
mxArray *ocvMxArrayFromVector_double(const std::vector<real_T> &v);
mxArray *ocvMxArrayFromVector_single(const std::vector<real32_T> &v);
mxArray *ocvMxArrayFromVector_uint8(const std::vector<uint8_T> &v);
mxArray *ocvMxArrayFromVector_uint16(const std::vector<uint16_T> &v);
mxArray *ocvMxArrayFromVector_uint32(const std::vector<uint32_T> &v);
mxArray *ocvMxArrayFromVector_int8(const std::vector<int8_T> &v);
mxArray *ocvMxArrayFromVector_int16(const std::vector<int16_T> &v);
mxArray *ocvMxArrayFromVector_int32(const std::vector<int32_T> &v);
mxArray *ocvMxArrayFromVector_bool(const std::vector<boolean_T> &v);

Arguments

v

Reference to vector<DataType>. Supported data types:

real_Treal32_Tuint8_T
uint16_Tuint32_Tint8_T
int16_Tint32_Tboolean_T

Returns

Pointer to a MATLAB® struct mxArray.

Description

The ocvMxArrayFromVector_{DataType} function converts numeric std::vector<DataType> to an mxArray.

Version History

Introduced in R2015a