static DoublePt centroidForColorPredicate(F1 pred, RGBImage img) { ret floatPairToDoublePt(bwLightCentroid(colorPredicateToBWImage(pred, img))); }