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.

ocvMxArrayFromMat_{DataType}

Convert row major cv::Mat to column major mxArray for generic matrix

C++ Syntax

#include "opencvmex.hpp"
mxArray *ocvMxArrayFromMat_double(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_single(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_uint8(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_uint16(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_uint32(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_int8(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_int16(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_int32(const cv::Mat &in);
mxArray *ocvMxArrayFromMat_bool(const cv::Mat &in);

Arguments

in

Reference to OpenCV cv::Mat with row major data.

Returns

Pointer to a MATLAB® struct, mxArray, having column major data. Supported data types:

real_T (double)uint8_T (uint8)uint32_T (uint32)int16_T (int16)
real32_T (single)uint16_T (uint16)int8_T (int8)int32_T (int32)

Description

The ocvMxArrayFromMat_{DataType} function creates an mxArray from a cv::Mat object. The mxArray contains column major data and cv::Mat contains row major data. This matrix conversion is a generic routine for any number of channels.

Introduced in R2015a