IntegralImage is used for calculating rectangular image sums and averages rapidly More...
#include <IntegralImage.h>
Public Member Functions  
double  GetAve (CvRect &rect) 
Calculate the average for the given rectangular area in the image. More...  
void  GetSubimage (const CvRect &rect, IplImage *sub) 
Get a subimage using integral image representation. More...  
double  GetSum (CvRect &rect, int *count=0) 
Calculate the sum for the given rectangular area in the image. More...  
IntegralImage ()  
void  Update (IplImage *gray) 
Update integral image for the given image. More...  
~IntegralImage ()  
Private Attributes  
IplImage *  sum 
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 HAARlike features.
The IntegralImage should be used when we need to a lot of sum/average calculations for the same image.
Definition at line 100 of file IntegralImage.h.
alvar::IntegralImage::IntegralImage  (  ) 
Definition at line 66 of file IntegralImage.cpp.
alvar::IntegralImage::~IntegralImage  (  ) 
Definition at line 69 of file IntegralImage.cpp.
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 subimage using integral image representation.
rect  The rectangle we want to get the subimage from 
sub  The image where the subimage 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.
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.
rect  The rectancle 
count  If 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.
gray  The original grayscale image we want analyze 
Definition at line 72 of file IntegralImage.cpp.

private 
Definition at line 101 of file IntegralImage.h.