eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EKernel Class Reference

Kernel for use in convolution operations. More...

#include <eVision/EasyImage/EKernel.h>

Collaboration diagram for eVision::EKernel:

Public Member Functions

 EKernel ()
 Constructs an EKernel object to be used with the EasyImage::ConvolKernel method.
 EKernel (int16_t sizeX, int16_t sizeY, float gain, uint32_t offset, eVision::EKernelRectifier rectifier, uint32_t 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.
virtual ~EKernel () throw ()
int16_t GetSizeX () const
 Number of coefficients along a row.
int16_t GetSizeY () const
 Number of coefficients along a column.
float GetGain () const
 Global gain.
uint32_t GetOffset () const
 Global offset (a constant added to the convolution result).
eVision::EKernelRectifier GetRectifier () const
 Rectification mode. This property allows specifying how negative convolution result values are handled.
uint32_t GetOutsideValue () const
 Out-of-limits image value (only influences the result along image edges).
void * GetRawDataPtr ()
 Pointer to the upper left convolution coefficient.
float GetKernelData (int32_t columnIndex, int32_t rowIndex)
 Returns the convolution coefficient of given indices.
void GetKernelData (int32_t columnIndex, int32_t rowIndex, float &coefficientValue)
 Returns the convolution coefficient of given indices.
void SetKernelData (int32_t columnIndex, int32_t 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 (int16_t n16SizeX, int16_t n16SizeY)
 Sets the number of coefficients along a row and along a column.
void SetGain (float f32Gain)
 Global gain.
void SetOffset (uint32_t un32Offset)
 Global offset (a constant added to the convolution result).
void SetRectifier (eVision::EKernelRectifier rectifier)
 Rectification mode. This property allows specifying how negative convolution result values are handled.
void SetOutsideValue (uint32_t un32OutsideValue)
 Out-of-limits image value (only influences the result along image edges).
 EKernel (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Kernel for use in convolution operations.

License(s): EasyImage

Constructor & Destructor Documentation

◆ EKernel() [1/4]

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

eVision::EKernel::EKernel ( int16_t sizeX,
int16_t sizeY,
float gain,
uint32_t offset,
eVision::EKernelRectifier rectifier,
uint32_t 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/4]

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.

◆ ~EKernel()

eVision::EKernel::~EKernel ( )
throw ( )
virtual

◆ EKernel() [4/4]

eVision::EKernel::EKernel ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ GetGain()

float eVision::EKernel::GetGain ( ) const

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.

◆ GetKernelData() [1/2]

float eVision::EKernel::GetKernelData ( int32_t columnIndex,
int32_t 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 ( int32_t columnIndex,
int32_t rowIndex,
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.

◆ GetOffset()

uint32_t eVision::EKernel::GetOffset ( ) const

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

◆ GetOutsideValue()

uint32_t eVision::EKernel::GetOutsideValue ( ) const

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

◆ GetRawDataPtr()

void * eVision::EKernel::GetRawDataPtr ( )

Pointer to the upper left convolution coefficient.

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

◆ GetRectifier()

eVision::EKernelRectifier eVision::EKernel::GetRectifier ( ) const

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

◆ GetSizeX()

int16_t eVision::EKernel::GetSizeX ( ) const

Number of coefficients along a row.

◆ GetSizeY()

int16_t eVision::EKernel::GetSizeY ( ) const

Number of coefficients along a column.

◆ SetGain()

void eVision::EKernel::SetGain ( float f32Gain)

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.

◆ 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 ( int32_t columnIndex,
int32_t 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.

◆ SetOffset()

void eVision::EKernel::SetOffset ( uint32_t un32Offset)

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

◆ SetOutsideValue()

void eVision::EKernel::SetOutsideValue ( uint32_t un32OutsideValue)

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

◆ SetRectifier()

void eVision::EKernel::SetRectifier ( eVision::EKernelRectifier rectifier)

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

◆ SetSize()

void eVision::EKernel::SetSize ( int16_t n16SizeX,
int16_t 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.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EKernel::wrappedClass_