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

Image gradients processor. More...

#include <ImageGradients.h>

Public Types

enum class  Kernel { centralDiff3Point = 3 , centralDiff5Point = 5 , centralDiff7Point = 7 , centralDiff9Point = 9 }
 

Public Member Functions

 ImageGradients ()
 Default constructor.
 
 ImageGradients (int dstRoiWidth, int dstRoiHeight)
 Constructs image gradients processor of specified size work buffers.
 
 ImageGradients (const ImageGradients &rhs)
 Copy constructor.
 
 ImageGradients (ImageGradients &&rhs) noexcept
 Move constructor.
 
virtual ~ImageGradients ()
 Destructor.
 
ImageGradients & operator= (const ImageGradients &rhs)
 Copy assignment operator.
 
ImageGradients & operator= (ImageGradients &&rhs) noexcept
 Move assignment operator.
 
void setKernel (Kernel kernel)
 Sets the kernel.
 
Kernel kernel () const
 The kernel.
 
void resize (int dstRoiWidth, int dstRoiHeight)
 Resizes work buffers.
 
void clear ()
 Resizes work buffers to zero.
 
void calcGradients (const T *pSrc, int srcStep, T *pDstIx, int dstIxStep, T *pDstIy, int dstIyStep, int dstRoiWidth, int dstRoiHeight)
 Calculates the x and y derivatives of an image.
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

template<typename T, typename U, size_t C>
class blo::ImageGradients< T, U, C >

Image gradients processor.

Template Parameters
TData type of image.
UData type of kernel.
CNumber of channels.

Member Enumeration Documentation

◆ Kernel

template<typename T , typename U , size_t C>
enum class blo::ImageGradients::Kernel
strong
Enumerator
centralDiff3Point 

3-point central difference.

centralDiff5Point 

5-point central difference.

centralDiff7Point 

7-point central difference.

centralDiff9Point 

9-point central difference.

Constructor & Destructor Documentation

◆ ImageGradients() [1/4]

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

Default constructor.

◆ ImageGradients() [2/4]

template<typename T , typename U , size_t C>
blo::ImageGradients< T, U, C >::ImageGradients ( int  dstRoiWidth,
int  dstRoiHeight 
)

Constructs image gradients processor of specified size work buffers.

Parameters
dstRoiWidthWidth of the destination image ROI in pixels to resize work buffers to.
dstRoiHeightHeight of the destination image ROI in pixels to resize work buffers to.

◆ ImageGradients() [3/4]

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

Copy constructor.

◆ ImageGradients() [4/4]

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

Move constructor.

◆ ~ImageGradients()

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

Destructor.

Member Function Documentation

◆ calcGradients()

template<typename T , typename U , size_t C>
void blo::ImageGradients< T, U, C >::calcGradients ( const T *  pSrc,
int  srcStep,
T *  pDstIx,
int  dstIxStep,
T *  pDstIy,
int  dstIyStep,
int  dstRoiWidth,
int  dstRoiHeight 
)

Calculates the x and y derivatives of an image.

Parameters
pSrcPointer to the source image.
srcStepStep in bytes between the rows in the source image.
pDstIxPointer to the destination x-derivative image.
dstIxStepStep in bytes between the rows in the destination x-derivative image.
pDstIyPointer to the destination y-derivative image.
dstIyStepStep in bytes between the rows in the destination y-derivative image.
dstRoiWidthWidth of the destination image ROI in pixels.
dstRoiHeightHeight of the destination image ROI in pixels.

◆ clear()

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

Resizes work buffers to zero.

◆ kernel()

template<typename T , typename U , size_t C>
Kernel blo::ImageGradients< T, U, C >::kernel ( ) const

The kernel.

Returns
The kernel.

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ resize()

template<typename T , typename U , size_t C>
void blo::ImageGradients< T, U, C >::resize ( int  dstRoiWidth,
int  dstRoiHeight 
)

Resizes work buffers.

Parameters
dstRoiWidthWidth of the destination image ROI in pixels to resize work buffers to.
dstRoiHeightHeight of the destination image ROI in pixels to resize work buffers to.

◆ setKernel()

template<typename T , typename U , size_t C>
void blo::ImageGradients< T, U, C >::setKernel ( Kernel  kernel)

Sets the kernel.

Parameters
kernelThe kernel.

Friends And Related Function Documentation

◆ ImageGradients< float, float, 1 >

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

◆ ImageGradients< float, float, 3 >

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

◆ ImageGradients< float, float, 4 >

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

◆ ImageGradients< float, int16_t, 1 >

template<typename T , typename U , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradients< float, int16_t, 1 >
related

◆ ImageGradients< float, int16_t, 3 >

template<typename T , typename U , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradients< float, int16_t, 3 >
related

◆ ImageGradients< float, int16_t, 4 >

template<typename T , typename U , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradients< float, int16_t, 4 >
related

◆ ImageGradients< int16_t, float, 1 >

template<typename T , typename U , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradients< int16_t, float, 1 >
related

◆ ImageGradients< int16_t, float, 3 >

template<typename T , typename U , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradients< int16_t, float, 3 >
related

◆ ImageGradients< int16_t, float, 4 >

template<typename T , typename U , size_t C>
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradients< int16_t, float, 4 >
related

◆ ImageGradients< int16_t, int16_t, 1 >

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

◆ ImageGradients< int16_t, int16_t, 3 >

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

◆ ImageGradients< int16_t, int16_t, 4 >

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

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