ubuntu+OpenCV更新
https://blog.csdn.net/cocoaqin/article/details/78163171
1、更换国内源,不然下载文件太慢会终止
/etc/apt/sources.list 文件内容改为下面的阿里云
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
2、更新下 sudo apt-get update
3、下载opencv.zip文件用unzip命令解压(最好不要在windows下解压)
unzip opencv-3.4.1.zip
4、安装依赖项
sudo apt-get install cmake
sudo apt-get install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg.dev libtiff4.dev libswscale-dev libjasper-dev
///////////////之后和ubuntu下运行一个C++程序一样///////
5、在opencv目录下新建build文件
6、在build文件下cmake,产生makefile文件
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
7、安装makefile文件编译
sudo make
sudo make install
8、之后就是配置了
sudo gedit /etc/ld.so.conf.d/opencv.conf
加入/usr/local/lib
9、sudo ldconfig # 使配置生效
10、sudo vim /etc/bash.bashrc
# 末尾加入
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
# 保存退出
sudo source /etc/bash.bashrc #使配置生效
( 这一步需要在root中进行操作)
sudo updatedb #更新database
报错:Ubuntu cmake error:Could not find a package configuration file provided by "OpenCV"
解决方案:
locate OpenCVConfig.cmake
在CmakeLists.txt中添加:
set(OpenCV_DIR home/haha/opencv)
说明:home/haha/opencv 为OpenCVConfig.cmake所在路径
cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_ENABLE_NONFREE=ON \
-D INSTALL_PYTHON_EXAMPLES=NO \
-D INSTALL_C_EXAMPLES=ON \
-D ENABLE_PRECOMPILED_HEADERS=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.1.2/modules \
-D BUILD_opencv_world=NO \
-D BUILD_SHARED_LIBS=OFF \
-D BUILD_DOCS=NO \
-D BUILD_TESTS=NO \
-D BUILD_PERF_TESTS=NO \
-D BUILD_opencv_java=NO ..
Ubuntu 16.04 + Qt 5.11 +opencv 3.4完美配置(亲测,最简单完美的方法)
https://blog.csdn.net/wanzhen4330/article/details/82622664
这个月课程汇总(10天opencv学习,10天项目实战)
1、opencv学习(10天)
2、项目实战(检测、定位、车牌识别)
3、QT界面设计
4、QT通信
5、项目移植和打包
arm linux
0、环境的搭建(ubuntu下opencv安装和qt的安装)
图像的认识
1.1环境的搭建 https://blog.csdn.net/wanzhen4330/article/details/82622664
1、安装opencv opencv更新.txt
2、安装qt https://blog.csdn.net/wuweifeng_2017/article/details/78322249
3、实现ubuntu下qt+opencv读图片显示图片
1.2linux 下CmakeLists语法规则
读图片、显示、视频
像素的操作
读
修改
遍历
图像混合
(自用)