ubuntu opencv采坑


[compiler] sudo apt-get install build-essential

[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev


cd ~/

git clone https://github.com/opencv/opencv.git

git clone https://github.com/opencv/opencv_contrib.git

cd ~/opencv

复制.cache文件夹到此目录

.链接:https://pan.baidu.com/s/1As_m86Y44xLtHP4XLKzeFA 密码:9yc5

├── ./data

│   └── ./data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat

├── ./ippicv

│   └── ./ippicv/b7cc351267db2d34b9efa1cd22ff0572-ippicv_2017u3_lnx_intel64_general_20180518.tgz

└── ./xfeatures2d

    ├── ./xfeatures2d/boostdesc

    │   ├── ./xfeatures2d/boostdesc/0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i

    │   ├── ./xfeatures2d/boostdesc/0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i

    │   ├── ./xfeatures2d/boostdesc/202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i

    │   ├── ./xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i

    │   ├── ./xfeatures2d/boostdesc/324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i

    │   ├── ./xfeatures2d/boostdesc/98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i

    │   └── ./xfeatures2d/boostdesc/e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i

    └── ./xfeatures2d/vgg

        ├── ./xfeatures2d/vgg/151805e03568c9f490a5e3a872777b75-vgg_generated_120.i

        ├── ./xfeatures2d/vgg/7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i

        ├── ./xfeatures2d/vgg/7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i

        └── ./xfeatures2d/vgg/e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i

mkdir build

cd build

最大的麻烦就是C++11按照这个cmake进行安装

cmake -DCMAKE_BUILD_TYPE=Release  -D ENABLE_PRECOMPILED_HEADERS=OFF -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules/   -D CMAKE_CXX_FLAGS=-std=c++11 -D CMAKE_INSTALL_PREFIX=/usr/local ..

make -j7

sudo make install

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值