r-lidar / lidR

Airborne LiDAR data manipulation and visualisation for forestry application
https://CRAN.R-project.org/package=lidR
GNU General Public License v3.0
587 stars 132 forks source link

Manual Tree Identification Suggestion #610

Closed Saadi4469 closed 2 years ago

Saadi4469 commented 2 years ago

Good day,

Based on this issue I would like to suggest an optional way to manually correct tree tops if possible by overlaying the points on an aerial basemap or a high resolution raster. This might increase the performance of the process. I am also open to other solutions as well.

Thank you

Jean-Romain commented 2 years ago

You cannot dynamically edit a 2D plot so what is proposed in lidR in 3D is not reproducible in 2D with regular plots.

Edit: Or a raster but in 3D. Why not.

Jean-Romain commented 2 years ago

Well actually it is already working. I'm closing

LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las = readLAS(LASfile)
chm = rasterize_canopy(las)
ttops = locate_trees(chm, manual())
Jean-Romain commented 2 years ago

If there was a way I know to get a faster rendering I swear I would already have put it in lidR :wink:

Saadi4469 commented 2 years ago

Oh cool thank you so much, I will give it a try tomorrow at work. However, I wish there was a way to fasten rgl 3D rendering for manual tree correction purposes.

Saadi4469 commented 2 years ago

Hope you had some fruitful discussion with the rgl maintainer.

Jean-Romain commented 2 years ago

If you are referring to the person on stackoverflow I thnk they are not the rgl maintainer. And we did not discuss at all actually. But I'm working on improving the rgl rendering for billion of points. I think I have the ideas clear but the implementation is hard.

Saadi4469 commented 2 years ago

I am so happy to hear that, thank you so much for your time and help. I did post the same question here, and the rgl maintainer did modify some of the code to improve performance. Good luck!

Saadi4469 commented 2 years ago

He did point out that the performance has to do with the CPU and not the GPU when it comes to rendering points. Moreover, rgl is single threaded and therefore does not use multiple thread, and the maintainer told me it's not possible to make rgl use multiple threads.