scieee AI-readable full text Open interactive document viewer

Head pose estimation from 2D/3D images

Guàrdia Santesmases, Robert

Abstract

The purpose of the current work is to develop, test and compare different methods for the detection of the angles of the head. To achieve good head estimation this project has been divided in two stages. In the first stage, different face detection and tracking techniques have been implemented, as well as a face point clouds constructor. In the second stage, 4 different techniques for head pose estimation have been implemented and tested using the “ICT 3D HeadPose Database [75, 76]” to evaluate their behaviors and make a comparison between their results. After a presentation and analysis of the main state-of the-art head pose estimation algorithms, we present our four selected methods based on the use of 3D images (PCA, cylinder fitting using RANSAC, cylinder fitting doing an exhaustive search of the cylinder axis and ICP). These methods are completely automatics, so they do not need any training. In order to evaluate the results and identify potential error sources, two different analyses have been done: (1) a global analysis for each method tested over the whole database and (2) a specific analysis using different techniques over some subjects of the database. From the results of these analyses, a comparison between the four methods is made.

Full text

Universitat Politècnica de Catalunya Escola Tècnica Superior d’Enginyeria Industrial de Barcelona Université de Liège Faculté des Sciences Appliquées Academic Year 2014 - 2015 Robert GUÀRDIA Santesmases Master Thesis submitted for the degree of Superior Industrial Engineering. Promoter: Prof. Jacques VERLY EAD OSE STIMATION FROM IMAGES Résumé Le but du présent projet est développer, tester et comparer différentes méthodes estimant la position et l’orientation, appelé la pose, de la tête. Pour atteindre une bonne estimation de cette pose, le présent projet a été divisé en deux étapes. Dans la première étape, différentes techniques de détection du visage et de son suivi ont implémentées, ainsi qu’un constructeur d’un nuage de points 3D du visage. Dans la seconde étape, 4 différentes techniques estimant la pose de la tête ont été implémentées et testées en utilisant la base de données « ICT 3D HeadPose Database [75,76]» afin d’évaluer leurs comportements et comparer leurs résultats. Après la présentation et l’analyse de l’état de l’art sur l’estimation de la pose de la tête, nous présentons nos quatre méthodes sélectionnées basées sur l’utilisation d’images 3D (PCA, ajustement d’un cylindre via RANSAG, ajustement d’un cylindre via une recherche exhaustive et ICP). Ces méthodes sont entièrement automatiques et donc, ne nécessitent aucun apprentissage. Afin d’évaluer les résultats et d’identifier les sources potentielles d’erreurs, nous réalisons deux types d’analyses pour chaque méthode: (1) une analyse globale testée sur l’ensemble de la base de données et (2) une analyse spécifique sur quelques sujets de la base de données. A partir de ces résultats et analyses, une comparaison entre les quatre méthodes a été effectuée. Abstract The purpose of the current work is to develop, test and compare different methods for the detection of the angles of the head. To achieve good head estimation this project has been divided in two stages. In the first stage, different face detection and tracking techniques have been implemented, as well as a face point clouds constructor. In the second stage, 4 different techniques for head pose estimation have been implemented and tested using the “ICT 3D HeadPose Database [75, 76]” to evaluate their behaviors and make a comparison between their results. After a presentation and analysis of the main state-of the-art head pose estimation algorithms, we present our four selected methods based on the use of 3D images (PCA, cylinder fitting using RANSAC, cylinder fitting doing an exhaustive search of the cylinder axis and ICP). These methods are completely automatics, so they do not need any training. In order to evaluate the results and identify potential error sources, two different analyses have been done: (1) a global analysis for each method tested over the whole database and (2) a specific analysis using different techniques over some subjects of the database. From the results of these analyses, a comparison between the four methods is made. Thanks First of all, I would like to express my gratitude and show my sincere appreciation to Quentin Massoz, advisor of the current work, for your patience, your concern and your help. I also would like to thank Thomas Hoyoux and Jacques Verly to give me the opportunity to start in the world of computer science trusting in me for this project. I really thank LLorenç Guàrdia, for his collaboration in the development of most part of the drawings of the current work. Finally I would like to express my gratitude to Olga Carrera for her patience and tips that have helped me many times. i Table of Contents Introduction ................................................................................................................... 1 Structure of the report ............................................................................................. 1 Chapter 1: Head Pose Estimation presentation ......................................... 3 1.1 Head Pose Estimation ................................................................................... 3 1.2 Classification ..................................................................................................... 4 1.2.1 Appearance Template Models ........................................................... 4 1.2.2 Detector Arrays ........................................................................................ 5 1.2.3 Nonlinear regression methods .......................................................... 6 1.2.4 Manifold Embedding Methods ........................................................... 7 1.2.5 Flexible models......................................................................................... 9 1.2.6 Geometric models ................................................................................ 10 1.2.7 Tracking methods ................................................................................ 11 1.2.8 Hybrid methods .................................................................................... 12 1.3 Conclusion of the first chapter ............................................................... 13 Chapter 2: Head Pose Computation ............................................................... 14 2.1 Head Pose Computation ............................................................................ 14 2.2 Euler Rotation Angles................................................................................. 15 2.3 Geometric Transformations .................................................................... 15 2.3.1 Rotation matrix ..................................................................................... 15 2.3.2 Translation matrix: .............................................................................. 17 2.4 Extract the angles from the rotation matrix: .................................... 17 2.4.1 Quaternions ............................................................................................ 17 2.4.2 Shoemake’s Euler angle extraction ............................................... 19 2.5 Conclusion of the second chapter ......................................................... 19 TABLE OF CONTENTS ii Chapter 3: Related work ....................................................................................... 20 3.1 Face Detection ............................................................................................... 20 3.1.1 Viola & Jones ........................................................................................... 20 3.1.2 Face detector using depth information ....................................... 23 3.2 Tracking faces ................................................................................................ 24 3.2.1 Continously Adaptative Meanshift (Camshift) tracker ........ 24 3.2.2 Lucas – Kanade Optical flow tracker ............................................ 25 3.3 Principal Component Analysis (PCA) .................................................. 26 3.3.1 Some statistical introduction .......................................................... 27 3.3.2 Theoretical Introduction of PCA .................................................... 28 3.4 Fitting a Cylinder to the face ................................................................... 29 3.4.1 Fitting a Cylinder using Random Sample Consensus ............ 29 3.4.2 Fitting a Cylinder doing an exhaustive search of the cylinder axis ...................................................................................................................... 30 3.5 Iterative Closest Point (ICP) .................................................................... 33 3.6 Nose Detection .............................................................................................. 35 3.6.1 Mean distance graph ........................................................................... 35 3.6.2 Effective Energy method ................................................................... 38 3.7 Conclusion of the third chapter ............................................................. 40 Chapter 4: Results .................................................................................................... 42 4.1 Database description .................................................................................. 42 4.2 Stage 1: Face detection and tracking ................................................... 44 4.2.1 Depth information face detector .................................................... 44 4.2.2 Viola & Jones face detector ............................................................... 44 4.2.3 Camshift Face Tracker ........................................................................ 45 4.2.4 Lucas-Kanade Face tracker .............................................................. 46 4.2.5 Viola and Jones and Lucas-Kanade combination .................... 48 4.2.6 Face Point Clouds ................................................................................. 49 TABLE OF CONTENTS iii 4.3 Stage 2: Global results ................................................................................ 51 4.3.1 Global results for PCA ......................................................................... 52 4.3.2 Global results for cylinder fitting ................................................... 57 4.3.3 Global Results ICP ................................................................................ 64 4.4 Specific Analysis ........................................................................................... 67 4.5 Conclusion of the fourth chapter ........................................................... 72 Conclusion .................................................................................................................... 73 Bibliography ................................................................................................................ 75 iv Table of Figures Fig. 1.1: Appearance Template Models ................................................................. 5 Fig. 1.2: Detector Arrays .............................................................................................. 6 Fig. 1.3: Nonlinear regression methods ................................................................ 7 Fig. 1.4: Manifold Embedding methods ................................................................ 8 Fig. 1.5: Signal processing system ........................................................................... 9 Fig. 1.6: Flexible models ........................................................................................... 10 Fig. 1.7: Geometric models ...................................................................................... 11 Fig. 1.8: Tracking methods ...................................................................................... 12 Fig. 2.1: Euler angles of a human head. .............................................................. 14 Fig. 2.2: Euler Angles .................................................................................................. 15 Fig. 3.1: Haar Features .............................................................................................. 21 Fig. 3.2: Computing integral images. ................................................................... 22 Fig. 3.3: Integral image .............................................................................................. 22 Fig. 3.4: Scheme of the cascade architecture of the classifiers. ............... 23 Fig. 3.5: Domain with spherical components .................................................. 30 Fig. 3.6: Search domain of the cylinder axis. .................................................... 31 Fig. 3.7: Face point cloud assumption ................................................................ 35 Fig. 3.8: Cylinder axes for nose detection ......................................................... 36 Fig. 3.9: Mean distance nose detection............................................................... 36 Fig. 3.10: Domain of the search ............................................................................. 37 Fig. 3.11: Cylinder geometry ................................................................................... 37 Fig. 3.12: Convex area of the nose ........................................................................ 39 Fig. 4.1: Distribution of the pitch ground truth angles ................................ 43 Fig. 4.2: Distribution of the yaw ground truth angles .................................. 43 Fig. 4.3: Distribution of the roll ground truth angles ................................... 43 Fig. 4.4: Algorithm demonstation failure ......................................................... 44 Fig. 4.5: Examples of good face detections ....................................................... 45 Fig. 4.6: Example of a failed camshift tracking. .............................................. 46 Fig. 4.7: Example of a correct camshift tracking. ........................................... 46 TABLE OF FIGURES v Fig 4.8: Lucas-Kanade tracking algorithm ........................................................ 47 Fig. 4.9: Results of V&J and LK combination ................................................... 47 Fig. 4.10: Example of a false positive in V&J performance. ....................... 48 Fig. 4.11: Examples of point clouds extracted from Kinect2 .................... 49 Fig. 4.12: Body of the subject .................................................................................. 50 Fig. 4.13: Face point clouds from Kinect2 ......................................................... 50 Fig. 4.14: Face point clouds from database ...................................................... 51 Fig. 4.15: PCA algorithm performance ............................................................... 52 Fig. 4.16: Mean absolute error of PCA algorithm over (1) ........................ 53 Fig. 4.17: Face point cloud in large head rotations ....................................... 54 Fig. 4.18: Mean absolute error of PCA algorithm over (2) ........................ 55 Fig. 4.19: Mean absolute error of PCA algorithm over (3) ........................ 56 Fig. 4.20: Mean distance method results S1-f0001 ....................................... 58 Fig. 4.21: Mean distance method results S1-f1000 ....................................... 58 Fig. 4.22: Cylinder fitting using RANSAC algorithm performance .......... 59 Fig. 4.23: Mean absolute error of RC over (3) ................................................. 60 Fig. 4.24: Cylinder fitting using ESCA algorithm performance ................ 61 Fig. 4.25: Mean absolute error of EC over (3) ................................................. 62 Fig. 4.26: Bad nose detections .............................................................................. 63 Fig. 4.27: ICP algorithm performance using thick point clouds .............. 64 Fig. 4.28: ICP algorithm performance using thin point clouds ................ 65 Fig. 4.29: Mean absolute error of ICP algorithm (3) .................................... 66 Fig. 4.30: Absolute pitch error using PCA with thick point clouds. ........ 67 Fig. 4.31: Pitch estimation sequence using PCA S5 ....................................... 68 Fig. 4.32: Pitch estimation sequence using PCA S7 ....................................... 68 Fig. 4.33: PCA offset. ................................................................................................... 69 Fig. 4.34: Yaw estimation sequence using RC S2 ........................................... 69 Fig. 4.35: Yaw estimation sequence using EC S2 ........................................... 70 Fig. 4.36: Absolute roll error using ICP with thick point clouds ............. 70 Fig. 4.37: Yaw estimation sequence using ICP S4 .......................................... 71 Fig. 4.38: Yaw estimation sequence using ICP S8 .......................................... 71 CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 7 linear maps. In this case the input data is compared to each node for each map and used to learn a weight matrix. Advantages - Very fast computation. - Most accurate head pose estimation. Drawbacks - It is hard to say how well a specific regression tool will learn the proper mapping. - Some regression tools could be not powerful enough for a highdimensionality of an image. This can be solved using some dimensionality reducing techniques like Principal Component Analysis (PCA). - Poor face localization may bring errors. It could be solve introducing shift, scale and distortion invariance. Fig. 1.3: Nonlinear regression methods 1.2.4 Manifold Embedding Methods Despite we can consider the image of a head like a high-dimensional sample, as explained earlier, we can describe the head with a rigid model with a minimum of three parameters for orientation and three for position. Thus, we can consider that each high-dimensional sample can be described with a low-dimensional manifold constrained by the available pose variations. This technique consists in estimating head pose by projecting a processed image to a low-dimensional space. In fact, all the algorithms used to reduce the dimensions can be considered as a kind of CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 8 manifold embedding system. The problem in these methods may be the errors in head pose estimation due to the image variations coming from other sources. The most famous dimensionality reduction techniques are Principal Component Analysis (PCA) and its nonlinear kernalized version (KPCA). For instance, in the first stage of [11], they use PCA and KPCA to reduce the dimensionality of the image structure in the spatial-frequency domain. As a result, they get a first head pose estimation. In [12], they use PCA on the training images to compute several eigenspaces for each pose, called pose-eigenspaces. Then, they estimate the head pose using the highest projection energy. In the first stage of [13], they also create pose-eigenspaces, but using KPCA. Finally, in [14], they use local Gabor binary patterns as a feature to train a set of multiclass SVM. PCA is used in this method to reduce the dimensionality of the features before the classifier. Advantages - The simplest models, they have a really fast computation. Drawbacks - PCA and KPCA are not the best techniques for head pose estimation. This is because it is unknown if the principal components will really correspond the pose variation but not the appearance variation. Usually they relate both. To avoid this problem, like in [12, 13], the solution can be create the pose based eigenspaces named before. To build them, it is necessary to divide the training data in different groups with the same discrete head pose but from different views. In this way we obtain a way to separate the relation between the appearance variations and the pose variation. Fig. 1.4: Manifold Embedding methods CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 9 1.2.5 Flexible models All the previous approaches were solving the problem of head pose estimation as a signal processing one. With an image region as the input and the head pose estimation as the output. Fig. 1.5: Signal processing system Flexible models have a different behavior. These methods fit a non-rigid model to the face of the studied subject. Because of this, they require labeled pose and training data with annotated facial features. In these systems it is necessary to label manually, in each training image, all the facial feature locations and then, extract the local feature descriptors for each location. The result is called Elastic Bunch Graph. Then, this graph is placed over all the new face images and deformed until the minimum distance between the features at every graph node location found. In the second stage of [11] they use the Elastic Bunch graph to finally estimate the head pose. Advantages - Really robust to inter-subject variability. - Good predictions if the model is well defined. Drawbacks - Discrete Pose estimation. - Comparing a lot of bunch graphs, each with many deformations, is computationally expensive. Another really extended flexible model is the Active Appearance Model (AAM) [49]. These methods combine a shape variation model with a texture variation model. There are many different methods to build these models. In [21] they build the AAM from the regression trees and in [41] they use depth information with an elastic deformable model, but in this case they use a likelihood iteration to fit the model to the new head pose and Iterative Closest Point (ICP) to compute the head rotation. CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 10 Advantages - Accurate head pose orientation in the available position interval. Drawbacks - All the facial features are required to be located in each computable face. That makes the allowable head pose orientations of this approach very limited, i.e. we can only use the head pose positions nearest to the frontal view where all these features are visible. Fig. 1.6: Flexible models 1.2.6 Geometric models These techniques use the geometrical features of the head, like the shape or the relative configuration of local features to estimate the head pose. Some examples of the most used features are the inner and outer corners of each eye, outside corners of the mouth, tip of the nose, nostrils and eyebrows. Even very simple geometric shapes can be used to estimate head pose. For instance, in [15], they fit an ellipse to the head using a gradient contour technique and a color module. Then, in [16, 20] they create a triangle using face features (eyes and mouth, or eyes and nose tip) and compute the yaw and the roll with the deviation of a pure isosceles. Advantages - Fast and simple. CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 11 Drawbacks: - The features must be detected with high precision and accuracy to estimate a correctly head poses with this model. - As with the AAM, pose can only be estimated if all the required features for the estimation are detected. Thus, the range of the possible angles decreases. - It is more sensitive to occlusion than appearance-based methods. This is due to situations that can permanently obscure facial features. For example a person who wears glasses and hides his eye corners. . Fig. 1.7: Geometric models 1.2.7 Tracking methods These are one of the most successful techniques. They estimate the global movement of the head finding the relative movement between two consecutive images in a video sequence. There are several different implementations of these methods. For example, in [47] is presented a six feature face point tracking using correlation windows and Random Sample Consensus (RANSAC). In [48], they track feature face points using linear regression to find the best correspondence transformation between two frames. In [42] they use dynamic templates and in [43, 50, 51] they use different polygonal models as cylinders or ellipsoids. In [52], they present a method called the scale-invariant feature transform (SIFT), which consists in converting the image data in a scale-invariant features making the image matching easier. In [53] they propose a method to track a head using 3D geometry. Finally, in [54, 55], they use the 3D face models to estimate the head position. CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 12 Advantages - High level of accuracy. Drawbacks - It requires initialization from a known head position. Normally a frontal pose is used. - When the track is lost, they need to be reinitialized. Fig. 1.8: Tracking methods 1.2.8 Hybrid methods Hybrid methods combine two or more techniques to estimate pose. Here, the key is to minimize the limitations of one approach with the strengths of the others. As a rule, they are formed by a static method and a tracking system. The first is the responsible of the initialization and, if the track is lost, the reboot. The second one is responsible for the pose estimation over time. Next, we present some of the most successful combinations. For example, in [56], they present automatic geometric methods with point tracking. In [46] they do the same but using depth information. In [63] they use PCA template matching with a probabilistic model to find the head orientation. In [11, 18], they present a two stage method with a first stage using the manifold embedded templates for a first estimation of the face. Then, to refine a result, they add a second stage with a flexible model. Finally, in [17], they present a method with 2 steps. The first one is also using PCA to construct the pose subspaces. In this case, the subspaces are used to compute a prior model of the head which is used in a second stage of tracking. CHAPTER 1: HEAD POSE ESTIMATION PRESENTATION 13 1.3 Conclusion of the first chapter In this chapter, we have shown the importance of the head pose in the interaction between humans and how important is the use of head gestures for the communication. In addition, in recent years, the computer scientists have developed several algorithms able to estimate the head pose precisely thanks to the advent of 3D cameras. All these developments are aimed to facilitate and improve the communication between computers and humans. Then we have classified some of these mentioned algorithms in different categories manifesting their strengths and weaknesses. For example, we have seen that the appearance template methods are easy to implement but they present some troubles in the estimation due to they are limited to discrete poses. The detector array methods are good for the estimation, but because they are computationally expensive results are also limited. Then, the nonlinear regression methods are one of the best techniques for the head pose estimation but its implementation is quite hard. On the other hand, we have the manifold embedding methods, with a really easy implementation but questionable results. Now, changing the approach, there are the flexible models. Both Elastic Bunch graph and AAM are good techniques for the head pose estimation, but they are computationally expensive and have a complicated implementation. Then we have the geometric models, which are easy to implement but requires good feature detection for good head pose estimation. Finally we have the tracking methods, which are one of the best methods for head pose estimation but they require initialization. In the end, we have seen that the best way to achieve good head pose estimation is combining one or more of these methods, using the strengths to cover the weaknesses of the others. 14 Chapter 2 Head Pose Computation In this chapter we present the methods used in this project to embody the head pose. In section 2.1 we define the head pose and how it is related to the Euler angles. In section 2.2 we explain what the Euler angles are. In section 2.3 we present the mathematical way to represent the rotations and we present the rotation matrix and the translation matrix. Next, in section 2.4, we show the two methods used to extract the Euler angles from the rotation matrix. Finally, in section 2.5 we conclude the chapter. 2.1 Head Pose Computation The head pose consist in the position and orientation of the head. This is, where the head is in the 3D Euclidean space and which its orientation is. As we exposed earlier, head has six degrees of freedom (DOF), three rotation angles and three linear shifts. The three angles can be characterized with the Euler angles as pitch (X), yaw (Y) and roll (Z) (See Fig. 2.1). The shifts are usually expressed with a translation vector with reference to the camera viewpoint. Fig. 2.1: The 3 Degrees of Freedom (DOF) of the human head described by the Euler angles yaw, pitch and roll. CHAPTER 2: HEAD POSE COMPUTATION 15 2.2 Euler Rotation Angles The Euler angles were introduced by Leonhard Euler in rigid body dynamics to describe the orientation of a reference system attached to a rigid solid in motion. Three parameters are needed to describe an orientation in a 3 dimensional Euclidean Space. Euler angles are one of the many ways to express the orientation of a rigid object. Thus, the Euler angles are a set of three angular coordinates which specify the orientation of a reference system with orthogonal axis, usually mobile, with respect to another reference with known orthogonal axis called standard orientation. This standard initial orientation is normally represented by a motionless (fixed) coordinate system. The Euler angles are typically denoted as X,Y,Z or [,\,]. [56]. Fig. 2.2: Euler Angles, image extracted from Wikipedia [56]. 2.3 Geometric Transformations Below we present the two matrices used to express the position of an object relative to a reference coordinate axis and their combination. 2.3.1 Rotation matrix In linear algebra, a rotation matrix is the matrix that represents a rotation in Euclidean space. Let be the column vector ^, the position of each point in the standard initial orientation and _, the rotation matrix. Then, a rotated vector ` is obtained by multiplying the rotation matrix times the vector. `a _b^ CHAPTER 2: HEAD POSE COMPUTATION 16 The rotation matrix is a way to express the orientation of an object relative to a reference coordinate system. To construct a rotation matrix starting from a local axis set, we have to put the vectors of each axis as the columns of the rotation matrix. In this way, we obtain the transformation from the reference coordinate system to the new local system. In other words, if perform the rotation of a vector ^, we will obtain `, who express the same point in the new axis coordinates. Here are the matrices for rotation by X around the c− dcef, Y around the g− dcef, and Z around the h−dcef [59, 60]. The general rotation matrix depends on the order of rotations. The first matrix rotates about c, then g, then h; the second rotates about h, then g, then c. CHAPTER 3: RELATED WORK 23 Fig. 3.4: Scheme of the cascade architecture of the classifiers. Image from [35]. In our case, to implement our algorithm we used the implementation of OpenCV [68], and we obtained the Haar filters from [69, 70]. 3.1.2 Face detector using depth information The second approach we implemented is an experimental method, found in [30]. It consists in using only the depth information to find the position of the head. That makes it really simple and fast, and can detect the face in any pose despite the illumination, expression change and small occlusions like glasses or hats. The problem is that it needs some conditions to be applied with success. This method can only detect one face, and it has to be the closest object from the camera. The main idea of this method is to consider the depth distance between the chin and the neck as the indicator of the face boundary. The first step of this method is to apply a threshold to the depth image in order to separate the background from the body of our subject. Usually, the background depth mean is clearly higher that the body depth mean, so playing with these two values it should be easy to find a good threshold for a good division. Then, we consider the highest point in the image to be the top of the head. From this point, we start to look downwards the Y axis until we find a discontinuity larger than another threshold in the depth map. That is assumed to be the chin. The choice of a good threshold to find the chin is the key of this method. The problem is that the subject and the distance from the camera, as well as the head orientation can make change this distance between the chin and the neck. In our case, instead of searching a discontinuity between two adjacent pixels, we decided to use the mean of ten pixels in this direction. Thus, we can know better if there really exists a difference in the studied pixels that represents the difference between the chin and the neck. CHAPTER 3: RELATED WORK 24 The next step consists in searching the right-most and left-most points between the top of the head and the chin to get the sides of the head. Thus, we can extract the rectangle that represents the physical size of the head W x H. Obs: We implemented this method with Kinect2 images from the ULg lab and the results were good. The problem was with the database used in this project to evaluate performances. As said earlier, to implement this method some conditions need to be fulfilled. In the used database, there are some frames with objects closer to the camera than the studio subject (See section 4.2.1). For this reason, we finally didn’t use this method to do our comparison. 3.2 Tracking faces To improve the results of the face detection, we decided to try some tracking methods in combination with the face detection methods. The two analyzed methods were the Camshift tracker and the Lucas Kanade tracker. 3.2.1 Continously Adaptative Meanshift (Camshift) tracker The camshift tracker is a technique used to track objects in video sequences. It is based on the meanshift algorithm [71]. The meanshift algorithm consists in tracking an object using the backprojection and the histogram of the tracked object. The first step of this method consists in selecting an object, in our case the face. The face is found using the algorithms explained in the previous section. Then, we compute the normalized histogram of the face. A normalized histogram, instead of displaying the number of times each value appears in the image, display the proportion of each value in the image. This histogram will be the model used below to track the face. The next step is tracking the object. To do that we use the backprojection of each consecutive frame based in the normalized histogram of the face. The backprojection is a tool that indicates where in an image are the pixels with the same distribution of our histogram model. In our case, it will recognize as positive samples the regions of the image with skin colors. The problem of the meanshift algorithm is that the region of interest studied in the image has always the same size. To overcome this problem, Camshift was designed. This improved algorithm updates the size of the window and calculates the orientation with the best fitting of our region to it. Then, it applies meanshift again with the new scaled size and the previous location. The process is repeated iteratively until the desired accuracy is reached. CHAPTER 3: RELATED WORK 25 Advantages - Fast implementation and computation. Drawbacks - This algorithm is very dependent of the subject conditions. As we will see in chapter 4 (section 4.2), when the subject wears black clothes, this method presents really good results. However, if the clothes are similar to skin color it loses the track completely. 3.2.2 Lucas – Kanade Optical flow tracker This second method is based on optical flow using the pyramidal Lucas-Kanade tracker [72]. Instead of using the color of the image, this algorithm tracks features between two consecutive frames. It works on a main assumption which says that all the pixel intensities of an object do not change during the image acquisition. Optical flow has two main steps. The first one consists in finding good features to track. There are several different algorithms to find good features to track. In our case we use the Shi-Tomasi algorithm, because is the one used in [73]. A short summary of this method says that a good feature to track has to satisfy two requirements: “texturedness” (i.e. feature with motion information) and be a corner. The second step is solving the optical flow function with these selected features. Considering a video sequence, let be l(c,g,o) the intensity of the pixel c,g in the frame o. Then, for the next frame o+mo, this pixel has moved (mc,mg) within the image. Considering the assumption mentioned earlier, we have that: l(c,g,o)al(c+mc,g+mg,o+mo) If we apply Taylor series to the right hand site we obtain: l(c+mc,g+mg,o+mo)a l(c,g,o)+ ˜l ˜cmc+˜l ˜gmg+ ˜l ˜omo Combining the last two expressions and dividing by mo: ™ s `+ ™ t ^+ ™ š a0 CHAPTER 3: RELATED WORK 26 Where: ™ s a ˜l ˜c ; ™ t a˜l ˜g ; `amc mo ; ^amg mo This equation is called the Optical flow equation. ™ s and ™ t are the image gradients and ™ š is the gradient along time. ` and ^ are the unknowns. Lucas-Kanade algorithm is one of many existing methods to solve this equation. This algorithm works assuming that all the neighboring pixels will have the same motion. Thus, this method consists in taking a 3x3 kernel around the point such that we form a 9 pixel neighborhood for each feature. We can solve the above equation with these 9 points. So now, we have a system with 9 equations and two unknown that can be solved with least squares method. However, this algorithm presents problems with large motions due to it relies only on information extracted from the neighborhood of the features. So, if a feature is moved out of its local window (i.e. large motion), the algorithm is not able to find it. For this reason, this method was improved implementing a pyramidal architecture. That means, use different windows size to find the feature in the next frame, starting with small sizes until the big ones. This improvement allows this algorithm to deal with large motions. Advantages - Fast, reliable and robust. Drawbacks - In this method there is no adaptive window, so the first face detection size remains until a next detection. In our case this does not affect significantly our systems because the subjects use remain, more or less, in the same depth distance from the camera during all the video sequence. Obs: Based on the results of both tracking methods, we decided to use Lucas- Kanade Optical flow in our face detection because of the robustness and accuracy presented in the face tracking. 3.3 Principal Component Analysis (PCA) The first method used to estimate the head pose was Principal Component Analysis (PCA) [19, 23, 24]. This method consists in finding the principal directions of the point cloud of the face in each frame. CHAPTER 3: RELATED WORK 27 3.3.1 Some statistical introduction Variance: The variance is a measure to quantify the spread of data in a data set, i.e. the amount of dispersion. f z a ∑ (œ p −œ•) z ž pŸy („−1) Covariance: Usually the datasets have more than 1 dimension. With the last two measures we cannot know if there exists some relationship between different dimensions in a dataset. Covariance is a measure that allow as to quantify the relation between two different dataset dimensions. Actually, variance is the covariance computed between one dimension and itself. The formula to compute the covariance is the next. ‹•^ (œ, )a ∑ (œ p − œ•)( p − •) ž pŸy („−1) The sign of the covariance shows us how the different dimensions studied behave with respect to the other. For example, a positive sign means that if one of the dimensions increases the other will do the same. Nevertheless, if the sign is negative means the opposite, if one of the dimensions increases the other decreases. As a last case, if the covariance is zero, it indicates that the two dimensions are independent of each other. Covariance Matrix: As we said, covariance can only be computed between two dimensions. However, the datasets usually have more than two dimensions. So, if we compute all the possible covariance values of a dataset, we will be able to build the covariance matrix. For instance, in a 3 dimensional data, as our case, there are 3 different covariance values (i.e. ‹•^(c,g),‹•^(c,h) and ‹•^(g,h)), so we will obtain a 3-dimension squared matrix. ¡a ¢‹•^(c ,c) ‹•^(c ,g) ‹•^(c ,h) ‹•^(g ,c) ‹•^(g ,g) ‹•^(g ,h) ‹•^(h ,c) ‹•^(h ,g) ‹•^(h ,h)£ Furthermore, in n-dimensional data set, you can calculate ž! (ž¥z)! z different covariance values. CHAPTER 3: RELATED WORK 28 Eigenvectors and Eigenvalues: In linear algebra, the eigenvectors of a linear operator are the nonzero vectors whose direction is invariant under the linear transformation of this linear operator. In other words, if we transform the vector ^ with the linear operator, the result will be a scalar multiple of ^. jb^a ¦b^ Where j is the squared matrix associated to the linear operator, ^ is the eigenvector and ¦ is the scalar or the eigenvalue. 3.3.2 Theoretical Introduction of PCA PCA is a powerful statistical technique commonly used for finding patterns in high dimension data. For this reason is one of the widely methods used as a dimensionality reduction technique. Due to the fact that the graphical representation is usually not available in this kind of data, PCA is a useful tool for analyzing data and distinguish their similarities and differences. The first step to apply this method is computing the covariance matrix. To work properly is good to do it after subtracting the mean of each data dimension. This results in a data set with zero mean. In our case, as explained before, we are working with a 3 dimensional data (the points of the face in the space), so the covariance matrix must have 3 dimensions. The next step consists in computing the eigenvectors and eigenvalues of the covariance matrix. We can do this step because the covariance matrix is square. We should notice that all the lengths of the eigenvectors are 1, i.e. they are unit vectors, and they are perpendicular to each other. By doing this step, we extract information about the patterns within the data. In other words, they characterize our data. Once we have the eigenvectors computed, we need to choose the main directions of the head. To do that, we use the eigenvalues. The eigenvector with the highest eigenvalue is the principal component of the data set. Once we have extracted the eigenvectors from the data, we have to sort them by eigenvalue, highest to lowest. This step provides us the principal components or eigenvalues in order of significance. Advantages - As we saw in chapter 1, this method is easy to implement. CHAPTER 3: RELATED WORK 29 Drawbacks - We will see that there is no accuracy or robustness on search the principal components of a point cloud to estimate a face. 3.4 Fitting a Cylinder to the face In this section we will explain the idea of estimating head pose trying to fit a cylinder to the face 3D point cloud. With this method we will obtain the vertical axis of the head, and thus compute the pitch angle. Then it will be necessary to find some way to adjust the other axis to be able to estimate the other two angles. To define a cylinder we need to define 7 Degrees of Freedom (DOF). §a (¨ • ,¨ y ,¨ z ) is a unit-length direction vector that defines cylinder axis (3 DOF). ¡ is a point of the cylinder axis (3 DOF) and © is the radius of the cylinder (1 DOF). These are the required parameters to define a cylinder. 3.4.1 Fitting a Cylinder using Random Sample Consensus (RANSAC) In this first part we used [64, 65] to fit the cylinder to the head point cloud. This library fits a cylinder using the random sample consensus segmentation. The Random Sample Consensus (RANSAC) is an iterative algorithm published by Fisher and Bolles at SRI Interantional in 1981. It is used to deduce the parameters of a mathematical model from a data set which contains outliers. In our case, this mathematical model is a cylinder that we try to fit to the face point cloud. From [43, 64, 65, 66] the RANSAC algorithm assumes that the data we are working with is comprised of both inliers and outliers. The parameters of the model are estimated in a way that they can explain the inliers while the outliers can never be fitted to the model. This algorithm involves two main steps that are iteratively repeated: - In the first step, a minimal sample subset of the input data is randomly selected. This subset is called the hypothetical inliers. Using only the elements of this sample subset, the algorithm fits a model and computes its corresponding model parameters. The size of the sample subset is the smallest enough to be able to compute the model parameters. - In the second step, the entire input data is used to test the consistency of the fitted model obtained in the first step. The samples that do not match within some error threshold that defines the maximum deviation allowed will be considered as outliers. We call Consensus set to the set of inliers from the actual model. CHAPTER 3: RELATED WORK 30 The RANSAC algorithm is iteratively repeating the above two steps until it reach a certain number of iterations or the obtained consensus set has enough inliers. Finally, the model can be improved by computing the parameters again, but this time, using only the members of the consensus set. The algorithm keeps this model only if after testing it with the rest of the data base the consensus becomes larger. Advantages - Compute a robust estimation of the model parameters. - High level of accuracy even with a big number of outliers. Drawbacks - There is no time computation limit, so it may take long time to compute the model parameters. - If we limit the number of iterations the found solution may not be optimal. 3.4.2 Fitting a Cylinder doing an exhaustive search of the cylinder axis (ESCA) In this second method, we followed [27]. In this paper is presented a method that consists in searching the configuration of a cylinder with the minimum error with our point cloud. To do that, we consider a large number of cylinder directions using half sphere as our domain. To reduce the number of parameters, we will use two spherical ([,\) components instead of the three usual rectangular components (See Fig. 3.5). Fig. 3.5: Spherical components used to define the domain of our search. We decided to reduce the domain because we know the approximate limits of the movement of the head. In this way, we only consider ª/6 around the y axis (See Fig. 3.6) instead of all the domain of the half sphere. CHAPTER 3: RELATED WORK 31 Fig. 3.6: Search Domain of the cylinder axis. Finally, we compute the error «(§) for each cylinder orientation § configuration using the next formula from [27]: «(§)a¬e„ -®,¯ «(© z ,¡,§) a¬e„ -®,¯ °[±(œ p ; © z ,¡,§ )] z ž pŸy a¬e„ -®,¯ °[(œ p −¡) k (l−§§ k )(œ p −¡)− © z ] z ž pŸy Where œa{ œ y ,…,œ ž } are the points to be fitted (our face point cloud) and W, ¡ and r are the cylinder parameters defined at the beginning of section 3.4. Remember, the cylinder axis (defined by a vector and a point) and the radius. Altogether, there are 7 parameters. For each studied direction §, we compute the radius and the center that minimize our error in that direction, and finally we choose the minimum error of all the studied directions. To do this process we follow the next steps: Firstly, we need to normalize the point cloud. As before, this consists in subtracting, in each sample, the mean of the entire point cloud for each direction. œ p aœ p − ∑œ p „ CHAPTER 3: RELATED WORK 32 Then we define: ³al−§b§ k © pz a(¡−œ p ) k ³(¡−œ p ) Where ³ represents a projection on a plane with normal §. We have to notice that ³ z a³, and depends on direction § and © pz depends on ¡ and §. In this way, we can rewrite the error function as: «a °(© pz −© z ) z žp Then we compute the radius minimizing the error with respect to ©. ´« ´©a −2 °(© pz −© z ) žp a0 © z a 1„°© pz žp And we compute the center minimizing the error with respect to ¡. ´« ´¡a −4 °(© pz −© z ) žp ³a0 If we follow the demonstration developed in [27], we finally get: ¡a jµ∗· tr‡jµ∗jˆ CHAPTER 3: RELATED WORK 39 From [74], we define the neighborhood of point P as: Í· (³)a {Î y ,…,Î ž } Then, we can define the Effective Energy of one neighbor Î p with. m p a(Î p − ³)Í Ï a ‖Î p −³‖cos\ Where Í Ï if the normalized normal in point ³. As an observation, if we don’t know the norm of each point of the point cloud, we can approximate it using PCA with all the neighbors of the point. Usually, the perpendicular axis of the surface will be the one with the lowest eigenvalue. So, if we compute the effective energy for each pixel of the neighborhood we will obtain the Effective Energy set ««(³) of the neighborhood. «« (³)a {m y ,…,m ž } As we mentioned, we are searching the nose as the local highest point in some direction. So, any nose candidate must be the highest point of his neighborhood, and as a consequence, his whole Effective Energy set has to be negative or zero. This is easy to understand imaging the nose area as a convex area and the tip of nose a point lying in the top of this area (See Fig. 3.12). Then, the angle between the normal of ³ and the vectors from the point to each of the neighbors \ has to be greater than 90 T . With this condition we reduce significantly the number of candidates but we still keep a good amount, thus we need to apply another condition to further reduce the number of candidates. Fig. 3.12: Convex area of the nose where P represents the tip of the nose lying in the top of this area. CHAPTER 3: RELATED WORK 40 The next step is to compute the mean and the variance of the Effective Energy set of all the remaining candidates. We remember: Ða 1„ °m p žp Ñ z a 1„ °(m p −Ð) z žp Now, each point is defined with these two variables. In this case we think on the nose like the most significant protuberance on the face. Thus, the mean of the EE set should be smaller and the variance larger than in other regions of the face. This second threshold allows us to reduce further the number of possible nose candidates. For example, with these two steps, we can find a candidate in a poses closer to the frontal pose but allow some candidates in large head rotations. Thus, we need to apply a last condition to reduce even more the nose candidates for large rotations. This condition will be a movement limitation. For this, we make the assumption that the nose tip cannot move more than 20 mm in any direction from one frame to another. In this way, we create a square bounding box around the nose of 40 mm. Any candidate out of this box will be discarded. Finally, once we have found the nose position, we must define one axis to estimate the position. We decided to use the line perpendicular to the cylinder axis which intersects with the nose point and the cylinder axis. To find this line, we define the plan perpendicular to the cylinder axis where the nose point is comprised. Then we find the intersection point of the plane with the cylinder axis. 3.7 Conclusion of the third chapter In this chapter we have seen the work done in this project. First, we started with the face detection. This is an important part of the project because without a good face detection is not possible to estimate a good head pose. In this section we have seen two different approaches to detect the face, the already known Viola-Jones face detector using Haar features, and a new experimental method using only the depth information. Between this two, we finally decided to use the Viola and Jones due to its robustness compared with the other method which needed some concrete conditions to work fine. Next, we have presented two different methods to track the face. The first one, Camshift, based on the color of the pixels of the face, and the second one, Lucas- CHAPTER 3: RELATED WORK 41 Kanade, based on tracking some features of the face. In this comparison we decided to use the second for the same reason as before, the robustness. The fact that the first tracker was too much dependent on the subject conditions was a clearly weakness that we did not want to deal with. Next we have presented the different selected approaches in this project to estimate the head position. The first one is PCA. As we have seen in chapter 1, PCA methods have one of the easiest implementation so we thought it could be a good starting point for the implementation of a head pose estimator. After that we decided to go a little bit further and we tried to fit a cylinder to the head point cloud. As we receive information from camera’s point of view, the face point cloud forms like a kind of half cylinder shape. For this reason we thought we can get a good estimation with these methods. The first technique used to fit the cylinder was using RANSAC algorithm because we found it was a good method to estimate the parameters of a mathematical model. Next we decided to try with another method of cylinder fitting a little bit slower, but which we expected better results, ESCA. Finally, to change totally the approach, we decided to use ICP to align the different point clouds with a reference point cloud from a frontal position. Thus, we created a dynamical head pose estimation system, which use the rotation from the previous frames to estimate the new pose. After the fourth methods, we have presented two approaches to estimate the nose position. This is important for the cylinder fitting methods due to they can find the vertical head axis, but we need another axis to be able to estimate the head pose. Here we have presented a first idea which consists in find the nose by computing the distance between the points and the head vertical axis. Then, we have presented another approach based on the Effective Energy. Due to the fact that the first one did not give us the expected results, we had no other choice but to apply the second. 42 Chapter 4 Results In this chapter we present the results of our work. First of all we must clarify that, in this project, we divide our work in two stages. In the first stage, we detect the faces and extract the 3D point clouds for all the subjects and a second stage where the implemented methods are used to estimate the head pose from the computed point clouds. The first section of this chapter is focused on a brief presentation of the database used in this project. Then, in section 4.2 we show the results of the first stage of our work, face detection and tracking. We also explain how we obtain the face point clouds using Point Cloud Library [77]. In section 4.3 we present the global results obtained in the second stage. These results are the ones used to evaluate the performance of our methods using the above data base. In section 4.4 we analyze the specific results from some particular subjects. Finally, in section 4.5, we make the comparison between the methods over the results seen in this chapter as a conclusion. 4.1 Database description In order to perform our results we decided to use the ICT 3D HeadPose Database [75, 76], created by the Institute for Creative Technologies of the University of Southern California. This database consists in 10 sequences acquired with a Microsoft Kinect sensor with ten different subjects. The subjects are distributed in 6 males and 4 females. In this database the subjects are recorded while turning their heads, sitting in front of the sensor. They wear a cap with the Polhemus Fastrack flock of birds to collect the ground truth head orientation. As for the translation, the values given are not as reliable because they didn’t know the offset from the center of rotation to the tracker, so they computed the centroid of the head 3D point cloud. For that reason, in this project we have focused in the estimation of the orientation of the head. As for the translation, we also computed the centroid of the head point cloud. However, we decided to not compare the values with a non-reliable base and focus this work only on the orientation. To be sure we worked with a database which containing variability over all the allowable head orientations we decided to plot a histogram showing the distribution of the ground truth angles of the whole database (See Fig. 4.1, Fig. 4.2 and Fig. 4.3). CHAPTER 4: RESULTS 43 Fig. 4.1: Distribution of the pitch ground truth angles of the ICT 3D HeadPose Database [75, 76]. Fig. 4.2: Distribution of the yaw ground truth angles of the ICT 3D HeadPose Database [75, 76]. Fig. 4.3: Distribution of the roll ground truth angles of the ICT 3D Headose Database [75, 76]. 0 200 400 600 800 1000 -45 -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30 35 40 45 50 55 Number of occurencies Pitch angle Pitch Ground truth 0 200 400 600 800 1000 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 Number of occurences Yaw angle Yaw Ground truth 0 200 400 600 800 1000 1200 1400 -40 -30 -20 -10 0 10 20 30 40 50 Number of occurrences Roll angle Roll ground truth CHAPTER 4: RESULTS 44 Analyzing the graphs plotted above we can observe a normal distribution of the angles. We see the angles in frontal positions appear much more often than the extreme positions. Nevertheless, this is normal because to go from one extreme position of the head to the other, we must always go through a central position. In the graphs, you can also appreciate how the extreme positions have much less numbers of occurrences, but we consider them enough to test our implementation. 4.2 Stage 1: Face detection and tracking In this section we present the results of face detection and tracking. 4.2.1 Depth information face detector First of all, we expose the problem with the face detector using the depth information method. Remember that this technique can only detect one face and it needs the subject to be the closer object to the camera (See section 3.1.2). In Fig. 4.4 we can see some frames for different subjects where there is a person in the left part of the image. This person is closer or at the same depth than the studied subjects in the images, making the algorithm fail. Fig. 4.4: Examples of different frames with a person closer to the camera than the studied subject that impedes the depth information face detector to obtain successful results. 4.2.2 Viola & Jones face detector Next, we focus on the method we used to detect the face, Viola and Jones. In Fig. 4.5 we can see a frame for each different subjects of the database. The detected face region is represented as rectangle around the face. We can appreciate that this algorithms works for different head positions. CHAPTER 4: RESULTS 45 Fig. 4.5: Examples for each of the subjects of the database where V&J algorithm success in the face detection task. The problem starts when the head rotates too much, Viola and Jones algorithm loses the face and is when the tracking system starts his work. 4.2.3 Camshift Face Tracker As we have commented in the previous chapter, this tracker uses the backprojection of the last detected face to find where it is in the image (for more details, see section 3.2.1). The problem with this method is the low accuracy presented due to the similarities in the histogram for different colors. In (Fig. 4.6), we show an example where the algorithm fails. In the left image we see the region of interest (ROI) we want to track (square in the middle of the image) with the subject wearing a red T-shirt. In the right image, we can see the backprojection of the histogram of the cited ROI. We can observe that both the face and clothes become positive results (white color) for this algorithm but only the body area is surrounded. Remember that this algorithm is able to change the size of the tracked area. In (Fig. 4.7), the two pictures show us the same subject with the same selected ROI, but wearing a black T-shirt. In this case we can appreciate that the algorithm is tracking perfectly. CHAPTER 4: RESULTS 46 Fig. 4.6: Example of a failed camshift tracking. Fig. 4.7: Example of a correct camshift tracking. These results show a lack of robustness of this algorithm due to its dependence on the subject conditions. For this reason, we decided to search another method that presents better results. 4.2.4 Lucas-Kanade Face tracker Because of the results given by the Camshift tacker, we decided to try using the Lucas-Kanade tracking algorithm. Remember it consists in tracking features of the face (for more details, see section 3.2.2). In (Fig. 4.8) we have four pictures. In the top left, we show the features detected by the algorithm. In the top right, after applying Viola and Jones, we search only the features inside the rectangle around the face. Here the number of features increases. In the images below, we can see how the features are tracked. The green points are the features of the new frame and the white thin lines are the distance they have moved with respect to the previous frame. The rectangle around the face follows the features. It moves a distance equal to the mean of the movement of all the features for each direction. CHAPTER 4: RESULTS 47 Fig 4.8: Lucas-Kanade tracking algorithm. In (a) we can see the features detected by the algorithm. In (b) the features detected by the algorithm after applying the face detector. In (c) and (d) we can see the tracking features moving left and right successively. As we see, this technique is more robust and the track is successful independently of the subject’s clothes. For this reason, we decided to test this algorithm with the database. In (Fig. 4.9) we can see the results for different subjects, where the face detector algorithm fails but not the tracking algorithm. Fig. 4.9: Example of the results for different subjects of the combination of the face detection algorithm V&J and the tracking algorithm LK. CHAPTER 4: RESULTS 48 4.2.5 Viola and Jones and Lucas-Kanade combination In general, the combination of Viola and Jones (V&J) face detector and Lucas- Kanade (LK) tracker give us good results. However, V&J algorithm sometimes detects faces where there isn’t. Then, the LK starts trying to follow the face until the face detector finds a face again. In (Fig. 4.10) we can see an example, where V&J detects the face in the body region of the studied subject. This may become a problem for the implemented head pose estimation techniques. Fig. 4.10: Example of a false positive in V&J performance. To have control over these situations and with the aim to know which effect has these errors over the total results, we decided to do a table (Table 1) annotating all the frames where the face is lost. Because this work has been done manually, we decided to also annotate the frames where the face is detected, but the detection rectangle does not include the nose (it is possible in large head rotations). This will be useful later when we evaluate the nose detection in the cylinder fitting algorithms. Subject Frames where nose is lost Frames where the face is lost Total number of face losses Total number of frames of the sequence % where the face is lost 1 - 1050 - 1070 20 1438 1,39 2 - - 0 1611 0 3 - - 0 882 0 4 - 430 - 450 640 - 740 780 - 910 250 1257 19,89 5 1370 - 1380 275 - 295 890 - 920 1230 - 1270 90 1528 5,89 6 - 230 - 237 800 - 820 1040 - 1050 1465 - 1485 57 1536 3,71 7 - - 0 1221 0 8 1470 - 1490 390 - 443 53 1293 4,09 9 - - 0 1827 0 10 985 - 1025 1275 - 1295 20 1607 1,24 Table 1: This table contains the false positive rate for each subject of ICP 3D HeadPose Database [75, 76]. CHAPTER 4: RESULTS 55 (a) (b) (c) (d) (e) (f) Fig. 4.18: Mean absolute error computed for each estimated angle from the application of PCA algorithm over the database without subject 4 (2). (a) Pitch using thick point cloud. (b) Pitch using thin point cloud. (c) Yaw using thick point cloud. (d) Yaw using thin point cloud. (e) Roll using thick point cloud. (f) Roll using thin point cloud. 0 5 10 15 20 25 30 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (PCA - thick - (2) ) 0 5 10 15 20 25 30 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (PCA - thin - (2)) 0 20 40 60 80 100 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (PCA - thick - (2)) 0 20 40 60 80 100 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (PCA - thin - (2)) 0 20 40 60 80 100 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (PCA - thick - (2)) 0 5 10 15 20 25 30 35 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (PCA - thin - (2)) CHAPTER 4: RESULTS 56 (a) (b) (c) (d) (e) (f) Fig. 4.19: Mean absolute error computed for each estimated angle from the application of PCA algorithm over the database without subject 4 and 5 (3). (a) Pitch using thick point cloud. (b) Pitch using thin point cloud. (c) Yaw using thick point cloud. (d) Yaw using thin point cloud. (e) Roll using thick point cloud. (f) Roll using thin point cloud. 0 5 10 15 20 25 30 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (PCA-thick-(3)) 0 5 10 15 20 25 30 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (PCA-thin-(3)) 0 10 20 30 40 50 60 70 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (PCA-thick-(3)) 0 10 20 30 40 50 60 70 80 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (PCA-thin-(3)) 0 5 10 15 20 25 30 35 40 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (PCA-thick- (3)) 0 5 10 15 20 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (PCA-thin-(3)) CHAPTER 4: RESULTS 57 With these lasts graphs, we can appreciate how the error decrease, first removing the subject 4 from the dataset (2) and then removing subjects 4 and 5 (3). This is because, as mentioned, the failed face detection in some parts of its sequences makes these two subjects a big part of the error source of our performance (In section 4.4 we explain in more detail this event). With the database without these two subjects (3) we have acceptable estimation values for both pitch and roll in an interval of [−30 • ,30 • ]. Unfortunately, yaw has not the same behavior and the big error remains even though we remove the problematic subjects. As we have seen with this first method, using the database without subjects 4 and 5 (3) we obtain better results. To avoid fill the report with too much graphs, from now we show directly the results tested with this clipped database. 4.3.2 Global results for cylinder fitting In this section we present the global results for both techniques of cylinder fitting, Cylinder fitting using RANSAC and Cylinder fitting doing an exhaustive search of the cylinder axis. But first we want to show the results for the nose detection techniques explained in the previous chapter. 4.3.2.1 Results of the Error Graph for nose detection Next we present the results obtained from the first implemented technique of nose detection. As explained, this technique consists in computing the distance between the points of the face point cloud and the head axis computed by cylinder fitting methods (For more details, see section 3.6.1). In Fig. 4.20 we show the results for subject 1 in the first frame of the sequence with a 0 T yaw ground truth angle. The graph on the left is plotted over the whole entire domain of the face point cloud and the graph on the right is plotted only over our interval of interest. CHAPTER 4: RESULTS 58 (a) (b) Fig. 4.20: Mean distance between the cylinder axis and the point cloud for each direction covering the point cloud of the frame 1 of subject number 1 (ã ã ).. (a) For the entire domain. (b) Zoomed in the region of interest. Here we expected to find a peak close to the 0 • area. Instead, there is an oscillating signal that does not show any significant peak that we can determine as a nose around 0 T . In Fig. 4.21 we plotted the same graphs but changing the yaw ground truth angle. Here we expect a peak in 23,88 • . (a) (b) Fig. 4.21: Mean distance between the cylinder axis and the point cloud for each direction covering the point cloud. (a) For the entire domain. (b) Zoomed in the region of interest of the frame 1000 of subject number 1 (–—.ää ã ). In this case the desired results are neither achieved. We cannot distinguish any peak around 23,88 T that we can determine as a nose. For this reason, we finally decided to discard this technique and implement the nose detection using the Effective Energy algorithm. -150 -100 -50 0 50 100 150 0 10 20 30 40 50 60 70 Point cloud angles Mean distance Nose MD graph (S1 - f0001) -50 -40 -30 -20 -10 0 10 20 30 40 50 0 0,5 1 1,5 2 2,5 3 3,5 Point cloud angles Mean distance Nose MD Zoom (S1 - f0001) -100 -50 0 50 100 0 10 20 30 40 50 60 70 80 Point cloud angles Mean distance Nose MD graph (S2 -f1000) -50 -40 -30 -20 -10 0 10 20 30 40 50 0 1 2 3 4 5 6 7 Point cloud angles Mean distance Nose MD Zoom (S2 -f1000) CHAPTER 4: RESULTS 59 4.3.2.2 Global results of cylinder fitting using RANSAC Here we present the results for the cylinder fitting method using RANSAC for the clipped database (3). In Fig. 4.22 we can see images of the point clouds while the algorithm is computing the angles. In the left part of the image we have the original computed point cloud. To allow a fast computation, we down sample this point cloud. The result is shown in the middle of the image. We can see some of the normal vectors of the point cloud surface and the fitted cylinder. Finally, at the right part of the image we see the point cloud with the estimated orientation axes, blue for the c−dcef, red for the g−dcef and green for the h−dcef. The red point clouds are the points considered as inliers of the cylinder fitting. The green points are the candidates for the nose. The above images are using the thick point cloud, and the below images using the thin poitcloud. (a) (b) Fig. 4.22: Images taken during the execution of Cylinder fitting using RANSAC algorithm. In (a) we can see images of the thick face point cloud and in (b) images of the thin face point cloud. CHAPTER 4: RESULTS 60 (a) (b) (c) (d) (e) (f) Fig. 4.23: Mean absolute error computed for each estimated angle from the application of Cylinder fitting using RANSAC algorithm over the database without subject 4 and 5 (3). (a) Pitch using thick point cloud. (b) Pitch using thin point cloud. (c) Yaw using thick point cloud. (d) Yaw using thin point cloud. (e) Roll using thick point cloud. (f) Roll using thin point cloud. 0 10 20 30 40 50 60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (RC - thick - (3)) 0 10 20 30 40 50 60 70 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (RC - thin - (3)) 0 20 40 60 80 100 120 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (RC - thick - (3)) 0 20 40 60 80 100 120 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (RC - thin - (3)) 0 20 40 60 80 100 120 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (RC - thick - (3)) 0 20 40 60 80 100 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (RC - thin - (3)) CHAPTER 4: RESULTS 61 In this case we observe how the thick point clouds have a better estimation of the pitch and roll angles than the thin ones. More points in the cloud allow a better fitting in this method because RANSAC algorithm is able to optimize the parameters of a mathematical model even in the presence of outliers. In any case, we observe that the estimation of the yaw is still disappointing. 4.3.2.3 Global results of Cylinder Fitting using ESCA Here we present the results for the cylinder fitting doing the exhaustive search for the cylinder axis for the clipped database (3). In Fig. 4.24 we can see images while the algorithm is computing the angles. Here we can see in different views the cylinder fitted to the head point cloud. Furthermore, the estimated axes of the head are shown, red for the c−dcef, blue for the g−dcef and green for the h−dcef. The above images are using the thick point cloud, and the below images using the thin point cloud. (a) (b) Fig. 4.24: Images taken during the execution of Cylinder fitting using ESCA algorithm. In (a) we can see images of the thick face point cloud and in (b) images of the thin face point cloud. CHAPTER 4: RESULTS 62 (a) (b) (c) (d) (e) (f) Fig. 4.25: Mean absolute error computed for each estimated angle from the application of Cylinder fitting using ESCA algorithm over the database without subject 4 and 5 (3). (a) Pitch using thick point cloud. (b) Pitch using thin point cloud. (c) Yaw using thick point cloud. (d) Yaw using thin point cloud. (e) Roll using thick point cloud. (f) Roll using thin point cloud. 0 10 20 30 40 50 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (EC - thick - (3)) 0 5 10 15 20 25 30 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 MAE ( α ) Ground truth angles Pitch MAE (EC-thin-(3)) 0 20 40 60 80 100 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (EC - thick - (3)) 0 20 40 60 80 100 -80 -60 -40 -20 0 20 40 60 80 MAE ( β ) Ground truth angles Yaw MAE (EC-thin-(3)) 0 5 10 15 20 25 30 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (EC - thick - (3)) 0 20 40 60 80 100 120 -50 -30 -10 10 30 50 MAE ( γ ) Ground truth angles Roll MAE (EC - thin - (3)) CHAPTER 4: RESULTS 63 In this case we improve a little bit with respect to the first cylinder fitting method. Particularly the pitch angles using the thin point cloud present a range of acceptable errors lower than 10 T for a larger range. Also, the roll angles using the thin point cloud have a good results in the 30 T range around the frontal position, altough two big peaks apear in the extreme positions. However, the yaw performance is still poor. As we have seen, both cylinder fitting algorithms fail in yaw estimation. By reducing the point cloud size we reduce some error but not enough Precisely from the results, we can deduce that the problem remains in the nose detector. Both cylinders fitting methods have the same result, so we can venture to say that proably the problem is with the nose detector. To confirm our hypotesis we show Fig. 4.26 where we can see two images where the Effective Energy method computes bad nose positions for large head orientations. Fig. 4.26: Bad nose detections from Effective Energy algorithm for nose detection. In this picture, the red points are the inliers of the fitted cylinder and the green points are the candidates of the nose. Here we can see that in both images the real nose has green candidates points. Usually, there are points of the nose among the nose candiadates for all the head pose orientations. The problem is that in some cases, there are some outgoing areas that are more protruding than the nose area, and this may cause errors and do the algorithm selsect not the right one (see the tip of the green axis). CHAPTER 4: RESULTS 64 4.3.3 Global Results ICP Here we present the results for ICP method on the clipped database (3). In Fig. 4.26 and Fig. 4.27 we can see images while the algorithm is computing the angles. At both parts of the image the white point cloud is the reference point cloud, the one we use to compare with all the other frames. The green point cloud of the right part is the point cloud of the current frame and the red point cloud at the right part is the same after the aligning done by ICP. Fig. 4.27: Images taken during the execution of ICP algorithm using the thick face point cloud. CHAPTER 4: RESULTS 71 There is a huge difference between these two subjects in the roll estimation. While subject 4 presents a big errors for the entire domain, even in frontal positions, subject 8 has an error lower than 10 T for all the sequence. There are some frames where the error increases a little bit but we can generalize in good roll estimation To search an explanation we show the roll estimation sequence of subjects 4 and 8 in Fig. 4.37 and Fig. 4.38. Fig. 4.37: Yaw estimation sequence using ICP algorithm with thick point cloud for subject 4. Fig. 4.38: Yaw estimation sequence using ICP algorithm with thick point cloud for subject 8. Here we have two completely different estimation sequences. The first is lost almost all the way and the second works quite fine. Finding a reason to explain this is not easy. Looking at Table 1 (in section 4.2.5) we know that subject number 4 is one of the subjects with the most lost faces during consecutive frames (430 – 440, 640 – 740 and 780 – 910). In fact, if we look well, we can see how the frames where the face detector loses the face are coincident with the error spikes of roll estimation. As we mentioned in section (3.4 Viola and Jones), this kind of detector only works with small rotations of the head and it loses the face otherwise. We -80 -60 -40 -20 0 20 40 60 80 0 200 400 600 800 1000 1200 Roll ( γ ) Frame Roll estimation sequence (ICP - S4 - thick) roll estimation real roll -40 -30 -20 -10 0 10 20 30 40 0 200 400 600 800 1000 1200 Roll ( γ ) Frame Roll estimation sequence (ICP - S8 -thick) roll estimation real roll CHAPTER 4: RESULTS 72 implemented a tracking system to operate when a face was lost, but the problem in these subjects is not with the false negatives, but with false positives, and it depends on the training data of the face detector. The behavior of the results when a face is loss is random. This causes a great source of error. For all these reasons, we decided to test our algorithms with the database without subjects 4 and 5 and see if we really won accuracy. 4.5 Conclusion of the fourth chapter To sum up this chapter, we made a comparison between the 4 studied methods and their performance over the ICT 3D HeadPose Database [75, 76]. In this comparison we also take an interest in computation time. The global results for PCA show an acceptable error lower than 10 T for pitch and roll estimation, in a 30 T range around the frontal position for pitch and in the entire domain for roll. Nevertheless, yaw estimation is poor, and the error grows linearly with the yaw. The computation time needed for this algorithm is less than 1 ¬f for both thick and thin point clouds, so they can achieve real time. Regarding the results of the cylinder fitting using RANSAC we observe that this method presents worse results in pitch estimation, reducing the range where there is an acceptable error. For the roll estimation, this method has a range of 30 T around a frontal position with an error lower than 10 • . However, the yaw estimation is again poor, presenting a smoothed curve with respect to PCA but still with high error for the entire domain except the frontal orientation. This algorithm has a computation time between 6 and 8 ¬f depending on the number of points in the point cloud, so it could work in real time too. The other cylinder fitting method, based on the exhaustive search of the cylinder axis, presents similar errors. In this case, the range with acceptable errors in pitch estimation is larger but is, still lower than in PCA pitch estimation range. The roll estimation is quite good presenting nice results for the entire domain less the extreme positions. The yaw is improved again and presents a range of ±20 T around the frontal position with an acceptable error, but then, the big errors appear again. Computation time of this algorithm is huge, taking between 1100 and 1600 ¬f, depending on the number of points, to calculate the cylinder for each frame, so it is impossible to work in real time with this algorithm. In addition, after seeing the results are quite similar with the first cylinder fitting method, it is not recommended to use this one. Finally, ICP presents really good results for pitch and roll estimations in the entire domain except some extreme positions. The problem is the same as always, the yaw estimation is poor. This algorithm has a computation time between 800 and 950 ¬f for each frame, so it is not possible to work in real time with this algorithm. 73 Conclusion The main goal of the current work was to develop, evaluate and compare different techniques for head pose estimation using 3D images. For this purpose we implemented 4 different techniques to estimate the head orientation. However, the first challenge presented by this project was to get an accurate and robust method for face detection and tracking. To achieve this first objective, we finally used a combination of Viola & Jones algorithm [31, 35, 67] and the Lucas- Kanade tracking system [72, 73]. To be sure we had a good face detector we tested it on the whole database. The results were analyzed manually and they were satisfactory with a detection rate of 96,55 %. Although the face detector had a well performance in general, there were two subjects of the database that presented a high false positive rate. For this reason, we also decided to test the head estimation methods with the database without these subjects. Once we had the face detector we focused on the head orientation. The four implemented techniques selected were Principal Component Analysis (PCA) [19, 23, 24], two methods to fit a cylinder to the 3D face point cloud, Cylinder fitting using Random Sample Consensus (RANSAC) [43, 64, 65, 66] and Cylinder fitting doing an exhaustive search of the cylinder axis [27]. Finally, the last algorithm was Iterative Closest Point (ICP) [28, 29]. Apart from both cylinder fitting algorithms, all the methods presented are quite different in natures. First of all, PCA computes the main directions of the face point cloud. Cylinder fitting techniques try to estimate the parameters of a cylinder model among the points of the face point cloud and finally ICP computes the relative rotation between two point clouds by aligning them. To evaluate these algorithms we tested them with the ICT 3D HeadPose Database [75, 76] and we analyzed the results by two different methods. First, we did a global analysis of the results for the whole database and then, a specific analysis that allowed us to understand better the behavior of the implemented methods and the studied subjects’ influence on them. In general, PCA showed good results for pitch and roll estimation but very bad results for yaw estimation, which values where always close to 0. This is because the point cloud has always a similar half cylinder shape, independently of the yaw rotation, and the principal component in h−dcef has always the same direction. As for the results of the cylinder fitting using RANSAC, we observed that this method presented little worse results in pitch and roll estimation than PCA. In addition, the yaw estimation was still poor. The other cylinder fitting method presented similar error but a little bit better. The problem with this approach is its CONCLUSION 74 computation time that is near to 1500 ¬f and make impossible for this algorithm to work in real time. The problems of cylinder fitting with the yaw probably come from the nose detector algorithm and a bad detection of this feature. This algorithm works better in frontal positions but it usually loses the nose in large head rotations. An improvement on the nose detection algorithm can improve a lot the results for these two methods. One way to improve it could be to train some machine learning algorithm over a nose database or find better geometric conditions to localize the nose in the face. Another drawback presented in these methods is their instability. Due to the fact that a new cylinder is computed in every frame, there is no continuity in the head orientation estimation. They are static methods. Thus, a thing that could improve these methods would be any kind of filter that relates the new angles estimation with the estimation done in previous frames. One example could be the exponential filter. Finally, ICP presented really good results for pitch and roll estimations but the yaw estimation showed similar results as before. ICP works by aligning the points of each frame point cloud with the points of the reference point cloud, done with a frontal head orientation. As mentioned, all the face point clouds have more or less a half cylinder shape, and if there is no some protuberances or points that allow a distinction in the cylinder, computing the yaw becomes impossible. In our case, this algorithm was fundamentally based on the nose alignment to estimate the yaw, and if it is not enough protruding, the alignment was not well performed. A way to improve this method could be trying to exaggerate some prominent features in the point clouds like the nose, the ears, the chin and even the eyes sockets, making them deeper. This could be done maybe with a lower smoothing of the point cloud. Another improvement to achieve better results could be done by using higher depth information quality. The main problem of the ICP algorithm is its computation time. To sum up, we have presented four algorithms with more or less good estimation of pitch and roll angles. However, we didn’t manage to achieve any of these algorithms to make good yaw estimation, which is the most challenging task because of self-occlusions. All the improvements presented above are thought to try to improve this estimation. 75 Bibliography [1] Fanelli, G., Gall, J., & Van Gool, L. (2011, June). Real time head pose estimation with random regression forests. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on (pp. 617-624). IEEE. [2] Fanelli, G., Weise, T., Gall, J., & Van Gool, L. (2011). Real time head pose estimation from consumer depth cameras. In Pattern Recognition (pp. 101- 110). Springer Berlin Heidelberg. [3] Murphy-Chutorian, E., & Trivedi, M. M. (2009). Head pose estimation in computer vision: A survey. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 31(4), 607-626. [4] Ferrario, V. F., Sforza, C., Serrao, G., Grassi, G., & Mossi, E. (2002). Active range of motion of the head and cervical spine: a three-dimensional investigation in healthy young adults. Journal of orthopaedic research, 20(1), 122-129. [5] Beymer, D. J. (1994, June). Face recognition under varying pose. In Computer Vision and Pattern Recognition, 1994. Proceedings CVPR'94., 1994 IEEE Computer Society Conference on (pp. 756-761). IEEE. [6] Niyogi, S., & Freeman, W. T. (1996, October). Example-based head tracking. In Automatic Face and Gesture Recognition, 1996., Proceedings of the Second International Conference on (pp. 374-378). IEEE. [7] Szeliski, R. (2010). Computer vision: algorithms and applications. Springer Science & Business Media. [8] Schowengerdt, R. A. (2006). Remote sensing: models and methods for image processing. Academic press. [9] Li, Y., Gong, S., & Liddell, H. (2000). Support vector regression and classification based multi-view face detection and recognition. In Automatic Face and Gesture Recognition, 2000. Proceedings. Fourth IEEE International Conference on (pp. 300-305). IEEE. [10] Li, Y., Gong, S., Sherrah, J., & Liddell, H. (2004). Support vector machine based multi-view face detection and recognition. Image and Vision Computing, 22(5), 413-427. [11] Wu, J., & Trivedi, M. M. (2008). A two-stage head pose estimation framework and evaluation. Pattern Recognition, 41(3), 1138-1158. [12] Srinivasan, S., & Boyer, K. L. (2002, August). Head pose estimation using view based eigenspaces. In null (p. 40302). IEEE. [13] Li, S. Z., Fu, Q., Gu, L., Schölkopf, B., Cheng, Y., & Zhang, H. (2001). Kernel machine based learning for multi-view face detection and pose estimation. InComputer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on (Vol. 2, pp. 674-679). IEEE. [14] Ma, B., Zhang, W., Shan, S., Chen, X., & Gao, W. (2006, August). Robust head pose estimation using LGBP. In Pattern Recognition, 2006. ICPR 2006. 18th International Conference on (Vol. 2, pp. 512-515). IEEE. BIBLIOGRAPHY 76 [15] Cordea, M. D., Petriu, E. M., Georganos, N. D., Petriu, D. C., & Whalen, T. E. (2001). Real-time 2 (1/2)-D head pose recovery for model-based videocoding.Instrumentation and Measurement, IEEE Transactions on, 50(4), 1007-1013. [16] Nikolaidis, A., & Pitas, I. (2000). Facial feature extraction and pose determination. Pattern Recognition, 33(11), 1783-1791. [17] Morency, L. P., Sundberg, P., & Darrell, T. (2003, October). Pose estimation using 3d view-based eigenspaces. In Analysis and Modeling of Faces and Gestures, 2003. AMFG 2003. IEEE International Workshop on (pp. 45-52). IEEE. [18] Wu, J., Pedersen, J. M., Putthividhya, D., Norgaard, D., & Trivedi, M. M. (2004, August). A two-level pose estimation framework using majority voting of gabor wavelets and bunch graph analysis. In Proc. Pointing 2004 Workshop: Visual Observation of Deictic Gestures (pp. 4-12). [19] Robospace. (2015). Object orientation, principal component analysis & opencv. “ https://robospace.wordpress.com/2013/10/09/object-orientation- principal-component-analysis-opencv/” . [20] Dervinis, D. (2015). Head orientation estimation using characteristic points of face. Elektronika ir Elektrotechnika, 72(8), 61-64. [21] Zhu, X., & Ramanan, D. (2012, June). Face detection, pose estimation, and landmark localization in the wild. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on (pp. 2879-2886). IEEE. [22] Day, M., & Games, I. (2012). Extracting Euler angles from a rotation matrix. Insomniac Games R&D. Available online at: “ http://www.insomniacgames.com/mike-day-extracting-euler-angles-from- a-rotation-matrix” . [23] Smith, L. I. (2002). A tutorial on principal components analysis. Cornell University, USA, 51, 52. [24] Shlens, J. (2014). A tutorial on principal component analysis. arXiv preprint arXiv:1404.1100. [25] Littlewort, G., Whitehill, J., Wu, T., Fasel, I., Frank, M., Movellan, J., & Bartlett, M. (2011, March). The computer expression recognition toolbox (CERT). In Automatic Face & Gesture Recognition and Workshops (FG 2011), 2011 IEEE International Conference on (pp. 298-305). IEEE. [26] Hernández, N., Jiménez, P., Berga, L. M., Delgado, B., & Sevillano, M. (2010, September). Vision-Based distraction analysis tested on a realistic driving simulator. In Intelligent Transportation Systems (ITSC), 2010 13th International IEEE Conference on (pp. 895-902). IEEE. [27] Eberly, David. "Fitting 3D data with a cylinder." Online, February (2008). [28] Tamaki, T., Abe, M., Raytchev, B., & Kaneda, K. (2010, November). Softassign and em-icp on gpu. In Networking and Computing (ICNC), 2010 First International Conference on (pp. 179-183). IEEE. [29] Granger, S., & Pennec, X. (2006). Multi-scale EM-ICP: A fast and robust approach for surface registration. Computer Vision—ECCV 2002, 69-73. BIBLIOGRAPHY 77 [30] Hernandez, M., Choi, J., & Medioni, G. (2015). Near laser-scan quality 3-D face reconstruction from a low-quality depth stream. Image and Vision Computing,36, 61-69. [31] Viola, P., & Jones, M. J. (2004). Robust real-time face detection. International journal of computer vision, 57(2), 137-154. [32] Roth, D., Yang, M. H., & Ahuja, N. (2000). A SNoW-based face detector.Urbana, 51, 61801. [33] Yang, M. H., Kriegman, D. J., & Ahuja, N. (2002). Detecting faces in images: A survey. Pattern Analysis and Machine Intelligence, IEEE Transactions on,24(1), 34-58. [34] Pavani, S. K., Delgado, D., & Frangi, A. F. (2010). Haar-like features with optimally weighted rectangles for rapid object detection. Pattern Recognition, 43(1), 160-172. [35] Viola, P., & Jones, M. (2001). Rapid object detection using a boosted cascade of simple features. In Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on (Vol. 1, pp. I-511). IEEE. [36] Zhao, L., Pingali, G., & Carlbom, I. (2002). Real-time head orientation estimation using neural networks. In Image Processing. 2002. Proceedings. 2002 International Conference on (Vol. 1, pp. I-297). IEEE. [37] Seemann, E., Nickel, K., & Stiefelhagen, R. (2004, May). Head pose estimation using stereo vision for human-robot interaction. In Automatic Face and Gesture Recognition, 2004. Proceedings. Sixth IEEE International Conference on (pp. 626-631). IEEE. [38] Rae, R., & Ritter, H. J. (1998). Recognition of human head orientation based on artificial neural networks. Neural Networks, IEEE Transactions on, 9(2), 257-265. [39] Murphy-Chutorian, E. M. (2009). Vision-based head pose estimation and interactivity analysis: algorithms, systems and evaluation. [40] Murphy-Chutorian, E., Doshi, A., & Trivedi, M. M. (2007, September). Head pose estimation for driver assistance systems: A robust algorithm and experimental evaluation. In Intelligent Transportation Systems Conference, 2007. ITSC 2007. IEEE (pp. 709-714). IEEE. [41] Cai, Q., Gallup, D., Zhang, C., & Zhang, Z. (2010). 3d deformable face tracking with a commodity depth camera. In Computer Vision–ECCV 2010 (pp. 229- 242). Springer Berlin Heidelberg. [42] Xiao, J., Moriyama, T., Kanade, T., & Cohn, J. F. (2003). Robust full-motion recovery of head by dynamic templates and re-registration techniques. International Journal of Imaging Systems and Technology, 13(1), 85-94. [43] Beder, C., & Förstner, W. (2006). Direct solutions for computing cylinders from minimal sets of 3d points. In Computer Vision–ECCV 2006 (pp. 135- 146). Springer Berlin Heidelberg. [44] La Cascia, M., Sclaroff, S., & Athitsos, V. (2000). Fast, reliable head tracking under varying illumination: An approach based on registration of texturemapped 3D models. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22(4), 322-336. BIBLIOGRAPHY 78 [45] Spreeuwers, L. (2011). Fast and accurate 3d face recognition. International Journal of Computer Vision, 93(3), 389-414. [46] Malassiotis, S., & Strintzis, M. G. (2005). Robust real-time 3D head pose estimation from range data. Pattern Recognition, 38(8), 1153-1165. [47] Gee, A., & Cipolla, R. (1996). Fast visual tracking by temporal consensus. Image and Vision Computing, 14(2), 105-114. [48] Yao, P., Evans, G., & Calway, A. (2001). Using affine correspondence to estimate 3-d facial pose. In Image Processing, 2001. Proceedings. 2001 International Conference on (Vol. 3, pp. 919-922). IEEE. [49] Cootes, T. F., Edwards, G. J., & Taylor, C. J. (2001). Active appearance models. IEEE Transactions on Pattern Analysis & Machine Intelligence, (6), 681-685. [50] Schodl, A., Haro, A., & Essa, I. A. (1998). Head tracking using a textured polygonal model. [51] Malciu, M., & Pr?teux, F. (2000). A robust model-based approach for 3d head tracking in video sequences. In Automatic Face and Gesture Recognition, 2000. Proceedings. Fourth IEEE International Conference on (pp. 169-174). IEEE. [52] Lowe, D. G. (2004). Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2), 91-110. [53] Ohayon, S., & Rivlin, E. (2006, August). Robust 3d head tracking using camera pose estimation. In Pattern Recognition, 2006. ICPR 2006. 18th International Conference on (Vol. 1, pp. 1063-1066). IEEE. [54] Yang, R., & Zhang, Z. (2002, May). Model-based head pose tracking with stereovision. In Automatic Face and Gesture Recognition, 2002. Proceedings. Fifth IEEE International Conference on (pp. 255-260). IEEE. [55] Decarlo, D., & Metaxas, D. (2000). Optical flow constraints on deformable models with applications to face tracking. International Journal of Computer Vision, 38(2), 99-127. [56] Wikipedia. Euler angles. (2015). “https://en.wikipedia.org/wiki/Euler_angles”. [57] Wikipedia. Rotation Matrix. (2015). “ https://en.wikipedia.org/wiki/Rotation_matrix ”. [58] Wikipedia. Translation (geometry). (2015). “https://en.wikipedia.org/wiki/Translation_(geometry)”. [59] Gruber, Diana. (2000). The Mathematics of the 3D Rotation Matrix. Xtreme Game Developrs Conference. “ https://www.fastgraph.com/makegames/3drotation/ ”. [60] Murray, G. (2013). Rotation about an arbitrary axis in 3 dimensions. Colorado School of Mines notes. “ http://inside.mines.edu/fs_home/gmurray/ArbitraryAxisRotation/ ”. [61] Euclidean Space. Maths – Conversion Matrix to Quaternion. (2015). “http://www.euclideanspace.com/maths/geometry/rotations/conversions/ matrixToQuaternion/”. BIBLIOGRAPHY 79 [62] Wikipedia. Conversion between quaternions and Euler angles. (2015). “https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler _angles”. [63] Huang, K. S., & Trivedi, M. M. (2004, August). Robust real-time detection, tracking, and pose estimation of faces in video streams. In Pattern Recognition, 2004. ICPR 2004. Proceedings of the 17th International Conference on (Vol. 3, pp. 965-968). IEEE. [64] Point Cloud Library (pcl). (2015). How to use Random Sample Consensus model. “http://pointclouds.org/documentation/tutorials/random_sample_co nsensus.php” . [65] Point Cloud Library (pcl). (2015). Cylinder model segmentation. “http://pointclouds.org/documentation/tutorials/random_sample_consensu s.php ”. [66] Wikipedia. (2015). RANSAC. “https://en.wikipedia.org/wiki/RANSAC”. [67] Wikipedia. (2015). Viola-Jones object detecting framework. “https://en.wikipedia.org/wiki/Viola%E2%80%93Jones_object_detection_fr amework”. [68] OpenCV documentation. (2015). Cascade Classifier. “http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade _classifier.html” [69] Steve Putenmans. GitHub. Opencv/data/haarcascades (2015). “ https://github.com/Itseez/opencv/tree/master/data/haarcascades” [70] Haar Cascades. (2015). “http://alereimondo.no-ip.org/OpenCV/34/” [71] Open Source Computer vision (OpenCV). (2015). Meanshift and Camshift. “http://docs.opencv.org/master/db/df8/tutorial_py_meanshift.html#gsc.tab a0”. [72] Bouguet, J. Y. (2001). Pyramidal implementation of the affine lucas kanade feature tracker description of the algorithm. Intel Corporation , 5 , 1-10. [73] Open Source Computer vision (OpenCV). (2015). Optical Flow. “http://docs.opencv.org/master/d7/d8b/tutorial_py_lucas_kanade.html#gsc. taba0”. [74] Xu, C., Tan, T., Wang, Y., & Quan, L. (2006). Combining local features for robust nose location in 3D facial data. Pattern Recognition Letters , 27 (13), 1487-1494. [75] USC. Institute for Creative Technologies. The Multicomp Lab. ICT 3D HeadPose Database. (2015). “ http://multicomp.ict.usc.edu/?pa1738”. [76] Tadas Baltrusaitis Peter Robinson Louis-Philippe Morency. '3D Constrained Local Model for Rigid and Non-Rigid Facial Tracking'. IEEE Computer Vision and Pattern Recognition (CVPR 2012).June 2012. [77] Point Cloud Library. (2015). “http://pointclouds.org/”.