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, eVision.EKernel other)
 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.
None Save (self, str file)
 Save the kernel configuration.
None Save (self, eVision.ESerializer|None serializer)
 Save the kernel configuration.
None Load (self, str file)
 Load the kernel configuration.
None Load (self, eVision.ESerializer|None serializer)
 Load the kernel configuration.
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.

Properties

 SizeX = property(_SizeX__getter, None)
 Number of coefficients along a row.
 SizeY = property(_SizeY__getter, None)
 Number of coefficients along a column.
 Gain = property(_Gain__getter, _Gain__setter)
 Global gain.
 Offset = property(_Offset__getter, _Offset__setter)
 Global offset (a constant added to the convolution result).
 Rectifier = property(_Rectifier__getter, _Rectifier__setter)
 Rectification mode.
 OutsideValue = property(_OutsideValue__getter, _OutsideValue__setter)
 Out-of-limits image value (only influences the result along image edges).
 RawDataPtr = property(_RawDataPtr__getter, None)
 Pointer to the upper left convolution coefficient.

Detailed Description

Kernel for use in convolution operations.

Remarks:

License(s): EasyImage

Constructor & Destructor Documentation

◆ __init__() [1/4]

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/4]

None eVision.EKernel.__init__ ( self,
eVision.EKernel other )

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
otherOther eVision.EKernel.__init__ to copy.

◆ __init__() [3/4]

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__() [4/4]

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

◆ 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.

◆ Load() [1/2]

None eVision.EKernel.Load ( self,
eVision.ESerializer | None serializer )

Load the kernel configuration.

Parameters
serializerSerializer. Must be in read mode.

◆ Load() [2/2]

None eVision.EKernel.Load ( self,
str file )

Load the kernel configuration.

Parameters
fileFile path.

◆ Save() [1/2]

None eVision.EKernel.Save ( self,
eVision.ESerializer | None serializer )

Save the kernel configuration.

Parameters
serializerSerializer. Must be in write mode.

◆ Save() [2/2]

None eVision.EKernel.Save ( self,
str file )

Save the kernel configuration.

Parameters
fileFile path.

◆ 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.

Property Documentation

◆ Gain

eVision.EKernel.Gain = property(_Gain__getter, _Gain__setter)
static

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.

◆ Offset

eVision.EKernel.Offset = property(_Offset__getter, _Offset__setter)
static

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

◆ OutsideValue

eVision.EKernel.OutsideValue = property(_OutsideValue__getter, _OutsideValue__setter)
static

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

◆ RawDataPtr

eVision.EKernel.RawDataPtr = property(_RawDataPtr__getter, None)
static

Pointer to the upper left convolution coefficient.

Remarks:

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

◆ Rectifier

eVision.EKernel.Rectifier = property(_Rectifier__getter, _Rectifier__setter)
static

Rectification mode.

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

◆ SizeX

eVision.EKernel.SizeX = property(_SizeX__getter, None)
static

Number of coefficients along a row.

◆ SizeY

eVision.EKernel.SizeY = property(_SizeY__getter, None)
static

Number of coefficients along a column.