IntegralGradient is used for calculating rectangular image gradients rapidly More...
#include <IntegralImage.h>
Public Member Functions | |
void | GetAveGradient (CvRect &rect, double *dirx, double *diry) |
Calculate the average gradient for the given rectangular area in the image. | |
void | GetGradient (CvRect &rect, double *dirx, double *diry, int *count=0) |
Calculate the gradient for the given rectangular area in the image. | |
IntegralGradient () | |
void | Update (IplImage *gray) |
Update intermediate images for calculating the gradients to the given image. | |
~IntegralGradient () | |
Protected Member Functions | |
void | CalculatePointNormals (IplImage *gray) |
Protected Attributes | |
IntegralImage | integx |
IntegralImage | integy |
IplImage * | normalx |
IplImage * | normaly |
IntegralGradient is used for calculating rectangular image gradients rapidly
We calculate IntegralImage:s based on point normals for 4-pixel intersections (see Donahue1992). Using the integral images it is possible to make fast gradient calculations to any image rectangle. This approach is useful when we need to calculate many gradient rectangles for the same image.
(See SampleIntegralImage.cpp)
Definition at line 136 of file IntegralImage.h.
Definition at line 168 of file IntegralImage.cpp.
Definition at line 172 of file IntegralImage.cpp.
void alvar::IntegralGradient::CalculatePointNormals | ( | IplImage * | gray | ) | [protected] |
Definition at line 128 of file IntegralImage.cpp.
void alvar::IntegralGradient::GetAveGradient | ( | CvRect & | rect, |
double * | dirx, | ||
double * | diry | ||
) |
Calculate the average gradient for the given rectangular area in the image.
dirx | Method fills in the x-component of the gradient here |
diry | Method fills in the y-component of the gradient here |
Definition at line 187 of file IntegralImage.cpp.
void alvar::IntegralGradient::GetGradient | ( | CvRect & | rect, |
double * | dirx, | ||
double * | diry, | ||
int * | count = 0 |
||
) |
Calculate the gradient for the given rectangular area in the image.
dirx | Method fills in the x-component of the gradient here |
diry | Method fills in the y-component of the gradient here |
count | If this parameter is not 0 it is filled with number of pixels in the rectangle. |
Definition at line 181 of file IntegralImage.cpp.
void alvar::IntegralGradient::Update | ( | IplImage * | gray | ) |
Update intermediate images for calculating the gradients to the given image.
gray | The original grayscale image we want analyze |
Definition at line 176 of file IntegralImage.cpp.
IntegralImage alvar::IntegralGradient::integx [protected] |
Definition at line 140 of file IntegralImage.h.
IntegralImage alvar::IntegralGradient::integy [protected] |
Definition at line 141 of file IntegralImage.h.
IplImage* alvar::IntegralGradient::normalx [protected] |
Definition at line 138 of file IntegralImage.h.
IplImage* alvar::IntegralGradient::normaly [protected] |
Definition at line 139 of file IntegralImage.h.