![]() |
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>