!7 static RGB destColor = rgb("#5650C3"); static float contrast = 5f; static float gamma = 0.5f; p-experiment { RGBImage img = shootScreen(); int w = img.getWidth(), h = img.getHeight(); BWImage bw = new BWImage(w, h); int destColorInt = destColor.getInt(); for y to h: for x to w: { float diff = rgbDiff(img.getInt(x, y), destColorInt); //diff = pow(diff, gamma); //diff *= contrast; diff = (diff-0.2f)*10f; bw.setPixel(x, y, diff); } //showBWImage(bw); //showAutoSegmentedImage(bw); L rects = sortRectsByMiddleY(autoSegment(bw)); pnl(rects); showImageWithSelections(img, rects); }