![]() |
OpenCV 4.13.0
开源计算机视觉库 (Open Source Computer Vision)
|
这些函数用于 OpenCV 和 Eigen 之间的互操作性。它们可以将 Mat 对象转换为相应的 Eigen::Matrix 对象,反之亦然。有关 Matrix 模板类型的信息,请查阅 Eigen 文档。
Eigen/Dense 或类似的头文件。命名空间 | |
| 命名空间 | cv::traits |
类 | |
| 类 | cv::Affine3< T > |
| 仿射变换。 更多... | |
类型定义 (Typedefs) | |
| typedef Affine3< double > | cv::Affine3d |
| typedef Affine3< float > | cv::Affine3f |
函数 | |
| 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 > | |
| static void | cv::cv2eigen (const Mat &src, Eigen::Matrix< _Tp, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > &dst) |
| template<typename _Tp , int _layout> | |
| static void | cv::cv2eigen (const Mat &src, Eigen::Tensor< _Tp, 3, _layout > &dst) |
| 将 cv::Mat 转换为 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 , int _rows, int _cols> | |
| static void | cv::cv2eigen (const Matx< _Tp, _rows, _cols > &src, Eigen::Matrix< _Tp, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > &dst) |
| template<typename _Tp > | |
| static Eigen::TensorMap< Eigen::Tensor< _Tp, 3, Eigen::RowMajor > > | cv::cv2eigen_tensormap (InputArray src) |
| 将 cv::Mat 数据映射到 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) |
| 将 Eigen::Tensor 转换为 cv::Mat。 | |
| template<typename T , typename V > | |
| static V | cv::operator* (const Affine3< T > &affine, const V &vector) |
| V is a 3-element vector with member fields x, y and z. | |
| template<typename T > | |
| static Affine3< T > | cv::operator* (const Affine3< T > &affine1, const Affine3< T > &affine2) |
| static Vec3d | cv::operator* (const Affine3d &affine, const Vec3d &vector) |
| static Vec3f | cv::operator* (const Affine3f &affine, const Vec3f &vector) |
| typedef Affine3<double> cv::Affine3d |
#include <opencv2/core/affine.hpp>
| typedef Affine3<float> cv::Affine3f |
#include <opencv2/core/affine.hpp>
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
将 cv::Mat 转换为 Eigen::Tensor。
该方法将 cv::Mat 转换为 Eigen Tensor,形状为 (H x W x C),其中:H = 行数 W = 列数 C = 通道数
用法
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
将 cv::Mat 数据映射到 Eigen::TensorMap。
该方法使用 Eigen TensorMap 包装现有的 Mat 数据数组,形状为 (H x W x C),其中:H = 行数 W = 列数 C = 通道数
需要显式实例化返回类型。
以下示例初始化一个 cv::Mat 并生成一个 Eigen::TensorMap
|
inlinestatic |
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
将 Eigen::Tensor 转换为 cv::Mat。
该方法将形状为 (H x W x C) 的 Eigen::Tensor 转换为 cv::Mat,其中:H = 行数 W = 列数 C = 通道数
用法
|
static (静态) |
#include <opencv2/core/affine.hpp>
V is a 3-element vector with member fields x, y and z.
|
static (静态) |
#include <opencv2/core/affine.hpp>
#include <opencv2/core/affine.hpp>
#include <opencv2/core/affine.hpp>