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

Image gradient magnitude and direction processor. More...

#include <ImageGradientMagnitudeDirection.h>

Public Member Functions

 ImageGradientMagnitudeDirection ()
 Default constructor.
 
 ImageGradientMagnitudeDirection (int width, int height)
 Constructs image gradient magnitude and direction processor of specified size work buffers.
 
 ImageGradientMagnitudeDirection (const ImageGradientMagnitudeDirection &rhs)
 Copy constructor.
 
 ImageGradientMagnitudeDirection (ImageGradientMagnitudeDirection &&rhs) noexcept
 Move constructor.
 
virtual ~ImageGradientMagnitudeDirection ()
 Destructor.
 
ImageGradientMagnitudeDirection & operator= (const ImageGradientMagnitudeDirection &rhs)
 Copy assignment operator.
 
ImageGradientMagnitudeDirection & operator= (ImageGradientMagnitudeDirection &&rhs) noexcept
 Move assignment operator.
 
void resize (int width, int height)
 Resizes work buffers.
 
void clear ()
 Resizes work buffers to zero width and zero height.
 
int width () const
 Width of the work buffers.
 
int height () const
 Height of the work buffers.
 
void setWinSize (int winSize)
 Sets size of the feature window.
 
int winSize () const
 Size of the feature window.
 
void calcMagnitude (const T *pSrcIx, int srcIxStep, const T *pSrcIy, int srcIyStep, T *pDst, int dstStep, int dstRoiWidth, int dstRoiHeight)
 Calculates the gradient magnitude of windows within an image.
 
void gradientMagnitudeDirection (const T *pSrcIx, int srcIxStep, const T *pSrcIy, int srcIyStep, T *pDstMagnitude, int dstMagnitudeStep, SmallMatrix< T, 2, 1 > *pDstDirection, int dstDirectionStep, int dstRoiWidth, int dstRoiHeight)
 Calculates the gradient magnitude and direction of windows within an image.
 
void gradientMagnitudeDirection (const T *pSrcIx, int srcIxStep, const T *pSrcIy, int srcIyStep, T *pDstMagnitude, int dstMagnitudeStep, T *pDstDirection, int dstDirectionStep, int dstRoiWidth, int dstRoiHeight)
 Calculates the gradient magnitude and direction of windows within an image.
 

Related Functions

(Note that these are not member functions.)

BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradientMagnitudeDirection< float, 1 >
 
BLO_EXPIMP_TEMPLATE template class BLO_API ImageGradientMagnitudeDirection< float, 3 >
 

Detailed Description

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

Image gradient magnitude and direction processor.

Template Parameters
TData type.
CNumber of channels.

Constructor & Destructor Documentation

◆ ImageGradientMagnitudeDirection() [1/4]

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

Default constructor.

◆ ImageGradientMagnitudeDirection() [2/4]

template<typename T , size_t C>
blo::ImageGradientMagnitudeDirection< T, C >::ImageGradientMagnitudeDirection ( int  width,
int  height 
)

Constructs image gradient magnitude and direction processor of specified size work buffers.

Parameters
widthWidth of the work buffers in pixels.
heightHeight of the work buffers in pixels.

◆ ImageGradientMagnitudeDirection() [3/4]

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

Copy constructor.

◆ ImageGradientMagnitudeDirection() [4/4]

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

Move constructor.

◆ ~ImageGradientMagnitudeDirection()

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

Destructor.

Member Function Documentation

◆ calcMagnitude()

template<typename T , size_t C>
void blo::ImageGradientMagnitudeDirection< T, C >::calcMagnitude ( const T *  pSrcIx,
int  srcIxStep,
const T *  pSrcIy,
int  srcIyStep,
T *  pDst,
int  dstStep,
int  dstRoiWidth,
int  dstRoiHeight 
)

Calculates the gradient magnitude of windows within an image.

Note
The input are C channel images, the output is a 1 channel image.
Parameters
pSrcIxPointer to the source image x-derivative.
srcIxStepStep in bytes between the rows in the source image pSrcIx.
pSrcIyPointer to the source image y-derivative.
srcIyStepStep in bytes between the rows in the source image pSrcIy.
pDstPointer to the destination image.
dstStepStep in bytes between the rows in the destination image.
dstRoiWidthWidth of the destination image ROI in pixels.
dstRoiHeightHeight of the destination image ROI in pixels.

◆ clear()

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

Resizes work buffers to zero width and zero height.

◆ gradientMagnitudeDirection() [1/2]

template<typename T , size_t C>
void blo::ImageGradientMagnitudeDirection< T, C >::gradientMagnitudeDirection ( const T *  pSrcIx,
int  srcIxStep,
const T *  pSrcIy,
int  srcIyStep,
T *  pDstMagnitude,
int  dstMagnitudeStep,
SmallMatrix< T, 2, 1 > *  pDstDirection,
int  dstDirectionStep,
int  dstRoiWidth,
int  dstRoiHeight 
)

Calculates the gradient magnitude and direction of windows within an image.

Note
The input are C channel images, the output is a 1 channel image.
The output direction is unsigned direction.
Parameters
pSrcIxPointer to the source image x-derivative.
srcIxStepStep in bytes between the rows in the source image pSrcIx.
pSrcIyPointer to the source image y-derivative.
srcIyStepStep in bytes between the rows in the source image pSrcIy.
pDstMagnitudePointer to the destination gradient magnitude image.
dstMagnitudeStepStep in bytes between the rows in the destination gradient magnitude image.
pDstDirectionPointer to the destination gradient direction image.
dstDirectionStepStep in bytes between the rows in the destination gradient direction image.
dstRoiWidthWidth of the destination images ROI in pixels.
dstRoiHeightHeight of the destination images ROI in pixels.

◆ gradientMagnitudeDirection() [2/2]

template<typename T , size_t C>
void blo::ImageGradientMagnitudeDirection< T, C >::gradientMagnitudeDirection ( const T *  pSrcIx,
int  srcIxStep,
const T *  pSrcIy,
int  srcIyStep,
T *  pDstMagnitude,
int  dstMagnitudeStep,
T *  pDstDirection,
int  dstDirectionStep,
int  dstRoiWidth,
int  dstRoiHeight 
)

Calculates the gradient magnitude and direction of windows within an image.

Note
The input are C channel images, the output is a 1 channel image.
The output direction is unsigned direction.
Parameters
pSrcIxPointer to the source image x-derivative.
srcIxStepStep in bytes between the rows in the source image pSrcIx.
pSrcIyPointer to the source image y-derivative.
srcIyStepStep in bytes between the rows in the source image pSrcIy.
pDstMagnitudePointer to the destination gradient magnitude image.
dstMagnitudeStepStep in bytes between the rows in the destination gradient magnitude image.
pDstDirectionPointer to the destination gradient direction image.
dstDirectionStepStep in bytes between the rows in the destination gradient direction image.
dstRoiWidthWidth of the destination images ROI in pixels.
dstRoiHeightHeight of the destination images ROI in pixels.

◆ height()

template<typename T , size_t C>
int blo::ImageGradientMagnitudeDirection< T, C >::height ( ) const

Height of the work buffers.

Returns
Height of the work buffers in pixels.

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ resize()

template<typename T , size_t C>
void blo::ImageGradientMagnitudeDirection< T, C >::resize ( int  width,
int  height 
)

Resizes work buffers.

Parameters
widthWidth in pixels to resize work buffers to.
heightHeight in pixels to resize work buffers to.

◆ setWinSize()

template<typename T , size_t C>
void blo::ImageGradientMagnitudeDirection< T, C >::setWinSize ( int  winSize)

Sets size of the feature window.

Parameters
winSizeSize of the feature window.

◆ width()

template<typename T , size_t C>
int blo::ImageGradientMagnitudeDirection< T, C >::width ( ) const

Width of the work buffers.

Returns
Width of the work buffers in pixels.

◆ winSize()

template<typename T , size_t C>
int blo::ImageGradientMagnitudeDirection< T, C >::winSize ( ) const

Size of the feature window.

Returns
Size of the feature window.

Friends And Related Function Documentation

◆ ImageGradientMagnitudeDirection< float, 1 >

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

◆ ImageGradientMagnitudeDirection< float, 3 >

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

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