Accord.Imaging.IntegralImage.GetRectangleMean C# (CSharp) Method

GetRectangleMean() public method

Calculate mean value of pixels in the specified rectangle.
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.
public GetRectangleMean ( int x, int y, int radius ) : float
x int X coordinate of central point of the rectangle.
y int Y coordinate of central point of the rectangle.
radius int Radius of the rectangle.
return float
        public float GetRectangleMean(int x, int y, int radius)
        {
            return GetRectangleMean(x - radius, y - radius, x + radius, y + radius);
        }

Same methods

IntegralImage::GetRectangleMean ( int x1, int y1, int x2, int y2 ) : float