Un petit commentaire ne fait jamais de mal filtreHue.cpp edited online with Bitbucket

This commit is contained in:
Luc Absil 2015-05-07 16:14:23 +00:00
parent 97c07c8eaa
commit 021119a896

View file

@ -17,6 +17,8 @@ class Callback {
BOOST_FOREACH (const Point& pt, msg->points) BOOST_FOREACH (const Point& pt, msg->points)
{ {
uint8_t min, max, c; uint8_t min, max, c;
//Recherche du min et du max des coefficients R,G,B
if (pt.r >= pt.g) { if (pt.r >= pt.g) {
if (pt.g >= pt.b) { if (pt.g >= pt.b) {
max = pt.r max = pt.r
@ -40,7 +42,7 @@ class Callback {
} }
c = max - min; c = max - min;
assert(c > 0); assert(c > 0);
assert(max > pt.r); assert(max > pt.r);
assert(max > pt.g); assert(max > pt.g);
@ -50,7 +52,7 @@ class Callback {
assert(min < pt.b); assert(min < pt.b);
pcl->height = 1; pcl->height = 1;
pcl->width = pcl->points.size(); pcl->width = pcl->points.size();
publisher.publish(pcl); publisher.publish(pcl);