My Project
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IntegralGradient Class Reference

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
 

Detailed Description

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.

Member Function Documentation

◆ GetAveGradient()

void GetAveGradient ( cv::Rect &  rect,
double *  dirx,
double *  diry 
)

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

Parameters
dirxMethod fills in the x-component of the gradient here
diryMethod fills in the y-component of the gradient here

◆ GetGradient()

void GetGradient ( cv::Rect &  rect,
double *  dirx,
double *  diry,
int *  count = 0 
)

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

Parameters
dirxMethod fills in the x-component of the gradient here
diryMethod fills in the y-component of the gradient here
countIf this parameter is not 0 it is filled with number of pixels in the rectangle.

◆ Update()

void Update ( cv::Mat &  gray)

Update intermediate images for calculating the gradients to the given image.

Parameters
grayThe original grayscale image we want analyze

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