安装相关软件包 OpenCV eigen pangolin pcl

安装相关软件包 OpenCV eigen pangolin pcl

版本: ubuntu18.04 OpenCV

sudo apt install  build-essential
sudo apt install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev  
sudo apt install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

第三行中,可能会出现 无法定位软件包libjasper-dev 的错误提示

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt upgrade
sudo apt install libjasper1 libjasper-dev

其中 libjasper1 是 libjasper-dev 的依赖包

2.获取Source

接下来获取 OpenCV 的 source 文件,直接到官网下载:https://opencv.org/releases/

这里我们用的是3.4版本

3.用 CMake 从 Source 构建 OpenCV

进入解压出来的OpenCV-3.4.x文件夹,创建一个新文件夹,创建 build文件

启动终端,输入

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. 

之后

sudo make

再之后

sudo make install 

CMakeLists.txt调用格式

find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries( xxxx ${OpenCV_LIBS} )

参考网址:参考网址:链接: https://blog.csdn.net/qq_36486890/article/details/97511295.

2. Pangolin

1.安装相关软件包

git clone https://github.com/stevenlovegrove/Pangolin.git

2.依赖安装

sudo apt-get install libglew-dev
sudo apt-get install cmake
sudo apt-get install libpython2.7-dev
sudo apt-get install ffmpeg libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavdevice-dev
sudo apt-get install libdc1394-22-dev libraw1394-dev
sudo apt-get install libjpeg-dev libpng12-dev libtiff5-dev libopenexr-dev

3.编译

cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .

参考网址:链接: https://blog.csdn.net/weixin_44354586/article/details/89399289.

3. Engin3

sudo apt-get install libeigen3-dev

调用

include_directories("/usr/include/eigen3")

PLC安装库

下载

git clone https://github.com/PointCloudLibrary/pcl pcl-trunk

编译安装

cd pcl-trunk && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make -j2
sudo make -j2 install

你可能感兴趣的:(opencv,ubuntu,slam)