OpenCV
4.10.0
Open Source Computer Vision
|
These functions are provided for OpenCV-Eigen interoperability. They convert Mat
objects to corresponding Eigen::Matrix
objects and vice-versa. Consult the Eigen documentation for information about the Matrix
template type.
Eigen/Dense
or similar header to be included before this header. Functions | |
template<typename _Tp > | |
static void | cv::cv2eigen (const Mat &src, Eigen::Matrix< _Tp, 1, Eigen::Dynamic > &dst) |
template<typename _Tp , int _rows, int _cols, int _options, int _maxRows, int _maxCols> | |
static void | cv::cv2eigen (const Mat &src, Eigen::Matrix< _Tp, _rows, _cols, _options, _maxRows, _maxCols > &dst) |
template<typename _Tp > | |
static void | cv::cv2eigen (const Mat &src, Eigen::Matrix< _Tp, Eigen::Dynamic, 1 > &dst) |
template<typename _Tp > | |
static void | cv::cv2eigen (const Mat &src, Eigen::Matrix< _Tp, Eigen::Dynamic, Eigen::Dynamic > &dst) |
template<typename _Tp , int _layout> | |
static void | cv::cv2eigen (const Mat &src, Eigen::Tensor< _Tp, 3, _layout > &dst) |
Converts a cv::Mat to an Eigen::Tensor. | |
template<typename _Tp , int _cols> | |
static void | cv::cv2eigen (const Matx< _Tp, 1, _cols > &src, Eigen::Matrix< _Tp, 1, Eigen::Dynamic > &dst) |
template<typename _Tp , int _rows> | |
static void | cv::cv2eigen (const Matx< _Tp, _rows, 1 > &src, Eigen::Matrix< _Tp, Eigen::Dynamic, 1 > &dst) |
template<typename _Tp , int _rows, int _cols, int _options, int _maxRows, int _maxCols> | |
static void | cv::cv2eigen (const Matx< _Tp, _rows, _cols > &src, Eigen::Matrix< _Tp, _rows, _cols, _options, _maxRows, _maxCols > &dst) |
template<typename _Tp , int _rows, int _cols> | |
static void | cv::cv2eigen (const Matx< _Tp, _rows, _cols > &src, Eigen::Matrix< _Tp, Eigen::Dynamic, Eigen::Dynamic > &dst) |
template<typename _Tp > | |
static Eigen::TensorMap< Eigen::Tensor< _Tp, 3, Eigen::RowMajor > > | cv::cv2eigen_tensormap (InputArray src) |
Maps cv::Mat data to an Eigen::TensorMap. | |
template<typename _Tp , int _rows, int _cols, int _options, int _maxRows, int _maxCols> | |
static void | cv::eigen2cv (const Eigen::Matrix< _Tp, _rows, _cols, _options, _maxRows, _maxCols > &src, Matx< _Tp, _rows, _cols > &dst) |
template<typename _Tp , int _rows, int _cols, int _options, int _maxRows, int _maxCols> | |
static void | cv::eigen2cv (const Eigen::Matrix< _Tp, _rows, _cols, _options, _maxRows, _maxCols > &src, OutputArray dst) |
template<typename _Tp , int _layout> | |
static void | cv::eigen2cv (const Eigen::Tensor< _Tp, 3, _layout > &src, OutputArray dst) |
Converts an Eigen::Tensor to a cv::Mat. | |
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
Converts a cv::Mat to an Eigen::Tensor.
The method converts a cv::Mat to an Eigen Tensor with shape (H x W x C) where: H = number of rows W = number of columns C = number of channels
Usage:
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
Maps cv::Mat data to an Eigen::TensorMap.
The method wraps an existing Mat data array with an Eigen TensorMap of shape (H x W x C) where: H = number of rows W = number of columns C = number of channels
Explicit instantiation of the return type is required.
The example below initializes a cv::Mat and produces an Eigen::TensorMap:
|
inlinestatic |
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
Converts an Eigen::Tensor to a cv::Mat.
The method converts an Eigen::Tensor with shape (H x W x C) to a cv::Mat where: H = number of rows W = number of columns C = number of channels
Usage: