Commit 2813091b authored by Clément Pinard's avatar Clément Pinard
Browse files

fix install dependencies script

 * fix README format problem
 * Change pcl util c++ programs to use c++ 14 instead of  c++11 (for PCL 1.10)
parent 691a34d2
...@@ -18,7 +18,9 @@ Apart from CUDA, which you need to install by yourself, you can use the help scr ...@@ -18,7 +18,9 @@ Apart from CUDA, which you need to install by yourself, you can use the help scr
For PDrAW, there should be a `native-wrapper.sh` file that you to keep a track of. It's usually in `groundsdk/out/pdraw-linux/staging/native-wrapper.sh`(see [here](https://developer.parrot.com/docs/pdraw/installation.html)) For PDrAW, there should be a `native-wrapper.sh` file that you to keep a track of. It's usually in `groundsdk/out/pdraw-linux/staging/native-wrapper.sh`(see [here](https://developer.parrot.com/docs/pdraw/installation.html))
## Hardaware dependecies For COLMAP, you will need a vocab tree for feature matching. You can download them at https://demuc.de/colmap/#download . In our tests, we took the 256K version.
## Hardware dependecies
To recreate the results of the study, you will need these hardware pieces : To recreate the results of the study, you will need these hardware pieces :
- Parrot Anafi - Parrot Anafi
...@@ -106,10 +108,10 @@ Here are the key steps of the dataset creation : ...@@ -106,10 +108,10 @@ Here are the key steps of the dataset creation :
Structure your input folder so that it looks like this: Structure your input folder so that it looks like this:
``` ```
├── Pictures ├── Pictures
   ├── anafi ├── anafi
   │   ├── raw ├── raw
   │   ├── rectilinear ├── rectilinear
   └── apn └── apn
├── Videos ├── Videos
│ ├── 4K30 │ ├── 4K30
│ └── 720p120 │ └── 720p120
...@@ -231,7 +233,7 @@ This will essentially do the same thing as the script, in order to let you chang ...@@ -231,7 +233,7 @@ This will essentially do the same thing as the script, in order to let you chang
--ImageReader.mask_path Path/to/images_mask/ \ --ImageReader.mask_path Path/to/images_mask/ \
``` ```
We also recommand you make your own vocab_tree with image indexes, this will make the next matching steps faster. We also recommand you make your own vocab_tree with image indexes, this will make the next matching steps faster. You can download a vocab_tree at https://demuc.de/colmap/#download : We took the 256K version in our tests.
``` ```
colmap vocab_tree_retriever \ colmap vocab_tree_retriever \
...@@ -507,7 +509,6 @@ This will essentially do the same thing as the script, in order to let you chang ...@@ -507,7 +509,6 @@ This will essentially do the same thing as the script, in order to let you chang
Importante note : This operation doesn't work for scale adjustments which can be a problem with very large models. Importante note : This operation doesn't work for scale adjustments which can be a problem with very large models.
Option 2 : construct a PLY file from lidar scans and register the reconstructed cloud with respect to the lidar, with PCL or CloudCompare. We do this way (and not from lidar to reconstructed), because it is usually easier to register the cloud with less points with classic ICP) Option 2 : construct a PLY file from lidar scans and register the reconstructed cloud with respect to the lidar, with PCL or CloudCompare. We do this way (and not from lidar to reconstructed), because it is usually easier to register the cloud with less points with classic ICP)
``` ```
ETHD3D/build/NormalEstimator \ ETHD3D/build/NormalEstimator \
-i /path/to/lidar.mlp \ -i /path/to/lidar.mlp \
...@@ -525,11 +526,10 @@ This will essentially do the same thing as the script, in order to let you chang ...@@ -525,11 +526,10 @@ This will essentially do the same thing as the script, in order to let you chang
Or use CloudCompare : https://www.cloudcompare.org/doc/wiki/index.php?title=Alignment_and_Registration Or use CloudCompare : https://www.cloudcompare.org/doc/wiki/index.php?title=Alignment_and_Registration
Best results were maintened with these consecutive steps : Best results were maintened with these consecutive steps :
- Crop the /path/georef_dense.ply cloud, otherwise the Octomap will be very inefficient, and the cloud usually has very far outliers - Crop the /path/georef_dense.ply cloud, otherwise the Octomap will be very inefficient, and the cloud usually has very far outliers
- Apply noise filtering on cropped cloud - Apply noise filtering on cropped cloud
- Apply fine registration, with final overlap of 50%, scale adjustment, and Enable farthest point removal - Apply fine registration, with final overlap of 50%, scale adjustment, and Enable farthest point removal
- save inverse of resulting registration - Save inverse of resulting registration
For the fine registration part, as said earlier, the aligned cloud is the reconstruction and the reference cloud is the lidar For the fine registration part, as said earlier, the aligned cloud is the reconstruction and the reference cloud is the lidar
......
#!/bin/bash #!/bin/bash
# This scrip helps you install the necessary tools to construct a depth enabled dataset with Anafi videos # This script helps you install the necessary tools to construct a depth enabled dataset with Anafi videos
# Note that CUDA needs to be already installed # Note that CUDA and Anaconda need to be already installed
# Also note that for repo to work, git needs to be parametrized with email and name.
# This command makes sure that the .so files pointed by the cmake commands are the right ones
# Alternatively, you can add conda to the cmake folders with the following command :
# CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
# Note that the alternative will trigger erros if you move or delete the anaconda folder.
eval "$(conda shell.bash hook)"
conda deactivate
sudo apt update sudo apt update
sudo apt install -y git \ sudo apt install -y git \
repo \ curl \
cmake \ cmake \
build-essential \ build-essential \
pkg-config \ pkg-config \
...@@ -19,11 +29,9 @@ sudo apt install -y git \ ...@@ -19,11 +29,9 @@ sudo apt install -y git \
qtbase5-dev \ qtbase5-dev \
libqt5opengl5-dev \ libqt5opengl5-dev \
libcgal-dev \ libcgal-dev \
libvtk6-dev \
libflann-dev \ libflann-dev \
cmake libgmp-dev \ cmake libgmp-dev \
libgoogle-glog-dev \ libgoogle-glog-dev \
qt5-default \
libqwt-qt5-dev \ libqwt-qt5-dev \
libpcl-dev \ libpcl-dev \
libproj-dev \ libproj-dev \
...@@ -36,9 +44,9 @@ sudo apt install -y git \ ...@@ -36,9 +44,9 @@ sudo apt install -y git \
git clone https://github.com/laurentkneip/opengv.git git clone https://github.com/laurentkneip/opengv.git
cd opengv \ cd opengv \
&& mkdir build \ && mkdir -p build \
&& cd build \ && cd build \
&& cmake .. && cmake .. \
&& make -j8 && make -j8
sudo make install sudo make install
cd ../../ cd ../../
...@@ -46,7 +54,7 @@ cd ../../ ...@@ -46,7 +54,7 @@ cd ../../
git clone https://github.com/opencv/opencv.git git clone https://github.com/opencv/opencv.git
cd opencv \ cd opencv \
&& git checkout 4.1.2 \ && git checkout 4.1.2 \
&& mkdir build \ && mkdir -p build \
&& cd build \ && cd build \
&& cmake -D WITH_CUDA=OFF .. \ && cmake -D WITH_CUDA=OFF .. \
&& make -j8 && make -j8
...@@ -64,9 +72,9 @@ cd dataset-pipeline \ ...@@ -64,9 +72,9 @@ cd dataset-pipeline \
git clone https://ceres-solver.googlesource.com/ceres-solver git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver \ cd ceres-solver \
&& git checkout $(git describe --tags) \ && git checkout $(git describe --tags) \
&& mkdir build \ && mkdir -p build \
&& cd build && cd build \
&& cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF && cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF \
&& make -j8 && make -j8
sudo make install sudo make install
cd ../../ cd ../../
...@@ -74,13 +82,19 @@ cd ../../ ...@@ -74,13 +82,19 @@ cd ../../
git clone https://github.com/colmap/colmap.git git clone https://github.com/colmap/colmap.git
cd colmap \ cd colmap \
&& git checkout dev \ && git checkout dev \
&& mkdir build && mkdir -p build \
&& cd build \ && cd build \
&& cmake .. \ && cmake .. \
&& make -j8 && make -j8
sudo make install sudo make install
cd ../../ cd ../../
mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo
conda activate
mkdir -p groundsdk \ mkdir -p groundsdk \
&& cd groundsdk \ && cd groundsdk \
&& repo init -u https://github.com/Parrot-Developers/groundsdk-manifest -m release.xml \ && repo init -u https://github.com/Parrot-Developers/groundsdk-manifest -m release.xml \
...@@ -90,4 +104,4 @@ cd ../ ...@@ -90,4 +104,4 @@ cd ../
pip install -r requirements.txt pip install -r requirements.txt
./build_pcl.sh ./build_pcl_util.sh
\ No newline at end of file \ No newline at end of file
cmake_minimum_required(VERSION 2.8 FATAL_ERROR) cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 14)
project(Parrot_photogrammetry_PCLutils) project(Parrot_photogrammetry_PCLutils)
find_package(PCL REQUIRED) find_package(PCL REQUIRED)
find_package(COLMAP REQUIRED) find_package(COLMAP REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fopenmp")
include_directories(${PCL_INCLUDE_DIRS}) include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS}) link_directories(${PCL_LIBRARY_DIRS})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment