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