GDAL
Public Member Functions | List of all members
GDALIntegralImage Class Reference

Integral image class (summed area table). More...

#include <gdal_simplesurf.h>

Public Member Functions

void Initialize (const double **padfImg, int nHeight, int nWidth)
 Compute integral image for specified array. More...
 
double GetValue (int nRow, int nCol)
 Fetch value of specified position in integral image. More...
 
double GetRectangleSum (int nRow, int nCol, int nWidth, int nHeight)
 Get sum of values in specified rectangular grid. More...
 
double HaarWavelet_X (int nRow, int nCol, int nSize)
 Get value of horizontal Haar wavelet in specified square grid. More...
 
double HaarWavelet_Y (int nRow, int nCol, int nSize)
 Get value of vertical Haar wavelet in specified square grid. More...
 
int GetHeight ()
 Fetch height of integral image. More...
 
int GetWidth ()
 Fetch width of integral image. More...
 

Detailed Description

Integral image class (summed area table).

Author
Andrew Migal migal.nosp@m..dre.nosp@m.w@gma.nosp@m.il.c.nosp@m.om

Integral image is a table for fast computing the sum of values in rectangular subarea. In more detail, for 2-dimensional array of numbers this class provides capability to get sum of values in rectangular arbitrary area with any size in constant time. Integral image is constructed from grayscale picture.

Member Function Documentation

◆ GetHeight()

int GDALIntegralImage::GetHeight ( )

Fetch height of integral image.

Returns
Height of integral image (number of rows).

◆ GetRectangleSum()

double GDALIntegralImage::GetRectangleSum ( int  nRow,
int  nCol,
int  nWidth,
int  nHeight 
)

Get sum of values in specified rectangular grid.

Rectangle is constructed from left top point.

Parameters
nRowRow of left top point of rectangle
nColColumn of left top point of rectangle
nWidthWidth of rectangular area (number of columns)
nHeightHeight of rectangular area (number of rows)
Returns
Sum of values in specified grid.

◆ GetValue()

double GDALIntegralImage::GetValue ( int  nRow,
int  nCol 
)

Fetch value of specified position in integral image.

Parameters
nRowRow of this position
nColColumn of this position
Returns
Value in specified position or zero if parameters are out of range.

◆ GetWidth()

int GDALIntegralImage::GetWidth ( )

Fetch width of integral image.

Returns
Width of integral image (number of columns).

◆ HaarWavelet_X()

double GDALIntegralImage::HaarWavelet_X ( int  nRow,
int  nCol,
int  nSize 
)

Get value of horizontal Haar wavelet in specified square grid.

Parameters
nRowRow of left top point of square
nColColumn of left top point of square
nSizeSide of the square
Returns
Value of horizontal Haar wavelet in specified square grid.

◆ HaarWavelet_Y()

double GDALIntegralImage::HaarWavelet_Y ( int  nRow,
int  nCol,
int  nSize 
)

Get value of vertical Haar wavelet in specified square grid.

Parameters
nRowRow of left top point of square
nColColumn of left top point of square
nSizeSide of the square
Returns
Value of vertical Haar wavelet in specified square grid.

◆ Initialize()

void GDALIntegralImage::Initialize ( const double **  padfImg,
int  nHeight,
int  nWidth 
)

Compute integral image for specified array.

Result is stored internally.

Parameters
padfImgPointer to 2-dimensional array of values
nHeightNumber of rows in array
nWidthNumber of columns in array

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

Generated for GDAL by doxygen 1.8.13.