当前位置:网站首页>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
边栏推荐
- Interaction of diet gut microbiota on cardiovascular disease
- Youqilin 22.04 lts version officially released | ukui 3.1 opens a new experience
- Basic operation of sequence table
- Gut liver axis: host microbiota interaction affects hepatocarcinogenesis
- The 14th issue of HMS core discovery reviews the long article | enjoy the silky clip and release the creativity of the video
- Spark small case - RDD, spark SQL
- 那些年我面试过的Android开发岗总结(附面试题+答案解析)
- Basic use of shell WC (counting the number of characters)
- Brushless motor drive scheme based on Infineon MCU GTM module
- Apache Bench(ab 压力测试工具)的安装与使用
猜你喜欢
Installation du compilateur croisé de la plateforme zynq
Key points of AWS eks deployment and differences between console and eksctl creation
[paper reading] [3D object detection] voxel transformer for 3D object detection
Teach you how to build the ruoyi system by Tencent cloud
520. Detect capital letters
简单的拖拽物体到物品栏
Simply drag objects to the item bar
383. 赎金信
test
zynq平台交叉编译器的安装
随机推荐
解决ValueError: Argument must be a dense tensor: 0 - got shape [198602], but wanted [198602, 16].
Innovative practice of short video content understanding and generation technology in meituan
leetcode007--判断字符串中的括号是否匹配
Microbial neuroimmune axis -- the hope of prevention and treatment of cardiovascular diseases
基于英飞凌MCU GTM模块的无刷电机驱动方案开源啦
Installation du compilateur croisé de la plateforme zynq
Druid -- JDBC tool class case
Installation and deployment of Flink and wordcount test
Small volume Schottky diode compatible with nsr20f30nxt5g
Recommended scheme for national production of electronic components for wireless charging
Inverse system of RC low pass filter
Redis command Encyclopedia
Redis 命令大全
selenium模式下切换窗口,抓取数据的实现
Alibaba tip: it is better to create threads manually
补:注解(Annotation)
Migrate from MySQL database to AWS dynamodb
Huawei machine test -- high precision integer addition
520.检测大写字母
Leetcode006 -- find the longest common prefix in the string array