The blo Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Related Functions | List of all members
blo::ImageConvolution< T, C > Class Template Reference

Convolution processor. More...

#include <ImageConvolution.h>

Public Types

enum class  Shape { full = 0x00000000 , valid = 0x00010000 }
 

Public Member Functions

 ImageConvolution ()
 Default constructor.
 
 ImageConvolution (int src1Width, int src1Height, int src2Width, int src2Height)
 Constructs convolution processor of specified size work buffers.
 
 ImageConvolution (const ImageConvolution &rhs)
 Copy constructor.
 
 ImageConvolution (ImageConvolution &&rhs) noexcept
 Move constructor.
 
virtual ~ImageConvolution ()
 Destructor.
 
ImageConvolution & operator= (const ImageConvolution &rhs)
 Copy assignment operator.
 
ImageConvolution & operator= (ImageConvolution &&rhs) noexcept
 Move assignment operator.
 
void setShape (Shape shape)
 Sets shape parameter.
 
Shape shape () const
 Retrieves shape parameter.
 
void resize (int src1Width, int src1Height, int src2Width, int src2Height)
 Resizes work buffers.
 
void clear ()
 Resizes work buffers to zero width and zero height.
 
void calcConvolution (const T *pSrc1, int src1Step, int src1Width, int src1Height, const T *pSrc2, int src2Step, int src2Width, int src2Height, T *pDst, int dstStep, int divisor)
 Calculates the convolution between two images.
 

Related Functions

(Note that these are not member functions.)

BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< uint8_t, 1 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< int16_t, 1 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< uint8_t, 3 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< int16_t, 3 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< uint8_t, 4 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< int16_t, 4 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< float, 1 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< float, 3 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< float, 4 >
 

Detailed Description

template<typename T, size_t C>
class blo::ImageConvolution< T, C >

Convolution processor.

Template Parameters
TData type.
CNumber of channels.

Member Enumeration Documentation

◆ Shape

template<typename T , size_t C>
enum class blo::ImageConvolution::Shape
strong
Note
Compatible with IppiROIShape.
Enumerator
full 

Assume first source image is zero-padded to size (src1Width + 2 * (src2Width - 1))-by-(src1Height + 2 * (src2Height - 1)). The destination image is (src1Width + src2Width - 1)-by-(src1Height + src2Height - 1).

valid 

Do not assume first source image is zero-padded. The destination image is (|src1Width - src2Width| + 1)-by- (|src1Height - src2Height| + 1).

Constructor & Destructor Documentation

◆ ImageConvolution() [1/4]

template<typename T , size_t C>
blo::ImageConvolution< T, C >::ImageConvolution ( )

Default constructor.

◆ ImageConvolution() [2/4]

template<typename T , size_t C>
blo::ImageConvolution< T, C >::ImageConvolution ( int  src1Width,
int  src1Height,
int  src2Width,
int  src2Height 
)

Constructs convolution processor of specified size work buffers.

Parameters
src1WidthWidth of the first source image in pixels to size work buffers to.
src1HeightHeight of the first source image in pixels to size work buffers to.
src2WidthWidth of the second source image in pixels to size work buffers to.
src2HeightHeight of the second source image in pixels to size work buffers to.

◆ ImageConvolution() [3/4]

template<typename T , size_t C>
blo::ImageConvolution< T, C >::ImageConvolution ( const ImageConvolution< T, C > &  rhs)

Copy constructor.

◆ ImageConvolution() [4/4]

template<typename T , size_t C>
blo::ImageConvolution< T, C >::ImageConvolution ( ImageConvolution< T, C > &&  rhs)
noexcept

Move constructor.

◆ ~ImageConvolution()

template<typename T , size_t C>
virtual blo::ImageConvolution< T, C >::~ImageConvolution ( )
virtual

Destructor.

Member Function Documentation

◆ calcConvolution()

template<typename T , size_t C>
void blo::ImageConvolution< T, C >::calcConvolution ( const T *  pSrc1,
int  src1Step,
int  src1Width,
int  src1Height,
const T *  pSrc2,
int  src2Step,
int  src2Width,
int  src2Height,
T *  pDst,
int  dstStep,
int  divisor 
)

Calculates the convolution between two images.

This function calculates the convolution between two images.
The assumed zero-padding of the first source image and the size of the destination image is determined by the shape parameter.

Parameters
pSrc1Pointer to the first source image.
src1StepStep in bytes between the rows in the first source image.
src1WidthWidth of the first source image ROI in pixels.
src1HeightHeight of the first source image ROI in pixels.
pSrc2Pointer to the second source image.
src2StepStep in bytes between the rows in the second source image.
src2WidthWidth of the second source image ROI in pixels.
src2HeightHeight of the second source image ROI in pixels.
pDstPointer to the destination image.
dstStepStep in bytes between the rows in the destination image.
divisorThe value the computed result is divided by.

◆ clear()

template<typename T , size_t C>
void blo::ImageConvolution< T, C >::clear ( )

Resizes work buffers to zero width and zero height.

◆ operator=() [1/2]

template<typename T , size_t C>
ImageConvolution & blo::ImageConvolution< T, C >::operator= ( const ImageConvolution< T, C > &  rhs)

Copy assignment operator.

◆ operator=() [2/2]

template<typename T , size_t C>
ImageConvolution & blo::ImageConvolution< T, C >::operator= ( ImageConvolution< T, C > &&  rhs)
noexcept

Move assignment operator.

◆ resize()

template<typename T , size_t C>
void blo::ImageConvolution< T, C >::resize ( int  src1Width,
int  src1Height,
int  src2Width,
int  src2Height 
)

Resizes work buffers.

Parameters
src1WidthWidth of the first source image in pixels to resize work buffers to.
src1HeightHeight of the first source image in pixels to resize work buffers to.
src2WidthWidth of the second source image in pixels to resize work buffers to.
src2HeightHeight of the second source image in pixels to resize work buffers to.

◆ setShape()

template<typename T , size_t C>
void blo::ImageConvolution< T, C >::setShape ( Shape  shape)

Sets shape parameter.

Parameters
shapeShape parameter.

◆ shape()

template<typename T , size_t C>
Shape blo::ImageConvolution< T, C >::shape ( ) const

Retrieves shape parameter.

Returns
Shape parameter.

Friends And Related Function Documentation

◆ ImageConvolution< float, 1 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< float, 1 >
related

◆ ImageConvolution< float, 3 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< float, 3 >
related

◆ ImageConvolution< float, 4 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< float, 4 >
related

◆ ImageConvolution< int16_t, 1 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< int16_t, 1 >
related

◆ ImageConvolution< int16_t, 3 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< int16_t, 3 >
related

◆ ImageConvolution< int16_t, 4 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< int16_t, 4 >
related

◆ ImageConvolution< uint8_t, 1 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< uint8_t, 1 >
related

◆ ImageConvolution< uint8_t, 3 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< uint8_t, 3 >
related

◆ ImageConvolution< uint8_t, 4 >

template<typename T , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageConvolution< uint8_t, 4 >
related

The documentation for this class was generated from the following file: