1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- /**
- * @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 <class GrayValueType, class GradientMagnitudeType, class GradientDirectionType>
- 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 <class GrayValueType, class GradientMagnitudeType, class GradientDirectionType>
- 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 <class SrcValueType, class DstValueType>
- static void calcGradientY ( const SrcValueType *img, int xsize, int ysize, DstValueType *d );
- template <class SrcValueType, class DstValueType>
- static void calcGradientX ( const SrcValueType *img, int xsize, int ysize, DstValueType *d );
- };
- } // namespace
- #include "FastFilter.tcc"
- #endif
|