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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColorColorThe color to use for pixels that are above the threshold.
lowerColorColorThe 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColorColorThe color to use for pixels that are above the threshold.
lowerColorColorThe color to use for pixels that are below the threshold
modeBinaryThresholdModeSelects 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColorColorThe color to use for pixels that are above the threshold.
lowerColorColorThe color to use for pixels that are below the threshold
modeBinaryThresholdModeSelects the value to be compared to threshold.
rectangleRectangleThe 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
upperColorColorThe color to use for pixels that are above the threshold.
lowerColorColorThe color to use for pixels that are below the threshold
rectangleRectangleThe 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
modeBinaryThresholdModeSelects 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
modeBinaryThresholdModeSelects the value to be compared to threshold.
rectangleRectangleThe 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
sourceIImageProcessingContextThe current image processing context.
thresholdfloatThe threshold to apply binarization of the image. Must be between 0 and 1.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.