flann is a library for performing fast approximate nearest neighbor searches in high dimensional spaces.
apt-get install -y libflann-dev
Ref: 成功在Ubuntu 16.04環境中安裝 PCL 1.8.1 & python-pcl(Python 2.7.12 & Python 3.5.2).
First download flann.1.9.1.tar.gz
(or other versions) from its github repo, and then untar it.
Prerequisite:
Build:
mkdir build && cd build
cmake ..
make
make install
In cmake ..
, there could be an error:
No SOURCES given to target: flann_cpp
# ...
No SOURCES given to target: flann
Following heirecka's solution, a workaround is to create empty.cpp
under src/cpp
,
and then revise src/cpp/CMakeLists.txt
, change its
line 32:
add_library(flann_cpp SHARED "")
and line 86:
add_library(flann SHARED "")
to:
line 32:
add_library(flann_cpp SHARED empty.cpp)
and line 86:
add_library(flann SHARED empty.cpp)