笔记ROS_face recognition using Kinect

41 篇文章 1 订阅

http://wiki.ros.org/face_recognition

$ cd ~/catkin_ws/src
$ git clone https://github.com/procrob/procrob_functional.git --branch catkin //下载程序包,完成后可见在 cd ~/catkin_ws/src下有procrob_functional文件夹
$ cd ~/catkin_ws
$ catkin_make    //编译
$ source ~/catkin_ws/devel/setup.bash

在data文件夹中是训练样本,可添加新的样本。之后按格式修改train.txt。

Training images are stored in the data directory.
Training images are listed in the train.text file.
The 'train.txt' follows a specific format which is best understood by looking at the exampletrain.txt file provided in the package. Note that person numbers start from 1, and spaces or special characters are not allowed in persons' names).
The program trains from the training examples listed in thetrain.txt and create an Eigenfaces database which is stored in thefacedata.xml file.
Face detection is performed using a haarcascade classifier (haarcascade_frontalface_alt.xml).
The data folder, and train.txt, facedata.xml and haarcascade_frontalface_alt.xmlfiles should be placed in the program's working directory (i.e. the directory from which you execute the program).

When the face_recognition program starts:
Iffacedata.xml exists, the Eigenfaces database is loaded from facedata.xml.
If facedata.xml does not exist, the program tries to train and create Eigenfaces database from the training images listed intrain.txt, if any.//所yi要先删除facedata.xml

Regardless of if the Eigenfaces database is loaded/created at start up or not, you can always add training images directly from the video stream and then update the Eigenfaces database by (re)training.
Note: when the program (re)trains, the content of facedata.xml is disregarded and the program trains only based on the training images listed in train.txt.

打开新终端

$roscore

$roslaunch openni_launch openni.launch  //打开kinect

打开新终端

rosrun image_view image_view image:=/camera/rgb/image_color //打开彩色摄像头

在另外的终端

$ cd ~/catkin_ws
$ source ~/catkin_ws/devel/setup.bash

$ roscd face_recognition
$ rosrun face_recognition Fserver

在新终端

$ cd ~/catkin_ws
$ source ~/catkin_ws/devel/setup.bash

$ rosrun face_recognition Fclient

  • In another terminal publish following messages on topic /fr_order to test different face recognition functionalities.
  • After each command notice the output of Fserver and Fclient.

$ rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 2 "your_name"

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值