Code source associated to IWCIA'20 paper: Digital hyperplane fitting
The program uses some C++ 11 feature, so we recommend the use of gcc 4.2 or later to compile. The program requires these libraries to be installed:
- Boost
- DGtal (To install DGtal see https://github.com/DGtal-team/DGtal/blob/master/README.md)
- Eigen3
- CGAL
- CMake 2.8.11
To install the program see INSTALL.txt file.
Three execution programs are generated after the complication:
- FittingLine for 2D fitting
- FittingPlane for 3D fitting
- FittingHyperplane for 4D fitting.
The program takes as input a file containing a list of points with the first line indicating the total number of point, and following by the coordinates of each point.
- Example for a file containing 2D points
10
1 10
1 26
3 3
3 42
4 18
4 34
8 6
8 39
9 25
10 11
- Example for a file containing 3D points
10
8 1 1
9 1 1
10 2 1
11 3 1
12 4 1
11 12 1
12 12 1
7 1 2
8 2 2
9 2 2
You can find more examples in Data/Data2D, Data/Data3D and Data/Data4D
- Run the program FittingLine for line fitting
./FittingLine points2D.txt
- Run the program FittingPlane for plane fitting
./FittingPlane points3D.txt
- Run the program FittingHyperplane for 4D hyperplane fitting
./FittingHyperplane points4D.txt