change function signatures in filtre.cpp

This commit is contained in:
Louis-Guillaume DUBOIS 2015-05-26 15:52:30 +02:00
parent 5d50a6ab3e
commit 31638974d8

View file

@ -27,7 +27,7 @@ class Callback {
publisher.publish(pcl);
}
Callback(ros::Publisher& pub)
Callback(const ros::Publisher& pub)
: publisher(pub), z_max(90.), hue(0.), delta_hue(20.), sat_min(0.3), sat_max(1.), val_min(0.3), val_max(1.)
{
assert(delta_hue > 0);
@ -41,7 +41,7 @@ class Callback {
}
void
reconfigure(hand_control::FiltreConfig& c, uint32_t level) {
reconfigure(const hand_control::FiltreConfig& c, const uint32_t level) {
z_max = c.z_max;
hue = c.hue;
delta_hue = c.delta_hue;
@ -81,14 +81,18 @@ class Callback {
return std::min(diff1, diff2);
}
float sat(const Point& pt)
inline
float
sat(const Point& pt)
{
float h, s, v, diff1, diff2;
pcl::tracking::RGB2HSV(pt.r, pt.g, pt.b, h, s, v);
return s;
}
float val(const Point& pt)
inline
float
val(const Point& pt)
{
float h, s, v, diff1, diff2;
pcl::tracking::RGB2HSV(pt.r, pt.g, pt.b, h, s, v);