ubuntu16.04下安装Sophus

git clone https://github.com/strasdat/Sophus.git

下载完成后

cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make
sudo make install

 

Sophus库的使用,为了编译他,请在cmake工程中的CMakeLists.txt文件中添加以下内容

# 寻找Sophus库
find_package( Sophus REQUIRED )

# 添加头文件路径
include_directories( ${Sophus_INCLUDE_DIRS} )

add_executable(   xxx xxx.cpp)

#链接库
target_link_libraries( xxx ${Sophus_LIBRARIES} )

 

posted @ 2018-03-21 20:21  feifanren  阅读(3385)  评论(0编辑  收藏  举报