![]() |
OpenCV 4.12.0
开源计算机视觉
|
这些函数旨在实现 OpenCV-Eigen 互操作性。它们将 Mat 对象转换为相应的 Eigen::Matrix 对象,反之亦然。有关 Matrix 模板类型的信息,请查阅 Eigen 文档。
Eigen/Dense 或类似的头文件。命名空间 | |
| 命名空间 | cv::traits |
类 | |
| 类 | cv::Affine3< T > |
| 仿射变换。 更多... | |
类型定义 | |
| 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 是一个包含成员字段 x, y 和 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 转换为具有 (H x W x C) 形状的 Eigen Tensor,其中:H = 行数 W = 列数 C = 通道数
用法
|
inlinestatic |
#include <opencv2/core/eigen.hpp>
将 cv::Mat 数据映射到 Eigen::TensorMap。
此方法将现有 Mat 数据数组包装为形状为 (H x W x C) 的 Eigen TensorMap,其中: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 是一个包含成员字段 x, y 和 z 的三元素向量。
|
static |
#include <opencv2/core/affine.hpp>
#include <opencv2/core/affine.hpp>
#include <opencv2/core/affine.hpp>