This is the official implementation of the method described in the following paper (see the published version on ISPRS or our preprint on arXiv):
Xufei Wang, Zexin Yang, Xiaojun Cheng, Jantien Stoter, Wenbing Xu, Zhenlun Wu, and Liangliang Nan.
GlobalMatch: Registration of forest terrestrial point clouds by global matching of relative stem positions.
ISPRS Journal of Photogrammetry and Remote Sensing. Vol. 197, 71-86, 2023.
The current implementation depends on the Point Cloud Library (PCL) and its dependencies (e.g., Eigen and the Visualization Toolkit (VTK)). Please install PCL (and its dependencies) first.
To build GlobalMatch, you need CMake (>= 3.12
) and a compiler that
supports >= C++14
.
With CMake, GlobalMatch can be built on almost all platforms,
although so far we have only tested it on Linux (GCC >= 4.8, Clang >= 3.3).
There are many options to build GlobalMatch. Choose one of the following (not an exhaustive list):
-
Option 1 (purely on the command line): Use CMake to generate Makefiles and then
make
(on Linux/macOS) ornmake
(on Windows with Microsoft Visual Studio).- On Linux or macOS, you can simply
$ cd path-to-root-dir-of-GlobalMatch $ mkdir Release $ cd Release $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make
- On Windows with Microsoft Visual Studio, use the
x64 Native Tools Command Prompt for VS XXXX
(don't use the x86 one), then$ cd path-to-root-dir-of-GlobalMatch $ mkdir Release $ cd Release $ cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release .. $ nmake
- On Linux or macOS, you can simply
-
Option 2: Use any IDE that can directly handle CMakeLists files to open the
CMakeLists.txt
in the root directory of GlobalMatch. Then you should have obtained a usable project and just build it. I personally highly recommend using CLion. For Windows users: your IDE must be set forx64
. -
Option 3: Use CMake-Gui to generate project files for your IDE. Then load the project to your IDE and build it. For Windows users: your IDE must be set for
x64
.
Don't have any experience with C/C++ programming? Have a look at Liangliang's step-by-step tutorial.
We have split GlobalMatch into two classes - Mapping and Matching - to make it easier to use. The main.cpp file demonstrates how to use it for pairwise registration. To register a "source" forest point cloud to a "target" one, run the built executable like this:
./GlobalMatch <source_scan_ply_file> <target_scan_ply_file> <output_matrix_txt_file>
<source_scan_ply_file>
and<target_scan_ply_file>
specify the path to the input point cloud ply files (order matters: source filename comes first)<output_matrix_txt_file>
specifies the filename to save the estimated 4 by 4 transformation matrix
The Tongji-Trees dataset, as part of our work, is introduced to complement the scarce publicly available data for evaluating marker-free registration methods for forest TLS scans. The dataset (including raw scans, ground-truth matrices, and our estimated matrices) can be downloaded from the links below:
Dataset | Google Drive |
Baidu Wangpan |
Size |
---|---|---|---|
Tongji-Trees | Download link | Download link | approx. 10GB |
Disclaimer: The estimated matrices you obtain may differ slightly from our provided ones due to the stochastic nature of our stem mapping algorithm.
We kindly ask you to cite our paper if you use (part of) the code, ideas, or dataset in your academic work:
@article{wang2023globalmatch,
title={GlobalMatch: Registration of forest terrestrial point clouds by global matching of relative stem positions},
author={Wang, Xufei and Yang, Zexin and Cheng, Xiaojun and Stoter, Jantien and Xu, Wenbing and Wu, Zhenlun and Nan, Liangliang},
journal={ISPRS Journal of Photogrammetry and Remote Sensing},
volume={197},
pages={71--86},
year={2023},
publisher={Elsevier}
}
Please feel free to contact me at [email protected] with questions, comments, or suggestions ;-)
Zexin Yang
December 21, 2021