Struct EdgeDetector2DKernel
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Convolution
- Assembly
- SixLabors.ImageSharp.dll
Represents an edge detection convolution kernel consisting of two 1D gradient operators.
public readonly struct EdgeDetector2DKernel : IEquatable<EdgeDetector2DKernel>
- Implements
- Inherited Members
Constructors
EdgeDetector2DKernel(DenseMatrix<float>, DenseMatrix<float>)
Initializes a new instance of the EdgeDetector2DKernel struct.
public EdgeDetector2DKernel(DenseMatrix<float> kernelX, DenseMatrix<float> kernelY)
Parameters
kernelXDenseMatrix<float>The horizontal gradient operator.
kernelYDenseMatrix<float>The vertical gradient operator.
Fields
KayyaliKernel
An edge detection kernel containing two Kayyali operators.
public static readonly EdgeDetector2DKernel KayyaliKernel
Field Value
PrewittKernel
An edge detection kernel containing two Prewitt operators. https://en.wikipedia.org/wiki/Prewitt_operator.
public static readonly EdgeDetector2DKernel PrewittKernel
Field Value
RobertsCrossKernel
An edge detection kernel containing two Roberts-Cross operators. https://en.wikipedia.org/wiki/Roberts_cross.
public static readonly EdgeDetector2DKernel RobertsCrossKernel
Field Value
ScharrKernel
An edge detection kernel containing two Scharr operators.
public static readonly EdgeDetector2DKernel ScharrKernel
Field Value
SobelKernel
An edge detection kernel containing two Sobel operators. https://en.wikipedia.org/wiki/Sobel_operator.
public static readonly EdgeDetector2DKernel SobelKernel
Field Value
Properties
KernelX
Gets the horizontal gradient operator.
public DenseMatrix<float> KernelX { get; }
Property Value
KernelY
Gets the vertical gradient operator.
public DenseMatrix<float> KernelY { get; }
Property Value
Methods
Equals(EdgeDetector2DKernel)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(EdgeDetector2DKernel other)
Parameters
otherEdgeDetector2DKernelAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(EdgeDetector2DKernel, EdgeDetector2DKernel)
Checks whether two EdgeDetector2DKernel structures are equal.
public static bool operator ==(EdgeDetector2DKernel left, EdgeDetector2DKernel right)
Parameters
leftEdgeDetector2DKernelThe left hand EdgeDetector2DKernel operand.
rightEdgeDetector2DKernelThe right hand EdgeDetector2DKernel operand.
Returns
- bool
True if the
leftparameter is equal to therightparameter; otherwise, false.
operator !=(EdgeDetector2DKernel, EdgeDetector2DKernel)
Checks whether two EdgeDetector2DKernel structures are equal.
public static bool operator !=(EdgeDetector2DKernel left, EdgeDetector2DKernel right)
Parameters
leftEdgeDetector2DKernelThe left hand EdgeDetector2DKernel operand.
rightEdgeDetector2DKernelThe right hand EdgeDetector2DKernel operand.
Returns
- bool
True if the
leftparameter is not equal to therightparameter; otherwise, false.