Hello @james_c_452, I poked some point cloud experts for insight on this. I’ll pass along the information as best I can, but feel free ask for further clarification if needed.
There are 2 main approaches to recommend. One is a binning method and the other, a raster method. These approaches also depend on the data involved, if at least one of the layers is plan view oriented (2.5D or less) these approaches should work.
- The binning approach uses coordinate rounding to a desired resolution – you could round to the nearest metre with a PointCloudExpressionEvaluator. If you round your points to nearest metre, then you can look at the result and extract the min, max, mean or mode and use that to transfer to a component on an overlapping point cloud using PointCloudMerger
- Another related approach would be to cast the colored point cloud into raster (ImageRasterizer) and then use PointCloudOnRasterComponentSetter to transfer RBG values onto the target point cloud.
Between the two, I think the second method may be easier to adopt and implement. In regards to feedback on your current workspace, there wasn’t much, apologies. Are you using the new 2022.0 Clipper? I know its undergone many improvements since 2021, including performance.
Furthermore, if you would like to see something for this use case added to FME in the future, I recommend creating an idea to consider this kind of point cloud processing support. Happy to help, Kailin
Hi @kailinatsafe ,
thanks for the answer. I won't be able to use option two because my point cloud is not planar. It covers a variety of aspects, not just one plane. I never even considered this when I was asking because of this reason. It is a helpful tool for other applications though!
I will have a go at option 1 at some stage though. It is an approach I haven't tried and sounds promising
I'm not using the 2022 clipper unfortunately. I'm constrained by using an older version at the moment. I would like to though.
James
Hi @kailinatsafe I do have one question about this process if you can help out.
I have done as you said for option 1. I rounded the coordinates of point cloud then filtered what has and hasn't got colour (or its colour is black). Then I used 3 PointCloudSplitters to get a single feature/point cloud for each XYZ combination. I then got the median of each of these, made this a component, merged using the PointCloudMerger, restored the coordinates, replaced the colour component, and merged all the pointclouds into one file.
It works but I'm not sure if using a PointCloudSplitter is the most efficient way to get the median colour of each XYZ combination. I've only tried it with feature caching on but it did take a while, because it has to write all the new point clouds. There are thousands for my small test site. Is there a way to find all the medians more easily? Say with the PointCloudExpressionEvaluator or something? Basically a for loop where for each XYZ combination find the median colour red, for example.
Or would this actually run fast if I did it without caching on (I can't test this for a few months)?
Thanks
Hi @kailinatsafe I do have one question about this process if you can help out.
I have done as you said for option 1. I rounded the coordinates of point cloud then filtered what has and hasn't got colour (or its colour is black). Then I used 3 PointCloudSplitters to get a single feature/point cloud for each XYZ combination. I then got the median of each of these, made this a component, merged using the PointCloudMerger, restored the coordinates, replaced the colour component, and merged all the pointclouds into one file.
It works but I'm not sure if using a PointCloudSplitter is the most efficient way to get the median colour of each XYZ combination. I've only tried it with feature caching on but it did take a while, because it has to write all the new point clouds. There are thousands for my small test site. Is there a way to find all the medians more easily? Say with the PointCloudExpressionEvaluator or something? Basically a for loop where for each XYZ combination find the median colour red, for example.
Or would this actually run fast if I did it without caching on (I can't test this for a few months)?
Thanks
Hello @james_c_452, so glad this approach worked for you, thanks for the update! Feature caching is not your friend when processing raster or point clouds, although it is helpful. Yes, I suspect caching could take a big hit on performance, especially if you're working with large data volumes. Please let us know if disabling caching improves processing time!
Perhaps try adding a Clipper or a PointCloudSimplifier to reduce the number of points before trying to do calculations? This might impact the accuracy of your results however. I feel like it could be possible to use the PointCloudExpressionEvaluator, but I wouldn't know of any examples for you to reference unfortunately. Let me know if you have any other questions I can try to lend a hand with! Happy to help, Kailin.