static RGBImage rgbMarkedRects(RGBImage img, Collection rects) { BufferedImage bi = cloneBufferedImage(img.getBufferedImage()); drawBoxes(bi, rectsToRectangles(rects), Color.red, 1); ret new RGBImage(bi); }