sinterface IBWIntegralImage { public int getWidth(); public int getHeight(); public int getIIValue(int x, int y); // 0.0 to 255.0 default public double getPixelAverage(int x1, int y1, int x2, int y2) { int area = (x2-x1)*(y2-y1); ret doubleRatio(bwIntegralImage_sumRect(this, x1, y1, x2, y2), area); } }