ros_kinect人脸识别face_recognition



1.下载

$ cd ~/catkin_ws/src
$ git clone https://github.com/procrob/procrob_functional.git --branch catkin
$ cd ~/catkin_ws
$ catkin_make
$ source ~/catkin_ws/devel/setup.bash


1.1文件说明:

data文件夹内是训练图片;

train.txt --- 训练名单列表,有人和图片的对应关系;

facedata.xml --- 运行程序后生成的Eigenface数据库;

haarcascade_frontalface_alt.xml --- haarcascade classifier


1.2参数说明:

为使接受kinect的图像话题,将cpp文件里“/camera/image_raw"改为“/camera/rgb/image_color“

confidence_value(double, default = 0.88) 信任度大于0.88才能被识别

show_screen_flag(boolean, default = true)是否显示到屏幕

add_face_number(int, default = 25) 训练图片数量



2.运行

roscore
roslaunch openni_launch openni.launch 打开kinect


rosrun face_recognition Fserver
rosrun face_recognition Fclient

获取训练样本,当样本数量够25个时视频停止:

rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 2 "your_name"
从新训练并更新数据库:
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 3 "none"
继续,实现人脸识别。
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 1 "none"

新添样本:
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 2 "your_friend's_name"

一次只识别一个:
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 0 "none"
视频继续识别:
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 1 "none" 
退出:
rostopic pub -1 /fr_order face_recognition/FRClientGoal -- 4 "none" 

参考http://wiki.ros.org/face_recognition


你可能感兴趣的:(opencv,ROS,Kinect)