Point Cloud Library (PCL)  1.7.0
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 >:

List of all members.

Public Member Functions

 HSVColorCoherence ()
 initialize the weights of the computation.
void setWeight (double weight)
 set the weight of coherence
double getWeight ()
 get the weight (w) of coherence
void setHWeight (double weight)
 set the hue weight (w_h) of coherence
double getHWeight ()
 get the hue weight (w_h) of coherence
void setSWeight (double weight)
 set the saturation weight (w_s) of coherence
double getSWeight ()
 get the saturation weight (w_s) of coherence
void setVWeight (double weight)
 set the value weight (w_v) of coherence
double getVWeight ()
 get the value weight (w_v) of coherence

Protected Member Functions

double computeCoherence (PointInT &source, PointInT &target)
 return the color coherence between the two points.

Protected Attributes

double weight_
 the weight of coherence (w)
double h_weight_
 the hue weight (w_h)
double s_weight_
 the saturation weight (w_s)
double v_weight_
 the value weight (w_v)

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 17 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 25 of file hsv_color_coherence.h.


Member Function Documentation

template<typename PointInT >
double pcl::tracking::HSVColorCoherence< PointInT >::computeCoherence ( PointInT &  source,
PointInT &  target 
) [protected, virtual]

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().

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

get the hue weight (w_h) of coherence

Definition at line 51 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 61 of file hsv_color_coherence.h.

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

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

get the value weight (w_v) of coherence

Definition at line 71 of file hsv_color_coherence.h.

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

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

get the weight (w) of coherence

Definition at line 41 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 47 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 57 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 67 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 37 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: