Full text
Trabajo Fin de Máster Detección y modelado de escaleras con sensor RGB-D para asistencia personal Autor/es Alejandro Pérez Yus Director/es Jos± Jesús Guerrero Campo Gonzalo López Nicolás Escuela de Ingeniería y Arquitectura 2014 Repositorio de la Universidad de Zaragoza – Zaguan http://zaguan.unizar.es
Resumen La habilidad de avanzar y moverse de manera efectiva por el entorno resulta natural para la mayoría de la gente, pero no resulta fácil de realizar bajo algunas circunstancias, como es el caso de las personas con problemas visuales o cuando nos movemos en entornos especialmente complejos o desconocidos. Lo que pretendemos conseguir a largo plazo es crear un sistema portable de asistencia aumentada para ayudar a quienes se enfrentan a esas circunstancias. Para ello nos podemos ayudar de cámaras, que se integran en el asistente. En este trabajo nos hemos centrado en el módulo de detección, dejando para otros trabajos el resto de módulos, como podría ser la interfaz entre la detección y el usuario. Un sistema de guiado de personas debe mantener al sujeto que lo utiliza apartado de peligros, pero también debería ser capaz de reconocer ciertas características del entorno para interactuar con ellas. En este trabajo resolvemos la detección de uno de los recursos más comunes que una persona puede tener que utilizar a lo largo de su vida diaria: las escaleras. Encontrar escaleras es doblemente benecioso, puesto que no sólo permite evitar posibles caídas sino que ayuda a indicar al usuario la posibilidad de alcanzar otro piso en el edicio. Para conseguir esto hemos hecho uso de un sensor RGB-D, que irá situado en el pecho del sujeto, y que permite captar de manera simultánea y sincronizada información de color y profundidad de la escena. El algoritmo usa de manera ventajosa la captación de profundidad para encontrar el suelo y así orientar la escena de la manera que aparece ante el usuario. Posteriormente hay un proceso de segmentación y clasicación de la escena de la que obtenemos aquellos segmentos que se corresponden con "suelo", "paredes", "planos horizontales" y una clase residual, de la que todos los miembros son considerados "obstáculos". A continuación, el algoritmo de detección de escaleras determina si los planos horizontales son escalones que forman una escalera y los ordena jerárquicamente. En el caso de que se haya encontrado una escalera, el algoritmo de modelado nos proporciona toda la información de utilidad para el usuario: cómo esta posicionada con respecto a él, cuántos escalones se ven y cuáles son sus medidas aproximadas. En denitiva, lo que se presenta en este trabajo es un nuevo algoritmo de ayuda a la navegación humana en entornos de interior cuya mayor contribución es un algoritmo de detección y modelado de escaleras que determina toda la información de mayor relevancia para el sujeto. Se han realizado experimentos con grabaciones de vídeo en distintos entornos, consiguiendo buenos resultados tanto en precisión como en tiempo de respuesta. Además se ha realizado una comparación de nuestros resultados con los extraídos de otras publicaciones, demostrando que no sólo se consigue una eciencia que iguala al estado de la materia sino que también se aportan una serie de mejoras. Especialmente, nuestro algoritmo es el primero capaz de obtener las dimensiones de las escaleras incluso con obstáculos obstruyendo parcialmente la vista, como puede ser gente subiendo o bajando. Como resultado de este trabajo se ha elaborado una publicación aceptada en el Second workshop on Assitive Computer Vision and Robotics del ECCV , cuya presentación tiene lugar el 12 de Septiembre de 2014 en Zúrich, Suiza. i
ii
Abstract The ability of navigating eectively in the environment is natural for people, but not easy to achieve under certain circumstances, such as the case of visually impaired people or when moving at unknown and intricate environments. Our goal in the long term is building a wearable enhanced assistance system to help the people under that circumstances. To deal with this problem we can count on the help of instruments such as cameras, laser scans or other type of sensors and integrate them into the wearable navigation assistant. In this work we have focused on the detection module of the assistant, leaving the rest of the modules such as the interface between the detection and the user to other works. A personal guidance system must keep the subject away from hazards, but it should also point out specic features of the environment the user might want to interact with. In this work we propose an algorithm which outputs the region of space available to walk but also solves the detection of one of the most common features any person can come across during his daily life: the stairs. Finding stairs along the path has the double benet of preventing falls and advertising the possibility of reaching another oor in the building. To accomplish that we use a RGB-D sensor mounted on the chest, able to provide simultaneously color and depth information of the scene. The algorithm takes advantage of the depth perception to nd the ground automatically and to dynamically recalibrate the ground position in order to project the 3D coordinates to a user-centered system. There is a segmentation process of the projected scene where the resulting segments are tentatively classied among "oor", "walls", "horizontal planes" and a residual class where all members are considered "obstacles". Then the stairs detection algorithm outputs if the horizontal planes constitute a stairway, a single step or none. If a stairway is found, the algorithm retrieves how it is positioned with respect to the subject, how many steps can be seen and their approximate dimensions. What we present here is a new algorithm for human navigation in indoor environments that serve as base for future add-ons to help us to understand better the scene. Our main contribution is a new stair detection and modelling module that provides full information of the staircases present before the subject. Experiments with video recordings in dierent indoor environments have accomplished great results in terms of accuracy and time response. Besides, a comparison of our results with the ones from other publications has been performed, showing that the algorithm not only reaches state of the art performance but also includes further improvements. Specically, our algorithm is the rst known to the authors to be able to obtain the measurements of staircases even with people obstructing the view, allowing the extension of the information of the few steps detected to complete the staircase. As a result of this work there has been a research paper accepted in the Second Workshop on Assistive Computer Vision and Robotics of the ECCV , whose presentation takes place the 12th of September of 2014 in Zurich, Switzerland. iii
iv
Contents 1 Introduction 1 1.1 Motivation............................... 1 1.2 StateoftheArt............................ 3 1.2.1 Visually Impaired Aids . . . . . . . . . . . . . . . . . . . . 3 1.2.1.1 Assistants without Vision . . . . . . . . . . . . . 4 1.2.1.2 Vision-based Assistants . . . . . . . . . . . . . . 5 1.2.1.3 Assistants Using Depth Sensing . . . . . . . . . . 6 1.2.2 Scene Understanding . . . . . . . . . . . . . . . . . . . . . 8 1.2.3 Stairs Detection . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.3.1 Conventional Cameras . . . . . . . . . . . . . . . 10 1.2.3.2 Stereo Vision . . . . . . . . . . . . . . . . . . . . 11 1.2.3.3 Laser Scanning . . . . . . . . . . . . . . . . . . . 11 1.2.3.4 RGB-D ....................... 11 1.3 Objectives............................... 13 1.4 Structure ............................... 14 1.5 Publication .............................. 14 2 RGB-D Setup and Data Preprocessing 17 2.1 Setup Conguration and Data Acquisition . . . . . . . . . . . . . 17 2.2 FloorDetection............................ 18 3 Segmentation and Classication of the Scene 23 3.1 NormalEstimation.......................... 23 3.2 Region-growing ............................ 25 3.3 PlanarTest .............................. 26 3.4 PlaneExtension............................ 27 3.5 Euclidean Cluster Extraction . . . . . . . . . . . . . . . . . . . . 27 3.6 Plane Classication . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4 Stair Detection and Modelling Algorithm 31 4.1 StairDetection ............................ 31 4.2 StairModelling ............................ 33 5 Experimental Evaluation 39 6 Conclusions and Future Work 45 v
CONTENTS vi
Chapter 1 Introduction In this work we deal with the perception task of a wearable navigation assistant. We have focused on the detection of staircases because of the important role they play in indoor navigation, due to the multi-oor reaching possibilities they bring and the lack of security they cause, specially for those who suer from visual deciencies. We use the depth sensing capacities of the modern RGB-D cameras to segment and classify the dierent elements that integrate the scene and then carry out the stair detection and modelling algorithm to retrieve all the information that might interest the user, i.e. the location and orientation of the staircase, the number of steps and the step dimensions. Experiments prove that the system is able to perform fast enough for normal usage and works even under partial occlusions of the stairway. In Section 1.1 we talk about the motivation that encourage us to do this work. Then, in Section 1.2 a review of the dierent solutions to this problem presented through the years is shown. In Section 1.3 we point out the goals we set when we started to work on this line. Finally, in Section 1.4 the structure of the work is explained, to conclude with a brief comment about our publication related to this work's topic in Section 1.5. 1.1 Motivation According to the World Health Organization (WHO), in 2012 there were 285 millions of visually impaired people worldwide: 39 million are blind and 246 have low vision. This large amount of people is not negligible and shows the need of portable, practical, and highly functional assistive devices to help out people under this circumstances. The WHO also arms that the 90 % of the world's visually impaired live in low-income settings and the 82 % of people living in blindness are aged 50 or above. This means that the devices we pursue to develop should not be high priced or technologically complex. When thinking about building a platform to help visually impaired people we have to think about the information the user might want or need to receive. Despite their lack of sight, as human beings they can still use their own senses and experiences in many tasks. They also have always had two low-tech level aids: 1
CHAPTER 1. INTRODUCTION Recently, the introduction in the market of consumer cameras which combine simultaneously range-sensing with conventional image-sensing has made a great impact in what assistance navigation for the visually impaired concerns. They provide a great amount of information, are low-cost and have good miniaturization perspectives. That is the case of [62], which uses a head-mounted conguration or [6], which uses a chest-mounted conguration along with an accelerometer to measure the movement of the subject. [32] introduces the use of a vibrotactile helmet to comunicate with the user besides the head-mounted RGB-D sensor. Also Lee et al. in [29] improved what was published for Pradeep et al. in [42] by replacing the stereo camera with a RGB-D camera. Another example using machine learning techniques for segmentation of the scene is [61]. 1.2.2 Scene Understanding Segmentation and scene understanding have been essential issues in robot and human navigation, because it is not only a matter of avoiding obstacles: in order to perform any relatively complex task it is necessary to recognize the features of your surroundings in order to interact with them. Our case of study is indoor environments, where, like in most human-made scenarios, the basic structure of the scene is made by combination of planes. Range sensors have proven to be extremely helpful for this mission, and many dierent algorithms have been developed to perform the segmentation. Hoover et al. [24] compiled and performed an evaluation of related early work. Three basic type of approaches are distinguished: RANSAC, Hough Transform and Region Growing. Rusu et al. [48] introduced a point cloud-based segmentation and mapping of the scene in household environments (Fig. 1.7). Some of the algorithms presented in this article were later included in the Point Cloud Library (PCL) which Rusu et al. presented in [47]. Both the library and some of the algorithms have also been used in our work, such as the normal estimation or region growing. Their acquisition of point cloud data was made with laser scanners and required complex registration operations which can now be avoided with modern RGB-D sensors. Figure 1.7: Segmentation and mapping in household environments by [48] Holz et al. proposed an algorithm for real-time plane segmentation using RGB-D-captured data by fast computing of surface normals, clustering and classifying in both normal space and spherical coordinates [23]. Wang et al. proposed another algorithm in [60] which works in two steps: initial segmentation (voxelization and region-growing algorithm) and rened segmentation (plane merging) which proves to be faster than the previously mentioned. Alternatively, Dube et 8
1.2. STATE OF THE ART al. [13] used Randomized Hough Transform for the same task. Recently, Holz et al. proposed a new algorithm for fast range image segmentation and smoothing using approximate surface reconstruction and region growing [22]. The main difference to the previous ones is that they make a triangle mesh of the input cloud prior to the segmentation. At the end they do a polygonalization using alpha shapes, resulting a clean smooth segmented reconstruction of the scene. In [26], Koppula et al. proposed and evaluated a model and learning algorithm for scene understanding that exploits rich relational information derived from the point clouds captured by a RGB-D sensor for object labeling. Not only is able to detect coarse classes like walls or ground, but also individual objects such as a keyboard or a monitor. To achieve that they use a model similar to a Markov Random Field and Machine Learning algorithms (Fig. 1.8). The works were extended in [3]. Although the results are promising, their goals and methods are far from ours at the moment. In this direction we can nd other approaches such as [45], [59], or [17]. Figure 1.8: Semantic segmentation of the scene by [3] Silberman et al. claimed that most existing work ignores physical interactions or is applied only to tidy rooms and hallways [52]. Their goals were to analyze typical messy indoor scenes and classify the segments among oor, walls, supporting surfaces and object regions, and to recover support relations among them. Other special cameras such as omnidirectional cameras can be used to recover the spatial layout of a a scene from one single image, as López-Nicolás et al. show in [30]. 1.2.3 Stairs Detection Stairways are inevitably present in human-made environments and constitute a major problem in robot and human navigation. Many dierent types of sensors e.g. monocular and stereo cameras or laser scanning have been used for detecting stairs, all of them having intrinsic advantages and disadvantages. A brief revision 9
CHAPTER 1. INTRODUCTION of the existing algorithms is done in this section, classifying the works according to the sensor used. 1.2.3.1 Conventional Cameras The work of Se and Brady [49] uses normal gray images to detect the presence and estimate orientation and slope of staircases in order to help partially sighted people by using traditional computer vision: Gabor ltering, vanishing point detection and homographies. All the results shown are from outdoor scenes, some of them with the camera quite far from the steps (Fig. 1.9a). However, all of them consist of ascending staircases and it seems that the algorithm might be unable to perform detection of single steps. Other similar algorithms are [10], which focus in Unmanned Ground Vehicles stair climbing, and [19], which prioritizes the nding of the diagonal lines corresponding to the handrails to select stair candidates, which apparently works ne in the examples shown of outdoor ascending stairs (Fig. 1.9b), but seems unlikely to be exportable to other scenarios. In [20], the same authors proposed a dierent algorithm to detect stairways using Gabor lter, focusing in indoor environments. (a) (b) (c) (d) Figure 1.9: Stair detection algorithms using conventional monocular cameras. Hesch et al. [21] decided to focus on detecting descending staircases in both 10
1.2. STATE OF THE ART far and near approach, being the latter the most interesting. It uses line detection combined with optical ow computation in order to detect the edges of the rst step (Fig. 1.9c). For autonomous tracked vehicles with small size and the camera situated close to the oor might be useful for detecting step-downs, but thinking about a wearable system for human navigation and the situations the sensor may have this approach falls short. Conventional vision has been widely used together with Machine Learning algorithms. Andersen and Seibel [4] used a head mounted camera and Hough transform to detect lines and train a neural network in order to detect navigation hazards such as doors and staircases. Wang and Wang [58] used Real AdaBoost for training a cascaded classier (Fig. 1.9d). 1.2.3.2 Stereo Vision Stereo vision has also been used to perform this task. That is the case of [31], which combines the use of the geometry information provided by the stereo with the RGB data from the images captured. This combination makes the system less prone to error. Also, the aforementioned [43] uses stereo vision in a more similar way as we do, using the information obtained to estimate normals and planes of the scene. However, they provide the basis for stair nding but not the recognition itself. Gutmann et al. proposed a stair detection algorithm for humanoid robots in [18] where the stereo vision system segments the scene into planar surfaces. Experimental results are also shown in this work. 1.2.3.3 Laser Scanning Most of the authors who use laser scanning for nding stairs focus on robot navigation, like [14],[2],[34], [5] and [40]. In [25], a small laser range sensor is used to develop a visually impaired assistant. It is attached to the chest of the subject. With this laser scanner, a segmentation of the scene is performed and the coordinates are classied into horizontal or vertical segments, after which the system judges whether there are steps or not. These ideas are also present in our proposal, but our output proves to be much more interesting as they only inform the user of the presence of stairs without giving extra data. Oÿwald et al. in [37] and [38] used the combination of a laser scan and conventional vision applied to humanoid robots stair climbing: the laser to detect the stairs and build a model of the staircase from a distance and the camera, pointing downwards, to detect the next step in front of the robot during stairclimbing. In 2012 they improved their proposal as shown in [39]. 1.2.3.4 RGB-D Some authors who choose RGB-D as main sensor use machine learning algorithms to perform staircase detection. In the case of [15], they use neural networks to 11
CHAPTER 1. INTRODUCTION detect the presence of obstacles and classify scenes captured by the depth camera among ascending staircase, descending staircase or none. Wang and Tian used a similar approach in [57] with some dierences. At rst they use Hough transform to detect parallel lines and nd out if the images have a group of concurrent lines. After that they use the depth information to recognize among upstairs, downstairs and pedestrian crosswalks using support vector machine (SVM) classiers. As we have already mentioned, most of RGB-D cameras have problems outdoors with strong sun light, so we do not think the recognition of pedestrian crosswalks is really helpful as it is impossible to assure if it is going to work. Others preferred the usage of geometrical reasoning instead of machine learning to detect staircases with RGB-D. This is the approach we also consider to solve this problem, because we believe that the existing algorithms using this technology are incomplete and can be improved. (a) (b) Figure 1.10: (a) Stair detection image from [53], where the points correspondent to each step extend beyond the actual step. (b) Model of the staircase from [12]. The algorithm of Tang et al. [53] has some important aws. First of all, their identication of ground plane starts with the estimation of the height and orientation of the sensor from the ground plane given by an accelerometer, whereas our algorithm does not need that extra information to be able to nd the ground. Their iteration to nd steps one by one by looking for planes at certain heights is prone to fail as it does not take into account any other shape constraint except having sucient points. This may cause false positives and that the inliers of the planes correspondent to the steps include more points than the ones the step actually has (Fig. 1.10a). It can be solved using a region growing algorithm instead of just RANSAC for planes. They considered there is a staircase if there are three or more steps, ignoring the possibility of less than three steps, which is also quite common in doorways or other special constructions. The information they provide is also very basic: detects the presence of the staircase, if it ascends or descends and the estimated number of steps. Using point clouds in Euclidean distances allows to measure sizes and distances in a more straightforward manner than using inverse depth measurements in range images as they do. They 12
1.3. OBJECTIVES provided a dataset of some staircases both ascending and descending and other common indoor scenes to detect false positives. We have made a comparison with their results and ours that will be shown later in this work. Another similar approach is shown in [56]. Their alignment of the reference system of point cloud captured by the sensor to a user reference system is also done in our work. They use that projection to nd the oor as the biggest plane parallel to the oor plane, which might not be true if there are some other dominant planes such as big table. In our case, the ground is automatically found at rst and it serves as hint to make the projection, so the oor is never missed. While we look for planes just one time and then classify among ground, walls, obstacles, steps, etc., they use a RANSAC algorithm every time they want to nd any specic plane, but they might not even be on the scene, being highly time-consuming. They also used the Tang et al. database improving their results, and we compare our performance with them as well. The two works commented above commit the same mistake of focusing on the detection and ignoring the modelling. With the modelling the actual measurements of the steps can be obtained, information which can be used to verify the detection, to give indications to the user or to analyze the traversability of the staircase. On the other hand, Delmerico et al. proposed an ascending stairway modelling that introduces some interesting ideas [12]. Their goal is to localize and model stairways to check for traversability and enable autonomous multi-oor exploration. They want to perform this task while the robot is also performing simultaneous localization and mapping of the scene, to include the model of the stairway in the map as well. The model of the staircase is an inclined plane inside a bounding box containing the stairway, and the measurements of the steps and the whole staircase (Fig. 1.10b). In order to build up a complete model of the stairway they align the point clouds from dierent views relying on the robot's estimated pose, which is complicated in human navigation. In addition, the stair edge detection, which is the starting point of their algorithm, is based on abrupt changes in depth that only appears in ascending staircases when the sensor is lower than the steps, i.e. a small robot. That collapses with our idea of a chestmounted sensor. Moreover, the incapacity of the algorithm to detect descending stairs and their requirement of a minimum of three steps for detecting a stairway leaves a margin of improvement. 1.3 Objectives Now that we have explained the motivation that lead us to develop an assistive system for the visually impaired and after performing an extensive review of the related works, it is time to set our main objectives for the current work: • Choose the best location of the RGB-D sensor given the specication that it has to be wearable. 13
CHAPTER 1. INTRODUCTION • Search for the most appropriate libraries and programming languages to perform this task. • Learn to preprocess the data captured by the sensor in the most ecient way. • Perform a segmentation of the three-dimensional scene and classify the segments according to their orientation with respect to the user. • Trace the obstacle-free region of the oor in the image. • Develop an algorithm that can detect the presence of a staircase, organizing the planes belonging to the steps in a hierarchical way. • Once we have have found the steps which form a staircase, retrieve and trace the model of the stair. • Perform experiments in dierent environments taking into account the time necessary to make all the operations, the quality of the models obtained and if it is possible compare the results with other works. 1.4 Structure This work is organized as follows: 1. In Chapter 1 we explain the motivation behind this work, the current state of the art and the objectives we set, as well as a brief comment about the structure of this text. 2. In Chapter 2 the rst considerations of what we have built here are described, paying special attention to the location of the sensor, the initial preprocessing of the data and the detection of the oor, which is the starting point of the algorithm. 3. In Chapter 3 we show how we perform the segmentation and classication of the elements of the scene, describing each stage and showing examples. 4. In Chapter 4 we explain the stair detection and modelling module, which is the most novel part of this work. 5. In Chapter 5 some results are shown, including captures, comparisons with other works, and quality of the model and computing time analysis. 6. In Chapter 6 we express our nal thoughts about this work and some possible lines of work for the future. 1.5 Publication As a result of this work there has been a research paper sent to the Second Workshop on Assistive Computer Vision and Robotics (ACVR) of the European 14
1.5. PUBLICATION Conference on Computer Vision (ECCV) , which has been accepted for oral presentation [41]. The workshop takes place the 12th of September of 2014 in Zurich, Switzerland. [41] Pérez-Yus, A., López-Nicolás, G., Guerrero, J.J.: Detection and Modelling of Staircases Using a Wearable Depth Sensor. In: Second ECCV Workshop on Assistive Computer Vision and Robotics (2014). 15
CHAPTER 1. INTRODUCTION 16
Chapter 2 RGB-D Setup and Data Preprocessing The dierent parts of the algorithm and the theory behind them will be explained in this section. The whole process is thought to be iterative, capturing a video sequence in real time and making the computations on the go, but it has been also implemented a single point cloud mode for the experiments. In Section 2.1 a scheme of how the camera is intended to be worn and the capture of the data is shown. If the oor is signicantly present in the cloud, it is automatically found and the 3D coordinates of the point cloud are projected to a user-centered coordinate system as explained in Section 2.2. 2.1 Setup Conguration and Data Acquisition There are dierent options to locate the camera in a wearable navigation system [33]. The two most common choices are head-mounted and chest-mounted. The rst one has the advantages of being intuitive as it resembles the eyes location, allows the subject to simply stand and scan the environment and makes harder to have the eld of view obstructed. On the other hand, it is continuously moving and it adds more complexity to implement a robust and stable navigation system. Moreover, it is less safe as the user might be looking away from his most immediate hazards, as it cannot be controlled. A chest-mounted system remains xed to the body in a comfortable and safe manner, allowing the user to move freely knowing that the assistant will warn of any danger along the path. For these considerations we have chosen a chest-mounted system as the best option. The camera will be slightly pointing downwards, at approximately 45◦ down. As the RGB-D sensor employed has a 45◦ of vertical eld of view, it should be enough to locate the obstacle-free path in front of the subject and to easily detect stairs in the scene. Currently, all the computations are operated on a laptop which could be carried in a backpack. A scheme of the conguration is shown in Fig. 2.1. The basic type of data used by our system are the so-called point clouds , consisting on a set of data of each pixel which contains the 3D location with respect to the camera and the RGB information. We have used Robot Operating System (ROS) as framework and the Point-Cloud Library (PCL) as our main 17
CHAPTER 3. SEGMENTATION AND CLASSIFICATION OF THE SCENE corresponds to the order in the image). After the initial ltering, our cloud appears unorganized as we got rid of a large amount of points. Another way of solving this issue consists in obtaining the surface of the point cloud dataset by using surface meshing techniques, after which the normal estimation is immediate. This way adds extra computational load to the algorithm and we try to avoid it. The solution for estimating the surface normal chosen is based on the analysis of the eigenvectors and eigenvalues (or PCA - Principal Component Analysis) of a covariance matrix created from the nearest neighbors of the query point. More specically, for each point pi , we assemble the covariance matrix C as follows: C=1 k k X i=1 ·(pi−p)·(pi−p)T,C · ~ vj=λj·~ vj, j ∈ {0,1,2} (3.1) Where k is the number of point neighbours considered in the neighbourhood of pi , p represents the 3D centroid of the nearest neighbors, λj is the j -th eigenvalue of the covariance matrix, and ~ vj the j -th eigenvector. The third component obtained from the analysis corresponds to the normal direction. It is necessary to make sure that the normal direction is ipped towards the viewpoint (Fig. 3.1). In this process the curvature of the surfaces is also computed. The output surface curvature is estimated as a relationship between the eigenvalues of the covariance matrix (as presented above), as: σ=λ0 λ0+λ1+λ2 (3.2) Figure 3.1: Normal estimation. The normals are drawn in the colored point cloud as white vectors pointing towards the viewpoint. 24
3.2. REGION-GROWING 3.2 Region-growing This algorithm starts from a seed , which is the point with minimum curvature, and then expands the region towards the neighbouring points that have small angle between the normals and similar curvature value. The neighbouring points which satisfy the normal and curvature threshold became the new seeds and repeats until the region cannot expand anymore. Then, a new initial seed is chosen among the remaining points, and the process starts over until the regions that can be found are smaller than a certain threshold. The procedure can be seen in more detail in Algorithm 1. The inputs of the algorithm are the point cloud = {P} with the corresponding normals = {N} and curvatures = {c} as computed in Section 3.1, a Neighbour nding function Ω (.) for which we use a Kd-Tree partition of the cloud, a curvature threshold cth = 0.5 , an angle threshold θth = 4◦ and a minimum region size of 25 points. In Fig. 3.2 there is an example of the output of the algorithm. Algorithm 1 Region-growing algorithm Region list R← Ø Available points list {A} ← {1, ..., |P|} while {A} is not empty do Current region {Rc} ← Ø Current seeds {Sc} ← Ø Point with minimum curvature in {A} → Pmin {Sc} ← {Sc} ∪ Pmin {Rc} ← {Rc} ∪ Pmin {A} ← {A} \ Pmin for i= 0 to size ( {Sc} ) do Find nearest neighbours of current seed point {Bc} ← Ω(Sc{i}) for j= 0 to size ({Bc}) do Current neighbour pointPj←Bc{j} if {A} contains Pj and cos−1(|(N{Sc{i}}, N{Sc{j}})|)< θth then {Rc} ← {Rc} ∪ Pj {A} ← {A} \ Pj if c{Pj}< cth then {Sc} ← {Sc} ∪ Pj end if end if end for end for Add current region to global segment list {R} ← {R} ∪ {Rc} end while Return {R} 25
CHAPTER 3. SEGMENTATION AND CLASSIFICATION OF THE SCENE Figure 3.2: Region-growing. The points in red are points with non-assigned region Figure 3.3: Planar test. The regions whose majority of points lies on a plane are considered planes, whose normal is drawn as a white vector. 3.3 Planar Test Because of how the region-growing algorithm works, most regions are planes or have a high degree of atness, but they can also be a curved surface with smooth transitions. As the ground, walls, doors or steps are all planes, it is important to test this condition. A RANSAC algorithm looks for the biggest plane in each 26
3.4. PLANE EXTENSION region and, if most of the points are inliers, it will be considered a planar surface with the plane equation obtained. Otherwise, the regions will be considered as arbitrary obstacles of the scene (Fig. 3.3). 3.4 Plane Extension In this stage we look for improving the results of the region-growing stage by extending the planar regions to t in a shape closer to reality. This also allows us to have more control of the process as we divide the problem in two stages. The remaining points not belonging to any region yet are included in a planar region if they have small angle between their normal and the plane normal, they have a small perpendicular distance to the plane and they are placed near the region (Fig. 3.4). The rst two computations can be made using simple 3D geometry operations, and for the later we use a neighbour search from the Kdtree partition. For example, if the remaining point considered has 2 neighbours of a certain regions in a radius of 15 cm, it is considered close to a region. Figure 3.4: Plane extension. The points not belonging to any region become part of the planes found if they satisfy geometric restrictions. 3.5 Euclidean Cluster Extraction The points still not belonging to any region go through a cluster extraction algorithm which establishes connections and forms separate entities. The algorithm behind this problem is shown in Algorithm 2. The clusters are considered obstacles at rst, although the planar testing algorithm can be used again with this clusters as sometimes they are planes (Fig. 3.5). 27
CHAPTER 3. SEGMENTATION AND CLASSIFICATION OF THE SCENE Figure 3.5: Euclidean cluster extraction. Points still not belonging to any region are grouped forming clusters. Algorithm 2 Euclidean Cluster Extraction Create a Kd-tree representation for the input point cloud dataset P ; Set up an empty list of clusters {C} ← Ø, and a queue of the points that need to be checked {Q} ; for i= 0 to size ( P ) do {Q} ← {Q} ∪ pi for k= 0 to size {Q} do search for the set Pi k of point neighbors of pi in a sphere with radius r < dth ; for every neighbor pk i∈Pk i do if pk i has not been processed yet then {Q} ← {Q} ∪ pk i end if end for end for {C} ← {C} ∪ {Q} {Q} ← Ø end for 3.6 Plane Classication Once the segmentation stage has succeeded the planes are classied among different classes according to the orientation and the relative position of the planes. The orientation of the plane normals is compared to the normal vector of the oor. If the angle between the planes and the ground is close to 90◦ , they are tentatively classied as walls , whereas planes whose angles are close to 0◦ are con- 28
3.6. PLANE CLASSIFICATION sidered horizontal. Any other circumstance is considered obstacle. In this case the term walls simply denes a vertical planar structure as no further reasoning has been done yet (Fig. 3.6). Figure 3.6: Classication. The planes are classied according to their orientation. For each plane, the points of their contours and the normal are displayed in certain color: green for the oor, pink for horizontal planes, yellow for walls, orange for non-vertical and non-horizontal planes. Also, in red the non-planar clusters and in a color gradient from green to blue the steps in the last image. Horizontal planes can be ground, steps or other obstacles that should be avoided (e.g. a table). It is common that the oor or steps are composed by more than one planar region as occlusions can happen. The height of the centroid of the planes is then considered: The regions with height close to zero are classied as oor, whereas the regions with positive or negative height are classied as step candidates if they satisfy the minimum height requirements regulated by the current Technical Edication Code valid in Spain [35] (see Fig. 3.7). According to the Code, the height of the steps ranges from a minimum Hmin = 13 cm to a maximum Hmax = 18.5 cm. Horizontal regions will be considered as step candidates if they are situated above (in ascending stairways) or below (in descending ones) Hmin −Htol/2 = 10 cm from the ground. It is necessary to add a tolerance as the measurements can be very noisy. The existence of a set of at least one step candidate activates the stair detection algorithm. Other size and shape restrictions are kept to a minimum at this point because they could discard valid portions of steps which might be useful for a better modelling of staircases. As a result of the segmentation and classication algorithm, the obstacles position can be projected to the ground to remove the non-walkable area from the ground detected (Fig. 3.8). Additionally, if the oor plane equation has signicantly changed, a new transformation matrix is computed to not lose track 29
13 cm Riser 18.5 cm Tread 28 cm 54 cm 2risers+ 1tread70 cm Htol = 6cm Step candidates Obstacle floor Min. step height
Chapter 4 Stair Detection and Modelling Algorithm In Chapter 3 it has been explained how the step candidates are obtained. Our stair detection and modelling algorithm is the next phase, using these step candidates as input, and providing the full characteristics of the staircase as output. At this moment, the algorithm is functional with both ascending and descending staircases, being capable of detecting one of each at a time. There is no restrictions about the number of steps belonging to a staircase, making also isolated single steps detectable during navigation. Our work goes beyond simple detection and models the staircase even with partial occlusions such as people walking the stairs. That means that every step can be found split in dierent regions. Spiral staircases can be detected but the modelling part has not been addressed yet. 4.1 Stair Detection The detection algorithm establishes connections among the candidates to discard the ones that do not belong to the staircase and to group the stair planes in levels according to the distance in steps to the oor (Fig. 4.1). The candidates are analysed one by one in a bottom-up strategy, for which it is necessary to select a rst step . The candidates whose centroid is between the valid range Level 3 Level 2 Level 1 Level 0 Level -1 Level -2 Level -3 Figure 4.1: Example of one detected ascending stair and a detected descending stair from two perspectives. 31
floorfl oo r Hmin Hmax floor f l oo r floorfl oo rfloor f l oo r floor f l oo r Hmin −Htol/2=10 Hmax +Htol/2=21.5cm
4.2. STAIR MODELLING Figure 4.3: Connectivity between step candidates to previous levels: Ascending and descending staircases (left), more than one region per level (right). no connection to previous levels (e.g. a horizontal plane correspondent to a table) they are classied as obstacles (Fig. 4.2e). As a result, a set of connected regions corresponding to dierent levels is obtained (Fig. 4.3). When all the candidates have been checked, if the number of levels is greater than one, the algorithm starts the modelling of the staircase. A special case occurs when there is only one step. It might either actually be the rst step of a staircase, or be just a single step on the way. But it also can be an object which should be considered an obstacle. Here, strict area and shape conditions can be applied in order to determine in which case we are. For example, we know the measurements of the steps according to the regulations. If the candidate does not satisfy the conditions because is too small it is an obstacle, if it is too big it is oor at another level. In Fig. 4.4 we show an example where the oor at another level is detected. Figure 4.4: Three examples of oor at another level that has been found. 4.2 Stair Modelling The shape of the staircases can have some dierences regarding the presence of absence of the riser or the inclination it might have. We are going to consider a unied model for all the possible cases, consisting on a set of consecutive parallelograms one of each corresponds to a single step (Fig. 4.5). The geometric parameters we are going to retrieve from the point cloud are: 33
CHAPTER 5. EXPERIMENTAL EVALUATION Figure 5.1: Some examples of results obtained with the dataset. The last four are from captures made in darkness. 40
0% 20% 40% 60% 80% 100% Tang [15] Vlamincku[16] Us FN TP 0% 20% 40% 60% 80% 100% Tang [15] Vlaminck [16] Us FP TN False negatives and tr ue positives False posit ives and tr ue negat ives Figure 5.2: Comparison of false negatives and false positives between our work and the presented by [53, 56] 0 10 20 30 40 50 60 70 80 90 100 1234567 Descendingstaircase Ascendingstaircase Step position Detection rate (%) Figure 5.3: Step detection rate with the step position in the staircase. 41
CHAPTER 5. EXPERIMENTAL EVALUATION Table 5.1: Average time of the stages of the algorithm Stage Time Filtering 15ms Ground extraction 3ms Normal extraction 13ms Region-growing 16ms Plane extension 20ms Cluster extraction 5ms Classication 16ms 1 stair detection 5ms The computing time was also tested to analyse the performance of the system and to compare it to the state of the art. The complete loop iteration time ranges from 50 to 150 ms, giving a rate of 7−20 Hz. The variation depends on the scene itself: close up captures provides good quality clouds and the segmentation algorithm provide less regions and as a consequence, faster results. On the other hand, a capture taken to a scene situated far from the camera adds more noise and less smooth surfaces. In general, this timing should be considered fast enough for indoor navigation assuming walking speeds around 1−1.5 m/s. A breakdown of the time distribution is shown in Table 5.1. This rate could be improved adding some optimizations to the algorithm or using multi-core processing, although no optimization eorts have been done yet. We have also quantitatively analysed the resemblance of the model to the real staircase. We have excluded the width from the analysis as the view of the stairs may be partial and it is not as relevant as the other measurements. After computing the height and length of a staircases, in both ascending and descending perspectives, from dierent viewing angles, the results were compared to the real measurements, as shown in the Table 5.2. As we can observe, the values do not have strong deviation. Half of the experiments were conducted with real people going up and down the stairs. Obstructing the view of the staircase partially does not adversely aect the quality of the model. Some pictures of the experiments with people climbing up/down the staircase can be seen in Fig. 5.4. Table 5.2: Average and standard deviation (in centimetres) of the length and height measured with and without obstacles. No obstacles Obstacles Real ¯x σ¯x σxr Length 29 2.01 29.39 1.89 30 Height 15.4 1.36 15.56 0.59 17 42
Figure 5.4: Example of a person partially blocking the view of the staircase during ascent or descent. 43
CHAPTER 5. EXPERIMENTAL EVALUATION 44
Chapter 6 Conclusions and Future Work In this paper we have presented the perception module of a wearable personal assistant oriented to visually impaired people, although it may have applications in other elds such as robotics or special cases of human navigation. Our main contribution is the stair detection algorithm, which is not only able to detect but also to model staircases with their complete dimensions and position with respect to the user. That would provide the subject with multi-oor navigation possibilities. The experiments prove that the model quality and the computing time are good enough to be used in real-time. The algorithm overcomes some limitations existing in related works, such as the possibility of single step detection or full modelling with partial occlusions caused mainly by other people traversing the staircases. More detection features are expected to be developed and added to the personal assistant, such as door detection, text sign recognition or people detection. But rst we would like to extend the possibilities that a RGB-D sensor can bring to stair detection by combining the depth information with color images. RGB data would help improving the model, counting the steps to extend the staircase model, detecting possible staircases from farther distances where depth measurements are not reliable or when the sun rays aect negatively the depth sensing. It is also required to test the system by users in real scenarios in order to receive feedback for improving our work. 45
CHAPTER 6. CONCLUSIONS AND FUTURE WORK 46
Bibliography [1] Aladren, A., Lopez-Nicolas, G., Puig, L., Guerrero, J.J.: Navigation assistance for the visually impaired using RGB-D sensor with range expansion. IEEE Systems Journal, Special Issue on Robotics & Automation for Human Health PP(99), 111 (2014) [2] Albert, A., Suppa, M., Gerth, W.: Detection of stair dimensions for the path planning of a bipedal robot. In: IEEE International Conference on Advanced Intelligent Mechatronics (AIM). vol. 2, pp. 12911296 (2001) [3] Anand, A., Koppula, H.S., Joachims, T., Saxena, A.: Contextually guided semantic labeling and search for three-dimensional point clouds. The International Journal of Robotics Research 32(1), 1934 (2013) [4] Andersen, J., Seibel, E.: Real-time hazard detection via machine vision for wearable low vision aids. In: Wearable Computers, 2001. Proceedings. Fifth International Symposium on. pp. 182183. IEEE (2001) [5] Bansal, M., Matei, B., Southall, B., Eledath, J., Sawhney, H.: A LIDAR streaming architecture for mobile robotics with application to 3D structure characterization. In: IEEE International Conference on Robotics and Automation (ICRA). pp. 18031810 (2011) [6] Bernabei, D., Ganovelli, F., Benedetto, M., Dellepiane, M., Scopigno, R.: A low-cost time-critical obstacle avoidance system for the visually impaired. In: International Conference on Indoor Positioning and Indoor Navigation (2011) [7] Borenstein, J., Ulrich, I.: The guidecane-a computerized travel aid for the active guidance of blind pedestrians. In: IEEE International Conference on Robotics and Automation. vol. 2, pp. 12831288 (1997) [8] Bostelman, R., Russo, P., Albus, J., Hong, T., Madhavan, R.: Applications of a 3D range camera towards healthcare mobility aids. In: IEEE International Conference on Networking, Sensing and Control. ICNSC. pp. 416421 (2006) [9] Capi, G., Toda, H.: A new robotic system to assist visually impaired people. In: RO-MAN. pp. 259263. IEEE (2011) 47
BIBLIOGRAPHY [10] Cong, Y., Li, X., Liu, J., Tang, Y.: A stairway detection algorithm based on vision for UGV stair climbing. In: IEEE International Conference on Networking, Sensing and Control (ICNSC). pp. 18061811 (2008) [11] Dakopoulos, D., Bourbakis, N.G.: Wearable obstacle avoidance electronic travel aids for blind: a survey. Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE Transactions on 40(1), 2535 (2010) [12] Delmerico, J.A., Baran, D., David, P., Ryde, J., Corso, J.J.: Ascending stairway modeling from dense depth imagery for traversability analysis. In: International Conference on Robotics and Automation (ICRA). pp. 2283 2290 (2013) [13] Dube, D., Zell, A.: Real-time plane extraction from depth images with the randomized hough transform. In: Computer Vision Workshops (ICCV Workshops). pp. 10841091. IEEE (2011) [14] Fair, M., Miller, D.P.: Automated staircase detection, alignment & traversal. In: Proceedings of International Conference on Robotics and Manufacturing. pp. 218222 (2001) [15] Filipe, V., Fernandes, F., Fernandes, H., Sousa, A., Paredes, H., Barroso, J.: Blind navigation support system based on Microsoft Kinect. Procedia Computer Science 14, 94101 (2012) [16] Fischler, M.A., Bolles, R.C.: Random Sample Consensus: A paradigm for model tting with applications to image analysis and automated cartography. Commun. ACM 24(6), 381395 (Jun 1981) [17] Gupta, S., Arbelaez, P., Malik, J.: Perceptual organization and recognition of indoor scenes from RGB-D images. In: IEEE Conference on Computer Vision and Pattern Recognition (CVPR). pp. 564571 (2013) [18] Gutmann, J.S., Fukuchi, M., Fujita, M.: Stair climbing for humanoid robots using stereo vision. In: Intelligent Robots and Systems.(IROS). Proceedings. IEEE/RSJ International Conference on. vol. 2, pp. 14071413 (2004) [19] Hernandez, D.C., Jo, K.H.: Outdoor stairway segmentation using vertical vanishing point and directional lter. In: International Forum onStrategic Technology (IFOST). pp. 8286. IEEE (2010) [20] Hernández, D.C., Jo, K.H.: Stairway tracking based on automatic target selection using directional lters. In: Frontiers of Computer Vision (FCV). pp. 16 (2011) [21] Hesch, J.A., Mariottini, G.L., Roumeliotis, S.I.: Descending-stair detection, approach, and traversal with an autonomous tracked vehicle. In: Intelligent Robots and Systems (IROS). pp. 55255531. IEEE (2010) 48
BIBLIOGRAPHY [22] Holz, D., Behnke, S.: Approximate triangulation and region growing for ecient segmentation and smoothing of range images. Robotics and Autonomous Systems (2014) [23] Holz, D., Holzer, S., Rusu, R.B., Behnke, S.: Real-time plane segmentation using RGB-D cameras. In: RoboCup 2011: Robot Soccer World Cup XV, pp. 306317. Springer (2012) [24] Hoover, A., Jean-Baptiste, G., Jiang, X., Flynn, P.J., Bunke, H., Goldgof, D.B., Bowyer, K., Eggert, D.W., Fitzgibbon, A., Fisher, R.B.: An experimental comparison of range image segmentation algorithms. Pattern Analysis and Machine Intelligence 18(7), 673689 (1996) [25] Ishiwata, K., Sekiguchi, M., Fuchida, M., Nakamura, A.: Basic study on step detection system for the visually impaired. In: Mechatronics and Automation (ICMA), IEEE International Conference on (2013) [26] Koppula, H.S., Anand, A., Joachims, T., Saxena, A.: Semantic labeling of 3D point clouds for indoor scenes. In: NIPS. vol. 1, p. 4 (2011) [27] Kulyukin, V., Gharpure, C., Nicholson, J., Pavithran, S.: RFID in robotassisted indoor navigation for the visually impaired. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). vol. 2, pp. 19791984 (2004) [28] Lee, C.H., Su, Y.C., Chen, L.G.: An intelligent depth-based obstacle detection system for visually-impaired aid applications. In: 13th International Workshop on Image Analysis for Multimedia Interactive Services (WIAMIS). pp. 14. IEEE (2012) [29] Lee, Y.H., Medioni, G.: A RGB-D camera based navigation for the visually impaired. In: RSS 2011 RGBD: Advanced Reasoning with Depth Camera Workshop. pp. 16 [30] López-Nicolás, G., Omedes, J., Guerrero, J.J.: Spatial layout recovery from a single omnidirectional image and its matching-free sequential propagation. Robotics and Autonomous Systems (2014) [31] Lu, X., Manduchi, R.: Detection and localization of curbs and stairways using stereo vision. In: International Conference on Robotics and Automation (ICRA). vol. 4, p. 4648 (2005) [32] Mann, S., Huang, J., Janzen, R., Lo, R., Rampersad, V., Chen, A., Doha, T.: Blind navigation with a wearable range camera and vibrotactile helmet. In: Proceedings of the 19th ACM international conference on Multimedia. pp. 13251328 (2011) 49