24 #ifndef INTEGRAL_IMAGE_H
25 #define INTEGRAL_IMAGE_H
36 #include <opencv2/core.hpp>
37 #include <opencv2/opencv.hpp>
66 void update_next_step();
117 double GetSum(cv::Rect &rect,
int *count = 0);
149 void CalculatePointNormals(cv::Mat &gray);
163 void GetGradient(cv::Rect &rect,
double *dirx,
double *diry,
int *count = 0);
This file defines library export definitions, version numbers and build information.
Class for calculating "evenly spaced" integer indices for data sequence.
int next()
Take the next integer index step.
int get() const
Get the index value.
int get_next_step() const
How much the index will be increased with the next next()
int operator=(int v)
Set the integer index to the "grid" value nearest to v .
int end() const
For testing have we reached the end.
IntIndex(int _res, int _steps)
Create IntIndex for indexing _res elements in predefined amount of _steps .
IntegralGradient is used for calculating rectangular image gradients rapidly
void GetAveGradient(cv::Rect &rect, double *dirx, double *diry)
Calculate the average gradient for the given rectangular area in the image.
void Update(cv::Mat &gray)
Update intermediate images for calculating the gradients to the given image.
void GetGradient(cv::Rect &rect, double *dirx, double *diry, int *count=0)
Calculate the gradient for the given rectangular area in the image.
IntegralImage is used for calculating rectangular image sums and averages rapidly
double GetAve(cv::Rect &rect)
Calculate the average for the given rectangular area in the image.
void Update(cv::Mat &gray)
Update integral image for the given image.
double GetSum(cv::Rect &rect, int *count=0)
Calculate the sum for the given rectangular area in the image.
void GetSubimage(const cv::Rect &rect, cv::Mat &sub)
Get a sub-image using integral image representation.