![]() |
OpenCV 4.13.0
开源计算机视觉库 (Open Source Computer Vision)
|
用于在编译时已知其类型和大小的小型矩阵的模板类。更多...
#include <opencv2/core/matx.hpp>
公开类型 | |
| enum | { rows = m , cols = n , channels = rows*cols , shortdim = (m < n ? m : n) } |
| typedef Matx< _Tp, shortdim, 1 > | diag_type |
| typedef Matx< _Tp, m, n > | mat_type |
| typedef _Tp | value_type (值类型) |
公开成员函数 | |
| Matx () | |
| 默认构造函数 | |
| Matx (_Tp v0) | |
| 1x1 矩阵 | |
| Matx (_Tp v0, _Tp v1) | |
| 1x2 或 2x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2) | |
| 1x3 或 3x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3) | |
| 1x4, 2x2 或 4x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4) | |
| 1x5 或 5x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5) | |
| 1x6, 2x3, 3x2 或 6x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6) | |
| 1x7 或 7x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7) | |
| 1x8, 2x4, 4x2 或 8x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8) | |
| 1x9, 3x3 或 9x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9) | |
| 1x10, 2x5 或 5x2 或 10x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11) | |
| 1x12, 2x6, 3x4, 4x3, 6x2 或 12x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13) | |
| 1x14, 2x7, 7x2 或 14x1 矩阵 | |
| Matx (_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13, _Tp v14, _Tp v15) | |
| 1x16, 4x4 或 16x1 矩阵 | |
| Matx (const _Tp *vals) | |
| 从普通数组初始化 | |
| template<int l> | |
| Matx (const Matx< _Tp, m, l > &a, const Matx< _Tp, l, n > &b, Matx_MatMulOp) | |
| template<typename _T2 > | |
| Matx (const Matx< _Tp, m, n > &a, _T2 alpha, Matx_ScaleOp) | |
| Matx (const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b, Matx_AddOp) | |
| Matx (const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b, Matx_DivOp) | |
| Matx (const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b, Matx_MulOp) | |
| Matx (const Matx< _Tp, m, n > &a, const Matx< _Tp, m, n > &b, Matx_SubOp) | |
| Matx (const Matx< _Tp, n, m > &a, Matx_TOp) | |
| Matx (std::initializer_list< _Tp >) | |
| 从初始化列表初始化 | |
| Matx< _Tp, m, 1 > | col (int i) const |
| 提取矩阵列 | |
| double | ddot (const Matx< _Tp, m, n > &v) const |
| 以双精度算术计算的点积 | |
| diag_type | diag () const |
| 提取矩阵对角线 | |
| Matx< _Tp, m, n > | div (const Matx< _Tp, m, n > &a) const |
| 逐元素除两个矩阵 | |
| _Tp | dot (const Matx< _Tp, m, n > &v) const |
| 以默认精度计算的点积 | |
| template<int m1, int n1> | |
| Matx< _Tp, m1, n1 > | get_minor (int base_row, int base_col) const |
| 提取矩阵的一部分 | |
| Matx< _Tp, n, m > | inv (int method=DECOMP_LU, bool *p_is_ok=NULL) const |
| 矩阵求逆 | |
| Matx< _Tp, m, n > | mul (const Matx< _Tp, m, n > &a) const |
| 逐元素乘两个矩阵 | |
| template<typename T2 > | |
| operator Matx< T2, m, n > () const | |
| 转换为另一种数据类型 | |
| _Tp & | operator() (int i) |
| const _Tp & | operator() (int i) const |
| 1D 元素访问 | |
| _Tp & | operator() (int row, int col) |
| const _Tp & | operator() (int row, int col) const |
| 元素访问 | |
| template<int m1, int n1> | |
| Matx< _Tp, m1, n1 > | reshape () const |
| 改变矩阵形状 | |
| Matx< _Tp, 1, n > | row (int i) const |
| 提取矩阵行 | |
| template<int l> | |
| Matx< _Tp, n, l > | solve (const Matx< _Tp, m, l > &rhs, int flags=DECOMP_LU) const |
| 求解线性方程组 | |
| Vec< _Tp, n > | solve (const Vec< _Tp, m > &rhs, int method) const |
| Matx< _Tp, n, m > | t () const |
| 转置矩阵 | |
静态公开成员函数 | |
| static CV_NODISCARD_STD Matx | all (_Tp alpha) |
| static CV_NODISCARD_STD Matx | diag (const diag_type &d) |
| static CV_NODISCARD_STD Matx | eye () |
| static CV_NODISCARD_STD Matx | ones () |
| static CV_NODISCARD_STD Matx | randn (_Tp a, _Tp b) |
| 生成正态分布的随机数。 | |
| static CV_NODISCARD_STD Matx | randu (_Tp a, _Tp b) |
| 生成均匀分布的随机数。 | |
| static CV_NODISCARD_STD Matx | zeros () |
公开属性 | |
| _Tp | val [m *n] |
| 矩阵元素 | |
用于在编译时已知其类型和大小的小型矩阵的模板类。
如果您需要更灵活的类型,请使用 Mat。矩阵 M 的元素可以使用 M(i,j) 记法访问。大多数常见的矩阵操作(另请参阅 MatrixExpressions)都可用。要对未实现的 Matx 执行操作,您可以轻松地将矩阵转换为 Mat 并反向转换。
除了接受元素列表的普通构造函数外,Matx 还可以从 C 数组初始化。
如果 C++11 功能可用,std::initializer_list 也可以用于初始化 Matx。
| 匿名枚举 |
1x3 或 3x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3 ) |
1x4, 2x2 或 4x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4 ) |
1x5 或 5x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5 ) |
1x6, 2x3, 3x2 或 6x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6 ) |
1x7 或 7x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6, | ||
| _Tp | v7 ) |
1x8, 2x4, 4x2 或 8x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6, | ||
| _Tp | v7, | ||
| _Tp | v8 ) |
1x9, 3x3 或 9x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6, | ||
| _Tp | v7, | ||
| _Tp | v8, | ||
| _Tp | v9 ) |
1x10, 2x5 或 5x2 或 10x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6, | ||
| _Tp | v7, | ||
| _Tp | v8, | ||
| _Tp | v9, | ||
| _Tp | v10, | ||
| _Tp | v11 ) |
1x12, 2x6, 3x4, 4x3, 6x2 或 12x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6, | ||
| _Tp | v7, | ||
| _Tp | v8, | ||
| _Tp | v9, | ||
| _Tp | v10, | ||
| _Tp | v11, | ||
| _Tp | v12, | ||
| _Tp | v13 ) |
1x14, 2x7, 7x2 或 14x1 矩阵
| cv::Matx< _Tp, m, n >::Matx | ( | _Tp | v0, |
| _Tp | v1, | ||
| _Tp | v2, | ||
| _Tp | v3, | ||
| _Tp | v4, | ||
| _Tp | v5, | ||
| _Tp | v6, | ||
| _Tp | v7, | ||
| _Tp | v8, | ||
| _Tp | v9, | ||
| _Tp | v10, | ||
| _Tp | v11, | ||
| _Tp | v12, | ||
| _Tp | v13, | ||
| _Tp | v14, | ||
| _Tp | v15 ) |
1x16, 4x4 或 16x1 矩阵
从普通数组初始化
从初始化列表初始化
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, m, n > & | a, |
| const Matx< _Tp, m, n > & | b, | ||
| Matx_AddOp | ) |
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, m, n > & | a, |
| const Matx< _Tp, m, n > & | b, | ||
| Matx_SubOp | ) |
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, m, n > & | a, |
| _T2 | alpha, | ||
| Matx_ScaleOp | ) |
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, m, n > & | a, |
| const Matx< _Tp, m, n > & | b, | ||
| Matx_MulOp | ) |
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, m, n > & | a, |
| const Matx< _Tp, m, n > & | b, | ||
| Matx_DivOp | ) |
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, m, l > & | a, |
| const Matx< _Tp, l, n > & | b, | ||
| Matx_MatMulOp | ) |
| cv::Matx< _Tp, m, n >::Matx | ( | const Matx< _Tp, n, m > & | a, |
| Matx_TOp | ) |
|
static (静态) |
提取矩阵列
| double cv::Matx< _Tp, m, n >::ddot | ( | const Matx< _Tp, m, n > & | v | ) | const |
以双精度算术计算的点积
|
static (静态) |
| Matx< _Tp, m, n > cv::Matx< _Tp, m, n >::div | ( | const Matx< _Tp, m, n > & | a | ) | const |
逐元素除两个矩阵
| _Tp cv::Matx< _Tp, m, n >::dot | ( | const Matx< _Tp, m, n > & | v | ) | const |
以默认精度计算的点积
|
static (静态) |
| Matx< _Tp, m1, n1 > cv::Matx< _Tp, m, n >::get_minor | ( | int | base_row, |
| int | base_col ) const |
提取矩阵的一部分
| Matx< _Tp, n, m > cv::Matx< _Tp, m, n >::inv | ( | int | method = DECOMP_LU, |
| bool * | p_is_ok = NULL ) const |
矩阵求逆
| Matx< _Tp, m, n > cv::Matx< _Tp, m, n >::mul | ( | const Matx< _Tp, m, n > & | a | ) | const |
逐元素乘两个矩阵
|
static (静态) |
| cv::Matx< _Tp, m, n >::operator Matx< T2, m, n > | ( | ) | const |
转换为另一种数据类型
1D 元素访问
| _Tp & cv::Matx< _Tp, m, n >::operator() | ( | int | 行 (row), |
| int | 列 (col) ) |
| const _Tp & cv::Matx< _Tp, m, n >::operator() | ( | int | 行 (row), |
| int | col ) const |
元素访问
|
static (静态) |
生成正态分布的随机数。
| a | 平均值。 |
| b | 标准差。 |
|
static (静态) |
生成均匀分布的随机数。
| a | 范围边界。 |
| b | 另一个范围边界(边界不必有序,下边界包含,上边界不包含)。 |
| Matx< _Tp, m1, n1 > cv::Matx< _Tp, m, n >::reshape | ( | ) | const |
改变矩阵形状
提取矩阵行
| Matx< _Tp, n, l > cv::Matx< _Tp, m, n >::solve | ( | const Matx< _Tp, m, l > & | rhs, |
| int | flags = DECOMP_LU ) const |
求解线性方程组
| Vec< _Tp, n > cv::Matx< _Tp, m, n >::solve | ( | const Vec< _Tp, m > & | rhs, |
| int | method ) const |
|
static (静态) |