00001 #ifndef PCL_TRACKING_HSV_COLOR_COHERENCE_H_ 00002 #define PCL_TRACKING_HSV_COLOR_COHERENCE_H_ 00003 00004 #include <pcl/tracking/coherence.h> 00005 00006 namespace pcl 00007 { 00008 namespace tracking 00009 { 00016 template <typename PointInT> 00017 class HSVColorCoherence: public PointCoherence<PointInT> 00018 { 00019 public: 00020 00025 HSVColorCoherence () 00026 : PointCoherence<PointInT> () 00027 , weight_ (1.0) 00028 , h_weight_ (1.0) 00029 , s_weight_ (1.0) 00030 , v_weight_ (0.0) 00031 {} 00032 00036 inline void 00037 setWeight (double weight) { weight_ = weight; } 00038 00040 inline double 00041 getWeight () { return weight_; } 00042 00046 inline void 00047 setHWeight (double weight) { h_weight_ = weight; } 00048 00050 inline double 00051 getHWeight () { return h_weight_; } 00052 00056 inline void 00057 setSWeight (double weight) { s_weight_ = weight; } 00058 00060 inline double 00061 getSWeight () { return s_weight_; } 00062 00066 inline void 00067 setVWeight (double weight) { v_weight_ = weight; } 00068 00070 inline double 00071 getVWeight () { return v_weight_; } 00072 00073 protected: 00074 00079 double 00080 computeCoherence (PointInT &source, PointInT &target); 00081 00083 double weight_; 00084 00086 double h_weight_; 00087 00089 double s_weight_; 00090 00092 double v_weight_; 00093 00094 }; 00095 } 00096 } 00097 00098 // #include <pcl/tracking/impl/hsv_color_coherence.hpp> 00099 00100 #ifdef PCL_NO_PRECOMPILE 00101 #include <pcl/tracking/impl/hsv_color_coherence.hpp> 00102 #endif 00103 00104 #endif