Retrieves the spatial moment, which in case of image moments is defined as: M_{x_order,y_order}=sum_{x,y}(I(x,y) * x^{x_order} * y^{y_order}) where I(x,y) is the intensity of the pixel (x, y).

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

Syntax

C#
public static double cvGetSpatialMoment(
	ref MCvMoments moments,
	int xOrder,
	int yOrder
)
Visual Basic (Declaration)
Public Shared Function cvGetSpatialMoment ( _
	ByRef moments As MCvMoments, _
	xOrder As Integer, _
	yOrder As Integer _
) As Double
Visual C++
public:
static double cvGetSpatialMoment(
	MCvMoments% moments, 
	int xOrder, 
	int yOrder
)

Parameters

moments
Type: Emgu.CV.Structure..::.MCvMoments %
The moment state
xOrder
Type: System..::.Int32
x order of the retrieved moment, xOrder >= 0.
yOrder
Type: System..::.Int32
y order of the retrieved moment, yOrder >= 0 and xOrder + y_order <= 3

Return Value

The spatial moment

See Also