// anything >= threshold ends up white
static Image2B imageToBinary(BufferedImage img, double threshold) {
  ret bwImageToBinary(new BWImage(img), zeroToOneToZeroTo255(threshold));
}

static Image2B imageToBinary(BufferedImage img, int threshold) {
  ret bwImageToBinary(new BWImage(img), threshold);
}

static Image2B imageToBinary(BWImage img, double threshold) {
  ret bwImageToBinary(img, zeroToOneToZeroTo255(threshold));
}

static Image2B imageToBinary(BWImage img, int threshold) {
  ret bwImageToBinary(img, threshold);
}