Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | 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 >:
+ Collaboration diagram for pcl::tracking::HSVColorCoherence< PointInT >:

Public Types

using Ptr = shared_ptr< HSVColorCoherence< PointInT > >
 
using ConstPtr = shared_ptr< const HSVColorCoherence< PointInT > >
 
- Public Types inherited from pcl::tracking::PointCoherence< PointInT >
using Ptr = shared_ptr< PointCoherence< PointInT > >
 
using ConstPtr = shared_ptr< const PointCoherence< 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 ()=default
 empty constructor More...
 
virtual ~PointCoherence ()=default
 empty destructor 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) override
 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...
 

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

Definition at line 15 of file hsv_color_coherence.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointInT >
using pcl::tracking::HSVColorCoherence< PointInT >::ConstPtr = shared_ptr<const HSVColorCoherence<PointInT> >

Definition at line 18 of file hsv_color_coherence.h.

◆ Ptr

template<typename PointInT >
using pcl::tracking::HSVColorCoherence< PointInT >::Ptr = shared_ptr<HSVColorCoherence<PointInT> >

Definition at line 17 of file hsv_color_coherence.h.

Constructor & Destructor Documentation

◆ HSVColorCoherence()

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

Member Function Documentation

◆ computeCoherence()

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

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

◆ getHWeight()

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

get the hue weight (w_h) of coherence

Definition at line 58 of file hsv_color_coherence.h.

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

◆ getSWeight()

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

get the saturation weight (w_s) of coherence

Definition at line 74 of file hsv_color_coherence.h.

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

◆ getVWeight()

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

get the value weight (w_v) of coherence

Definition at line 90 of file hsv_color_coherence.h.

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

◆ getWeight()

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

get the weight (w) of coherence

Definition at line 42 of file hsv_color_coherence.h.

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

◆ setHWeight()

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

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

◆ setSWeight()

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

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

◆ setVWeight()

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

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

◆ setWeight()

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

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

Member Data Documentation

◆ h_weight_

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

◆ s_weight_

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

◆ v_weight_

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

◆ weight_

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

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