#ifndef OnlinePathSmoother_h__ #define OnlinePathSmoother_h__ #include #include #include "CVUtils.h" using std::vector; namespace pagic { enum PagicSmoothType{ PAGIC_SMOOTH_AVERAGE, PAGIC_SMOOTH_GAUSS }; class OnlinePathSmoother { public: OnlinePathSmoother(); Point2d smooth(const Point2d& pos); void clear(); vector getSrcPosVec() const { return m_srcPosVec; } void setSrcPosVec(vector val) { m_srcPosVec = val; } vector getSmoothPosVec() const { return m_smoothPosVec; } void setSmoothPosVec(vector val) { m_smoothPosVec = val; } int getSmoothRadius() const { return m_smoothRadius; } void setSmoothRadius(int val) { m_smoothRadius = val; } protected: vector m_srcPosVec; vector m_smoothPosVec; int m_smoothRadius; PagicSmoothType m_type; void smoothLastPosByAverage(); void smoothLastPosByGauss(); private: }; } #endif // OnlinePathSmoother_h__