OpenCV 4.10.0
开源计算机视觉
|
由 cv::moments 返回的结构体 更多...
#include <opencv2/core/types.hpp>
公共成员函数 | |
Moments () | |
默认构造函数 | |
Moments (double m00, double m10, double m01, double m20, double m11, double m02, double m30, double m21, double m12, double m03) | |
完整构造函数 | |
公共属性 | |
空间矩 | |
double | m00 |
double | m10 |
double | m01 |
double | m20 |
double | m11 |
double | m02 |
double | m30 |
double | m21 |
double | m12 |
double | m03 |
中心矩 | |
double | mu20 |
double | mu11 |
double | mu02 |
double | mu30 |
double | mu21 |
double | mu12 |
double | mu03 |
中心归一化矩 | |
double | nu20 |
double | nu11 |
double | nu02 |
double | nu30 |
double | nu21 |
double | nu12 |
double | nu03 |
由 cv::moments 返回的结构体
空间矩 \(\texttt{Moments::m}_{ji}\) 计算如下
\[\texttt{m} _{ji}= \sum _{x,y} \left ( \texttt{array} (x,y) \cdot x^j \cdot y^i \right )\]
中心矩 \(\texttt{Moments::mu}_{ji}\) 计算如下
\[\texttt{mu} _{ji}= \sum _{x,y} \left ( \texttt{array} (x,y) \cdot (x - \bar{x} )^j \cdot (y - \bar{y} )^i \right )\]
其中 \((\bar{x}, \bar{y})\) 是质量中心
\[\bar{x} = \frac{\texttt{m}_{10}}{\texttt{m}_{00}} , \; \bar{y} = \frac{\texttt{m}_{01}}{\texttt{m}_{00}}\]
归一化中心矩 \(\texttt{Moments::nu}_{ij}\) 计算如下
\[\texttt{nu} _{ji}= \frac{\texttt{mu}_{ji}}{\texttt{m}_{00}^{(i+j)/2+1}} .\]
轮廓的矩定义相同,但使用格林公式计算(参见 http://en.wikipedia.org/wiki/Green_theorem)。因此,由于光栅分辨率有限,为轮廓计算的矩与为相同光栅化轮廓计算的矩略有不同。
cv::Moments::Moments | ( | ) |
默认构造函数
cv::Moments::Moments | ( | double | m00, |
double | m10, | ||
double | m01, | ||
double | m20, | ||
double | m11, | ||
double | m02, | ||
double | m30, | ||
double | m21, | ||
double | m12, | ||
double | m03 | ||
) |
完整构造函数
double cv::Moments::m00 |
double cv::Moments::m01 |
double cv::Moments::m02 |
double cv::Moments::m03 |
double cv::Moments::m10 |
double cv::Moments::m11 |
double cv::Moments::m12 |
double cv::Moments::m20 |
double cv::Moments::m21 |
double cv::Moments::m30 |
double cv::Moments::mu02 |
double cv::Moments::mu03 |
double cv::Moments::mu11 |
double cv::Moments::mu12 |
double cv::Moments::mu20 |
double cv::Moments::mu21 |
double cv::Moments::mu30 |
double cv::Moments::nu02 |
double cv::Moments::nu03 |
double cv::Moments::nu11 |
double cv::Moments::nu12 |
double cv::Moments::nu20 |
double cv::Moments::nu21 |
double cv::Moments::nu30 |