Calculates spatial and central moments up to the third order and writes them to moments. The moments may be used then to calculate gravity center of the shape, its area, main axises and various shape characeteristics including 7 Hu invariants.

C# | Visual Basic | Visual C++ |
public MCvMoments GetMoments( bool binary )
Public Function GetMoments ( _ binary As Boolean _ ) As MCvMoments
public: MCvMoments GetMoments( bool binary )

- binary (Boolean)
- If the flag is true, all the zero pixel values are treated as zeroes, all the others are treated as 1's

spatial and central moments up to the third order