-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new PointCloudColorHandler for "label" field #849
Conversation
@jspricke Any comments on this one? |
Any idea when this is going to be merged? It (and #718) are holding up some other changes I'd like to get into 1.8 early so they can be thoroughly tested =p |
Sorry for taking so long, will merge once the style is fine. |
@taketwo can you fix the merge errors, so I can hit the button? ;). Thanks! |
This includes both template class and a specialization for PCLPointCloud2 objects
b88e0f6
to
89b7b5b
Compare
Done |
Add a new PointCloudColorHandler for "label" field
Awesome, thanks! |
@taketwo I'm running into some issues with this - even with a fixed PointCloudColorHandlerLabelField, if I have more than GLASBEY_LUT_SIZE labels, both updatePointCloud and addPointCloud generate new random colors every time they're called. Is there a way to pre-allocate a greater number of colors, or store random colors once they're generated? |
Yes, but how many? 500, 1K, 2K, 100K? Where to stop? What if we use |
This is the perfect solution +10 |
…use the label field handlers from PointCloudLibrary#849
BTW this is exactly how I implemented it in PNG saving function. So both will be consistent now. |
…use the label field handlers from PointCloudLibrary#849 , deprecated functions return empty cloud to deprecated functions to avoid warnings Changed labeled color handler to use modulo max color instead of using random colors
This pull request adds a new color handler specialized for the "label" field. It assigns colors to points based on the labels. The colors are taken from Glasbey lookup table to ensure max distinctiveness.
This addition allows an end user to easily visualize labeled point clouds by simply writing:
More specifically, this pull request:
pcl_common
(because now it is needed in both
pcl_io
andpcl_visualization
);PointCloudColorHandlerLabelField
class;pcl_viewer
app to use the new handler when "label" field is present;PCLVisualizer
to provide convenience specializations for labeled points (PointXYZL
).