## 5 The Emotion Detection Visual-Based Component: GEFA
### Complete Solutions That Integrate Face Detection, Feature Extraction and Emotion Classification  
There are several works that present the three phases needed to detect emotions visually (face detection, features extraction and emotion classification) [76, 88]. They obtain improvements in their results thanks to the use of automatic learning techniques and databases with a large number of samples. Nevertheless, they do not give any information about source codes,or user libraries to check their results.  
In a recent work (2011), [PERSON] [89] presents a visual tool called CERT [90], which allows emotion classification in real-time (six emotions) and the detection of 19 FACS AUs. For the feature extraction, this tool uses the approach based on interest points (local approximation), and for the classification of each possible AU, it uses a Support Vector Machine (SVM) algorithm. The developers claim success rates between 80% and 90.1% for the emotion recognition online. Moreover, this tool is provided with a head-pose detector for emotion recognition in different poses (see Figure 5). The valid range for _roll_ (tilting side to side or turning on the imaginary axis that connects the nape with his nose) is \(-9^{\circ}\) to \(9^{\circ}\), for _pitch_ (tilting forward and backward or turning on the imaginary axis that connects both ears) is \(-8^{\circ}\) to \(15^{\circ}\) and for _yaw_ (turning left and right or turning on the imaginary axis that connects the neck with the crown) is \(-25^{\circ}\) to \(25^{\circ}\).  
Another interesting work is the one presented by the Fraunhofer Institute for Integrated Circuits (Erlangen, Germany), where the library, sophisticated high-speed object recognition engine (SHORE),  
Figure 5: Rotation parameters: roll, pitch and yaw.  
is presented [91; 92; 94]. This software package is able to detect faces with low CPU consumption and robustness regarding illumination changes. Moreover, it is able to track the position and orientation of users faces. In order to do this, it implements the following three face model types (holistic approach): _front_, _rotated_ and _profile_. The _front model_ is for interaction with roll, pitch and yaw values close to \"zero\". The _rotated model_ is for interaction with roll values between \(-60^{\circ}\) to \(60^{\circ}\) and, again, with pitch and yaw close to \"zero\". Finally, the _profile model_ is for interaction with pitch and yaw values not close to \"zero\". The detection rate in the _front type_ is much higher than the ones of the other models, and the false detection rate is respectively lower. Apart from the user emotion detection, SHORE is able to identify users and to detect gender and age. A demo of the software can be downloaded from [93].  
In our work, after reviewing the literature and testing several available libraries, the presented CERT and SHORE tools have been selected to build the GEFA module. Both of them have been integrated in our system as Robotic Operative System (ROS) nodes that use the ROS communication facilities. Due to the limitations of CERT and SHORE, the interaction system (RDS) should always try to place the robot in front of the user in order to improve the success rates.  
We have observed that the face detection and the emotion classification of CERT work up to a 2 m distance between the camera and the user; within this range, there are no differences in the the classification accuracy. However, if the interaction distance is bigger than 2 m, the face is lost, and the system does not work properly. This is independent of the resolution of the camera used, since this happens in the same way when using low resolution (1.3 megapixels) and high resolution cameras (15 megapixels). In the case of the software package, SHORE, the maximum interaction distance is about 4.5 m. Again, the success rate, within this distance, is not affected by the interaction distance or the resolution of the camera.