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

GetRectangleSumUnsafe() public method

Calculate sum of pixels in the specified rectangle without checking it's coordinates.

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

public GetRectangleSumUnsafe ( int x, int y, int radius ) : uint
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 uint
        public uint GetRectangleSumUnsafe(int x, int y, int radius)
        {
            return GetRectangleSumUnsafe(x - radius, y - radius, x + radius, y + radius);
        }

Same methods

IntegralImage::GetRectangleSumUnsafe ( int x1, int y1, int x2, int y2 ) : uint