public static BufferedImage boofCVBinarization(BufferedImage image, int threshold) {
		GrayU8 input8 = ConvertBufferedImage.convertFrom(image,(GrayU8)null);
		GrayF32 input32 = ConvertBufferedImage.convertFromSingle(image, null, GrayF32.class);
		GrayU8 binary8 = new GrayU8(input8.getWidth(), input8.getHeight());
//		GrayF32 binary32 = new GrayF32(input8.getWidth(), input8.getHeight());
		boolean down = false;
		ThresholdImageOps.threshold(input8, binary8, threshold, down);
//		GThresholdImageOps.threshold(input32, binary8, threshold, down);
		BufferedImage outputImage = null;
//		outputImage =	ConvertBufferedImage.convertTo(binary8, null);
		boolean invert = false;
		outputImage = VisualizeBinaryData.renderBinary(binary8, invert, null);
		// 
//		outputImage = ImageUtil.removeAlpha(outputImage);
//		outputImage = ImageUtil.convertRGB(outputImage, 
//				new int[] {0x0d0d0d}, new int[] {0xffffff});
		return outputImage;
	}
public static BufferedImage boofCVBinarization(BufferedImage image, int threshold) {
		GrayU8 input8 = ConvertBufferedImage.convertFrom(image,(GrayU8)null);
		GrayF32 input32 = ConvertBufferedImage.convertFromSingle(image, null, GrayF32.class);
		GrayU8 binary8 = new GrayU8(input8.getWidth(), input8.getHeight());
		boolean down = false;
		ThresholdImageOps.threshold(input8, binary8, threshold, down);
		BufferedImage outputImage = null;
		boolean invert = false;
		outputImage = VisualizeBinaryData.renderBinary(binary8, invert, null);
	
		return outputImage;
	}
public static bufferedimage boofcvbinarization(bufferedimage image, int threshold) { grayu8 input8 = convertbufferedimage.convertfrom(image,(grayu8)null); grayf32 input32 = convertbufferedimage.convertfromsingle(image, null, grayf32.class); grayu8 binary8 = new grayu8(input8.getwidth(), input8.getheight()); boolean down = false; thresholdimageops.threshold(input8, binary8, threshold, down); bufferedimage outputimage = null; boolean invert = false; outputimage = visualizebinarydata.renderbinary(binary8, invert, null); return outputimage; }