thoughts on color parsing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

thoughts on color parsing

Adam Leeper
All-

I want to write a class, node or nodelet to parse colors from a packed rgb float to separate values (floats on range 0-1 for each?). Initially I was just going to copy pointcloud_to_pcd and modify it for my purposes, but perhaps a formal solution would be useful to others.

Thoughts on how this should be done? Should there be a class that does the conversion (perhaps copies all fields form the input to output cloud except it replaces the "rgb" with three fields... "r", "g", "b"?), and then a nodelet that just calls the class operation?

Also... should fields be called r,g,b,  or perhaps red, green, blue, or...? A tradeoff between compactness and clarity I suppose.

Thanks,
Adam





Adam Leeper
Stanford University
[hidden email]
719.358.3804

_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: thoughts on color parsing

Radu B. Rusu
Administrator
Adam,


On 01/31/2011 09:19 PM, Adam Leeper wrote:
> All-
>
> I want to write a class, node or nodelet to parse colors from a packed rgb float to separate values (floats on range 0-1
> for each?). Initially I was just going to copy pointcloud_to_pcd and modify it for my purposes, but perhaps a formal
> solution would be useful to others.
>
> Thoughts on how this should be done? Should there be a class that does the conversion (perhaps copies all fields form
> the input to output cloud except it replaces the "rgb" with three fields... "r", "g", "b"?), and then a nodelet that
> just calls the class operation?

Sounds good. What would the class do? What is the purpose of the r,g,b extraction?

> Also... should fields be called r,g,b,  or perhaps red, green, blue, or...? A tradeoff between compactness and clarity I
> suppose.

Either way is fine I think. I think we used the r,g,b convention from other ROS tools, like stereo_image_proc, and
perhaps from OpenCV (?)

Cheers,
Radu.
--
http://pointclouds.org
_______________________________________________
[hidden email] / http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users