Skip to content

Commit d7ff024

Browse files
committed
Restructured folders
1 parent c57b648 commit d7ff024

12 files changed

+2126
-16
lines changed

README.md

+27-16
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,52 @@
11
# pICP
2-
This project provides a clean and fast implementation of the ICP method by [Besl and McKay](https://ieeexplore.ieee.org/document/121791/) in C++ with minimal dependencies ([Eigen](http://eigen.tuxfamily.org) for matrix manipulation and SVD computation, and [Nanoflann](https://github.com/jlblancoc/nanoflann) for KDTree-based correspondences search). The algorithm is one of the baseline methods on rigid alignment of point clouds, and this implementation attempts to provide an entry point for learning it with no practical hassles. At the same time, it works fast and robustly enough to be used out-of-the box on any of your projects.
2+
This project provides a clean and fast implementation of the ICP method by [Besl and McKay](https://ieeexplore.ieee.org/document/121791/) in C++ with minimal dependencies (see below). The algorithm is one of the baseline methods on rigid alignment of point clouds, and this implementation attempts to provide an entry point for learning it with no practical hassles. At the same time, it works fast and robustly enough to be used out-of-the box on any of your projects.
33

4-
![](samples/alignment.png)
4+
![](docs/alignment.png)
55

66

77
## How it works
88
### The problem
99
Given two point sets:
1010

11-
![](samples/readme_eq1.gif)
11+
![](docs/readme_eq1.gif)
1212

13-
![](samples/readme_eq2.gif)
13+
![](docs/readme_eq2.gif)
1414

1515
find a rotation R and translation T that minimizes the error:
1616

17-
![](samples/readme_eq3.gif)
17+
![](docs/readme_eq3.gif)
1818

1919
### SVD based transform estimation
2020
Given a matrix W made by a set of correspondent N points, centered to its mean
2121

22-
![](samples/readme_eq4.gif)
22+
![](docs/readme_eq4.gif)
2323

2424
obtain the Singular Value Decomposition of W = U * S * Vt.
2525

2626
Theorem without proof says that if rank( W ) = 3, the optimal solution of E( R, t ) is unique and given by:
2727

28-
![](samples/readme_eq5.gif)
28+
![](docs/readme_eq5.gif)
2929

30-
![](samples/readme_eq6.gif)
30+
![](docs/readme_eq6.gif)
3131

3232
This process can be run iteratively, selecting correspondent points by different criteria (neighbourhood, random search...), until convergence.
3333

3434
## Dependencies
35-
[Eigen](http://eigen.tuxfamily.org) is the only external dependency required on your system. [Nanoflann](https://github.com/jlblancoc/nanoflann) is included in the project.
35+
This project attempts to use the minimal dependencies as possible, and those are self-contained in the project when possible.
3636

37-
A real test executable is provided, allowing to register any desired pair of point clouds (only .obj format supported at the moment). The PointCloud class uses [TinyObjLoader](https://github.com/syoyo/tinyobjloader) (header included) for parsing OBJ files, and the PlainICP executable requires [Boost](https://www.boost.org/) for parsing external arguments.
37+
* [Nanoflann](https://github.com/jlblancoc/nanoflann) for KDTree-based correspondences search. Self-contained.
38+
* [TinyObjLoader](https://github.com/syoyo/tinyobjloader) for OBJ file parsing. Self-contained.
39+
* [googletest](https://github.com/google/googletest) for Unit testing. Self-contained (downloads and installs automatically).
40+
* [Eigen](http://eigen.tuxfamily.org) for matrix manipulation and SVD computation. Required on your system.
41+
* [Boost](https://www.boost.org/) just for parsing command-line arguments into the PlainICP executable. Required on your system.
3842

3943
## Usage
40-
Just include the ICP class header on your project.
41-
42-
Check the provided cmake project for compiling an executable which shows how to use the class:
44+
Make sure Eigen and Boost are installed on your system and compile the full project:
4345

4446
```
47+
sudo brew install eigen boost # For OsX
48+
sudo apt-get install libeigen3-dev libboost-all-dev # For Linux apt based distros
49+
4550
mkdir ./build
4651
cd ./build
4752
cmake ..
@@ -51,15 +56,21 @@ make
5156
Sample call with provided sample OBJ files:
5257

5358
```
54-
./PlainICP --source-obj-file ../samples/bunny_head.obj --target-obj-file ../samples/bunny.obj --transformed-obj-file ../samples/aligned_bunny_head.obj --tolerance 0.0005 --verbose 1
59+
./PlainICP --source-obj-file ../test/data/bunny_head.obj \
60+
--target-obj-file ../test/data/bunny.obj \
61+
--transformed-obj-file ../test/data/aligned_bunny_head.obj \
62+
--tolerance 0.005 \
63+
--verbose 1
5564
```
5665

66+
If you want to integrate the ICP implementation into your project, just copy the headers into your source code.
67+
5768
## Testing
58-
Unit testing using [googletest](https://github.com/google/googletest) is provided (Google Test dependency is automatically installed and self-contained within the project). Run the following target in the build directory:
69+
Unit testing is provided. Run the following target in the build directory:
5970

6071
```
6172
make build_and_test
6273
```
6374

6475
## License
65-
This software release is primarily [MIT](https://opensource.org/licenses/MIT) licensed. Some files contain third-party code under other licens
76+
This software release is primarily [MIT](https://opensource.org/licenses/MIT) licensed. Some files contain third-party code under other license.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/data/aligned_bunny_head.mtl

Whitespace-only changes.

0 commit comments

Comments
 (0)