struct returned by cv::moments More...
#include <types.hpp>
Public Member Functions | |
Moments () | |
the default constructor More... | |
Moments (double m00, double m10, double m01, double m20, double m11, double m02, double m30, double m21, double m12, double m03) | |
the full constructor More... | |
Public Attributes | |
spatial moments | |
CV_PROP_RW double | m00 |
CV_PROP_RW double | m10 |
CV_PROP_RW double | m01 |
CV_PROP_RW double | m20 |
CV_PROP_RW double | m11 |
CV_PROP_RW double | m02 |
CV_PROP_RW double | m30 |
CV_PROP_RW double | m21 |
CV_PROP_RW double | m12 |
CV_PROP_RW double | m03 |
central moments | |
CV_PROP_RW double | mu20 |
CV_PROP_RW double | mu11 |
CV_PROP_RW double | mu02 |
CV_PROP_RW double | mu30 |
CV_PROP_RW double | mu21 |
CV_PROP_RW double | mu12 |
CV_PROP_RW double | mu03 |
central normalized moments | |
CV_PROP_RW double | nu20 |
CV_PROP_RW double | nu11 |
CV_PROP_RW double | nu02 |
CV_PROP_RW double | nu30 |
CV_PROP_RW double | nu21 |
CV_PROP_RW double | nu12 |
CV_PROP_RW double | nu03 |
struct returned by cv::moments
The spatial moments are computed as:
The central moments are computed as:
where is the mass center:
The normalized central moments are computed as:
The moments of a contour are defined in the same way but computed using the Green's formula (see http://en.wikipedia.org/wiki/Green_theorem). So, due to a limited raster resolution, the moments computed for a contour are slightly different from the moments computed for the same rasterized contour.
cv::Moments::Moments | ( | ) |
the default constructor
cv::Moments::Moments | ( | double | m00, |
double | m10, | ||
double | m01, | ||
double | m20, | ||
double | m11, | ||
double | m02, | ||
double | m30, | ||
double | m21, | ||
double | m12, | ||
double | m03 | ||
) |
the full constructor
CV_PROP_RW double cv::Moments::m00 |
CV_PROP_RW double cv::Moments::m01 |
CV_PROP_RW double cv::Moments::m02 |
CV_PROP_RW double cv::Moments::m03 |
CV_PROP_RW double cv::Moments::m10 |
CV_PROP_RW double cv::Moments::m11 |
CV_PROP_RW double cv::Moments::m12 |
CV_PROP_RW double cv::Moments::m20 |
CV_PROP_RW double cv::Moments::m21 |
CV_PROP_RW double cv::Moments::m30 |
CV_PROP_RW double cv::Moments::mu02 |
CV_PROP_RW double cv::Moments::mu03 |
CV_PROP_RW double cv::Moments::mu11 |
CV_PROP_RW double cv::Moments::mu12 |
CV_PROP_RW double cv::Moments::mu20 |
CV_PROP_RW double cv::Moments::mu21 |
CV_PROP_RW double cv::Moments::mu30 |
CV_PROP_RW double cv::Moments::nu02 |
CV_PROP_RW double cv::Moments::nu03 |
CV_PROP_RW double cv::Moments::nu11 |
CV_PROP_RW double cv::Moments::nu12 |
CV_PROP_RW double cv::Moments::nu20 |
CV_PROP_RW double cv::Moments::nu21 |
CV_PROP_RW double cv::Moments::nu30 |