码迷,mamicode.com
首页 > 其他好文 > 详细

Inter IPP & Opencv + codeblocks 在centos 环境下的配置

时间:2019-08-10 21:22:29      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:uda   kernel   ESS   pua   install   setting   git   环境   gen   

一、先安装codeblocks

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm

wget http://rpm.jenslody.de/centos-jenslody.de-0.1-2.noarch.rpm

sudo rpm -Uvh epel-release-7*.rpm

sudo yum install wxGTK gcc gcc-c++ codeblocks

完成安装

 

二、下载IPP

https://registrationcenter.intel.com/zh/products/download

解压:    tar zxvf l_ipp_2018.4.274.tgz 

安装:   sudo ./install_GUI.sh

(参考:https://yang7229693.iteye.com/blog/985645)

 

三、安装opencv (参考:https://blog.csdn.net/qinglongzhan/article/details/81942935)

先装依赖:

sudo yum install cmake

sudo yum install gcc gcc-c++ kernel-devel 

sudo yum install gcc-gfortran

sudo yum install git

sudo yum install gtk2 gtk2-devel gtk2-devel-docs

sudo yum install gnome-devel gnome-devel-docs 

sudo yum install python-devel numpy

sudo yum install libdc1394-devel

sudo yum install libv4l-devel

sudo yum install gstreamer-plugins-base-devel

 

https://opencv.org/releases/

unzip opencv-3.4.7

cd opencv -3.4.7
mkdir build
cd build


cmake -D WITH_TBB=ON -D WITH_EIGEN=ON ..
cmake -D BUILD_DOCS=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF ..
cmake -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF ..
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

make
sudo make install

 

 

cd /etc/ld.so.conf.d

sudo /bin/bash -c ‘echo "/usr/local/lib64" > /etc/ld.so.conf.d/opencv.conf‘

sudo ldconfig

 

sido gedit /etc/bashrc

添加: 

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

export PKG_CONFIG_PATH

source /etc/bashrc

sudo updatedb

sudo cp -r /usr/local/lib64/pkgconfig /usr/lib/pkgconfig

测试,成功。

 

四、配置codeblocks,添加opencv库

新建空工程

右击项目名称,选build options

依次点击:Search directories->Complier->Add,选择头文件所在目录,添加头文件路径:

 /usr/local/include

/usr/local/include/opencv

/usr/local/include/opencv2

 

点击Linker->Add,选择lib库路径,添加路径:

/usr/local/lib64

 

点击 Linker settings,添加相应库文件,所有lib库文件全部添加进去

 

五、配置codeblocks,添加IPP库

右击项目名称,选build options

依次点击:Search directories->Complier->Add,选择头文件所在目录,添加头文件路径:

 

/opt/intel/compilers_and_libraries_2018.5.274/linux/ipp/include

 

点击Linker->Add,选择lib库路径,添加路径:

/opt/intel/compilers_and_libraries_2018.5.274/linux/ipp/lib/intel64_lin

 

点击 Linker settings,添加相应库文件,所有lib库文件全部添加进去(.so)

注意!不要把.a文件添加进去

 

Inter IPP & Opencv + codeblocks 在centos 环境下的配置

标签:uda   kernel   ESS   pua   install   setting   git   环境   gen   

原文地址:https://www.cnblogs.com/dzzy/p/11332907.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!