2 #ifndef CVD_INC_INTEGRAL_IMAGE_H 3 #define CVD_INC_INTEGRAL_IMAGE_H 6 #include <cvd/internal/pixel_operations.h> 7 #include <cvd/vision.h> 20 template <
class S,
class D>
28 for(
int x = 1; x < in.
size().
x; x++)
29 out[0][x] = out[0][x - 1] + in[0][x];
32 for(
int y = 1; y < in.
size().
y; y++)
33 out[y][0] = out[y - 1][0] + in[y][0];
36 for(
int y = 1; y < in.
size().
y; y++)
41 for(
int x = 1; x < in.
size().
x; x++)
48 #ifndef DOXYGEN_IGNORE_INTERNAL 69 integral_image<C, D>(i, j);
80 template <
class S,
class D>
Input images have incompatible dimensions.
Definition: vision_exceptions.h:26
All classes and functions are within the CVD namespace.
Definition: argb.h:6
ImageRef size() const
What is the size of this image?
Definition: image.h:557
void integral_image(const BasicImage< S > &in, BasicImage< D > &out)
Compute an integral image.
Definition: integral_image.h:21
Definition: pixel_operations.h:19
void resize(const ImageRef &size)
Resize the image (destroying the data).
Definition: image.h:731
int x
The x co-ordinate.
Definition: image_ref.h:172
A generic image class to manage a block of arbitrarily padded data as an image.
Definition: image.h:273
Definition: integral_image.h:52
int y
The y co-ordinate.
Definition: image_ref.h:173
A full image which manages its own data.
Definition: image.h:623