/** 
* @file GenericImageTools.h
* @brief simple filter stuff
* @author Erik Rodner
* @date 07/30/2008
*/
#ifndef GENERICIMAGETOOLSINCLUDE
#define GENERICIMAGETOOLSINCLUDE

#include "core/image/MultiChannelImageT.h"

namespace OBJREC {

/** simple filter stuff */
class GenericImageTools 
{
    public:

    /**
     * calculates the integral image.
     *
     * note: result integral image has same dimensions as the source image -
     * the size is NOT extended by a new 0-row and 0-column as is done in cv::integral.
     *
     */
    template <class PixelValueDst, class PixelValueSrc>
    static void calcIntegralImage ( NICE::ImageT<PixelValueDst> &integralImage, const NICE::ImageT<PixelValueSrc> &image, int xsize, int ysize );

    template <class PixelValueDst, class PixelValueSrc>
    static void nonMaximumSuppression ( NICE::ImageT<PixelValueDst> &dst, const NICE::ImageT<PixelValueSrc> &src, int xsize, int ysize, bool useEightConnectivity = true );

};

#include "GenericImageTools.tcc"

} // namespace

#endif
