public static WriteableBitmap EntropySelectionCalculate(WriteableBitmap writeableBitmap, out int?threshold) { threshold = EntroypSelectionThreshold(writeableBitmap); if (threshold == null) { return(null); } return(BinaryzationHelper.ManualBinaryzation((int)threshold, writeableBitmap)); }
public static WriteableBitmap PercentageBlackSelectionCalculate(WriteableBitmap writeableBitmap, double percentage) { int?threshold = PercentageBlackSelectionThreshold(writeableBitmap, percentage); if (threshold == null) { return(null); } return(BinaryzationHelper.ManualBinaryzation((int)threshold, writeableBitmap)); }