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.

OpenCV Interface Support

MEX-file support for OpenCV library functions

The support files provide an OpenCV Interface C++ API for integrating your OpenCV C++ code into MATLAB®. You can also use these support files to build MEX-files that call OpenCV functions. The support files contain graphics processing unit (GPU) support.

See Install and Use Computer Vision System Toolbox OpenCV Interface procedures and examples.

Functions

ocvCheckFeaturePointsStructCheck that MATLAB struct represents feature points
ocvStructToKeyPointsConvert MATLAB feature points struct to OpenCV KeyPoint vector
ocvKeyPointsToStructConvert OpenCV KeyPoint vector to MATLAB struct
ocvMxArrayToCvRectConvert a MATLAB struct representing a rectangle to an OpenCV CvRect
ocvCvRectToMxArrayConvert OpenCV CvRect to a MATLAB struct
ocvCvBox2DToMxArrayConvert OpenCV CvBox2D to a MATLAB struct
ocvCvRectToBoundingBox_{DataType}Convert vector<cv::Rect> to M-by-4 mxArray of bounding boxes
ocvMxArrayToSize_{DataType}Convert 2-element mxArray to cv::Size.
ocvMxArrayToImage_{DataType}Convert column major mxArray to row major cv::Mat for image
ocvMxArrayToMat_{DataType}Convert column major mxArray to row major cv::Mat for generic matrix
ocvMxArrayFromImage_{DataType}Convert row major cv::Mat to column major mxArray for image
ocvMxArrayFromMat_{DataType}Convert row major cv::Mat to column major mxArray for generic matrix
ocvMxArrayFromVectorConvert numeric vectorT to mxArray
ocvMxArrayFromPoints2fConverts vector<cv::Point2f> to mxArray
ocvMxGpuArrayToGpuMat_{DataType}Create cv::gpu::GpuMat from mxArray containing GPU data
ocvMxGpuArrayFromGpuMat_{DataType}Create an mxArray from cv::gpu::GpuMat object
visionSupportPackagesStart installer to download, install, or uninstall Computer Vision System Toolbox data

Topics

Install and Use Computer Vision System Toolbox OpenCV Interface

Convert OpenCV data types to MathWorks supported data types