Image Component Library (ICL)
|
class for creating integral images More...
#include <IntegralImgOp.h>
Public Member Functions | |
IntegralImgOp (core::depth integralImageDepth=core::depth32s) | |
Constructor. | |
~IntegralImgOp () | |
Destructor. | |
void | setIntegralImageDepth (core::depth integralImageDepth) |
sets the depth of the integralImage (depth8u etc) | |
core::depth | getIntegralImageDepth () const |
returns the depth of the integralImage | |
void | apply (const core::ImgBase *src, core::ImgBase **dst) |
applies the integralimage Operaor | |
Private Attributes | |
core::depth | m_integralImageDepth |
destination depth | |
core::ImgBase * | m_buf |
used only if IPP is available |
class for creating integral images
The integral image A of an image a (introduced by Viola & Jones (2001) in the paper : "Rapid Object Detection using a Boosted Cascade of Simple Features" ) defined as follows:
It can be calculated incrementally using the following equation:
+++++.. +++CA.. +++BX.. ....... X = src(x) + A + B - C
There are alternative definitions (like the ipp):
From this it follows, that the first integral image row and colum is filled with zeros and the internal image grows by one pixel in each dimension, with the benefit of some better usability of the result image. We use the above definition, which is a bit more convenient for the most common applications in our sight.
IPP optimization is not used, as IPP uses a different formulation of the integral image which leads to an integral image that is one row and one column larger as the source image. IPPs integral image formulation is
. As our implementation comes really close to the IPP-version in terms of performance, we dont use the IPP for this UnaryOp.
We support all source image depth, the integral image always needs a large value domain, so here, only icl32s, icl32f and icl64f are supported.
The calculation is very fast and we come close to the IPP performace.
icl::filter::IntegralImgOp::IntegralImgOp | ( | core::depth | integralImageDepth = core::depth32s | ) |
Constructor.
integralImageDepth | the depth of the integralImage (depth8u etc) |
Destructor.
void icl::filter::IntegralImgOp::apply | ( | const core::ImgBase * | src, |
core::ImgBase ** | dst | ||
) | [virtual] |
applies the integralimage Operaor
src | The source image |
dst | Pointer to the destination image |
Implements icl::filter::UnaryOp.
returns the depth of the integralImage
void icl::filter::IntegralImgOp::setIntegralImageDepth | ( | core::depth | integralImageDepth | ) |
sets the depth of the integralImage (depth8u etc)
integralImageDepth | the depth of the integralImage (depth8u etc) |
core::ImgBase* icl::filter::IntegralImgOp::m_buf [private] |
used only if IPP is available
Reimplemented from icl::filter::UnaryOp.
destination depth