GaussianFilter.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class GaussianFilter 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 2D discrete, symmetric gaussian filter (separable like most of the 00009 other filters, but we're not taking advantage of this to make the 00010 filter framework cleaner and more cohesive), centered at the origin 00011 <!-------------------------------------------------------------------->**/ 00012 00013 #ifndef GAUSSIAN_FILTER_H_ 00014 #define GAUSSIAN_FILTER_H_ 00015 00016 #include <filters/KernelFilter.h> 00017 00018 class GaussianFilter : public KernelFilter { 00019 public: 00020 ///@name Constructors 00021 //@{----------------------------------------------------------------- 00022 00023 inline GaussianFilter(real_t support = 2, real_t sigma = 1.0) 00024 : KernelFilter(support), m_sigma(sigma) 00025 { } 00026 00027 virtual ~GaussianFilter() 00028 { } 00029 00030 00031 //@}----------------------------------------------------------------- 00032 ///@name Initialization 00033 //@{----------------------------------------------------------------- 00034 00035 virtual void init(); 00036 00037 00038 //@}----------------------------------------------------------------- 00039 ///@name Main usage interface 00040 //@{----------------------------------------------------------------- 00041 00042 /** 00043 * @returns the value of this filter function evaluated at the given 00044 * point 00045 */ 00046 virtual real_t evaluate(const Vector2 &pt); 00047 00048 00049 //@}----------------------------------------------------------------- 00050 ///@name Accessors / Mutators 00051 //@{----------------------------------------------------------------- 00052 00053 /// @returns the sigma parameter of this gaussian distribution 00054 /// (standard deviation) 00055 inline real_t getSigma() const { 00056 return m_sigma; 00057 } 00058 00059 //@}----------------------------------------------------------------- 00060 00061 protected: 00062 real_t m_sigma; 00063 }; 00064 00065 #endif // GAUSSIAN_FILTER_H_ 00066
Generated on 28 Feb 2009 for Milton by
1.5.6