Calculate mean value of pixels in the specified rectangle.

Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public float GetRectangleMean(
	int x,
	int y,
	int radius
)

Parameters

x
Type: System..::.Int32
X coordinate of central point of the rectangle.
y
Type: System..::.Int32
Y coordinate of central point of the rectangle.
radius
Type: System..::.Int32
Radius of the rectangle.

Return Value

Returns mean value of pixels in the specified rectangle.

Remarks

The method calculates mean value of pixels in square rectangle with odd width and height. In the case if it is required to calculate mean value of 3x3 rectangle, then it is required to specify its center and radius equal to 1.

See Also