Class EdgeDetector2DProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Convolution
- Assembly
- SixLabors.ImageSharp.dll
Defines edge detection using the two 1D gradient operators.
public sealed class EdgeDetector2DProcessor : IImageProcessor
- Inheritance
-
EdgeDetector2DProcessor
- Implements
- Inherited Members
Constructors
EdgeDetector2DProcessor(EdgeDetector2DKernel, bool)
Initializes a new instance of the EdgeDetector2DProcessor class.
public EdgeDetector2DProcessor(EdgeDetector2DKernel kernel, bool grayscale)
Parameters
kernelEdgeDetector2DKernelThe 2D edge detector kernel.
grayscaleboolWhether to convert the image to grayscale before performing edge detection.
Properties
Grayscale
Gets a value indicating whether to convert the image to grayscale before performing edge detection.
public bool Grayscale { get; }
Property Value
Kernel
Gets the 2D edge detector kernel.
public EdgeDetector2DKernel Kernel { 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.