手相,大众cc,蛋糕图片-树木新闻,每一条新闻都在为你供氧

admin 2019-05-16 阅读:311

传奇微课原创首发

一、源码下载地址

https://github.com/hirohe/facerec-python

二、开发文档

(1)简介

facerec-python

个人毕业设计 - 根据树莓派、OpenCV及Python言语的人脸辨认

运用OpenCV for Python图像辨认库,运转在树莓派RASPBIAN JESSIE Linux体系平台上,调配树莓派官方摄像头模块。

(2)运转要求

OpenCV 2.4.9 for Python

Python 2.7

v4l2

PyQt4

(3)装置要求

sudo apt-get install build-essential cmake pkg-config python-dev libgtk2.0-dev libgtk2.0 zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libjasper-dev libavcodec-dev swig unzip

1. 启用v4l2

sudo nano /etc/modules

# 添加一行记载

bcm2835-v4l2

# 重启后能够找到/dev/video0

# 编译v4l2-util

apt-get install autoconf gettext libtool libjpeg8 libjpeg8-dev

git clone git://git.linuxtv.org/v4l-utils.git

cd v4l-utils/

sudo ./bootstrap.sh

./configure

make

sudo make install

2. 编译OpenCV 2.4.9

wget https://jaist.dl.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.9/opencv-2.4.9.zip

unzip opencv-2.4.9.zip

cd opencv-2.4.9/

cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_gpu=OFF -DBUILD_opencv_ocl=OFF

# 要使OpenCV敞开对v4l2的支撑 cmake之后要有以下输出

# V4L/V4L2: Using libv4l (ver 1.13.0)

sudo make

sudo make install

3.装置PyQt4

sudo apt-get install python-qt4

(3)运转

python main.py

(4)留意

该示例运转的屏幕分辨率为竖屏480 x 800,能够修正 /boot/config.txt 的以下装备

config.txt装备阐明

hdmi_cvt=800 480 60 6

hdmi_group=2

hdmi_mode=87

# 设置屏幕旋转视点

display_rotate=3