Class ConvolutionProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Convolution
- Assembly
- SixLabors.ImageSharp.dll
Defines a processor that uses a 2 dimensional matrix to perform convolution against an image.
public class ConvolutionProcessor : IImageProcessor
- Inheritance
-
ConvolutionProcessor
- Implements
- Inherited Members
Constructors
ConvolutionProcessor(in DenseMatrix<float>, bool, BorderWrappingMode, BorderWrappingMode)
Initializes a new instance of the ConvolutionProcessor class.
public ConvolutionProcessor(in DenseMatrix<float> kernelXY, bool preserveAlpha, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)
Parameters
kernelXYDenseMatrix<float>The 2d gradient operator.
preserveAlphaboolWhether the convolution filter is applied to alpha as well as the color channels.
borderWrapModeXBorderWrappingModeThe BorderWrappingMode to use when mapping the pixels outside of the border, in X direction.
borderWrapModeYBorderWrappingModeThe BorderWrappingMode to use when mapping the pixels outside of the border, in Y direction.
Properties
BorderWrapModeX
Gets the BorderWrappingMode to use when mapping the pixels outside of the border, in X direction.
public BorderWrappingMode BorderWrapModeX { get; }
Property Value
BorderWrapModeY
Gets the BorderWrappingMode to use when mapping the pixels outside of the border, in Y direction.
public BorderWrappingMode BorderWrapModeY { get; }
Property Value
KernelXY
Gets the 2d convolution kernel.
public DenseMatrix<float> KernelXY { get; }
Property Value
PreserveAlpha
Gets a value indicating whether the convolution filter is applied to alpha as well as the color channels.
public bool PreserveAlpha { get; }
Property Value
Methods
CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
sourceImage<TPixel>The source image. Cannot be null.
sourceRectangleRectangleThe Rectangle structure that specifies the portion of the image object to draw.
Returns
- IImageProcessor<TPixel>
Type Parameters
TPixelThe pixel type.