@@ -19,20 +19,20 @@ public static class BinaryThresholdExtensions
1919 /// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
2020 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
2121 public static IImageProcessingContext BinaryThreshold ( this IImageProcessingContext source , float threshold )
22- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , BinaryThresholdColorComponent . Luminance ) ) ;
22+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , BinaryThresholdMode . Luminance ) ) ;
2323
2424 /// <summary>
2525 /// Applies binarization to the image splitting the pixels at the given threshold.
2626 /// </summary>
2727 /// <param name="source">The image this method extends.</param>
2828 /// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
29- /// <param name="colorComponent">The color component to be compared to threshold.</param>
29+ /// <param name="mode">Selects the value to be compared to threshold.</param>
3030 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
3131 public static IImageProcessingContext BinaryThreshold (
3232 this IImageProcessingContext source ,
3333 float threshold ,
34- BinaryThresholdColorComponent colorComponent )
35- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , colorComponent ) ) ;
34+ BinaryThresholdMode mode )
35+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , mode ) ) ;
3636
3737 /// <summary>
3838 /// Applies binarization to the image splitting the pixels at the given threshold with
@@ -48,24 +48,24 @@ public static IImageProcessingContext BinaryThreshold(
4848 this IImageProcessingContext source ,
4949 float threshold ,
5050 Rectangle rectangle )
51- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , BinaryThresholdColorComponent . Luminance ) , rectangle ) ;
51+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , BinaryThresholdMode . Luminance ) , rectangle ) ;
5252
5353 /// <summary>
5454 /// Applies binarization to the image splitting the pixels at the given threshold.
5555 /// </summary>
5656 /// <param name="source">The image this method extends.</param>
5757 /// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
58- /// <param name="colorComponent">The color component to be compared to threshold.</param>
58+ /// <param name="mode">Selects the value to be compared to threshold.</param>
5959 /// <param name="rectangle">
6060 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
6161 /// </param>
6262 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
6363 public static IImageProcessingContext BinaryThreshold (
6464 this IImageProcessingContext source ,
6565 float threshold ,
66- BinaryThresholdColorComponent colorComponent ,
66+ BinaryThresholdMode mode ,
6767 Rectangle rectangle )
68- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , colorComponent ) , rectangle ) ;
68+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , mode ) , rectangle ) ;
6969
7070 /// <summary>
7171 /// Applies binarization to the image splitting the pixels at the given threshold with
@@ -81,7 +81,7 @@ public static IImageProcessingContext BinaryThreshold(
8181 float threshold ,
8282 Color upperColor ,
8383 Color lowerColor )
84- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , BinaryThresholdColorComponent . Luminance ) ) ;
84+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , BinaryThresholdMode . Luminance ) ) ;
8585
8686 /// <summary>
8787 /// Applies binarization to the image splitting the pixels at the given threshold.
@@ -90,15 +90,15 @@ public static IImageProcessingContext BinaryThreshold(
9090 /// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
9191 /// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
9292 /// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
93- /// <param name="colorComponent">The color component to be compared to threshold.</param>
93+ /// <param name="mode">Selects the value to be compared to threshold.</param>
9494 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
9595 public static IImageProcessingContext BinaryThreshold (
9696 this IImageProcessingContext source ,
9797 float threshold ,
9898 Color upperColor ,
9999 Color lowerColor ,
100- BinaryThresholdColorComponent colorComponent )
101- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , colorComponent ) ) ;
100+ BinaryThresholdMode mode )
101+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , mode ) ) ;
102102
103103 /// <summary>
104104 /// Applies binarization to the image splitting the pixels at the given threshold with
@@ -118,7 +118,7 @@ public static IImageProcessingContext BinaryThreshold(
118118 Color upperColor ,
119119 Color lowerColor ,
120120 Rectangle rectangle )
121- => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , BinaryThresholdColorComponent . Luminance ) , rectangle ) ;
121+ => source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , BinaryThresholdMode . Luminance ) , rectangle ) ;
122122
123123 /// <summary>
124124 /// Applies binarization to the image splitting the pixels at the given threshold.
@@ -127,7 +127,7 @@ public static IImageProcessingContext BinaryThreshold(
127127 /// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
128128 /// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
129129 /// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
130- /// <param name="colorComponent">The color component to be compared to threshold.</param>
130+ /// <param name="mode">Selects the value to be compared to threshold.</param>
131131 /// <param name="rectangle">
132132 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
133133 /// </param>
@@ -137,8 +137,8 @@ public static IImageProcessingContext BinaryThreshold(
137137 float threshold ,
138138 Color upperColor ,
139139 Color lowerColor ,
140- BinaryThresholdColorComponent colorComponent ,
140+ BinaryThresholdMode mode ,
141141 Rectangle rectangle ) =>
142- source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , colorComponent ) , rectangle ) ;
142+ source . ApplyProcessor ( new BinaryThresholdProcessor ( threshold , upperColor , lowerColor , mode ) , rectangle ) ;
143143 }
144144}
0 commit comments