Negative values in Canopy height model

Feel free to ask any question here
Post Reply
Chidi
Posts: 2
Joined: Mon Nov 21, 2022 9:23 am

Negative values in Canopy height model

Post by Chidi »

Hi Daniel, Good morning.

I am currently working on a LiDAR dataset captured with velodyne sensor onboard drone system. I am trying to calculate the canopy height model for a grape field but I have negative values in the output (The original dataset do not have any negative elevation).
Here are the steps that I have taken:
A. 1. Remove noise and outliers
2. Classify ground and non-ground points using the csf
3. Output the mesh from the classification
4. Compute the cloud to mesh distance using mesh as reference, off-ground points and all points alternatively as compared (just to see if there are differences).
5. Export sf coordinates

I Also tried it using another method where instead of the mesh, I computed the cloud-cloud distance between the ground points and off-ground / all points. I also spitted into x, y, and z directions. Here, I get 4 outputs, C2C distances. C2C distances in x, y, z directions respectively. As a last step, I set the C2C (z) as sf coordinates.

With both methods, I still get negative and positive values in the CHM. Please, what am I doing wrong or is there another way to compute it?
Unfortunately, I cannot share the dataset nor the result because it is part of my internship.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Negative values in Canopy height model

Post by daniel »

So cloud-to-mesh distances are signed based on the 'orientation' of the nearest triangle. The issue might be that depending on the topology of the mesh, you can get some corner cases where the nearest triangle is actually in a weird position relatively to the point (like almost aligned, etc.), and the 'orientation' of the triangle makes it so that the distance is negative.

In this case it would only be some outliers with negative distances, and most of the points with positive distances. Or do you see large patches of negative distances maybe?

If it's the first case, then maybe on option is to compute 'unsigned' distances and assume there are some outliers...

Don't hesitate to share the mesh and the cloud with me if you want me to take a closer look (admin[at]cloudcompare.org)
Daniel, CloudCompare admin
Chidi
Posts: 2
Joined: Mon Nov 21, 2022 9:23 am

Re: Negative values in Canopy height model

Post by Chidi »

Hi Daniel,
Good morning.

Thank you so much for your reply. I had no idea you already replied me and I did not get any notification via email.

Regarding the negative distance, most of my points have positive distances. I also figured out that when I set the display range to start from 0.0, and under 'parameters' turn off 'show NaN/out of range values in grey, the negative distances disappear.

Secondly, I tried your suggestion and computed the 'unsigned distances' using the cloud-to-mesh distances assuming there are outliers. This time, I did not get negative values, but noticed that some places with not enough ground points have absolute distance of 0......I guess that is where the issue came from.

Thirdly, do you have an idea how cloud-mesh or cloud-cloud distance computation affects the result?. Using the same dataset, I get max C2C absolute distance of 2.011 and max C2M absolute distance of 2.260.

Fourthly, what is the unit of the computed distances, I assume it is in meters.

And lastly, I will seek permission from my supervisor about sharing the data with you.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Negative values in Canopy height model

Post by daniel »

Cloud-to-cloud distance is generally more approximate, since it's the distance to the nearest point (which might be far from the underlying surface represented by the cloud, especially in case of a low density cloud, or even if some parts are missing). Cloud-to-mesh distance is more robust to that issue, assuming the coverage of the mesh is correct. However, topology issues on the mesh can cause the calculation of some strange distances / outliers... You can look at the distance histograms or at least the std deviation to try to compare them (and not only to the max distance).

And units of distances are the same as the point coordinates. CC loads the coordinates as is from the file. And the units are almost never defined in standard file formats, so it's up to you to determine the units.

I believe having the data on my side will help me a lot understand what happens.
Daniel, CloudCompare admin
Post Reply