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

Kernel for use in convolution operations. More...

Public Member Functions

None __init__ (self)
 Constructs an eVision.EKernel object to be used with the eVision.EasyImage.ConvolKernel method.
None __init__ (self, int sizeX, int sizeY, float gain, int offset, eVision.EKernelRectifier rectifier, int outsideValue)
 Constructs an eVision.EKernel object to be used with the eVision.EasyImage.ConvolKernel method.
None __init__ (self, eVision.EKernelType KernelType)
 Constructs an eVision.EKernel object to be used with the eVision.EasyImage.ConvolKernel method.
float GetKernelData (self, int columnIndex, int rowIndex)
 Returns the convolution coefficient of given indices.
None SetKernelData (self, int columnIndex, int rowIndex, float coefficientValue)
 Sets the convolution coefficient values at the given indices.
None SetKernelData (self, 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.
None SetKernelData (self, 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.
None SetKernelData (self, 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.
None SetSize (self, int n16SizeX, int n16SizeY)
 Sets the number of coefficients along a row and along a column.
int SizeX (self)
 Number of coefficients along a row.
int SizeY (self)
 Number of coefficients along a column.
float Gain (self)
 Global gain.
 Gain (self, float value)
 Global gain.
int Offset (self)
 Global offset (a constant added to the convolution result).
 Offset (self, int value)
 Global offset (a constant added to the convolution result).
eVision.EKernelRectifier Rectifier (self)
 Rectification mode.
 Rectifier (self, eVision.EKernelRectifier value)
 Rectification mode.
int OutsideValue (self)
 Out-of-limits image value (only influences the result along image edges).
 OutsideValue (self, int value)
 Out-of-limits image value (only influences the result along image edges).
ctypes.c_void_p RawDataPtr (self)
 Pointer to the upper left convolution coefficient.

Detailed Description

Kernel for use in convolution operations.

Remarks:

License(s): EasyImage

Constructor & Destructor Documentation

◆ __init__() [1/3]

None eVision.EKernel.__init__ ( self)

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

Remarks:

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.

◆ __init__() [2/3]

None eVision.EKernel.__init__ ( self,
int sizeX,
int sizeY,
float gain,
int offset,
eVision.EKernelRectifier rectifier,
int outsideValue )

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

Remarks:

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.

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 eVision.EKernelRectifier.
outsideValueOut-of-limits image value.

◆ __init__() [3/3]

None eVision.EKernel.__init__ ( self,
eVision.EKernelType KernelType )

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

Remarks:

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.

Parameters
KernelTypeKernel type, as defined by eVision.EKernelType.

Member Function Documentation

◆ Gain() [1/2]

float eVision.EKernel.Gain ( self)

Global gain.

Remarks:

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.

◆ Gain() [2/2]

eVision.EKernel.Gain ( self,
float value )

Global gain.

Remarks:

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.

◆ GetKernelData()

float eVision.EKernel.GetKernelData ( self,
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.

◆ Offset() [1/2]

int eVision.EKernel.Offset ( self)

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

◆ Offset() [2/2]

eVision.EKernel.Offset ( self,
int value )

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

◆ OutsideValue() [1/2]

int eVision.EKernel.OutsideValue ( self)

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

◆ OutsideValue() [2/2]

eVision.EKernel.OutsideValue ( self,
int value )

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

◆ RawDataPtr()

ctypes.c_void_p eVision.EKernel.RawDataPtr ( self)

Pointer to the upper left convolution coefficient.

Remarks:

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

◆ Rectifier() [1/2]

eVision.EKernelRectifier eVision.EKernel.Rectifier ( self)

Rectification mode.

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

◆ Rectifier() [2/2]

eVision.EKernel.Rectifier ( self,
eVision.EKernelRectifier value )

Rectification mode.

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

◆ SetKernelData() [1/4]

None eVision.EKernel.SetKernelData ( self,
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.

Remarks:

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

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.

◆ SetKernelData() [2/4]

None eVision.EKernel.SetKernelData ( self,
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.

Remarks:

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

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.

◆ SetKernelData() [3/4]

None eVision.EKernel.SetKernelData ( self,
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.

Remarks:

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

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.

◆ SetKernelData() [4/4]

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

Sets the convolution coefficient values at the given indices.

Remarks:

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

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

◆ SetSize()

None eVision.EKernel.SetSize ( self,
int n16SizeX,
int 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.

◆ SizeX()

int eVision.EKernel.SizeX ( self)

Number of coefficients along a row.

◆ SizeY()

int eVision.EKernel.SizeY ( self)

Number of coefficients along a column.