public GetHaarYWavelet ( 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. |
Результат | int |
public int GetHaarYWavelet(int x, int y, int radius)
{
int x1 = x - radius;
int x2 = x + radius - 1;
float a = GetRectangleSum(x1, y, x2, y + radius - 1);
float b = GetRectangleSum(x1, y - radius, x2, y - 1);
return (int)(a - b);
}