当前位置:网站首页>Raspberry pie + opencv + opencv -- face detection ------- environment construction
Raspberry pie + opencv + opencv -- face detection ------- environment construction
2022-04-23 04:43:00 【Vivid_ Mm】
Make it clear in advance , The environment version I built is 2.4.9( Very old version , They all have basic functions ) Source code installation .
1. Install dependent files
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libgtk2.0-dev
sudo apt-get install pkg-config
sudo apt-get install python-dev python-numpy
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev
2. Download the source file
1. Create a new one in your home directory opencv( It's just a name , What name do you like to call , No effect , Here we use opencv Instead of ) Folder
2. Then download opencv Source code
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download opencv-2.4.9.zip ( This is the source code URL)
You can download raspberry tour directly , Download and move to opencv In the folder
3. decompression upzip opencv-2.4.9.zip
3. compile
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
sudo ldconfig
stay cmake There will be problems in the process , But there will be solutions !
The first error message :
/home/hiscene/Downloads/opencv-2.4.8.3/modules/contrib/src/chamfermatching.cpp:969:30: error: the compiler can assume that the address of ‘annotate_img’ will never be NULL [-Werror=address]
if (&annotate_img!=NULL) {
^
/home/hiscene/Downloads/opencv-2.4.8.3/modules/contrib/src/chamfermatching.cpp:1016:34: error: the compiler can assume that the address of ‘annotate_img’ will never be NULL [-Werror=address]
if (&annotate_img!=NULL) {
^
/home/hiscene/Downloads/opencv-2.4.8.3/modules/contrib/src/chamfermatching.cpp: In member function ‘cv::ChamferMatcher::Match* cv::ChamferMatcher::Matching::localChamferDistance(cv::Point, cv::Mat&, cv::Mat&, cv::ChamferMatcher::Template*, float)’:
/home/hiscene/Downloads/opencv-2.4.8.3/modules/contrib/src/chamfermatching.cpp:1111:25: error: the compiler can assume that the address of ‘orientation_img’ will never be NULL [-Werror=address]
AM_CFLAGS = -Wall -g $(MATCHBOX_PANEL_CFLAGS) \
-I$(top_srcdir) -I$(top_builddir) -Werror
It means -Werror Get rid of
however opencv It's dependence cmake Compilation of , So according to the error information, you enter the corresponding directory , stay flags.make Found in the file -Werror=address, Remove it , Then save , Recompile is successful .
flags.make Files can be found directly in file management .
The second error message :
usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: There is no file or directory
cmake -D CMAKE_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local.. -DENABLE_PRECOMPILED_HEADERS=OFF
This is the problem I encountered in compiling , If there is anything wrong , Welcome to point out !
I'll post the code I use later , For your reference .
If you are downloading installation files or The download speed is very slow when installing dependency , It is suggested that you can replace apt Source ( That is, the software source ), Here is my software source For your reference :
1 deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib
2 deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib
This path is in :/etc/apt modify sources.list file ( Need to add root Permission or direct sudo )
Finished saving , Remember to update it :
sudo apt-get update
sudo apt-get -y uograde
The first one above Alibaba cloud platform , The second is the mirror station of Tsinghua University , Download speed bar .
Use python Words , If you use pip If you want to manage your files , It is suggested that pip Source , Here is also my pip Source , For your reference :
1 [global]
2 index-url = https://pypi.tuna.tsinghua.edu.cn/simple
3 [install]
4 trusted-host=mirrors.aliyun.com
This path is in :/home/pi/.pip(.pip Folder ) modify pip.conf file ( If you don't have one, just create one )
It's the same here , The first one is from Tsinghua University , The second is Ali's
May you , Don't innovate just because “ Speed ” And embarrassed !!!
版权声明
本文为[Vivid_ Mm]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220558084732.html
边栏推荐
- Spark optimization
- 383. 赎金信
- IEEE Transactions on systems, man, and Cybernetics: Notes for systems (TSMC)
- test
- Shanghai Hangxin technology sharing 𞓜 overview of safety characteristics of acm32 MCU
- Supplement 14: cmake practice project notes (to be continued 4 / 22)
- io. Platform. packageRoot; // ignore: deprecated_ Member_ use
- No such file or directory problem while executing shell
- What is the meaning of load balancing
- shell wc (统计字符数量)的基本使用
猜你喜欢

zynq平台交叉编译器的安装

Programmers complain: I really can't live with a salary of 12000. Netizen: how can I say 3000

递归调用--排列的穷举

Mysql50 basic exercises

Brushless motor drive scheme based on Infineon MCU GTM module

Record the ThreadPoolExecutor main thread waiting for sub threads

QML进阶(四)-绘制自定义控件

那些年我面试过的Android开发岗总结(附面试题+答案解析)

Jetpack 之 LifeCycle 组件使用详解

520. Detect capital letters
随机推荐
Open the past and let's start over.
Shanghai Hangxin technology sharing 𞓜 overview of safety characteristics of acm32 MCU
数据孤岛是什么?为什么2022年仍然存在数据孤岛?
Recommended scheme for national production of electronic components of wireless keyboard
Fusobacterium -- symbiotic bacteria, opportunistic bacteria, oncobacterium
重剑无锋,大巧不工
Recommended scheme for national production of electronic components for wireless charging
Installation of zynq platform cross compiler
Flink's important basics
Small volume Schottky diode compatible with nsr20f30nxt5g
Recursive call -- Enumeration of permutations
Spark small case - RDD, broadcast
unity摄像机旋转带有滑动效果(自转)
thymeleaf th:value 为null时报错问题
[timing] empirical evaluation of general convolution and cyclic networks for sequence modeling based on TCN
做数据可视化应该避免的8个误区
2020 is coming to an end, special and unforgettable.
229. Find mode II
QML advanced (V) - realize all kinds of cool special effects through particle simulation system
What's the difference between error and exception