版本: 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 的依赖包
接下来获取 OpenCV 的 source 文件,直接到官网下载:https://opencv.org/releases/
这里我们用的是3.4版本
进入解压出来的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.
git clone https://github.com/stevenlovegrove/Pangolin.git
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
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
参考网址:链接: https://blog.csdn.net/weixin_44354586/article/details/89399289.
sudo apt-get install libeigen3-dev
include_directories("/usr/include/eigen3")
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