CloudComPy icon indicating copy to clipboard operation
CloudComPy copied to clipboard

Accessing rgb color for point clouds

Open abaldacci opened this issue 3 years ago • 6 comments

Hi,

is it possible to access and modify the vertex colors stored in a point cloud file through the python API? I cant see a method to do it.

Thanks

Andrea

abaldacci avatar Jan 03 '22 17:01 abaldacci

Hello, I haven't put anything in the interface to process colors yet. I can add some functions, can you specify what you want (what functions of the CloudCompare GUI do you use?). You probably need the functions in the edit/colors menu, but you may be using other functions that I can't think of, or don't know about! I will try to add what is missing in the next version. Regards, Paul

prascle avatar Jan 03 '22 18:01 prascle

Hi Paul, I'm also interested in being able to process colors. The main reason is, I want to access them in nearest neighbor calculations (along with other scalar fields) to calculate the mean/stdev of color channels (or a scalar field) within a radius. This is something that the main CloudCompare GUI currently doesn't do as far as I know. So a function to convert colors to scalar fields would be useful for one.

I'm still trying to figure out a way to access scalar field values associated with nearest neighbor outputs (not just the point coordinates), but hopefully this is possible.

lmweidner avatar Jan 03 '22 21:01 lmweidner

Hi,

for my use case would be enough to be able to access the colors and modify them possibily by converting them from/to numpy arrays like it is implemented now for coordinates.

Best,

Andrea

abaldacci avatar Jan 05 '22 17:01 abaldacci

Hi, I started to look at the color implementation in CloudCompare, there is a huge amount of functions, I will add some of them in CloudComPy and look at the conversions between colors, scalar fields and Numpy arrays. Hopefully I'll have something for you in the next release (next week?). Paul

prascle avatar Jan 05 '22 18:01 prascle

Thanks!

abaldacci avatar Jan 12 '22 14:01 abaldacci

I have published a new release, see https://www.simulation.openfields.fr/ Paul

prascle avatar Jan 18 '22 10:01 prascle