http://www.emgu.com
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.

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.0.1717 (2.4.0.1717)

Syntax

C#
public static void cvMoments(
	IntPtr arr,
	ref MCvMoments moments,
	int binary
)
Visual Basic
Public Shared Sub cvMoments ( _
	arr As IntPtr, _
	ByRef moments As MCvMoments, _
	binary As Integer _
)
Visual C++
public:
static void cvMoments(
	IntPtr arr, 
	MCvMoments% moments, 
	int binary
)

Parameters

arr
Type: System..::..IntPtr
Image (1-channel or 3-channel with COI set) or polygon (CvSeq of points or a vector of points)
moments
Type: Emgu.CV.Structure..::..MCvMoments%
Pointer to returned moment state structure
binary
Type: System..::..Int32
(For images only) If the flag is non-zero, all the zero pixel values are treated as zeroes, all the others are treated as 1s

See Also