A face tracker based on the Haar detector.
More...
A face tracker based on the Haar detector.
Copyright (C) 2009 RobotCub Consortium
Author: Ugo Pattacini
CopyPolicy: Released under the terms of the GNU GPL v2.0.
Description
This module uses the OpenCV Haar detector in order to find a face in front of the robot. Once detected it sends out data to control the head motion for tracking through the iKinGazeCtrl module and also to move the hand to point at the gazing location through the iKinArmCtrl module.
The robot will gaze around until it will find a face and then it will remain on the last detected face (even in presence of more than one).
- Note:
- A video on iCub tracking a face can be seen here.
Dependencies
- YARP libraries.
- OpenCV libraries
Parameters
--name modName
- The parameter modName identifies the stem-name of the open ports.
--period T
- The integer T specifies the module period in [ms].
--eye sel
- The parameter sel selects the used eye: it can be "left" or "right".
--arm sel
- The parameter sel selects the arm used for pointing: it can be "left" or "right".
--eyeDist d
- The double d specifies the fixed distance of the recognized face from the selected eye (to be passed to the iKinHead module).
--holdoff dT
- The double dT specifies the temporal window after a detected top-down input during which the "search-for-face" stage is disabled.
--descriptor fileName
- The parameter fileName identifies the description file for the Haar detector.
Ports Accessed
/icub/cam/left /icub/cam/right /iKinGazeCtrl/head/x:o /eyeTriangulation/rpc /icub/face/emotions/in
Ports Created
- /faceTracker/img:i receives the image.
- /faceTracker/gazeat:o sends out the target 3-d component of the new fixation point (to be connected to the iKinGazeCtrl module).
- /faceTracker/reach:o sends out the target 3-d component of the new fixation point (to be connected to the iKinArmCtrl module for reaching purpose).
- /faceTracker/img:o sends out the image acquired from the left camera with a superimposed rectangle which identifies the detected face (to be connected to a viewer).
- /faceTracker/get3D:rpc sends a request to the iKinHead module in order to retrieve the 3d location of the face, knowing the its 2d location in the image plane.
- /faceTracker/topdown:i receives as input the couple u-v identifying a point where to direct the gaze that is selected through a click in the viewer
- /faceTracker/setFace:rpc commands the facial expressions.
Input Data Files
The description file for the Haar detector.
Output Data Files
None.
Tested OS
Windows, Linux
- Author:
- Ugo Pattacini