iLab Neuromorphic Robotics Toolkit  0.1
Integral Image Operations

Methods for computing and dealing with Integral Images

See also:
Image Math Operations
Image macros to facilitate promotion of pixel types

Functions

template<typename promo = int, typename srcType , typename dstType = typename nrt::promote<srcType, promo>::type>
nrt::Image< nrt::PixGray
< dstType > > 
nrt::getIntegralImage (nrt::Image< nrt::PixGray< srcType > > const im)
 Generate an Integral Image from a grayscale Image.
template<typename promo = int, typename srcType , typename dstType = typename nrt::promote<srcType, promo>::type>
nrt::Image< nrt::PixGray
< dstType > > 
nrt::getIntegralImage (nrt::Image< nrt::PixGray< srcType > > const im, std::function< dstType(srcType const &)> evalFxn)
 Generate an Integral Image from a grayscale Image.
template<typename promo = int, typename srcType , typename dstType = typename nrt::promote<srcType, promo>::type>
dstType nrt::getIIValue (nrt::Image< nrt::PixGray< srcType >> integralImage, nrt::Rectangle< nrt::int32 > rect)
 Compute the sum of values inside a rectangular region of an Image using an Integral Image.

Function Documentation

template<typename promo = int, typename srcType , typename dstType = typename nrt::promote<srcType, promo>::type>
nrt::Image<nrt::PixGray<dstType> > nrt::getIntegralImage ( nrt::Image< nrt::PixGray< srcType > > const  im)

Generate an Integral Image from a grayscale Image.

This function returns the integral image of the input image which contains a single-valued (PixGray) value It is useful for efficiently calculating the sum of values within a rectanglular region of an Image.

template<typename promo = int, typename srcType , typename dstType = typename nrt::promote<srcType, promo>::type>
dstType nrt::getIIValue ( nrt::Image< nrt::PixGray< srcType >>  integralImage,
nrt::Rectangle< nrt::int32 >  rect 
)

Compute the sum of values inside a rectangular region of an Image using an Integral Image.

After an Integral Image has been computed for a source Image, this method can use that Integral Image to compute the sum of pixel values inside a rectangular region of that source Image very efficiently using its Integral Image.

Parameters:
integralImageThe Integral Image computed via getIntegralImage().
rectThe rectangular region for which you want to compute the sum.

Definition at line 70 of file IntegralOpsImpl.H.

References nrt::Rectangle< T >::bottomLeftI(), nrt::Rectangle< T >::bottomRightI(), nrt::Rectangle< T >::topLeft(), and nrt::Rectangle< T >::topRightI().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines