public GetHaarXWavelet ( int x, int y, int radius ) : int | ||
x | int | X coordinate of the point to calculate wavelet at. |
y | int | Y coordinate of the point to calculate wavelet at. |
radius | int | Wavelet size to calculate. |
return | int |
public int GetHaarXWavelet(int x, int y, int radius)
{
int y1 = y - radius;
int y2 = y + radius - 1;
long a = GetRectangleSum(x, y1, x + radius - 1, y2);
long b = GetRectangleSum(x - radius, y1, x - 1, y2);
return (int)(a - b);
}