![]() |
My Project
|
IntegralGradient is used for calculating rectangular image gradients rapidly More...
#include <IntegralImage.h>
Public Member Functions | |
void | Update (cv::Mat &gray) |
Update intermediate images for calculating the gradients to the given image. More... | |
void | GetGradient (cv::Rect &rect, double *dirx, double *diry, int *count=0) |
Calculate the gradient for the given rectangular area in the image. More... | |
void | GetAveGradient (cv::Rect &rect, double *dirx, double *diry) |
Calculate the average gradient for the given rectangular area in the image. More... | |
Protected Member Functions | |
void | CalculatePointNormals (cv::Mat &gray) |
Protected Attributes | |
cv::Mat | normalx |
cv::Mat | normaly |
IntegralImage | integx |
IntegralImage | integy |
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 140 of file IntegralImage.h.
void GetAveGradient | ( | cv::Rect & | 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 |
void GetGradient | ( | cv::Rect & | 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. |
void Update | ( | cv::Mat & | gray | ) |
Update intermediate images for calculating the gradients to the given image.
gray | The original grayscale image we want analyze |