/artemis_treeiso

TLS tree isolation/segmentation code

Primary LanguageC++OtherNOASSERTION

Individual-tree isolation (treeiso) from terrestrial laser scanning

CloudCompare Plugin was developed now!

The University of Lethbridge - Department of Geography & Environment - Artemis Lab

Author - Zhouxin Xi (zhouxin.xi@uleth.ca) and Prof. Chris Hopkinson (c.hopkinson@uleth.ca)

Please cite:

Xi, Z.; Hopkinson, C. 3D Graph-Based Individual-Tree Isolation (Treeiso) from Terrestrial Laser Scanning Point Clouds. Remote Sens. 2022, 14, 6116. https://doi.org/10.3390/rs14236116

This tool relies on the cut-pursuit algorithm, please also consider citing:

Landrieu, L.; Obozinski, G. Cut Pursuit: Fast Algorithms to Learn Piecewise Constant Functions on General Weighted Graphs. SIAM J. Imaging Sci. 2017, 10, 1724–1766. hal link

Raguet, H.; Landrieu, L. Cut-pursuit algorithm for regularizing nonsmooth functionals with graph total variation. In Proceedings of the International Conference on Machine Learning, Stockholm, Sweden, 10–15 July 2018; Volume 80, pp. 4247–4256.

Folder structure

├── data                                    # All raw data
│   ├── LPine1_demo.laz                     # Example TLS data (just a subset from a TLS plot due to the file size limit)
├── Matlab                                  # treeiso Matlab Source code 
│   ├── treeiso.m                           # Main program
│   ├── cutPursuit.m                        # Wrapper of L0 cut-pursuit mex code
│   ├── jitknnsearch.m                      # Matlab jit accelerated knnsearch - fast knnsearch from small amount of points
│   ├── overlapping.m                       # Used to calculate overlap ratio between a pair of crown convex hulls
│   ├── L0_cut_pursuit.mexw64               # compiled L0 cut pursuit program
│   ├── L0_cut_pursuit_segmentation.mexw64  # compiled L0 cut pursuit program
│   ├── las2mat.mexw64                      # compiled las/laz file reading program
│   ├── mat2las.mexw64                      # compiled las/laz file writing program
├── LICENSE
└── README.md

1. Preprocessing requirements

If you use your own TLS data, it is recommended to clean the point clouds and remove the noise, e.g. using CloudCompare(Sober filter,NN=10,std=1)

It is also suggested to decimate the point cloud to reasonable resolution (~2cm)

Ground points must be removed prior to tree isolation

** The mex files were all compiled under Windows 10 (64bit) Intel using Visual Studio 2019. If you need to compile on your own, please refer to the authors' sites for detailed steps. Links below:

cutpursuit, mastools

2. treeiso

Run matlab code under Matlab\treeiso.m to isolate TLS trees

Type in the folder path where your laz files are located

The treeiso.m will exhaustively search all laz files and run the treeiso for each laz file

You can type in the data folder for a quick test. The treeiso.m will isolate trees from LPine1_demo.laz

Result laz file will be saved to Matlab\output\

The laz file will include three additional fields:

  1. init_segs: show the initial segmentation from 3D cut-pursuit
  2. interim_segs: show the 2nd-stage segmentation from 2D cut-pursuit
  3. segs: final tree segmentation

Please be patient: processing a laz file of ~25MB costs about 10 minutes using Intel Core i7-9700K and 16GB RAM.

Example isolated trees:

Raw TLS Example1 After treeiso isolation Top view
demo1_crop demo1_treeiso_crop demo1_treeiso2_crop
Raw TLS Example2 After treeiso isolation Top view
TAspen1_crop TAspen1_treeiso_crop TAspen1_treeiso2_crop
Raw TLS Example3 After treeiso isolation Top view
NPoplar2_crop NPoplar2_treeiso_crop NPoplar2_treeiso2_crop