Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::tracking::HSVColorCoherence< PointInT > Class Template Reference

HSVColorCoherence computes coherence between the two points from the color difference between them. More...

#include <pcl/tracking/hsv_color_coherence.h>

+ Inheritance diagram for pcl::tracking::HSVColorCoherence< PointInT >:

Public Member Functions

 HSVColorCoherence ()
 initialize the weights of the computation. More...
 
void setWeight (double weight)
 set the weight of coherence More...
 
double getWeight ()
 get the weight (w) of coherence More...
 
void setHWeight (double weight)
 set the hue weight (w_h) of coherence More...
 
double getHWeight ()
 get the hue weight (w_h) of coherence More...
 
void setSWeight (double weight)
 set the saturation weight (w_s) of coherence More...
 
double getSWeight ()
 get the saturation weight (w_s) of coherence More...
 
void setVWeight (double weight)
 set the value weight (w_v) of coherence More...
 
double getVWeight ()
 get the value weight (w_v) of coherence More...
 
- Public Member Functions inherited from pcl::tracking::PointCoherence< PointInT >
 PointCoherence ()
 empty constructor More...
 
virtual ~PointCoherence ()
 empty distructor More...
 
double compute (PointInT &source, PointInT &target)
 compute coherence from the source point to the target point. More...
 

Protected Member Functions

double computeCoherence (PointInT &source, PointInT &target)
 return the color coherence between the two points. More...
 
- Protected Member Functions inherited from pcl::tracking::PointCoherence< PointInT >
const std::string & getClassName () const
 Get a string representation of the name of this class. More...
 

Protected Attributes

double weight_
 the weight of coherence (w) More...
 
double h_weight_
 the hue weight (w_h) More...
 
double s_weight_
 the saturation weight (w_s) More...
 
double v_weight_
 the value weight (w_v) More...
 
- Protected Attributes inherited from pcl::tracking::PointCoherence< PointInT >
std::string coherence_name_
 The coherence name. More...
 

Additional Inherited Members

- Public Types inherited from pcl::tracking::PointCoherence< PointInT >
typedef boost::shared_ptr< PointCoherence< PointInT > > Ptr
 
typedef boost::shared_ptr< const PointCoherence< PointInT > > ConstPtr
 

Detailed Description

template<typename PointInT>
class pcl::tracking::HSVColorCoherence< PointInT >

HSVColorCoherence computes coherence between the two points from the color difference between them.

the color difference is calculated in HSV color space. the coherence is calculated by 1 / ( 1 + w * (w_h^2 * h_diff^2 + w_s^2 * s_diff^2 + w_v^2 * v_diff^2))

Author
Ryohei Ueda

Definition at line 16 of file hsv_color_coherence.h.

Constructor & Destructor Documentation

template<typename PointInT >
pcl::tracking::HSVColorCoherence< PointInT >::HSVColorCoherence ( )
inline

initialize the weights of the computation.

weight_, h_weight_, s_weight_ default to 1.0 and v_weight_ defaults to 0.0.

Definition at line 24 of file hsv_color_coherence.h.

Member Function Documentation

template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::computeCoherence ( PointInT &  source,
PointInT &  target 
)
protectedvirtual

return the color coherence between the two points.

Parameters
[in]sourceinstance of source point.
[in]targetinstance of target point.

Implements pcl::tracking::PointCoherence< PointInT >.

Definition at line 145 of file hsv_color_coherence.hpp.

References pcl::tracking::RGBValue::Blue, pcl::tracking::RGBValue::Green, pcl::tracking::RGBValue::int_value, pcl::tracking::RGBValue::Red, and pcl::tracking::RGB2HSV().

Referenced by pcl::tracking::HSVColorCoherence< PointInT >::getVWeight().

template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::getHWeight ( )
inline

get the hue weight (w_h) of coherence

Definition at line 50 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::h_weight_.

template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::getSWeight ( )
inline

get the saturation weight (w_s) of coherence

Definition at line 60 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::s_weight_.

template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::getVWeight ( )
inline
template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::getWeight ( )
inline

get the weight (w) of coherence

Definition at line 40 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::weight_.

template<typename PointInT >
void pcl::tracking::HSVColorCoherence< PointInT >::setHWeight ( double  weight)
inline

set the hue weight (w_h) of coherence

Parameters
[in]weightthe hue weight (w_h) of coherence.

Definition at line 46 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::h_weight_.

template<typename PointInT >
void pcl::tracking::HSVColorCoherence< PointInT >::setSWeight ( double  weight)
inline

set the saturation weight (w_s) of coherence

Parameters
[in]weightthe saturation weight (w_s) of coherence.

Definition at line 56 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::s_weight_.

template<typename PointInT >
void pcl::tracking::HSVColorCoherence< PointInT >::setVWeight ( double  weight)
inline

set the value weight (w_v) of coherence

Parameters
[in]weightthe value weight (w_v) of coherence.

Definition at line 66 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::v_weight_.

template<typename PointInT >
void pcl::tracking::HSVColorCoherence< PointInT >::setWeight ( double  weight)
inline

set the weight of coherence

Parameters
[in]weightthe weight of coherence.

Definition at line 36 of file hsv_color_coherence.h.

References pcl::tracking::HSVColorCoherence< PointInT >::weight_.

Member Data Documentation

template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::h_weight_
protected
template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::s_weight_
protected
template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::v_weight_
protected
template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::weight_
protected

The documentation for this class was generated from the following files: