对应头文件
#include <opencv2/core/eigen.hpp>
eigen2cv() [1/3]
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.----将Eigen::Tensor(张量)类型转换为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
----其中Eigen::Tensor类型为H x W x C,对应cv::Mat的行、列、通道数
eigen2cv() [2/3]
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
)
把Eigen::Matrix类型转换为OutputArray类型
eigen2cv() [3/3]
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
)
把Eigen::Matrix类型转换为cv::Matx类型, 上面_Tp, _rows, _cols分别代表数据类型、行、列
该文章介绍了如何将Eigen的数据结构,包括Tensor和Matrix类型,转换为OpenCV的Mat和Matx类型。提供的函数模板用于在不同维度和选项的矩阵间进行转换,支持从Eigen::Tensor的HxWxC形状到cv::Mat以及从Eigen::Matrix到cv::Matx的转换。


被折叠的 条评论
为什么被折叠?



