Hi,
I was wondering if anyone has an approach to assign scalar values from on point cloud to another. I have two point clouds created by SfM photogrammetry with having the R,G,B colors assigned to the points the other with NIR assigned to the points. Now the geometries of the two point clouds are very similar, however since the datasets are from two consecutive flights, the points are not on top of each other. Ideally I would like to merge the two clouds and to have R,G,B,NIR as scalar fields (NDVI calculation etc). Any ideas on this? I assume I'd need some sort of 3D neighborhood function to do so.
Thank you!
Jakob
Assigning scalar values from one point cloud to another
Re: Assigning scalar values from one point cloud to another
In CC there's already a function to do this with the colors ('interpolate from another entity' - see http://www.cloudcompare.org/doc/wiki/in ... her_entity).
It would be rather easy to do the same thing with a scalar field. In the code the entrey point is here:
https://github.com/cloudcompare/trunk/b ... .cpp#L1109
It would be rather easy to do the same thing with a scalar field. In the code the entrey point is here:
https://github.com/cloudcompare/trunk/b ... .cpp#L1109
Daniel, CloudCompare admin
Re: Assigning scalar values from one point cloud to another
Hi Daniel,
I think there's also the function implemented in qCanupo when you apply the classification result from core points to the point cloud.
Cheers
Dim
I think there's also the function implemented in qCanupo when you apply the classification result from core points to the point cloud.
Cheers
Dim
Re: Assigning scalar values from one point cloud to another
Indeed, but the code is not public yet ;)
Daniel, CloudCompare admin
Re: Assigning scalar values from one point cloud to another
Awesome! That is exactly what I was looking for. Here is a quick&dirty result:
Re: Assigning scalar values from one point cloud to another
Have you modified the code or simply interpolated the colors?
Daniel, CloudCompare admin
Re: Assigning scalar values from one point cloud to another
For now I just converted the R,G,B values from one cloud to scalar fields, then deleted the colors. Then interpolated the colors of the other cloud to the now un-colored cloud. The newly assigned R,G,B values were again converted to scalar fields which then lets me do some calculations such as NDVI, NDWI etc. As I said it was just a quick solution. I will look into modifying the code but I'm new to C++
-
- Posts: 1
- Joined: Wed Nov 27, 2019 9:37 am
Re: Assigning scalar values from one point cloud to another
I'm stealing the thread, but I didn't want to start the new one for just one question.
Is there a paper published on "Scalar fields - Interpolate from another entity" or can someone just direct me on some literature describing what is happening in the background of the filter/algorithm?
Thank you
Is there a paper published on "Scalar fields - Interpolate from another entity" or can someone just direct me on some literature describing what is happening in the background of the filter/algorithm?
Thank you
Re: Assigning scalar values from one point cloud to another
No paper. We just look for each point of the 'destination' cloud the nearest neighbors in the 'source' cloud and compute the average / median / weighted average of the neighbors scalar values.
See https://www.cloudcompare.org/doc/wiki/i ... her_entity
See https://www.cloudcompare.org/doc/wiki/i ... her_entity
Daniel, CloudCompare admin
-
- Posts: 3
- Joined: Wed Sep 15, 2021 12:35 pm
Re: Assigning scalar values from one point cloud to another
hi! I have followed the steps you indicate in the answers and I have taken the scalar field (which is Z coordinate referred to the ground, named Zo) from one point cloud to another. However when I export the resulting point cloud, it doesn´t contain the Zo coordinate. Do you have any idea why is this happening?
Thanks in advance
Thanks in advance