/// <summary> /// ........ /// ........ /// xxxxxxxx /// xxxxxxxx /// </summary> private double Filter1(IntegralImage i, int x, int y, int w, int h) { int halfH = h / 2; double a = i.CalculateArea(x, y + halfH, x + w - 1, y + h - 1); double b = i.CalculateArea(x, y, x + w - 1, y + halfH - 1); return(Subtract(a, b)); }
/// <summary> /// ...xxx... /// ...xxx... /// ...xxx... /// <summary> private double Filter5(IntegralImage i, int x, int y, int w, int h) { int thirdW = w / 3; double a = i.CalculateArea(x + thirdW, y, x + 2 * thirdW - 1, y + h - 1); double b = i.CalculateArea(x, y, x + thirdW - 1, y + h - 1) + i.CalculateArea(x + 2 * thirdW, y, x + w - 1, y + h - 1); return(Subtract(a, b)); }
/// <summary> /// xxxxxxxx /// xxxxxxxx /// xxxxxxxx /// xxxxxxxx /// </summary> private double Filter0(IntegralImage i, int x, int y, int w, int h) { double a = i.CalculateArea(x, y, x + w - 1, y + h - 1); double b = 0; return(Subtract(a, b)); }