*Note:* This project is a photogrammetric system for dendrometric feature estimation of individual trees. The purpose of this project is to do a 3D reconstruction of an individual tree using Open Multiple View Geometry (openMVG) and get dendrometry estimation (diameter at breast height (DBH), tree crown height, total tree height, crown volume, morphic factor and percentage canopy missing) of a stem tree. For that, were used OpenMVG and PMVS for 3D Mapping, a circular pattern for scale factor estimation, PCL Library and DBScan for segmentation and Euclidean distance for dendrometric feature estimation.
To build use CMake minimum required 3.5.1 : https://github.com/Kitware/CMake or:
$ sudo apt-get install cmake && cmake-gui && openssl && git -> This install cmake-3.5.1
- https://docs.google.com/spreadsheets/d/1cs-I-1BxetnAPiWe4e07TfKXyPMTo7x_rN72FC26kHU/edit?usp=sharing
-
Eigen3: http://eigen.tuxfamily.org/index.php?title=Main_Page
-
Glut (OpenGL):
$ sudo apt-get install libglu1-mesa-dev $ sudo apt-get install freeglut3-dev $ sudo apt-get install mesa-common-dev if(OpenGL not found): OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
-
Blas and Lapack:
$ sudo apt-get install liblapack-dev && libblas-dev $ sudo apt-get install libgoogle-glog-dev
-
OpenBLAS:
$ sudo apt-get install libopenblas-dev
-
Boost:
$ sudo apt-get install libboost-all-dev
-
Cereal:
$ sudo apt-get install gcc-multilib g++-multilib $ Download the source code, compile and install: https://github.com/USCiLab/cereal
-
Flann:
$ sudo apt-get install liblz4-dev $ sudo apt-get install libhdf5-dev $ sudo apt-get install libgtest-dev (for gtest) cd /usr/src/gtest sudo cmake CMakeLists.txt sudo make cd /usr/src/gtest/lib sudo cp *.a /usr/lib create a gtest folder in usr/local/lib sudo ln -s /usr/lib/libgtest.a /usr/local/lib/gtest/libgtest.a sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/gtest/libgtest_main.a Edit CMakeLists.txt on flann/src/cpp/CMakeLists.txt and replace: add_library(flann_cpp SHARED "") -> add_library(flann_cpp SHARED "main.cpp") Create a main.cpp file at the samen directory set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") $ https://github.com/mariusmuja/flann -> compile and install
-
TinyXML2: https://github.com/leethomason/tinyxml2 -> compile and install
-
GTK2.0:
$ sudo apt-get install libgtk2.0-dev
-
GTK 3.0:
$ sudo apt-get install build-essential libgtk-3-dev
-
QT creator:
$ sudo apt-get install qtcreator $ sudo apt-get install git build-essential qt5-default qtscript5-dev libssl-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev libsdl2-dev libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-jackd2-dev libxrandr-dev libqt5xmlpatterns5-dev libqt5xmlpatterns5 libqt5xmlpatterns5-private-dev
-
VTK:
$ sudo apt-get install libxt-dev $ sudo apt-get install xorg $ sudo apt-get install qhull-bin $ sudo apt-get install libqhull-dev $ sudo apt-get install libxt-dev https://github.com/Kitware/VTK
-
CMVS-PMVS: https://github.com/pmoulon/CMVS-PMVS
For this project it is necessary to have compiled the following libraries (it is not necessary to have installed):
- OpenCV 3.4.1: https://github.com/opencv/opencv/tree/3.4.1
- PCL 1.8.1 or 1.9.1: https://github.com/PointCloudLibrary/pcl/tree/pcl-1.8.1
Note: Just set the path to the build directory of each library in the principal CMakeList.txt
This project depends of openMVG, PCL, OpenCV, Qt and CMVS-PMVS, please compile the dependencies before.
- Download the src code and Unpack .zip
/src:
iTree3DMap - include
- libraries
- src
- CMakeLists.txt
- main.cpp
- Once OpenMVG was compiled, just set the path build directory in the CMakeList.txt
- Edit the "SfM_SequentialPipeline.py" file in the project build directorie (ItreeMapper_Build) with your own OpenMVG path directorie.
- If pmvs2 binary file is not working, download and compile the cmvs-pmvs library and replace the pmvs2 bin to /libraries folder of the package
Within build folder, compile with cmake:
cmake ../
make
cd /build/bin
./itree_3dmap
Note:
Just for OpenMVG compilation: If OpenMVG compiled without error and is not working; compile OpenMVG with this line:
cmake -DTARGET_ARCHITECTURE=generic ../src/
Extra packages:
- Canopy Missing C++ program for percentage canopy missing
- Pointcloud to Mesh channel C++ program to convert pcd to mesh
- Control image selector GUI interface for images
- Align point cloud C++ program for alignment pointcloud to axis
- DBScan C++ program for clustering 3D points in a space