Table of Contents

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

kernelX DenseMatrix<float>

The horizontal gradient operator.

kernelY DenseMatrix<float>

The vertical gradient operator.

Fields

KayyaliKernel

An edge detection kernel containing two Kayyali operators.

public static readonly EdgeDetector2DKernel KayyaliKernel

Field Value

EdgeDetector2DKernel

PrewittKernel

An edge detection kernel containing two Prewitt operators. https://en.wikipedia.org/wiki/Prewitt_operator.

public static readonly EdgeDetector2DKernel PrewittKernel

Field Value

EdgeDetector2DKernel

RobertsCrossKernel

An edge detection kernel containing two Roberts-Cross operators. https://en.wikipedia.org/wiki/Roberts_cross.

public static readonly EdgeDetector2DKernel RobertsCrossKernel

Field Value

EdgeDetector2DKernel

ScharrKernel

An edge detection kernel containing two Scharr operators.

public static readonly EdgeDetector2DKernel ScharrKernel

Field Value

EdgeDetector2DKernel

SobelKernel

An edge detection kernel containing two Sobel operators. https://en.wikipedia.org/wiki/Sobel_operator.

public static readonly EdgeDetector2DKernel SobelKernel

Field Value

EdgeDetector2DKernel

Properties

KernelX

Gets the horizontal gradient operator.

public DenseMatrix<float> KernelX { get; }

Property Value

DenseMatrix<float>

KernelY

Gets the vertical gradient operator.

public DenseMatrix<float> KernelY { get; }

Property Value

DenseMatrix<float>

Methods

Equals(EdgeDetector2DKernel)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(EdgeDetector2DKernel other)

Parameters

other EdgeDetector2DKernel

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

left EdgeDetector2DKernel

The left hand EdgeDetector2DKernel operand.

right EdgeDetector2DKernel

The right hand EdgeDetector2DKernel operand.

Returns

bool

True if the left parameter is equal to the right parameter; otherwise, false.

operator !=(EdgeDetector2DKernel, EdgeDetector2DKernel)

Checks whether two EdgeDetector2DKernel structures are equal.

public static bool operator !=(EdgeDetector2DKernel left, EdgeDetector2DKernel right)

Parameters

left EdgeDetector2DKernel

The left hand EdgeDetector2DKernel operand.

right EdgeDetector2DKernel

The right hand EdgeDetector2DKernel operand.

Returns

bool

True if the left parameter is not equal to the right parameter; otherwise, false.