/** * Calculate the sum of squared pixels in the image used for constructing * this SAT within the given rectangle * * @param r * rectangle * @return sum of pixels in given rectangle */ public float calculateSqSumArea(Rectangle r) { return calculateSqSumArea(Math.round(r.x), Math.round(r.y), Math.round(r.x + r.width), Math.round(r.y + r.height)); }
/** * Calculate the sum of squared pixels in the image used for constructing * this SAT within the given rectangle * * @param r * rectangle * @return sum of pixels in given rectangle */ public float calculateSqSumArea(Rectangle r) { return calculateSqSumArea(Math.round(r.x), Math.round(r.y), Math.round(r.x + r.width), Math.round(r.y + r.height)); }
double wndMean2 = 0, wndSum2 = 0; double t = sum.calculateSqSumArea(x, y, x+template.width, y+template.height); wndSum2 += t;
double wndMean2 = 0, wndSum2 = 0; double t = sum.calculateSqSumArea(x, y, x+template.width, y+template.height); wndSum2 += t;
double wndMean2 = 0, wndSum2 = 0; double t = sum.calculateSqSumArea(x, y, x+template.width, y+template.height); wndSum2 += t;
double wndMean2 = 0, wndSum2 = 0; double t = sum.calculateSqSumArea(x, y, x+template.width, y+template.height); wndSum2 += t;
double wndSum2 = 0; double t = sum.calculateSqSumArea(x, y, x+template.width, y+template.height); wndSum2 += t;
double wndSum2 = 0; double t = sum.calculateSqSumArea(x, y, x+template.width, y+template.height); wndSum2 += t;
num -= t * templateMean; double wndSum2 = sum.calculateSqSumArea(x, y, x+template.width, y+template.height);
num -= t * templateMean; double wndSum2 = sum.calculateSqSumArea(x, y, x+template.width, y+template.height);