Class BinaryThresholdExtensions
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
Defines extension methods to apply binary thresholding on an Image using Mutate/Clone.
public static class BinaryThresholdExtensions
- Inheritance
-
BinaryThresholdExtensions
- Inherited Members
Methods
BinaryThreshold(IImageProcessingContext, float)
Applies binarization to the image splitting the pixels at the given threshold with Luminance as the color component to be compared to threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
Returns
BinaryThreshold(IImageProcessingContext, float, Color, Color)
Applies binarization to the image splitting the pixels at the given threshold with Luminance as the color component to be compared to threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, Color upperColor, Color lowerColor)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColor
ColorThe color to use for pixels that are above the threshold.
lowerColor
ColorThe color to use for pixels that are below the threshold
Returns
BinaryThreshold(IImageProcessingContext, float, Color, Color, BinaryThresholdMode)
Applies binarization to the image splitting the pixels at the given threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, Color upperColor, Color lowerColor, BinaryThresholdMode mode)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColor
ColorThe color to use for pixels that are above the threshold.
lowerColor
ColorThe color to use for pixels that are below the threshold
mode
BinaryThresholdModeSelects the value to be compared to threshold.
Returns
BinaryThreshold(IImageProcessingContext, float, Color, Color, BinaryThresholdMode, Rectangle)
Applies binarization to the image splitting the pixels at the given threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, Color upperColor, Color lowerColor, BinaryThresholdMode mode, Rectangle rectangle)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColor
ColorThe color to use for pixels that are above the threshold.
lowerColor
ColorThe color to use for pixels that are below the threshold
mode
BinaryThresholdModeSelects the value to be compared to threshold.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
BinaryThreshold(IImageProcessingContext, float, Color, Color, Rectangle)
Applies binarization to the image splitting the pixels at the given threshold with Luminance as the color component to be compared to threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, Color upperColor, Color lowerColor, Rectangle rectangle)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColor
ColorThe color to use for pixels that are above the threshold.
lowerColor
ColorThe color to use for pixels that are below the threshold
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
BinaryThreshold(IImageProcessingContext, float, BinaryThresholdMode)
Applies binarization to the image splitting the pixels at the given threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, BinaryThresholdMode mode)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
mode
BinaryThresholdModeSelects the value to be compared to threshold.
Returns
BinaryThreshold(IImageProcessingContext, float, BinaryThresholdMode, Rectangle)
Applies binarization to the image splitting the pixels at the given threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, BinaryThresholdMode mode, Rectangle rectangle)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
mode
BinaryThresholdModeSelects the value to be compared to threshold.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
BinaryThreshold(IImageProcessingContext, float, Rectangle)
Applies binarization to the image splitting the pixels at the given threshold with Luminance as the color component to be compared to threshold.
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, Rectangle rectangle)
Parameters
source
IImageProcessingContextThe current image processing context.
threshold
floatThe threshold to apply binarization of the image. Must be between 0 and 1.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.