Point Cloud Library (PCL)
1.14.1-dev
|
HSVColorCoherence computes coherence between the two points from the color difference between them. More...
#include <pcl/tracking/hsv_color_coherence.h>
Public Types | |
using | Ptr = shared_ptr< HSVColorCoherence< PointInT > > |
using | ConstPtr = shared_ptr< const HSVColorCoherence< 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... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
std::string | coherence_name_ |
The coherence name. More... | |
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.
using pcl::tracking::HSVColorCoherence< PointInT >::ConstPtr = shared_ptr<const HSVColorCoherence<PointInT> > |
Definition at line 18 of file hsv_color_coherence.h.
using pcl::tracking::HSVColorCoherence< PointInT >::Ptr = shared_ptr<HSVColorCoherence<PointInT> > |
Definition at line 17 of file hsv_color_coherence.h.
|
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.
|
overrideprotectedvirtual |
return the color coherence between the two points.
[in] | source | instance of source point. |
[in] | target | instance 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().
|
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_.
|
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_.
|
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_.
|
inline |
get the weight (w) of coherence
Definition at line 42 of file hsv_color_coherence.h.
References pcl::tracking::HSVColorCoherence< PointInT >::weight_.
|
inline |
set the hue weight (w_h) of coherence
[in] | weight | the hue weight (w_h) of coherence. |
Definition at line 51 of file hsv_color_coherence.h.
References pcl::tracking::HSVColorCoherence< PointInT >::h_weight_.
|
inline |
set the saturation weight (w_s) of coherence
[in] | weight | the saturation weight (w_s) of coherence. |
Definition at line 67 of file hsv_color_coherence.h.
References pcl::tracking::HSVColorCoherence< PointInT >::s_weight_.
|
inline |
set the value weight (w_v) of coherence
[in] | weight | the value weight (w_v) of coherence. |
Definition at line 83 of file hsv_color_coherence.h.
References pcl::tracking::HSVColorCoherence< PointInT >::v_weight_.
|
inline |
set the weight of coherence
[in] | weight | the weight of coherence. |
Definition at line 35 of file hsv_color_coherence.h.
References pcl::tracking::HSVColorCoherence< PointInT >::weight_.
|
protected |
the hue weight (w_h)
Definition at line 107 of file hsv_color_coherence.h.
Referenced by pcl::tracking::HSVColorCoherence< PointInT >::getHWeight(), and pcl::tracking::HSVColorCoherence< PointInT >::setHWeight().
|
protected |
the saturation weight (w_s)
Definition at line 110 of file hsv_color_coherence.h.
Referenced by pcl::tracking::HSVColorCoherence< PointInT >::getSWeight(), and pcl::tracking::HSVColorCoherence< PointInT >::setSWeight().
|
protected |
the value weight (w_v)
Definition at line 113 of file hsv_color_coherence.h.
Referenced by pcl::tracking::HSVColorCoherence< PointInT >::getVWeight(), and pcl::tracking::HSVColorCoherence< PointInT >::setVWeight().
|
protected |
the weight of coherence (w)
Definition at line 104 of file hsv_color_coherence.h.
Referenced by pcl::tracking::HSVColorCoherence< PointInT >::getWeight(), and pcl::tracking::HSVColorCoherence< PointInT >::setWeight().