static float rgbInnerPrecision(RGBImage img) { int w = img.w(), h = img.h(); ret min(1f, 128*(1f-avg( rgbLocalSimilarity(img, new Rect(0, 0, w-1, h), new Rect(1, 0, w-1, h)), rgbLocalSimilarity(img, new Rect(0, 0, w, h-1), new Rect(0, 1, w, h-1))))); }