/** * @file FastFilter.h * @brief standard filter functions e.g. gradient filters * @author Erik Rodner * @date 07/22/2008 */ #ifndef FastFilterINCLUDE #define FastFilterINCLUDE namespace OBJREC { /** @brief standard filter functions e.g. gradient filters */ class FastFilter { public: /** calculates gradient magnitude and gradient directions quantized in a number * of bins. * @param pointer to the input image * @param xsize width of the image * @param ysize height of the image * @param gradient pointer to the destination memory for the gradient magnitude values * @param dir pointer to the destination memory for the gradient direction values * @param numBins number of bins used for the quantization of the gradient directions * @param usesigned if set put gradient directions alpha and - alpha in the same bin **/ template static void calcGradient ( const GrayValueType *gray, int xsize, int ysize, GradientMagnitudeType *gradient, GradientDirectionType *dir, int numBins, bool usesigned ); /** calculates gradient magnitude and gradient directions of a color image (use * the channel with the maximum magnitude at each pixel). * The gradient direction is quantized in a number of bins. * @param r first channel of the input image * @param g second channel of the input image * @param b third channel of the input image * @param xsize width of the image * @param ysize height of the image * @param gradient pointer to the destination memory for the gradient magnitude values * @param dir pointer to the destination memory for the gradient direction values * @param numBins number of bins used for the quantization of the gradient directions * @param usesigned if set put gradient directions alpha and - alpha in the same bin **/ template static void calcColorGradient ( const GrayValueType *r, const GrayValueType *g, const GrayValueType *b, int xsize, int ysize, GradientMagnitudeType *gradient, GradientDirectionType *dir, int numBins, bool usesigned ); template static void calcGradientY ( const SrcValueType *img, int xsize, int ysize, DstValueType *d ); template static void calcGradientX ( const SrcValueType *img, int xsize, int ysize, DstValueType *d ); }; } // namespace #include "FastFilter.tcc" #endif