Public Member Functions | Private Attributes
alvar::IntegralImage Class Reference

IntegralImage is used for calculating rectangular image sums and averages rapidly More...

#include <IntegralImage.h>

List of all members.

Public Member Functions

double GetAve (CvRect &rect)
 Calculate the average for the given rectangular area in the image.
void GetSubimage (const CvRect &rect, IplImage *sub)
 Get a sub-image using integral image representation.
double GetSum (CvRect &rect, int *count=0)
 Calculate the sum for the given rectangular area in the image.
 IntegralImage ()
void Update (IplImage *gray)
 Update integral image for the given image.
 ~IntegralImage ()

Private Attributes

IplImage * sum

Detailed Description

IntegralImage is used for calculating rectangular image sums and averages rapidly

The integral images are based on making intermediate representation of the image. Using this approach the sum/average of rectangular area can be calculated using only four references for the integral image. The integral images are commonly used with HAAR-like features.

The IntegralImage should be used when we need to a lot of sum/average calculations for the same image.

References

Examples:
SampleIntegralImage.cpp.

Definition at line 100 of file IntegralImage.h.


Constructor & Destructor Documentation

Definition at line 66 of file IntegralImage.cpp.

Definition at line 69 of file IntegralImage.cpp.


Member Function Documentation

double alvar::IntegralImage::GetAve ( CvRect &  rect)

Calculate the average for the given rectangular area in the image.

Definition at line 103 of file IntegralImage.cpp.

void alvar::IntegralImage::GetSubimage ( const CvRect &  rect,
IplImage *  sub 
)

Get a sub-image using integral image representation.

Parameters:
rectThe rectangle we want to get the sub-image from
subThe image where the sub-image is generated. Note, the desired resolution is defined by sub.

Get an image sub with a predefined resolution from the given rectangular area rect . In practice the sub is filled by getting the average with GetAve() for every pixel area.

Examples:
SampleIntegralImage.cpp.

Definition at line 107 of file IntegralImage.cpp.

double alvar::IntegralImage::GetSum ( CvRect &  rect,
int *  count = 0 
)

Calculate the sum for the given rectangular area in the image.

Parameters:
rectThe rectancle
countIf this parameter is not 0 it is filled with number of pixels in the rectangle.

Definition at line 83 of file IntegralImage.cpp.

void alvar::IntegralImage::Update ( IplImage *  gray)

Update integral image for the given image.

Parameters:
grayThe original grayscale image we want analyze
Examples:
SampleIntegralImage.cpp.

Definition at line 72 of file IntegralImage.cpp.


Member Data Documentation

IplImage* alvar::IntegralImage::sum [private]

Definition at line 101 of file IntegralImage.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Sat Dec 28 2013 16:46:16