GithubHelp home page GithubHelp logo

hirohe / facerec-python Goto Github PK

View Code? Open in Web Editor NEW
283.0 13.0 94.0 8.06 MB

个人毕业设计 - 基于树莓派、OpenCV及Python语言的人脸识别

Python 99.61% CSS 0.39%
facerec opencv raspberry-pi facerecognition python pyqt4

facerec-python's Introduction

!该项目已停止维护!

facerec-python

个人毕业设计 - 基于树莓派、OpenCV及Python语言的人脸识别

简介

使用OpenCV for Python图像识别库,运行在树莓派RASPBIAN JESSIE Linux系统平台上,搭配树莓派官方摄像头模块。

运行要求

  1. OpenCV 2.4.9 for Python
  2. Python 2.7
  3. v4l2
  4. PyQt4

安装要求

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
  1. 安装PyQt4
sudo apt-get install python-qt4
  1. 运行
python main.py

注意

该示例运行的屏幕分辨率为竖屏480 x 800,可以修改 /boot/config.txt 的以下配置

config.txt配置说明

hdmi_cvt=800 480 60 6
hdmi_group=2
hdmi_mode=87
# 设置屏幕旋转角度
display_rotate=3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.