Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
 public AutoWhiteBalance(HistogramThresholdAlgorithm algorithm)
     : this(algorithm, algorithm == HistogramThresholdAlgorithm.Simple ? 0.0006 : 0.006)
 {
 }
Exemplo n.º 4
0
 /// <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)
 {
 }