corrects hue distance in «filtre» node
This commit is contained in:
parent
2897943e42
commit
f741c60e12
2 changed files with 4 additions and 4 deletions
|
@ -61,7 +61,7 @@ class Callback {
|
||||||
diff2 = std::fabs(360.0f + h - hue);
|
diff2 = std::fabs(360.0f + h - hue);
|
||||||
else
|
else
|
||||||
diff2 = std::fabs(360.0f + hue - h);
|
diff2 = std::fabs(360.0f + hue - h);
|
||||||
return std::max(diff1, diff2);
|
return std::min(diff1, diff2);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@ class Generator
|
||||||
cgen.fill(length, length, *pcl);
|
cgen.fill(length, length, *pcl);
|
||||||
for (int i = 0; i < pcl->points.size(); ++i)
|
for (int i = 0; i < pcl->points.size(); ++i)
|
||||||
{
|
{
|
||||||
pcl->points[i].r = (uint8_t) 255;
|
pcl->points[i].r = (uint8_t) 175;
|
||||||
pcl->points[i].g = (uint8_t) 255;
|
pcl->points[i].g = (uint8_t) 120;
|
||||||
pcl->points[i].b = (uint8_t) 0;
|
pcl->points[i].b = (uint8_t) 118;
|
||||||
}
|
}
|
||||||
ros::Time now = ros::Time::now();
|
ros::Time now = ros::Time::now();
|
||||||
pcl->header.stamp = now.toNSec() / 1000;
|
pcl->header.stamp = now.toNSec() / 1000;
|
||||||
|
|
Loading…
Reference in a new issue