TreeLS icon indicating copy to clipboard operation
TreeLS copied to clipboard

tlsNormalize returns negative values, what does it really normalize?

Open mavavilj opened this issue 4 years ago • 2 comments

tlsNormalize returns negative values, what does it really normalize?

My 3D point clouds are such that the z varies from about z=70 to z=90 where the data lies.

Should I perhaps translate my data to origin first?

mavavilj avatar May 01 '21 14:05 mavavilj

tlsNormalize is just a wrapper function that calls lidR::grid_terrain(algorithm = knnidw()) and then lidR::normalize_height with the resulting dtm [and of course lidR::classify_ground(algo=csf()) if you don't have Classification == 2] so my guess would be that it has to do with your point density (i.e., lack of sufficient points to build the dtm and thus it normalizes with "high" points resulting in negative values) or the defaults passed in TreeLS, but these are just guesses. I suggest reading lines 530-553 (linked above) and just write your own own function that suits your specific needs.

bi0m3trics avatar May 01 '21 14:05 bi0m3trics

I inputted it already extracted trees. Does it require the ground points as well?

I also didn't understand from the code, how does it check whether normalization is in place? I checked some of the code:

https://github.com/tiagodc/TreeLS/blob/9033693503ee71ace2335a6b8fa2dce864df37cd/R/methods.R#L114-L115

So is it enough that the lowest Z of the cloud is in [0,1]?

mavavilj avatar May 01 '21 17:05 mavavilj