Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
BIAS::IntegralImage< StorageType > Class Template Reference

#include <Utils/IntegralImage.hh>

Public Member Functions

void GenerateFrom (const ImageBase &im)
 Create or update the integral image based on the given image. More...
 
double GetAreaAvg (const int &xA, const int &yA, const int &xB, const int &yB)
 Evaluate the integral image. More...
 
StorageType GetAreaAvgRd (const int &xA, const int &yA, const int &xB, const int &yB)
 Evaluate the integral image. More...
 
double GetAreaSum (const int &xA, const int &yA, const int &xB, const int &yB)
 Evaluate the integral image. More...
 
double GetDOM (int x, int y, int halfLevelSize)
 Calculate the difference of means (DOM) at a given position with a given scale (halfWinSize). More...
 
double * GetIntImageData ()
 Get the raw data pointer to the integral image. More...
 
 IntegralImage ()
 Create an uninitialized integral image. More...
 
 IntegralImage (const Image< StorageType > &im)
 Create an integral image instance based on the given image. More...
 
 ~IntegralImage ()
 

Protected Attributes

int channels_
 
int height_
 
double * intImg_
 
int width_
 

Detailed Description

template<class StorageType>
class BIAS::IntegralImage< StorageType >

Definition at line 16 of file IntegralImage.hh.

Constructor & Destructor Documentation

template<class StorageType >
IntegralImage::IntegralImage ( )

Create an uninitialized integral image.

Definition at line 7 of file IntegralImage.cpp.

template<class StorageType >
IntegralImage::IntegralImage ( const Image< StorageType > &  im)

Create an integral image instance based on the given image.

Definition at line 15 of file IntegralImage.cpp.

template<class StorageType >
IntegralImage::~IntegralImage ( )

Definition at line 24 of file IntegralImage.cpp.

Member Function Documentation

template<class StorageType >
void IntegralImage::GenerateFrom ( const ImageBase im)

Create or update the integral image based on the given image.

Definition at line 29 of file IntegralImage.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageDataArray(), and BIAS::ImageBase::GetWidth().

template<class StorageType >
double BIAS::IntegralImage< StorageType >::GetAreaAvg ( const int &  xA,
const int &  yA,
const int &  xB,
const int &  yB 
)
inline

Evaluate the integral image.

Returns the average value in the rectangle with the upper left corner (xA,yA) and lower right corner (xB,yB).

Parameters
xAleft border
yAupper border
xBright border
yBlower border

Definition at line 77 of file IntegralImage.hh.

template<class StorageType >
StorageType BIAS::IntegralImage< StorageType >::GetAreaAvgRd ( const int &  xA,
const int &  yA,
const int &  xB,
const int &  yB 
)
inline

Evaluate the integral image.

Returns the rounded average value in the rectangle with the upper left corner (xA,yA) and lower right corner (xB,yB) cast to StorageType.

Parameters
xAleft border
yAupper border
xBright border
yBlower border

Definition at line 94 of file IntegralImage.hh.

template<class StorageType >
double BIAS::IntegralImage< StorageType >::GetAreaSum ( const int &  xA,
const int &  yA,
const int &  xB,
const int &  yB 
)
inline

Evaluate the integral image.

Returns the sum of values in the rectangle with the upper left corner (xA,yA) and lower right corner (xB,yB).

Parameters
xAleft border
yAupper border
xBright border
yBlower border

Definition at line 61 of file IntegralImage.hh.

template<class StorageType >
double IntegralImage::GetDOM ( int  x,
int  y,
int  halfLevelSize 
)

Calculate the difference of means (DOM) at a given position with a given scale (halfWinSize).

This can be used as a fast alternative to the difference of gaussian (DOG) based scale space.

Parameters
xx position in the DOM space
yy position in the DOM space
halfWinSizeThe half windows size of the inner area (which is subtracked by an area with 2*halfWinSize)

Definition at line 70 of file IntegralImage.cpp.

template<class StorageType >
double* BIAS::IntegralImage< StorageType >::GetIntImageData ( )

Get the raw data pointer to the integral image.

Member Data Documentation

template<class StorageType >
int BIAS::IntegralImage< StorageType >::channels_
protected

Definition at line 48 of file IntegralImage.hh.

template<class StorageType >
int BIAS::IntegralImage< StorageType >::height_
protected

Definition at line 47 of file IntegralImage.hh.

template<class StorageType >
double* BIAS::IntegralImage< StorageType >::intImg_
protected

Definition at line 49 of file IntegralImage.hh.

template<class StorageType >
int BIAS::IntegralImage< StorageType >::width_
protected

Definition at line 46 of file IntegralImage.hh.


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