public AutoWhiteBalance(HistogramThresholdAlgorithm algorithm, double threshold) { formatTranslations[PixelFormat.Format8bppIndexed] = PixelFormat.Format8bppIndexed; formatTranslations[PixelFormat.Format24bppRgb] = PixelFormat.Format24bppRgb; formatTranslations[PixelFormat.Format32bppRgb] = PixelFormat.Format32bppRgb; formatTranslations[PixelFormat.Format32bppArgb] = PixelFormat.Format32bppArgb; this.Algorithm = algorithm; LowThreshold = HighThreshold = threshold; }
/// <summary> /// Creates an in-place auto-white-balance filter, using the given strategy and (0..1) percent threshold. /// </summary> /// <param name="algorithm"></param> /// <param name="threshold"></param> public AutoWhiteBalance(HistogramThresholdAlgorithm algorithm, double threshold) { formatTranslations[PixelFormat.Format8bppIndexed] = PixelFormat.Format8bppIndexed; formatTranslations[PixelFormat.Format24bppRgb] = PixelFormat.Format24bppRgb; formatTranslations[PixelFormat.Format32bppRgb] = PixelFormat.Format32bppRgb; formatTranslations[PixelFormat.Format32bppArgb] = PixelFormat.Format32bppArgb; this.Algorithm = algorithm; LowThreshold = HighThreshold = threshold; }
public AutoWhiteBalance(HistogramThresholdAlgorithm algorithm) : this(algorithm, algorithm == HistogramThresholdAlgorithm.Simple ? 0.0006 : 0.006) { }
/// <summary> /// Creates an in-place auto-white-balance filter, using the given strategy. If Simple is used, a threshold of 0.0006 is used; otherwise 0.006 is used. /// </summary> /// <param name="algorithm"></param> public AutoWhiteBalance(HistogramThresholdAlgorithm algorithm) : this(algorithm, algorithm == HistogramThresholdAlgorithm.Simple ? 0.0006 : 0.006) { }