// resulting image is of size (img.w()-blurw, img.h()-blurh) meta-for IntegralImage also as IIntegralImage { static int[] blurredPixelsFromIntegralImage(int blurw, int blurh default blurw, IntegralImage img) { int w1 = img.getWidth(), h1 = img.getHeight(); int w = w1-blurw, h = h1-blurh; if (w < 0 || h < 0) null; int[] pixels = new[w*h]; int i = 0; double area = blurw*blurh; for y to h: { for x to w: { dbl r = doubleRatio(img.rectSum(x, y, x+blurw, y+blurh, 0), area); dbl g = doubleRatio(img.rectSum(x, y, x+blurw, y+blurh, 1), area); dbl b = doubleRatio(img.rectSum(x, y, x+blurw, y+blurh, 2), area); pixels[i++] = rgbIntFromDoubles_fullAlpha(r, g, b); } } ret pixels; } }