Class EdgeDetector2DProcessor
Defines edge detection using the two 1D gradient operators.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Convolution
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class EdgeDetector2DProcessor : IImageProcessor
Constructors
| Edit this page View SourceEdgeDetector2DProcessor(EdgeDetector2DKernel, bool)
Initializes a new instance of the EdgeDetector2DProcessor class.
Declaration
public EdgeDetector2DProcessor(EdgeDetector2DKernel kernel, bool grayscale)
Parameters
Type | Name | Description |
---|---|---|
EdgeDetector2DKernel | kernel | The 2D edge detector kernel. |
bool | grayscale | Whether to convert the image to grayscale before performing edge detection. |
Properties
| Edit this page View SourceGrayscale
Gets a value indicating whether to convert the image to grayscale before performing edge detection.
Declaration
public bool Grayscale { get; }
Property Value
Type | Description |
---|---|
bool |
Kernel
Gets the 2D edge detector kernel.
Declaration
public EdgeDetector2DKernel Kernel { get; }
Property Value
Type | Description |
---|---|
EdgeDetector2DKernel |
Methods
| Edit this page View SourceCreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
Image<TPixel> | source | The source image. Cannot be null. |
Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
Type | Description |
---|---|
IImageProcessor<TPixel> |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |