-
-
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 ColorHandler to color points with individual RGB values #1570
base: master
Are you sure you want to change the base?
Conversation
Conflicts: visualization/include/pcl/visualization/point_cloud_color_handlers.h
I'm not sure if we need an new color handler for this. Can you just change the point type to something that includes RGB field and merge the color information there? |
You can definitely achieve the same effect by creating a new pointcloud that has RGB field and specifying the RGB values. But that requires a copy of the data. I guess it might not be too much of an issue. But I have found |
Well in it's current form My feeling is that this handler is superfluous. I agree that there might be a use case, but arguably it is a fairly rare case, and can be covered by using an RGB-enabled point type. So I would rather be against merging this, but if there are other opinions, please post. |
You are right about the data copy. I agree with you that this handler is not strictly speaking necessary. It would be interesting to see if anyone else has an opinion on it. |
It seems like this feature is non-essential. Should we close this pull request? |
capable_ = true; | ||
else | ||
capable_ = false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not simply
capable_ = (cloud_->points.size () == rgb_values_.size ())
The use case I see for this is in case you have a colored pointcloud already but want to override its colors for visualization purposes without copying the the XYZ data. I don't really see an issue in having it as a non-essential feature, it might convenient in some situations. Also since the |
I agree with @taketwo that it's more consistent to create a new cloud, even in the case @SergioRAgostinho proposes. |
Fair enough. Can we close this then? Sorry for the trouble @aecins :x |
No problem, @SergioRAgostinho, this can be closed. The final decision is that this functionality is not needed so I will not implement it in |
Actually, I am in favor of having this functionality as a part of |
This pull request has been automatically marked as stale because it hasn't had Come back whenever you have time. We look forward to your contribution. |
Adds a new

PointCloudColorHandlerCustomIndividual
color handler to PCLVisualizer that allows to color each point in the pointcloud with a different color. Here is an example of a visualization of a cloud where first 1/3 of points are red, second 1/3 is green and last 1/3 is blue: