eVision .NET API
Loading...
Searching...
No Matches
eVision.EKernel Class Reference

Kernel for use in convolution operations. More...

Inheritance diagram for eVision.EKernel:
Collaboration diagram for eVision.EKernel:

Public Member Functions

 EKernel ()
 Constructs an EKernel object to be used with the EasyImage.ConvolKernel method.
 EKernel (short sizeX, short sizeY, float gain, uint offset, eVision.EKernelRectifier rectifier, uint outsideValue)
 Constructs an EKernel object to be used with the EasyImage.ConvolKernel method.
 EKernel (eVision.EKernelType KernelType)
 Constructs an EKernel object to be used with the EasyImage.ConvolKernel method.
float GetKernelData (int columnIndex, int rowIndex)
 Returns the convolution coefficient of given indices.
void GetKernelData (int columnIndex, int rowIndex, out float coefficientValue)
 Returns the convolution coefficient of given indices.
void SetKernelData (int columnIndex, int rowIndex, float coefficientValue)
 Sets the convolution coefficient values at the given indices.
void SetKernelData (float coefficientValue00, float coefficientValue10, float coefficientValue20, float coefficientValue01, float coefficientValue11, float coefficientValue21, float coefficientValue02, float coefficientValue12, float coefficientValue22)
 Sets the convolution coefficient values at the given indices.
void SetKernelData (float coefficientValue00, float coefficientValue10, float coefficientValue20, float coefficientValue30, float coefficientValue40, float coefficientValue01, float coefficientValue11, float coefficientValue21, float coefficientValue31, float coefficientValue41, float coefficientValue02, float coefficientValue12, float coefficientValue22, float coefficientValue32, float coefficientValue42, float coefficientValue03, float coefficientValue13, float coefficientValue23, float coefficientValue33, float coefficientValue43, float coefficientValue04, float coefficientValue14, float coefficientValue24, float coefficientValue34, float coefficientValue44)
 Sets the convolution coefficient values at the given indices.
void SetKernelData (float coefficientValue00, float coefficientValue10, float coefficientValue20, float coefficientValue30, float coefficientValue40, float coefficientValue50, float coefficientValue60, float coefficientValue01, float coefficientValue11, float coefficientValue21, float coefficientValue31, float coefficientValue41, float coefficientValue51, float coefficientValue61, float coefficientValue02, float coefficientValue12, float coefficientValue22, float coefficientValue32, float coefficientValue42, float coefficientValue52, float coefficientValue62, float coefficientValue03, float coefficientValue13, float coefficientValue23, float coefficientValue33, float coefficientValue43, float coefficientValue53, float coefficientValue63, float coefficientValue04, float coefficientValue14, float coefficientValue24, float coefficientValue34, float coefficientValue44, float coefficientValue54, float coefficientValue64, float coefficientValue05, float coefficientValue15, float coefficientValue25, float coefficientValue35, float coefficientValue45, float coefficientValue55, float coefficientValue65, float coefficientValue06, float coefficientValue16, float coefficientValue26, float coefficientValue36, float coefficientValue46, float coefficientValue56, float coefficientValue66)
 Sets the convolution coefficient values at the given indices.
void SetSize (short n16SizeX, short n16SizeY)
 Sets the number of coefficients along a row and along a column.

Properties

short SizeX [get]
 Number of coefficients along a row.
short SizeY [get]
 Number of coefficients along a column.
float Gain [get, set]
 Global gain.
uint Offset [get, set]
 Global offset (a constant added to the convolution result).
eVision.EKernelRectifier Rectifier [get, set]
 Rectification mode. This property allows specifying how negative convolution result values are handled.
uint OutsideValue [get, set]
 Out-of-limits image value (only influences the result along image edges).
IntPtr RawDataPtr [get]
 Pointer to the upper left convolution coefficient.

Detailed Description

Kernel for use in convolution operations.

License(s): EasyImage

Constructor & Destructor Documentation

◆ EKernel() [1/3]

eVision.EKernel.EKernel ( )

Constructs an EKernel object to be used with the EasyImage.ConvolKernel method.

The default constructor constructs a void kernel. A void kernel has no associated convolution coefficients. The sizing constructor constructs a kernel of given size and global parameters. The third constructor constructs a kernel of a predefined type. The kernel will be normalized by the sum of its components before applying the gain.

◆ EKernel() [2/3]

eVision.EKernel.EKernel ( short sizeX,
short sizeY,
float gain,
uint offset,
eVision.EKernelRectifier rectifier,
uint outsideValue )

Constructs an EKernel object to be used with the EasyImage.ConvolKernel method.

Parameters
sizeXNumber of coefficients along a row.
sizeYNumber of coefficients along a column.
gainGlobal gain of the kernel. The kernel is normalized by the sum of its components then multiplied by the gain.
offsetGlobal offset.
rectifierRectification mode, as defined by EKernelRectifier.
outsideValueOut-of-limits image value.

The default constructor constructs a void kernel. A void kernel has no associated convolution coefficients. The sizing constructor constructs a kernel of given size and global parameters. The third constructor constructs a kernel of a predefined type. The kernel will be normalized by the sum of its components before applying the gain.

◆ EKernel() [3/3]

eVision.EKernel.EKernel ( eVision.EKernelType KernelType)

Constructs an EKernel object to be used with the EasyImage.ConvolKernel method.

Parameters
KernelTypeKernel type, as defined by EKernelType.

The default constructor constructs a void kernel. A void kernel has no associated convolution coefficients. The sizing constructor constructs a kernel of given size and global parameters. The third constructor constructs a kernel of a predefined type. The kernel will be normalized by the sum of its components before applying the gain.

Member Function Documentation

◆ GetKernelData() [1/2]

float eVision.EKernel.GetKernelData ( int columnIndex,
int rowIndex )

Returns the convolution coefficient of given indices.

Parameters
columnIndexColumn index, from 0 on, increasing rightwards.
rowIndexRow index, from 0 on, increasing downwards.

◆ GetKernelData() [2/2]

void eVision.EKernel.GetKernelData ( int columnIndex,
int rowIndex,
out float coefficientValue )

Returns the convolution coefficient of given indices.

Parameters
columnIndexColumn index, from 0 on, increasing rightwards.
rowIndexRow index, from 0 on, increasing downwards.
coefficientValueReference to the coefficient value.
Deprecated
Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ SetKernelData() [1/4]

void eVision.EKernel.SetKernelData ( float coefficientValue00,
float coefficientValue10,
float coefficientValue20,
float coefficientValue01,
float coefficientValue11,
float coefficientValue21,
float coefficientValue02,
float coefficientValue12,
float coefficientValue22 )

Sets the convolution coefficient values at the given indices.

Parameters
coefficientValue00Coefficient value at corresponding column and row indices.
coefficientValue10Coefficient value at corresponding column and row indices.
coefficientValue20Coefficient value at corresponding column and row indices.
coefficientValue01Coefficient value at corresponding column and row indices.
coefficientValue11Coefficient value at corresponding column and row indices.
coefficientValue21Coefficient value at corresponding column and row indices.
coefficientValue02Coefficient value at corresponding column and row indices.
coefficientValue12Coefficient value at corresponding column and row indices.
coefficientValue22Coefficient value at corresponding column and row indices.

The function can also set the coefficient values for 3x3, 5x5 and 7x7 kernels.

◆ SetKernelData() [2/4]

void eVision.EKernel.SetKernelData ( float coefficientValue00,
float coefficientValue10,
float coefficientValue20,
float coefficientValue30,
float coefficientValue40,
float coefficientValue01,
float coefficientValue11,
float coefficientValue21,
float coefficientValue31,
float coefficientValue41,
float coefficientValue02,
float coefficientValue12,
float coefficientValue22,
float coefficientValue32,
float coefficientValue42,
float coefficientValue03,
float coefficientValue13,
float coefficientValue23,
float coefficientValue33,
float coefficientValue43,
float coefficientValue04,
float coefficientValue14,
float coefficientValue24,
float coefficientValue34,
float coefficientValue44 )

Sets the convolution coefficient values at the given indices.

Parameters
coefficientValue00Coefficient value at corresponding column and row indices.
coefficientValue10Coefficient value at corresponding column and row indices.
coefficientValue20Coefficient value at corresponding column and row indices.
coefficientValue30Coefficient value at corresponding column and row indices.
coefficientValue40Coefficient value at corresponding column and row indices.
coefficientValue01Coefficient value at corresponding column and row indices.
coefficientValue11Coefficient value at corresponding column and row indices.
coefficientValue21Coefficient value at corresponding column and row indices.
coefficientValue31Coefficient value at corresponding column and row indices.
coefficientValue41Coefficient value at corresponding column and row indices.
coefficientValue02Coefficient value at corresponding column and row indices.
coefficientValue12Coefficient value at corresponding column and row indices.
coefficientValue22Coefficient value at corresponding column and row indices.
coefficientValue32Coefficient value at corresponding column and row indices.
coefficientValue42Coefficient value at corresponding column and row indices.
coefficientValue03Coefficient value at corresponding column and row indices.
coefficientValue13Coefficient value at corresponding column and row indices.
coefficientValue23Coefficient value at corresponding column and row indices.
coefficientValue33Coefficient value at corresponding column and row indices.
coefficientValue43Coefficient value at corresponding column and row indices.
coefficientValue04Coefficient value at corresponding column and row indices.
coefficientValue14Coefficient value at corresponding column and row indices.
coefficientValue24Coefficient value at corresponding column and row indices.
coefficientValue34Coefficient value at corresponding column and row indices.
coefficientValue44Coefficient value at corresponding column and row indices.

The function can also set the coefficient values for 3x3, 5x5 and 7x7 kernels.

◆ SetKernelData() [3/4]

void eVision.EKernel.SetKernelData ( float coefficientValue00,
float coefficientValue10,
float coefficientValue20,
float coefficientValue30,
float coefficientValue40,
float coefficientValue50,
float coefficientValue60,
float coefficientValue01,
float coefficientValue11,
float coefficientValue21,
float coefficientValue31,
float coefficientValue41,
float coefficientValue51,
float coefficientValue61,
float coefficientValue02,
float coefficientValue12,
float coefficientValue22,
float coefficientValue32,
float coefficientValue42,
float coefficientValue52,
float coefficientValue62,
float coefficientValue03,
float coefficientValue13,
float coefficientValue23,
float coefficientValue33,
float coefficientValue43,
float coefficientValue53,
float coefficientValue63,
float coefficientValue04,
float coefficientValue14,
float coefficientValue24,
float coefficientValue34,
float coefficientValue44,
float coefficientValue54,
float coefficientValue64,
float coefficientValue05,
float coefficientValue15,
float coefficientValue25,
float coefficientValue35,
float coefficientValue45,
float coefficientValue55,
float coefficientValue65,
float coefficientValue06,
float coefficientValue16,
float coefficientValue26,
float coefficientValue36,
float coefficientValue46,
float coefficientValue56,
float coefficientValue66 )

Sets the convolution coefficient values at the given indices.

Parameters
coefficientValue00Coefficient value at corresponding column and row indices.
coefficientValue10Coefficient value at corresponding column and row indices.
coefficientValue20Coefficient value at corresponding column and row indices.
coefficientValue30Coefficient value at corresponding column and row indices.
coefficientValue40Coefficient value at corresponding column and row indices.
coefficientValue50Coefficient value at corresponding column and row indices.
coefficientValue60Coefficient value at corresponding column and row indices.
coefficientValue01Coefficient value at corresponding column and row indices.
coefficientValue11Coefficient value at corresponding column and row indices.
coefficientValue21Coefficient value at corresponding column and row indices.
coefficientValue31Coefficient value at corresponding column and row indices.
coefficientValue41Coefficient value at corresponding column and row indices.
coefficientValue51Coefficient value at corresponding column and row indices.
coefficientValue61Coefficient value at corresponding column and row indices.
coefficientValue02Coefficient value at corresponding column and row indices.
coefficientValue12Coefficient value at corresponding column and row indices.
coefficientValue22Coefficient value at corresponding column and row indices.
coefficientValue32Coefficient value at corresponding column and row indices.
coefficientValue42Coefficient value at corresponding column and row indices.
coefficientValue52Coefficient value at corresponding column and row indices.
coefficientValue62Coefficient value at corresponding column and row indices.
coefficientValue03Coefficient value at corresponding column and row indices.
coefficientValue13Coefficient value at corresponding column and row indices.
coefficientValue23Coefficient value at corresponding column and row indices.
coefficientValue33Coefficient value at corresponding column and row indices.
coefficientValue43Coefficient value at corresponding column and row indices.
coefficientValue53Coefficient value at corresponding column and row indices.
coefficientValue63Coefficient value at corresponding column and row indices.
coefficientValue04Coefficient value at corresponding column and row indices.
coefficientValue14Coefficient value at corresponding column and row indices.
coefficientValue24Coefficient value at corresponding column and row indices.
coefficientValue34Coefficient value at corresponding column and row indices.
coefficientValue44Coefficient value at corresponding column and row indices.
coefficientValue54Coefficient value at corresponding column and row indices.
coefficientValue64Coefficient value at corresponding column and row indices.
coefficientValue05Coefficient value at corresponding column and row indices.
coefficientValue15Coefficient value at corresponding column and row indices.
coefficientValue25Coefficient value at corresponding column and row indices.
coefficientValue35Coefficient value at corresponding column and row indices.
coefficientValue45Coefficient value at corresponding column and row indices.
coefficientValue55Coefficient value at corresponding column and row indices.
coefficientValue65Coefficient value at corresponding column and row indices.
coefficientValue06Coefficient value at corresponding column and row indices.
coefficientValue16Coefficient value at corresponding column and row indices.
coefficientValue26Coefficient value at corresponding column and row indices.
coefficientValue36Coefficient value at corresponding column and row indices.
coefficientValue46Coefficient value at corresponding column and row indices.
coefficientValue56Coefficient value at corresponding column and row indices.
coefficientValue66Coefficient value at corresponding column and row indices.

The function can also set the coefficient values for 3x3, 5x5 and 7x7 kernels.

◆ SetKernelData() [4/4]

void eVision.EKernel.SetKernelData ( int columnIndex,
int rowIndex,
float coefficientValue )

Sets the convolution coefficient values at the given indices.

Parameters
columnIndexColumn index, from 0 on, increasing rightwards.
rowIndexRow index, from 0 on, increasing downwards.
coefficientValueNew coefficientValue.

The function can also set the coefficient values for 3x3, 5x5 and 7x7 kernels.

◆ SetSize()

void eVision.EKernel.SetSize ( short n16SizeX,
short n16SizeY )

Sets the number of coefficients along a row and along a column.

Parameters
n16SizeXThe number of coefficients along a row.
n16SizeYThe number of coefficients along a column.

Property Documentation

◆ Gain

float eVision.EKernel.Gain
getset

Global gain.

Before the global gain is applied, the coefficients are normalized so that their sum equals one, unless their sum equals zero (as is the case for a derivation operator). The rectification enables to handle the negative values that may appear after convolution.

◆ Offset

uint eVision.EKernel.Offset
getset

Global offset (a constant added to the convolution result).

◆ OutsideValue

uint eVision.EKernel.OutsideValue
getset

Out-of-limits image value (only influences the result along image edges).

◆ RawDataPtr

IntPtr eVision.EKernel.RawDataPtr
get

Pointer to the upper left convolution coefficient.

This pointer is actually the base address of a float array containing all coefficients.

◆ Rectifier

eVision.EKernelRectifier eVision.EKernel.Rectifier
getset

Rectification mode. This property allows specifying how negative convolution result values are handled.

◆ SizeX

short eVision.EKernel.SizeX
get

Number of coefficients along a row.

◆ SizeY

short eVision.EKernel.SizeY
get

Number of coefficients along a column.