安裝OPENCV
安裝OPENCV
---------------------------
安裝依賴項
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
---------------------------
下載OPENCV建立資料夾目錄
git clone https://github.com/opencv/opencv.git
cd ~/opencv
mkdir build
cd build
---------------------------
配置CMAKE
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
----------------------------
編譯
make -j8
----------------------------
安裝
sudo make install
---------------------------
配置環境變量
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
打開profile
sudo gedit /etc/profile
貼上
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
存檔
這樣基本上就完成OPENCV的安裝
---------------------------
安裝依賴項
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
---------------------------
下載OPENCV建立資料夾目錄
git clone https://github.com/opencv/opencv.git
cd ~/opencv
mkdir build
cd build
---------------------------
配置CMAKE
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
----------------------------
編譯
make -j8
----------------------------
安裝
sudo make install
---------------------------
配置環境變量
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
打開profile
sudo gedit /etc/profile
貼上
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
存檔
這樣基本上就完成OPENCV的安裝
留言
張貼留言