Browse Source

Changed naming convention for threshold limit param

pull/725/head
Simanto Rahman 8 years ago
parent
commit
31e5d8d35d
  1. 18
      src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs

18
src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs

@ -23,12 +23,12 @@ namespace SixLabors.ImageSharp.Processing
/// Applies Bradley Adaptive Threshold to the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="threshold">Threshold limit (0.0-1.0) to consider for binarization.</param>
/// <param name="thresholdLimit">Threshold limit (0.0-1.0) to consider for binarization.</param>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> AdaptiveThreshold<TPixel>(this IImageProcessingContext<TPixel> source, float threshold)
public static IImageProcessingContext<TPixel> AdaptiveThreshold<TPixel>(this IImageProcessingContext<TPixel> source, float thresholdLimit)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new AdaptiveThresholdProcessor<TPixel>(threshold));
=> source.ApplyProcessor(new AdaptiveThresholdProcessor<TPixel>(thresholdLimit));
/// <summary>
/// Applies Bradley Adaptive Threshold to the image.
@ -48,12 +48,12 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="upper">Upper (white) color for thresholding.</param>
/// <param name="lower">Lower (black) color for thresholding</param>
/// <param name="threshold">Threshold limit (0.0-1.0) to consider for binarization.</param>
/// <param name="thresholdLimit">Threshold limit (0.0-1.0) to consider for binarization.</param>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> AdaptiveThreshold<TPixel>(this IImageProcessingContext<TPixel> source, TPixel upper, TPixel lower, float threshold)
public static IImageProcessingContext<TPixel> AdaptiveThreshold<TPixel>(this IImageProcessingContext<TPixel> source, TPixel upper, TPixel lower, float thresholdLimit)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new AdaptiveThresholdProcessor<TPixel>(upper, lower, threshold));
=> source.ApplyProcessor(new AdaptiveThresholdProcessor<TPixel>(upper, lower, thresholdLimit));
/// <summary>
/// Applies Bradley Adaptive Threshold to the image.
@ -74,12 +74,12 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="upper">Upper (white) color for thresholding.</param>
/// <param name="lower">Lower (black) color for thresholding</param>
/// <param name="threshold">Threshold limit (0.0-1.0) to consider for binarization.</param>
/// <param name="thresholdLimit">Threshold limit (0.0-1.0) to consider for binarization.</param>
/// <param name="rectangle">Rectangle region to apply the processor on.</param>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> AdaptiveThreshold<TPixel>(this IImageProcessingContext<TPixel> source, TPixel upper, TPixel lower, float threshold, Rectangle rectangle)
public static IImageProcessingContext<TPixel> AdaptiveThreshold<TPixel>(this IImageProcessingContext<TPixel> source, TPixel upper, TPixel lower, float thresholdLimit, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new AdaptiveThresholdProcessor<TPixel>(upper, lower, threshold), rectangle);
=> source.ApplyProcessor(new AdaptiveThresholdProcessor<TPixel>(upper, lower, thresholdLimit), rectangle);
}
}
Loading…
Cancel
Save