Full text
UNIVERSITAT POLITÈCNICA DE CATALUNYA Programa de Doctorat: AUTOMÀTICA, ROBÒTICA I VISIÓ Tesi Doctoral EVENT BASED SLAM William Oswaldo Chamorro Hernández Directors: Juan Andrade-Cetto Joan Solà Ortega Barcelona, Desembre 2022
Event Based SLAM A thesis submitted to the Universitat Politècnica de Catalunya to obtain the degree of Doctor of Philosophy Doctoral programme: Automatic Control, Robotics and Computer Vision This thesis was completed at: Institut de Robòtica i Informàtica Industrial, CSIC-UPC Thesis advisors: Juan Andrade-Cetto Joan Solà Ortega © 2022 William Oswaldo Chamorro Hernández
EVENT BASED SLAM William Oswaldo Chamorro Hernández Abstract Event-based cameras are novel sensors with a bio-inspired design that exhibit a high dynamic range and extremely low latency. Their sensing principle is different from the one of conventional cameras. These novel sensors generate asynchronous streams of events triggered proportionally to the logarithmic pixel-level change of brightness. Each event is timestamped with a micro-second resolution and transmitted as soon as it is fired. Thus, event cameras convey non-redundant information and capture fast motion. These assets make them suitable for high dynamics and challenging lighting applications without image blurring, over, or underexposure problems. The event camera’s operational principle requires new algorithms to deal with the image intensity’s absence and leverage its fast asynchronous response. This thesis explores new event-based monocular solutions to the localization and mapping problem (SLAM) in human-made scenarios. Concerning the event camera’s natural edge response, line features were evaluated throughout this thesis’s chapters. A high-speed camera pose tracking approach was proposed that exploits the fast response of an event camera to estimate its 6 degrees of freedom accurately. Lines are efficiently matched to the events with a proposed fast data-association mechanism. In the tracking formulation, event-per-event and window of events representations were analyzed to identify their advantages and real-time implementation feasibility without introducing speed bottlenecks. Additionally, several estimation variants were implemented regarding measurement and motion models. This thesis also analyzes sensor fusion methodologies to combine events with inertial data. The inertial measurements come at a lower rate than events; thus, the objective is to avoid conventional inertial integration and cooperate with the event data to correct state parameters. The sensorial fusion allowed accurate estimations but might slow down and constrain the motion dynamics and event-data rate to the inertial sensor capabilities. Finally, the proposed mapping approach leverages the natural edge highlighting of events to recover and optimize straight lines in human-made scenarios. Line-based reconstructed maps have better representativeness for some tasks than point clouds since line features provide a notion of connectivity, boundary and a sense of neighborhood. In this work, mapping and tracking strategies are executed in parallel threads that add to the map new detected lines as the camera moves while updating the old ones with incoming observations. All variants tested in this thesis for tracking and sensor fusion are compatible with the mapping thread and can be combined freely as best suited for some given experimental conditions. The main contributions of this work are three-folded: (1) event-based camera pose tracking aiming at high dynamics and challenging lighting conditions, (2) event data and inertial i
ii measurements fusion with the primary objective of preserving the event camera’s fast response characteristic, and (3) event-based tracking and mapping system with line features in realtime for human-made environments. It is shown that monocular-based event-line SLAM can perform in challenging scenarios with a high level of accuracy and real-time performance, where conventional frame-based methods cannot operate. These thesis contributions were validated through extensive experimentation with real data in different scenarios and with different degrees of motion aggressiveness. Appropriate comparisons against state-of-the-art SLAM approaches were included.
EVENT BASED SLAM William Oswaldo Chamorro Hernández Resum Les càmeres d’esdeveniments són sensors nous amb un disseny d’inspiració biològica que presenten un rang dinàmic elevat i una latència baixa. El seu principi de detecció és diferent al de les càmeres convencionals. Aquests sensors generen paquets asíncrons d’esdeveniments produïts pel canvi logarítmic de la brillantor a nivell de píxels. Cada esdeveniment té un temps amb una resolució de microsegons i es transmet tan bon punt s’activa. Així, les càmeres d’esdeveniments no transmeten informació redundant i capturen moviment ràpids. Això els fa adequats per a aplicacions d’alta dinàmica i d’il·luminació desafiants sense problemes de desenfocament de la imatge, sobre o subexposició. El principi de funcionament de la càmera d’esdeveniments requereix nous algorismes per fer front a l’absència de la intensitat de la imatge i aprofitar la seva resposta ràpida. Aquesta tesi explora noves solucions monoculars amb esdeveniments al problema de localització i mapeig (SLAM) en escenaris creats per l’home. Pel que fa a la resposta de la vora natural de la càmera d’esdeveniments, es va avaluar l’ús de línies. Es va proposar una metodologia per estimar els 6 graus de llibertat de la càmera per en dinàmiques altes on les línies estan relacionades amb els esdeveniments amb un mecanisme ràpid d’associació. Durant la formulació de la localització, es van analitzar les representacions d’esdeveniment per esdeveniment i finestra d’esdeveniments per identificar els seus avantatges i la viabilitat d’implementació en temps realt. A més, es van implementar diverses variants d’estimació pel que fa als models de mesura i moviment. Aquesta tesi també analitza metodologies de fusió sensorial per combinar esdeveniments amb IMU. Les mesures inercials arriben a un ritme inferior a les estimacions d’esdeveniments; així, l’objectiu és cooperar amb les dades de l’esdeveniment per corregir l’estat en diferents moments. La fusió sensorial va permetre estimacions més precises, però va frenar i va limitar la dinàmica de moviment a les capacitats del sensor inercial. L’estratègia mapeig proposat aprofita la producció d’esdeveniments en contorns d’objectes per recuperar i optimitzar línies en escenaris creats per l’home. Els mapes reconstruïts amb línies tenen una millor representativitat de la realitat per a algunes tasques que els núvols de punts, ja que les característiques de la línia proporcionen una noció de connectivitat i límit. En aquest treball s’executen estratègies de mapatge i localització en fils paral·lels, que afegeixen al mapa noves línies detectades cuan la càmera es mou mentre actualitza les antigues amb les observacions entrants. Totes les variants provades per a la localització i la fusió de sensors d’aquesta tesi són compatibles amb el mòdul de mapeig i es poden combinar lliurement segons s’adapti millor a les condicions experimentals. iii
iv Les principals contribucions d’aquest treball són tres: (1) localització amb esdeveniments en alta dinàmica i condicions d’il·luminació difícils, (2) fusió de esdeveniments i IMU prevesevant la resposta ràpida de la càmera d’esdeveniments. i (3) sistema de localització i mapes amb esdeveniments i línies en temps real per a entorns creats per l’home. Es demostra que l’SLAM de línia amb esdeveniments pot funcionar en escenaris desafiants amb un alt nivell de precisió i rendiment en temps real, on els mètodes convencionals basats en imatges no poden funcionar. Les aportacions d’aquestes tesi es van validar mitjançant una àmplia experimentació amb dades reals en diferents escenaris i amb diferents graus d’agressivitat del moviment. Es va incloure una comparació adequada amb els enfocaments de SLAM de l’estat de l’art.
EVENT BASED SLAM William Oswaldo Chamorro Hernández Resumen Las cámaras de eventos son sensores de inspiración biológica con un alto rango dinámico y una latencia baja, las cuales tienen un principio de funcionamiento diferente al de los modelos convencionales y generan paquetes asíncronos de eventos que se producen a nivel de pixeles debido al cambio logarítmico de intensidad lumínica. Cada evento tiene una marca temporal con una resolución de microsegundos y es transmitido tan pronto como se producen. Por esto, las cámaras de eventos no transmiten información redundante y capturan movimientos rápidos, lo que las hace adecuadas para aplicaciones en condiciones de alta dinámica e iluminación compleja sin problemas de desenfoque, sobreexposición o subexposición. El tipo de información producida por la cámara de eventos conlleva a la necesidad de investigar nuevas metodologías para sobrellevar la ausencia de intensidad de imagen y aprovechar su rápida respuesta asíncrona. En esta tesis se explora nuevas soluciones monoculares basadas en eventos para el problema de localización y mapeo simultaneo (SLAM) en entornos hechos por humanos. Debido a la respuesta natural de la cámara de eventos a los contornos en la escena, se evaluó el uso de líneas. Se propuso una metodología para estimar los 6 grados de libertad de la cámara para altas dinámicas donde se relacionó líneas y eventos utilizando un mecanismo de asociación rápida. Se analizó representaciones de evento por evento y ventana de eventos para la estimación de pose de cámara, con el fin de identificar sus ventajas y la factibilidad de implementación en tiempo real. Adicionalmente se evaluó diversas formulaciones de modelos de dinámicos y de medición para los procesos de estimación. En tesis también se analiza metodologías de fusión sensorial combinando eventos con IMU. Las mediciones inerciales se obtienen a un ritmo más bajo que las estimaciones por eventos, por ende, el objetivo es evitar las clásicas integraciones inerciales y cooperar con los eventos para corregir los parámetros de estado en diferentes instantes. La fusión sensorial permitió estimaciones más precisas, pero restringiendo la dinámica de movimiento a las capacidades de la IMU. La estrategia de mapeo propuesta aprovecha la producción de eventos en contornos de objetos para recuperar y optimizar líneas rectas en escenarios creados por humanos. Los mapas reconstruidos en base a líneas tienen una mejor representatividad de la realidad, para algunas tareas, que las nubes de puntos, ya que las estas proporcionan una mejor noción de conectividad y bordes. Las estrategias de localización y mapeo de este trabajo fueron ejecutadas en procesos paralelos donde las nuevas líneas detectadas son agregadas al mapa conforme la cámara se mueve, y al mismo tiempo se actualizan líneas antiguas con observaciones recientes. Todas las variaciones probadas para la localización y la fusión sensorial en esta tesis son v
vi compatibles con el módulo de mapeo y se pueden combinar libremente como mejor se adapte a las condiciones experimentales. Las principales contribuciones de este trabajo son tres: (1) la estimación de la pose de la cámara de eventos en altas dinámicas e iluminación desafiante, (2) fusión sensorial entre eventos e IMU preservando la característica de respuesta rápida de la cámara, y (3) la integración de un sistema de localización y mapeo basado en eventos utilizando líneas y operando en tiempo real en entornos creados por humanos. Se ha mostrado que el SLAM monocular de líneas y eventos puede funcionar en escenarios complejos con un alto nivel de precisión y rendimiento en tiempo real, en tales condiciones los métodos basados en imágenes no son capaces de operar. Las contribuciones de esta tesis fueron validadas a través de una extensa experimentación con datos reales en diferentes escenarios y grados de agresividad de movimiento. También se han incluido comparaciones apropiadas con métodos del estado del arte.
Acknowledgements I would like to thank my supervisors, Juan Andrade-Cetto and Joan Solà, for their valuable guidance and support. Your teachings and advice made possible the development of this thesis. I also want to thank the people I had the pleasure to work with during these years and extend my gratitude to all IRI staff. I also wish to express my gratitude to the members of the dissertation committee, whose comments have helped to polish some of the ideas we wanted to put across. Thanks to my family, Oswaldo, María and Lizet, your motivational words were always comforting and made me feel close to home. To my beloved Gaby, for being by my side through this long way. All difficulties and hardworking nights we had to face were more affordable knowing you were always there. This work has been partially supported by: 1. The Spanish State Research Agency through projects EB-SLAM (DPI2017-89564-P), EBCON PID2020-119244GB- I00 and the María de Maeztu Seal of Excellence to IRI (MDM-2016-0656) MCIN/AEI/10.13039/501100011033. 2. Secretaría de Eduación Superior Ciencia, Tecnología e Innovación SENESCYT, Republic of Ecuador. vii
xiv FIGURES 2.11 Event-per-event evaluation: Trihedron fast sequence with Lie groups. (a) Position and Orientation pots, (b) Input and matched events rate, (c) Tracking sequence. . 54 2.12 Event-per-event evaluation: Trihedron fast zoomed position and orientation boxes and sequence’s RMSE box plots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.13 Window of events evaluation: Plane regular sequence with classic EKF. (a) Position and Orientation pots, (b) Input and matched events rate, (c) Tracking sequence. 56 2.14 Window of events evaluation: Plane regular zoomed position and orientation boxes and sequence’s RMSE box plots. . . . . . . . . . . . . . . . . . . . . . . . . 57 2.15 Window of events evaluation: Trihedron light sequence with Lie groups. (a) Position and Orientation pots. The gray zones mark the time with no scene illumination, (b) Input and matched events rate, (c) Tracking sequence. . . . . . 58 2.16 Window of events evaluation: Trihedron light zoomed position and orientation boxes and sequence’s RMSE box plots. . . . . . . . . . . . . . . . . . . . . . . . . 60 2.17 Mean real time factor from the evaluated sequences. The gray area marks real timefactorslowerthanone............................... 63 2.18 RMSE evaluation: Window of events. Each plot includes the computed errors, its mean value denoted with a dashed line and the 2-sigma bound as a shaded area. 65 2.19 RMSE evaluation: Event-per-event. . . . . . . . . . . . . . . . . . . . . . . . . . . 66 2.20 Speed evaluation: (a) Constrained motion mechanism, (b) Dimensions and trajectory simulation, (c-e) Tracking captures before failure. . . . . . . . . . . . . . . 67 2.21 Speed evaluation: The figure shows translation plots followed by the error plots for each velocity step. Each model’s error is represented with a line and highlighted the area beneath to difference each error’s evolution. The ground truth limits are marked with red lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.22 Speed evaluation: Zoomed plots for selected velocity steps with mean step errors. 69 3.1 Frame transformations for Camera, IMU and World references. . . . . . . . . . . 78 3.2 Block diagram for CA+IA and CV+MA variants. . . . . . . . . . . . . . . . . . . . 87 3.3 Block diagram for IMU+E variant. . . . . . . . . . . . . . . . . . . . . . . . . . . 88 3.4 Modification to the DAVIS ROS driver. The new implementation provides a synchronized packet of Events and IMU. . . . . . . . . . . . . . . . . . . . . . . . . . 89 3.5 EKF-IMU tunning evaluation in discrete steps for a fast-motion sequence (a)Position and orientation errors with the estimated 2-sigma bound, (b) Evolution of the parameters value for each discrete step . . . . . . . . . . . . . . . . . . . . . . . 91 3.6 Events-IMU fusion evaluation: Plane_fast_IMU sequence. (a)Position and Orientation plots, (b) Input and matched events rate, (c) Tracking sequence. . . . . . 94 3.7 Events-IMU fusion evaluation:(a) Plane_fast_IMU sequence zoomed position and orientation (b) mean position and orientation error boxplots. . . . . . . . . . . . 95 3.8 Events-IMU fusion evaluation: Planar_fast_IMU sequence bias estimation (a) linear acceleration bias, (b) angular velocity bias. . . . . . . . . . . . . . . . . . . . 96 3.9 Events-IMU fusion evaluation: Trihedron_360_IMU sequence. (a)Position and Orientation plots, (b) Input and matched events rate, (c) Tracking sequence. . . 97 3.10 Events-IMU fusion evaluation:(a) Trihedron_360_IMU sequence zoomed position and orientation (b) mean position and orientation error boxplots. . . . . . . . . 98
FIGURES xv 3.11 Events-IMU fusion evaluation:Trihedron_360_IMU sequence bias estimation (a) linear acceleration bias, (b) angular velocity bias. . . . . . . . . . . . . . . . . . 99 3.12 Plane_fast_IMU meanRTF...............................101 3.13 Trihedron_360_IMU meanRTF ............................101 3.14 Speed evaluation: (a) constrained mechanism modified for camera holding, (b-f) tracking sequences prior system failure. . . . . . . . . . . . . . . . . . . . . . . . 102 3.15 Speed evaluation: experiment event rate. Rate evolution for raw and line-associated events. .........................................103 3.16 Speed evaluation: Position estimation followed by error evolution per speed step. Each model’s error is represented with colored lines. The simulated motion limits aredenotedwithredlines................................104 3.17 Speed evaluation: zoomed plots for selected speed steps. . . . . . . . . . . . . . 105 3.18 Speed evaluation: IMU measurements contrasted with acceleration from CA+IA and angular velocity from CV+MA estimated in body frame. Note that the acceleration exceeds the IMU range yielding to a saturated measurement. The gray area marks the saturation zone. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 3.19 Speed evaluation: (a) estimated bias for linear acceleration, (b) estimated bias forangularvelocity....................................107 4.1 State-of-the-art performances in Office_large sequence: (a) ORBSlam3 [6], (b) SVO pro [7]. ......................................113 4.2 Event based line SLAM block diagram. (a) Tracking module: drive data association and camera pose estimation processes, (b) Mapping module: drives the space sweep process to retrieve 3D lines, manages the local map merging and 3D line modification policies. Tracking and Mapping modules are linked through an optimization process. Figure adapted from [8]. ...................117 4.3 Origin-direction line back-projection: Lis the line that lies on a semi-infinite plane π..........................................118 4.4 Projective grid shape illustration. The grid’s shape cope with the back-projection cones that grows in depth as the voxel’s size does. The depth planes are disposed in inverse depth for an accurate 3D line recovery. . . . . . . . . . . . . . . . . . . 121 4.5 Back-projection rays visualization for uniform and inverse depth: (a) rays shape, (b) line recovery simulation. Note how the rays become almost-parallel in the farthest depth planes with an uniform depth sampling. Ray intersections are better defined in inverse depth grid. . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.6 Two-folded ray back-projection process. (1) All events are mapped onto the first depth plane Z0via planar homography at the reference view, (2) efficient event map from Z0to any other depth plane Zi. ......................124 4.7 Voting strategies: (a) simple, (b) bilinear. . . . . . . . . . . . . . . . . . . . . . . 126 4.8 Line extraction visual-flow diagram, figure adapted from [8]. ...........127 4.9 2Dsegmentmerging...................................128 4.10RANSACflowdiagram..................................129 4.11 Line comparison stages: (a) segments distance, (b) angular difference, (c) colineargap.........................................132
xvi FIGURES 4.12 Line growing: (a) observed vs mapped projected lines during line growing, (b) linegrowingconstrains. ................................134 4.13 Windowed keyframe optimization example: the illustration is carried out with J= 3 keyframes that are composed by I= 4 event windows. Each optimization group is overlapped with K= 1 keyframe. I,J and K can be adjusted on demand, and each keyframe is composed by a large number of event windows in real experiments. ......................................136 4.14 Bundle adjustment bootstrapping scheme. The example in the bottom shows the 2D line tracking process trough several keyframes. The optimization returns the keyframe camera poses and estimated 3D lines. . . . . . . . . . . . . . . . . . . . 138 4.15 Office_large sequence: line-based parallel tracking and mapping performance. E- LIS + CV configuration. Figure adapted from [8]...................142 4.16 Office_large sequence: (a)estimated trajectory with ground truth, (b) zoomed sections..........................................143 4.17 Reconstructed human-made scenarios. . . . . . . . . . . . . . . . . . . . . . . . . 144 4.18 Office_L_shape: events and IMU line SLAM performance. E-LIS + IMU+E configuration. .........................................147 4.19 Office_L_shape: (a)estimated trajectory with ground truth for CV and IMU+E - just the best achieving representatives are drawn for visualization purposes- and the visual-inertial approach of SVO, (b) zoomed sections, all models are plotted in these boxes to closely observe the main differences. . . . . . . . . . . . . . . . 148 4.20 Mean errors for E-LIS variants and visual-inertial SVO with the evaluated sequences: (a) position, (b) orientation. . . . . . . . . . . . . . . . . . . . . . . . . 149 4.21 Mean real time factors for E-LIS variants: (a) tracking, (b) mapping. . . . . . . . 151 4.22 Normalized impact of the event window size. The gray area marks a balanced operation between window size and mapping cost. . . . . . . . . . . . . . . . . . 152 4.23 Number of lines impact on the estimation accuracy, figure adapted from [8]. . . . 153 4.24 Inacuracies during the line extraction process. (a) noisy lines, (b) distant lines reconstruction, (c) perspective miss association . . . . . . . . . . . . . . . . . . . 153 4.25 Screen sequence reconstruction: (a) marker-based initialization (b) E+BA initialization, figure adapted from [8]. ...........................155
Tables 1.1 Most relevant specifications of event cameras available in market. Table adapted from [9]. ........................................ 2 1.2 Default DAVIS event generation bias thresholds. . . . . . . . . . . . . . . . . . . . 8 2.1 ESKF variants implemented. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.2 State transition for CP, CV and CA motion models. . . . . . . . . . . . . . . . . . 33 2.3 Orientation transition with the quaternion manifold. . . . . . . . . . . . . . . . . 40 2.4 Velocity and acceleration ranges for the proposed experiments. . . . . . . . . . . 48 2.5 Discrete steps for parameter tuning. The best parameter combination for each filter variant are highlighted in bold . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.6 State perturbation and noise parameters. . . . . . . . . . . . . . . . . . . . . . . . 51 2.7 Mean position and orientation errors. The lower errors for each sequence are in bold for both representations, event-per-event and window of events. . . . . . . . 61 2.8 Real time factor and matched events rate. The best real-time performance are in bold for event-per-event and window of events. Higher values implies lower computationalcost.................................... 63 3.1 ES-EKF variants for sensorial fusion analysis. . . . . . . . . . . . . . . . . . . . . . 77 3.2 Discrete steps for IMU parameter tuning . . . . . . . . . . . . . . . . . . . . . . . 91 3.3 State perturbation and noise parameters for event-IMU variants. . . . . . . . . . . 92 3.4 RMSE evaluation for event-only and event-inertial configurations. The lowest errors for each sequence are marked in bold . . . . . . . . . . . . . . . . . . . . . 100 3.5 Computational performance for event-only and event-inertial configurations. The best real-time performance and computational cost are marked in bold for each sequence. The processing time is a mean value per event, and higher RTF values are related to fast data processing. . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.1 Mappingparameters...................................141 4.2 RMSE in challenging lighting conditions and fast motion. . . . . . . . . . . . . . . 145 4.3 RMSE for regular motion and real-time factors. . . . . . . . . . . . . . . . . . . . 145 4.4 RMSE for event-only and event-inertial configurations in E-LIS system, and for the frame based visual-inertial configuration of SVO. . . . . . . . . . . . . . . . . 149 4.5 Computational performance of event-only and event-inertial configurations in E- LIS system, and the frame based visual-inertial configuration of SVO. Note that the tracking time is the mean time required to process a whole event stream, and the mapping time is the mean processing time of each keyframe. The best RTF are the highest values, while the best processing times are the lowest. . . . . . . . 150 4.6 Bootstrapping impact comparison, table adapted from [8]..............155 xvii
Nomenclature Abbreviations E-LIS Event-based Line SLAM AER Address Event Representation APS Active Pixel Sensor BA Bundle Adjustment CA+IA Sensor fuion, CA prediction and correction with events and IA measurement model CA Constant Acceleration CPU Central Processing Unit CP Constant Position CV+MA Sensor fuion, CV prediction and correction with events and MA measurement model CV Constant Velocity DoF Degrees of Freedom DVS Dynamic Vision Sensor E+BA Event-based with Bundle Adjustment bootstrapping E+Fast Event-based with Fast corners bootstrapping E+Hough Event-based with Hough lines bootstrapping EMVS Event-based Multi View Stereo ES-EKF Error State Kalman Filter EVO Event-based Visual Odometry GPU Graphics Processing Unit HDR High Dynamic Range I+Fast Image-based with Fast corners bootstrapping IA Instantaneous Acceleration inertial measurements IDOL IMU-DVS Odometry using Lines IMU+E Sensor fuion, IMU prediction and event correction IMU Inertial Measurement Unit xix
xx NOMENCLATURE LSD Line Segment Detector MA Mean Acceleration inertial measurements OffBn Bias for triggering OFF events OnBn Bias for triggering ON events PnPL Perspective n-Points and Lines PnP Perspective n-Points PTAM Parallel Tracking and Mapping RANSAC Random Sample Consensus RMSE Root Mean Squared Error ROS Robot Operative System RTF Real Time Factor SLAM Simultaneous Localization and Mapping SVO Semi-direct Visual Odometry VIO Visual Inertial Odometry Operators ∥·∥ Vector norm Exp(·)Lie group exponential map Log(·)Lie group logarithmic map det(·)Matrix determinant [·]×Skew symmetric matrix [·]∨SO(3) Vee operator ([v]×)∨=v [·]∧SO(3) Hat operator (v)∧= [v]× ⊕Lie group plus R⊕{θ}=RExp(θ) ⊖Lie group minus R1⊖R2≜Log(R1⊤R2) ⊗Quaternion product
NOMENCLATURE xxi Notation General convention vScalar v(·)Function VMatrix vVector Specific notation σxState noise h(x)Measurement model Ja bJacobian of awith respect to bdenoted by ∂a/∂b PCovariance matrix of multi-variate Gaussian distribution QNoise covariance matrix of multi-variate Gaussian distribution xES-EKF state ykMeasurement at time k zkInnovation at time k δxES-EKF error state BIMU (body) frame CCamera frame VReference view point frame WWorld frame rW CCframe origin expressed in Wframe coordinates, or simply r WA3D line origin point expressed in Wframe, or simply A WB3D line director vector expressed in Wframe, or simply B WRCSO(3) rotation matrix from Cto Wframe, or simply R WTCSE(3) transform from frame Cto frame W, or simply T KCamera’s intrinsic parameters matrix
xxii NOMENCLATURE KCamera’s intrinsic parameters matrix in canonical form αuFocal length in udirection αvFocal length in vdirection u0principal point, ucoordinate v0principal point, vcoordinate
To Oswaldo, María, Lizet and Gaby
6 Introduction photoreceptors, bipolar cells, and ganglion cells. Event cameras try to mimic the human retina structure through three analogue components in the DVS: photodiodes, differential circuits, and threshold comparators resulting in a tuneable engineering device. Fig. 1.4 shows this analogy between the human eye retina and the DVS pixel design. Light is processed in the human eye and the DVS pixel in a similar manner. Firstly, light is harvested in transducers, either the photo-receptors (green colored in Fig. 1.4a (a.1)) or the photo-diodes. Photo receptors are neural cells made of rods and cones, whereas the photo diodes are artificial silicon sensors. These elements transform light into raw electrical signals. Secondly, these signals are conditioned to convey gradients between input and output layers. This process is carried out by the bipolar cells (blue colored in Fig. 1.4a (a.2)) or the differenciators. From an anatomical point of view, there are several types of bipolar cells, but overall, all encode increments and decrements in brightness. Finally, the conditioned signal is transformed 3.3V 3.3V 1.8V CR CS APS DVS AO MN1 MP1 C1 C2 RR RA CRON CROff CA AER Logic -A S1 MN5 MN6 PD Vpr 1 MN4 MN2 MN3 Vaps B2B1 (b) DAVIS pixel design a.1 Photo receptors a.2 Bipolar cells a.3Ganglion cells b.1 Photo diode b.2 Differenciators b.3 Comparators (a) Human eye retina Figure 1.4: Scheme of the biological inspiration for event camera’s pixel design: (a) Simplification of the human retina components, sub-figure adapted from [2]. (b) Simplification of DAVIS pixel design conformed by an Active Pixel Sensor (APS) in light purple, and the DVS in gray; sub-figure adapted from [3].
1.1 Understanding event cameras 7 into impulses associated with changes in light intensity. The ganglion cells (red colored in Fig. 1.4a (a.3)) propagate these electrical impulses through several neuron layers in the brain to draw a visual image and attach a meaning to it. On the other hand, comparators in DVS’s pixels interpret these impulses as events which are assigned a timestamp and polarity before being transmitted. These biologically inspired sensors -also called silicon retina sensorswere developed in the 90’s through the work of Mahowald et al. [25]. That work presented a model of the first stages of retinal process implemented in a silicon chip and provided similar outputs to biological systems. Since then, many other neuromorphic sensors have been developed e.g.like [26], and [27]. These newer sensors addressed issues related to signal-to-noise-ratio, contrast and direction sensitivity, among other functionalities. 1.1.3 Online performance considerations The previous section addressed the most relevant characteristics of event cameras and their advantages over conventional ones in challenging environments. However, as any electronic device, event cameras also have limitations. To obtain reliable information and achieve optimal performance, event cameras should be operated within a range of these limits. The following subsection describes the online operation limitations experienced for the DAVIS346 event-camera during this thesis development. Several operation thresholds have been characterized to obtain the best performance out of this particular camera model. The considerations detailed below might be extrapolated to other cameras if considering their internal design differences. Readout saturation The DAVIS camera gets event data from each pixel following a row and column arbitration system. Arbiters operate in a greedy configuration as detailed in [28] and [3]. When an event is fired, a request is activated for the row arbiter and later attended by the column one. At this point, events are individually time stamped and transmitted through the USB - DAVIS model spends about 100ns in this process- [3]. Meanwhile, an asynchronous state machine -located at the top of each columnlatches the incoming events. If several columns receive more row requests simultaneously than they can handle, the greedy arbitration logic will heed the major columns first. Therefore, an abrupt spike of events hinders the arbitration performance, and eventually the camera may reach a saturated state where events are sorted by columns rather than timestamp. The saturated state was observed while performing an ablation study - that will be discussed
8 Introduction in Chapter 2-. The event data was recorded by mounting the camera in a special device controlled by a brush-less motor. The event camera gradually reached high velocities before observing the saturated state. It is plausible to detect this behavior even during aggressive hand motions in highly textured and contrasting scenarios, where might be a great event generation even at moderate speeds. The illustration of the saturation process is shown in Fig. 1.5. In this figure, the first column shows a gray-scale image to visualize the scene. The second column displays event windows integrated over 300µs, finally the third and fourth are pixel’s columns and rows evolution over the temporal window respectively. During regular speed motion, events are generated at a low rate 3.57 Mev/s as in Fig. 1.5 - frame acompared with the maximum nominal rate of 12Mev/s for the DAVIS model. In such conditions events are uniformly arranged along the image plane, and the time plots -of pixel’s rows and columnsshow an asynchronous behavior emulating a random distribution in time. Previous reaching the saturation as in Fig. 1.5 - frames b-c, the columns time plots start revealing a synchronous behavior due to their arbitration logic. In such rates the events seem nearly sorted by column, and it is observable how the arbiters sweep the columns several times during 300µs. For higher event rates - greater than 7.77 Mev/s as in Fig. 1.5 - frames d-f- the arbiter saturation is visible. Events seem disposed in columns strips in the image plane that narrow as the event rate increases, where the empty spaces are portions of information that arrive later in the next windows. The time plots reveal a fully synchronous column-wise preference, while the same timestamp is assigned to a large number of events that share the same column as in Fig. 1.5 - frame f. A fine configuration of the event production biases is needed to avoid the camera saturation and facilitate its use in the most aggressive conditions of texture and speed. In the DAVIS camera, these thresholds are denoted as DiffBn, OnBn, OffBn, and RefrBp, and their descriptions are listed in Table 1.2. The sequence of Fig. 1.5 was obtained with default biases detailed in Table 1.2. Tuning these biases will increase the brightness change ranges to fire an event; hence it allows to take control over the camera’s sensitivity. Works like Delbruck et al. [29] show that it is possible to implement feedback controllers to regulate the event rate by acting over the threshold variables and refractory period. For detailed information about the DAVIS camera Table 1.2: Default DAVIS event generation bias thresholds. Bias Coarse Fine Description DiffBn 4 39 Differential bias: Controls the amplifier in the differential stage -see Fig. 1.4b-. Limits the light changes rate. OnBn 5 254 On bias: size of positive illumination change necessary to produce an event. OffBn 4 1 Off bias: size of negative illumination change necessary to produce an event. RefrBp 1 16 Refractory time: time period for pixel’s reset. Range [0 - 7] [1 - 255] Discrete ranges for coarse and fine values.
1.1 Understanding event cameras 9 0 0 240 0 346 0 240 346 100 200 Time [μs]Pixels Time [μs] 300 0 100 200 300 Pixels Pixels Pixels 0 240 0 346 0 240 Pixels Pixels Pixels 0 240 0 346 0 240 Pixels Pixels Pixels 0 240 0 346 0 240 Pixels Pixels Pixels 0 240 0 346 0 240 Pixels Pixels Pixels 0 240 0 346 0 240 Pixels Pixels Pixels Frame Events X vs time Y vs time (a) Rate: 3.57 Mev/s 1072 events1479 events2073 events2331 events2445 events2691 events (b) Rate: 4.93 Mev/s (c) Rate: 6.91 Mev/s (d) Rate: 7.77 Mev/s (e) Rate: 8.15 Mev/s (f) Rate: 8.97 Mev/s Figure 1.5: Event camera saturation process on a 300µs event window: frames a-f, motion sequence from regular to fast velocity in a textured scene. Note how the image frames get blurred gradually while the event rate increases with speed and saturates the arbiter tree. Data recorded with DAVIS346 model. parameters, the user’s bias configuration guide 6, by Inivation, can be followed. 6https://rb.gy/aq4m2q
10 Introduction The ratios OnBn/DiffBn and DiffBn/OffBn define the necessary contrast thresholds to produce an ON and OFF event respectively, i.e. the ratios can be obtained from the configuration of coarse and fine values, which are numeric references to compute the currents associated to each bias. The DAVIS240 and DAVIS346 models have biases created by currents in a two-stage- coarse-fine circuit [30]. The first stage provides a choice of eight coarse currents, which are logarithmically spaced from 25 µA down to 12 pA. The second stage divides the coarse current by a digitally programmable value from 1 to 255. The ON and OFF contrast thresholds (θon and θoff) are computed using the previously defined bias current and following [29] as, θon,off =1 Agln Ion,off Id,(1.1) where, Agis the amplifier gain, that for the DAVIS model is about 20X. For example, the ON threshold can be computed using the coarse-fine values stated in Table 1.2. The bias currents will be Ion = 3.0179 ×10−12/254, and Id= 1.2555×10−9/39, where the numerators belong to the fifth (OnBn) and fourth (DiffBn) values from the logarithmic series of coarse currents, that are divided by their respective fine number. The result, from Eq. 1.1, shows that a 19.75% increase in illumination should trigger an event. In this thesis, to avoid the camera saturation during fast motion in further experiments, the threshold values were set as follows: DiffBn ←[4,39], OnBn←[6,60],OffBn←[3,1]. These values represent illumination changes of about 23% and 27% for the ON and OFF thresholds, respectively. Latency uncertainty Event cameras -independently of the manufacturerreport a latency in the order of microseconds. This means that the time stamp difference between consecutive events is about 1 µs. In contrast, the frame sampling of conventional cameras like realsense D435 has a temporal mark of about 33 ms (30 Hz) [31]. The light intensity in the scene, USB transmission and event rate have an impact on the event latency resulting in latencies longer than 1 µs [32]. When the event camera is saturated, the time difference between two consecutive events reported by the camera may be as large as 20 µs, where most of them share the same time stamp as shown in Fig. 1.5 - frame d. This introduces a larger time uncertainty in the events due to the impossibility of determining the precise order of event appearing. In such conditions, the events are not informative enough for our computer vision algorithms. In addition, all event camera models have a refractory period defined as the time that a pixel needs to fire a new event. During this period (typically less than 1 µs), the pixel is essentially blind and limits the rate at which an event can be perceived.
1.2 Motivation 11 Sensitivity: 1.5% (a) (b) Sensitivity: 10% On Off Figure 1.6: Effects of improving contrast sensitivity. Events integration over a window of 30 ms with (a) 1.5% sensitivity, (b) 10% sensitivity. Figure taken with permission of [4] ©2011 IEEE. Low contrast sensitivity The event production could be affected in scenes with soft gradient changes. By default, DAVIS model requires about a 15% of minimum illumination change, otherwise the camera senses noise from the scene. This threshold can be modified up to 50% value, constraining the event production in highly textured scenes. Other designs like in Serrano et al. [4] offer an improved contrast sensitivity. That work is capable of reaching a 1.5% of temporal contrast producing more detailed images when integrating events over a period of time as shown in Fig 1.6. However, such sensitivity levels require of scenarios with good illumination conditions. 1.2 Motivation The previous section listed some advantages of event cameras despite their constructive and operative limitations. Due to their output characteristics, traditional computer vision algorithms cannot be extrapolated to event-cameras. This constraint opens the door for a new and extensive branch of research that aims to surpass the milestones in traditional computer vision algorithms in terms of accuracy, speed and robustness in demanding lighting conditions and high dynamics. This is a challenging task considering the continuous technological development and affordability of conventional cameras, plus the decades of research in traditional computer vision. A key challenge in event-based vision is its asynchronous output format and, therefore, the lack of image intensity frames. Nonetheless, this constraint can become an advantage if managed properly as it provides a free-pass to control the event stream as convenience. For instance, several works use an event-per-event method for tracking and feature detection
12 Introduction [33], [34], [35], [36]. In this type of methods, the core system updates its state as soon as an event arrives, showcasing their ability to work at fast rates. However, during abrupt events production standard CPUs might not be able to handle this computational burden in real-time. In contrast, when in low motion, the rate of events might not be informative enough. Disregarding GPUs and high-tech computing systems, processing asynchronous event streams sequentially requires new and clever solutions to work in real-time in standard computers. Another point to consider is the reduced amount of information that a single event conveys. It is a challenging task to discern between meaningful events - features - and noise when the only available information for each event are its coordinates in the retina and its time stamp. This reduced amount of data hinders feature matching operations as there is no direct measure of brightness. A potential solution to this issue is to cluster events into batches organized as appropriate [37], [38]. Most of these clustering schemes use heuristics on neighbor’s relations and temporal information of each event. As such, there is no definitive way to process event information, and the appropriateness of the method is subdued to its application. The microsecond resolution of event cameras is an advantage for fast and ultra-fast Visual Odometry (VO) and Simultaneous Tracking and Mapping (SLAM) systems, currently limited to low rates - 30 Hz or higher depending on the conventional camera model. Robust SLAM systems in high-dynamic motions are a possibility thanks to the event-cameras fast response and continuous operation in challenging lighting conditions. Event-based vision faces the same problems as classical computer vision for SLAM and ego-motion estimation, and existing available solutions consist on the adaptation of conventional methods to the case of event cameras. For example, current sensor fusion techniques efficiently integrate a large number of inertial sensors (IMU) readings - usually in rates of kHz - to match the frame rate. But, for event-cameras, as the event rate surpasses the one of the IMU’s, a new sensor fusion technique is required to avoid limiting the camera’s capability. Features definition and how to obtain them from an image is a key consideration for successful SLAM systems. Cultured detectors like SIFT [39], SURF [40], or ORB [41] rely on the image intensity to extract and match features over frames. Point-like features are vital in mature open-source VO and SLAM approaches like ORBSLAM [6] or SVO [7]. Furthermore, in conventional camera approaches, system performance is better when using points compared to line features [42]. Not disregarding other reasons, point-based systems perform better as not all scenarios have a sufficient amount of lines to make accurate pose estimations. However, event cameras naturally highlight edges in the scenes without requiring additional processing. What is more, the events hinder feature extraction, especially point-liked ones. The natural edgelike disposition of events calls for rethinking the usage of lines as features and finding ways to overcome the issues associated with them.
1.2 Motivation 13 1.2.1 Objectives and scope Event-based SLAM systems face two main issues based solely on the advantages and constraints of event cameras. The first issue is how to manage event streams to take advantage of the camera’s potential. Integrating events to create image-like frames or for image reconstruction - for feature extractionforces to obtain state estimations at similar rates to those of conventional cameras. With this background, one aim of this work is to develop a SLAM system for high dynamic motion that takes full advantage of the event-camera fast response and operation in demanding lighting conditions. For that, this thesis also seeks to determine the maximum speed at which an event-based SLAM system can operate before losing accuracy; and to evaluate the limitations and quality for state estimation in conditions not suitable for conventional cameras. The second issue is how to take advantage of the natural edge highlighting response of event cameras despite the apparent impractical use of line features in SLAM systems. As mentioned in Sec. 1.2, the lack of image intensity and the sparsity of event data hinders the direct application of known intensity-based feature descriptors. Lines features are a natural fit to the event cameras if their characteristic edge response is considered. This thesis’s ambition is to evaluate the feasibility of using line features as landmarks for SLAM systems. In this sense, it is important to determine what kind of limitations are associated with them, the complexity of their extraction process, and their behavior when subject to fast-changing event rates. To summarize, the main objective of this thesis is to assess the feasibility and to develop new techniques for event-based simultaneous localization and mapping that exploits the asynchronous stream of events for fast response without limiting the camera capabilities. From the problems observed in Sec. 1.2, the following specific objectives were identified: - To develop a SLAM system that takes advantage of the edge response of event cameras. - To assess a proper event representation - event-by-event or windows of events - to avoid hampering the event camera fast response without information lost. - To define a fitting mathematical model to handle 3D pose estimation and complex system derivatives. - To determine a proper data association procedure between events and features from scene for accurate and fast estimation. - To characterize the response limits of the event camera in high dynamic motions and challenging lighting conditions. - To develop novel sensor fusion strategies to combine events with IMU measurements without limiting the event camera fast response characteristic.
14 Introduction - To evaluate the feasibility, adequacy and limitations of using line features in event-based SLAM systems in highly dynamic conditions. - To inspect the complexity of implementing an event-based SLAM using line features for real-time performance in a standard CPU. - To analyze the feasibility of developing a more general form of line features for detecting edges with event cameras The scope of this thesis is focused on the development and evaluation of a monocular visual SLAM system, using as propioceptive sensor the output of an event camera. The system components of tracking and mapping should exploit the sparse and asynchronous nature of events by means of efficient data association algorithms -between events and features-, proper mathematical formulations, kinematic models and ablation studies. The environments to evaluate the proposed event based algorithms will be human-made, because of its rich content of observable lines. The results from this evaluation should provide a reference to consider more natural and complex scenarios. As mentioned in the paragraphs above, the main ambition is not to constrain the fast response of event cameras and achieve the highest possible accuracy in highly dynamic motion and challenging lighting conditions. In this work, the attention is focused on line features following the inherent edge response of event cameras to eventually overcome the known issues present in visual SLAM with these features. Besides modern technology regarding parallel computing -like GPUs and external servers-the SLAM components presented here will be light and efficiently implemented to run in a standard multi-core CPU. Simple and effective real-time algorithms open a door for further implementations in constrained robotic platforms. 1.2.2 Thesis overview This thesis is organized in five chapters that follows an intuitive order reading. Chapter 1introduced the necessary background of event cameras to understand the current motivations in this work. Since event cameras have about a decade of dedicated research, and they are experiencing a recent positioning in the commercial market, detailing their most relevant features was considered a relevant matter in this chapter. After this introductory chapter, it is presented a tracking mechanism that estimates the 3D camera pose using lines and events in a known scenario. In Chapter 2, it is evaluated the performance and limitations of several estimation variants, mathematical formulations and heuristic considerations to handle the event stream for highly dynamic conditions. This chapter was partially published in [5].
1.2 Motivation 15 In Chapter 3it is proposed and assessed several sensor fusion strategies to complement the event data with inertial measurements without constraining the camera’s fast response. This chapter includes ablation studies to determine the limitations and accuracy of the sensor fusion strategies. The findings of this chapter are about to be published. In Chapter 4it is shown the development of a SLAM system built upon the tracking strategies formulated in the previous chapters. The accuracy, performance and quality of 3D reconstructions were evaluated in several scenarios and motion conditions. Line feature extraction and their mathematical considerations are also included. The SLAM system presented is complemented with a bundle adjustment optimization based on the event data and line features. This process improves camera poses and line parameters via non-linear optimization. This chapter includes the work published in [8]. Chapter 5summarizes and discuss the main findings through this research work. It is also included future research lines based on possible improvements derived from this work.
22 Event-based camera tracking Window of events (a) (b) (c) Event frame Time surface 10939 events ≈ 5ms On events Off events Max polarity sum 1 Min polarity sum 0Latest events1Oldest events0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Figure 2.1: Event integration during 5ms and grouped as: (a)window, (b)event frame of polarities and (c)time surface. size of this window can be determined either by the number of events or duration. To discern the event polarity, two contrasting colors are typically used, as displayed in Fig. 2.1a, where red is for On and blue for Off events. The lack of events during low -or no-motion is its biggest limitation. Event frames mimic images from conventional cameras. With a -large- group of events, the pixel intensity can be estimated using any event-related value i.e., the sum of polarities as shown in Fig. 2.1b. This event representation is very sensitive to the number of events used; however, with sufficient event data, it becomes an informative input for a contrast maximization framework. Time surface converts the events into an image where the pixels value is their time stamp, i.e., newest events are brighter as in Fig. 2.1c. This representation shows a history log of how events evolve over time. 2.4 Event camera calibration The calibration for the event camera’s early designs - or models without image frames - is a complex process to be performed only with event data. The most straightforward techniques require a board of blinking LEDs to execute circular pattern detections [80]. Other works are based on image reconstruction networks from event data to perform a conventional intrinsic camera calibration [81]. The integration of the active pixel sensor (APS) in most event cameras allows using image frames in the calibration process since events and APS pixels are aligned by design. In this sense,
2.4 Event camera calibration 23 manufacturers like Inivation provide a Software Development Kit 3(SDK) and a user interface with several benefits such as event visualization, graphical programming, pre-programmed algorithms and calibration. The event camera models for the experiments presented in this thesis are DAVIS346 and DAVIS240C. Both models have similar technical specifications but different resolution, robustness and communication capabilities -see Table1.1. Due to the default 1:1.6 CS mount lens, the distortion in these commercial models is mostly radial. The barrel deformation in raw images is visible to the naked eye as observed in Fig. 2.2b. The monocular calibration node integrated into the Robot Operative System (ROS) eases the estimation of the camera’s intrinsic parameters of focal length (αu, αv), principal point (u0, v0) -that states for the intrinsic camera matrix Kas Eq. 2.25-, and radial distortion coefficients (d0, d1, d2). This process needs a chessboard pattern and good illumination to take image samples using the DAVIS frames, as shown in Fig. 2.2a. More details for the monocular calibration can be found in the ROS Wiki 4. Radial distortion is corrected following the exact formula in Drap et al. [82]. The output from this process is displayed in Fig. 2.2c. The use of this formula allows to create a lookup table containing the undistorted pixel coordinates of each event quickly and efficiently. Each element in the table corresponds to each event position denoted e(ue, ve), and the whole table is the same size as the camera image. This table is computed only once before deploying any estimation process; afterwards, it is accessed asynchronously by the events to retrieve the corresponding undistorted coordinates. Each pixel position in the table is rectified following the next steps: Depixelization: exy = ex= (ue−u0)/αu ey= (ve−v0)/αv (2.1) Undistorion: exy ←exy(1 −d0∥exy∥2+ (3d2 0−d1)∥exy∥4+ (8d0d1−12d3 0−d2)∥exy∥6) (2.2) Pixelization: e= ue←u0+αuex ve←v0+αvey (2.3) Note that the undistortion polynomial in Eq. 2.2 is aimed for three distortion coefficients, if the calibration process returns more than three terms, Eq. 2.2 needs to be adjusted following the coefficient arrangement stated in [82]. The lookup table creation process can also be implemented with the ROS-OpenCV pinhole 3https://inivation.gitlab.io/dv/dv-docs/docs/getting-started/ 4http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration
24 Event-based camera tracking camera model library using point undistortion functions based on the intrinsic parameters. Experimentally, this thesis implementation of Eq. 2.2 is about five to ten times faster than using the pinhole camera library. The DAVIS ROS Driver 5[3,18,83] grants access to the event data, image frames, IMU and internal configuration parameters. This driver is an open source ROS node written in C++ that handles the camera‘s communication channel using a libcaer library. Camera type: 0 Pinhole X Y Size Skew Fisheye Scale (a) (b) (c) Figure 2.2: Event distortion correction: (a) ROS monocular image calibration interface, (b) radial distortion effect on event data and (c) event undistortion. 2.5 Event-lines data association The data association mechanism that matches lines and events must be a fast and efficient process. The goal is to rapidly discard or validate events having an initial state estimation and to associate them to a specific line from a global map. This data association process is used in all tracking variants evaluated -described ahead in the text-, adapted only to the camera resolution as an instrument to correct and update the system state. The data association procedure is performed before any state correction, and it aims to allocate projected 2D lines into cells for fast event-line association operations. The data association process is described in the following sections. 2.5.1 Image tessellation The event-line association uses a fast outlier rejection algorithm enhanced with image tessellation to accelerate the search for event-to-line candidates. To this end, for the event data that needs to be processed -a single event or a batch of eventsthe visible 3D lines in the map at a predicted camera position are identified and projected onto the image plane. The rest of 5https://github.com/uzh-rpg/rpg_dvs_ros
2.5 Event-lines data association 25 Algorithm 2.1: Crossing cells identification 1: if Positive segment slope then 2: Set: incremental for loop 3: else 4: Set: decremental for loop 5: end if Part 1: Columns swept 1: for i=c1(1) to c2(1) do 2: j← ⌈(−a·w b·mi−c b)n h⌉ 3: cij ←[i, j]⊤ 4: end for Part 2: Rows swept 1: for j=c1(2) to c2(2) do 2: i← ⌈(−b·h a·nj−c a)m w⌉ 3: cij ←[i, j]⊤ 4: end for the segment projections are assumed young enough for the matching process. They will be eventually considered as new event data arrives and the camera moves. Note that the tracking system that predicts the camera at this point is described in Sec. 2.6, and that all 3D lines have known parameters. The image plane is tessellated in m×n(reasonably squared) cells, each one with a list of projected 2D lines that cross it. These lists are updated at the arrival of a group of events determined by the algorithmic process of the event representation in turn. The cells crossed by each 2D line have coordinates cij = [i, j]⊤∀i∈[1 . . . m]j∈[1 . . . n], which are rapidly identified computing the segment intersections with the horizontal and vertical tessellation grid guides, as shown in the examples presented in Fig. 2.3. This is an iterative process that requires: the image size w×h, the 2D projected line equation in the form a·x+b·y+c= 0 and its pixel endpoint coordinates u1,u2∈R2. The relative coordinates of the containing cell of a given 2D point are computed using its pixel coordinates in the image plane as: cij = m w0 0n n u ∈R2∀u= [u, v]⊤,(2.4) where ⌈·⌉ ≜ceil(·), and uis a 2D point in calibrated coordinates. The cells that contain the 2D line endpoints u1and u2are noted as c1and c2respectively. Cells in between these endpoints are identified following Algorithm 2.1. In addition, this process ends if the line goes out the image plane as in Fig. 2.3c. Longer lines that crosses the image
26 Event-based camera tracking plane and have both endpoints out of it are trimmed to plane limits before proceeding with Algorithm 2.1 as in Fig. 2.3d. The image tessellation performance is shown in Fig. 2.3, where the crossing cells for several cases are highlighted. (a) Positive slope (d) Two endpoints outside (e) Slope ≈ 0° (f) Slope ≈ 90° (b) Negative slope (c) One endpoint outside 0 012345 m 1u1 u1 2 3 4 5 . . . n 0 1 2 3 4 5 . . . n Cell detected in column swept Cell detected in row swept Tessellation grid Line . . . 012345 m . . . 012345 m . . . 012345 m . . . 012345 m . . . 012345 m . . . [0,0] [0,0] [m,n] [0,0] [m,n] [0,0] [m,n] [0,0] [m,n] [m,n] [m,n] [0,0] u2 u2 u1 u1 u1 u2 u2 Figure 2.3: Line allocation in tessellation grid: different line cases cosidering slope, horizontal and vertical directions, and endpoints out of the image plane. 2.5.2 Event-line matching The containing cell for an event eselected for matching is computed with Eq. 2.4, and compared only against the segments that are within that cell. This greatly reduces the combinatorial explosion of comparing Xsegments with a huge number Yof events from O(X×Y)to the smaller cost of updating the cells’ segments lists, which is only O(Y). The (very small) number of matched segment candidates for an event are sorted in ascending order considering the event- to-line distance in Eq. 2.32. To validate a match between an event and its closest segment the following three conditions -evaluated in this ordermust be met:
2.5 Event-lines data association 27 On events Off events Projected lines 0 50 100 150 200 0 40 80 120 160 Cell associated to line Horizontal and vertical intersections Tesselation guidelines Ambiguity zones Distance threshold Matched events 10 30 50 70 10 30 50 70 40 60 80 100 40 60 80 100 (a) (b) (c) Figure 2.4: Data association process: (a) event window with projected lines, (b) image tessellation, (c) event-line association and event disambiguation, figure adapted from [5]. •The distance d1to the closest segment is below a predefined threshold, d1< α, (2.5) where it is usually taken α∼2 pix. •The distance d2to the second closest segment is above another predefined threshold, d2> β, (2.6) where it is usually taken β∼2α. •The orthogonal projection of the event onto the segment falls between the two endpoints, 0<v1⊤v2 v1⊤v1 <1,(2.7) where v1=u2−u1and v2=e−u1. The line matching correspondence is revised in its cell for each event in the temporal window. Although the tracking system can process all events at the rate of millions per second, there might be cases in which this is not achievable. These situations depend on the motion dynamics and scene complexity proportionally related to the event rate production. In order to maintain real-time performance, the tracking system keeps track of the execution time and skips an event in the most demanding conditions if its timestamp is lagging more than 10µs from the current time. The data association process has the same structure, either considering individual events or using an event window. For ease of visualization and understanding Fig. 2.4 summarizes the process for an event window captured while observing some geometrical shapes. In the event
28 Event-based camera tracking window, the scene lines are drawn to what events are meant to be associated, Fig. 2.4a. The next frames Fig. 2.4b and 2.4c show the image tessellation and event-line association process for a zoomed area in the event window. It is visible how the noisy events and ambiguous events that may belong to more than one line in the line crossings zones are discarded. 2.6 Camera pose estimation preliminaries This section aims to propose a tracking mechanism that estimates the 6DoF of the camera pose using only the event data. The related works reveal that Bayesian filters are a popular choice in event-based SLAM as event production fits a Gaussian distribution. In this sense, the camera pose tracker is formulated using Kalman filter topology that is updated at a high rate using the data association mechanism described in Sec. 2.5. The camera pose estimation is performed under the assumption of having a known world parameterized with 3D lines. The active recovery of line-based landmarks is addressed in Chapter 4. For comparison purposes, two Kalman filter formulations were assessed. First, a Lie formulated Error State Kalman Filter (Lie EKF) conformed by a nominal state xdefined on the SO(3) Lie group, an error state δxthat belongs to the tangent space of SO(3) at the point x, and the true state computed as, xt=x⊕δx,(2.8) where the operator ⊕allows introducing error state increments between manifold elements and expressing them in its tangent vector space. As a result, the error state has a minimal size equal to the degrees of freedom of the SO(3) manifold. The system covariance and their Jacobians are expressed with respect the error state δx. The Jacobians maps exactly the error state covariance from tangent space to SO(3) manifold since their closed form are precisely defined in a Lie theoretic sense. Therefore, Lie Jacobians are computed without any truncation degree. A quick Lie theory review with the concepts used in this thesis is presented in App. Afor ease of understanding. A complete guide about other Lie groups used in robotics is presented in [84]. Second, a classic Extended Kalman Filter (classic EKF) that drives the orientation using quaternions [85] expressed with the Hamilton convention q= [qw, qx, qy, qz]⊤∈Has in [86]. In this approach, the state Jacobians and covariance are estimated directly from a given motion model. The Jacobians computation are performed with a truncation degree (first order approximation is used in this work), which allows mapping -with a degree of uncertaintythe orientation increments and their covariance onto the 4D quaternion space, with disregard of the topology of the unit quaternions manifold and its group structure. In the classic EKF, the
2.7 Tracking system overview: Event-per-event and window of events details 29 Table 2.1: ESKF variants implemented. Event representation Motion model Projection model Formulation Event-per-event CP DP Lie EKF: Manifold ∈SO(3) Window of events CV IP Classic EKF: Quaternions ∈H CA orientation updates become a four-dimensional vector that is linearly applied to the current quaternion vector. This operation causes the updated orientation to go out of the scope of the unit quaternion manifold, requiring an additional normalization step. More detail about these operations is given in Sec. 2.10. For the sake of understanding the event camera capabilities, this thesis explores the possibilities of either predicting and updating the filter event-per-event or collecting a certain number of events in a relatively small window. Event-per-event updates are appealing for achieving low latency, considering that the amount of information of a single event is reduced, and all computations must be performed at a high rate. On the other hand, windows of events offer the possibility of working in an area with more event data and reducing the number of computations per estimation. For the latter, the filter throughput depends on the event window size, a reasonably small size yields high-rate performances that allow fast estimations, as shown in the following sections. In order to find and evaluate the best possible tracking method in terms of accuracy, fast response, robustness and efficiency, several motion models were implemented. This thesis explores the models of: Constant Position (CP), Constant Velocity (CV) and Constant Acceleration (CA), depicting different degrees of approximations during microsecond resolution time steps. This thesis also assesses two projection models: Direct Projection (DP) - aimed for a moving camera in a static world- and Inverse Projection (IP) - aimed for a moving pattern in front of a static camerafor stress experimentation purposes. In total, 24 variants were evaluated, aiming at real-time and fast motion performances, with different complexities and capabilities. The implemented variants are summarized in Table 2.1 and properly defined later in the text. 2.7 Tracking system overview: Event-per-event and window of events details The following subsections address specific algorithmic details for event-per-event and windows of events for the prediction and correction steps. The mathematical development of each Kalman filter stage will be presented from Sec. 2.8. The considerations made for each representation
30 Event-based camera tracking comprises performance enhancements and proper management of computational burden to reach real-time. A block diagram of the tracking system proposed representing subsystems and operations for each event representation is displayed in Fig. 2.5. 2.7.1 Heuristics for state prediction Event-per-event processing becomes expensive if all events are treated equally since not all events can be associated with a line. Distinguishing helpful events in advance allows to optimize the execution time. In this sense, every single event is evaluated with the data association algorithm in Sec. 2.5 before proceeding with the state prediction, and only the matched ones continue the estimation process to avoid unnecessary operations. At the arrival of an event Event Event matched? Prediction Next event Matched line reallocation Data association Tessellation grid Projection Matched line Projected 3D lines Correction Pose tktk Δt = t - t kk-1 tk+1 tk Yes No Event Window Events matched? Next event window Data association Visible lines reallocation Tessellation grid Projection Matched lines & events Projected 3D lines Correction Correction Correction Pose tk+N Prediction Δt = t - t cc-1 Yes For all matched events: No [t ... t ] k k+N Central time : tc Central time : tc+1 tk+1 tk+N . . . Event-per-event Windows of events (a) (b) Figure 2.5: Estimation process block diagram: (a) Event-per-event, predicts and corrects the state with a single event matched to a line (b) Windows of events, predict the state once and perform partial event corrections.
2.7 Tracking system overview: Event-per-event and window of events details 31 stream the map’s visible lines are projected to be allocated in the tessellation grid. The lines in the grid are constantly updated as the camera pose changes, see Fig. 2.5a. After a matching success, the state prediction is performed considering that the time step ∆t=tk−tk−1is the difference between the current event timestamp tkand the one concerning the previous state estimation tk−1. This difference is asynchronous and usually in the order of tens of microseconds. The time step needs to be constantly monitored due to the eventual timestamp sharing by one or several events; this issue leads to the time step becoming zero. The defective events are skipped until having ∆t > 0; however, if many events share a timestamp, the tracking might fail. Afterwards, the projection and its Jacobian are computed for the matched line to proceed with the state correction. Windows of events require event integration during a short period, creating a batch of data that usually contains more than 300 events. Contrary to event-per-event, the state prediction is performed first to update all lines in the tessellation grid. Afterwards, the data association is carried out with updated information. Since all events are independent of each other, this process is parallelized, resulting in rejection and match vectors of events sorted by timestamp, see Fig. 2.5b. The state prediction is made only once for all the events inside the window, and it takes place at central window time tck. The time step is denoted ∆t=tck−tck−1that, in this case, represents the difference between consecutive central time stamps. This operation reduces the computational burden of computing the covariance matrices at the event rate at the cost of adding some latency. The use of window of events results in a synchronous time step ∆t, which can be adjusted on demand but is usually in the order of hundreds of microseconds (300 µs in the experiments). During slow-motion, empty windows may appear, which are skipped until getting a batch with a reasonable number of events (minimum 100 based on empirical observations; see Sec. 2.13.3). Finally, the matched lines are projected, and their Jacobians are stored to be used in the correction step. 2.7.2 Heuristics for state correction Event-per-event state corrections are performed with a single event and the orthogonal distance to its matched line. Afterwards, the active line is reallocated in the tessellation grind using the updated pose. The remaining lines are considered young enough for this process. After processing n= 300 events, all visible lines are reallocated in the tessellation grid using the current camera pose. This consideration is just a precaution in the extreme case of having visible lines with no matched events. Since the camera pose does not change significantly, updating the tessellation grid at the event rate is inefficient and expensive. Windows of events state corrections are computationally efficient since all event-line asso-
38 Event-based camera tracking with Jl u1=−[u2]× Jl u2= [u1]× JR⊤ R=−R. (2.29) Note that for DP the chain rule for the orientation Jacobian is in need of an additional operation with Juj R=Juj R⊤JR⊤ R, where JR⊤ Ris another elementary block belonging to the Jacobian of the group inversion which is equal to −R(see Eq. 2.29). Therefore, its closed form results from exploiting the orthogonality of the rotation matrix and the skew symmetric matrix properties yielding (for DP only), Juj R=K[R⊤(pj−r)]×(2.30) The measurement to correct the Kalman filter predictions comes from the stream of undistorted events, and it has a model: y=h(xk) + nd,(2.31) with a Gaussian measurement noise nd∼ N(0, σ2 d)and h() a general non-linear function of the system state. Having a successful event-line data association -see Sec. 2.5.2-, the innovation function zdefined as the signed orthogonal distance between an event (in homogeneous coordinates) e= (ue, ve,1)⊤and its associated line defined by: z=y−h(ˆ x) = d(e,l) = e⊤l √a2+b2∈R.(2.32) The innovation covariance Zresults in a scalar value computed in terms of the system covariance and the Jacobian of h() with respect the error state denoted by H≜∂h(x) ∂δx=Jz xJx δx. The Jacobian of the true state with respect the error state Jx δxis trivial for non SO(3) elements and equal to I, but for the rotation term this Jacobian is defined as ∂R⊕δθ ∂δθ=Jr(δθ). The resulting Jacobian block is a diagonal matrix with a size dependent on the motion model in turn yielding, Jx δx= diag ([I,Jr(δθ),··· ,I]) ∈Rm×m∀m∈ {6,12,or 18}. From Eq. 2.26 and Eq. 2.27 the innovation Jacobian with respect the true state Jz xyields: Jz x=hJz lJl rJz lJl R0··· 0i∈R1×m(2.33) Jz l=e⊤ √a2+b2∈R1×3,(2.34) therefore the innovation covariance is computed as, Z=HPH⊤+σ2 d∈R,(2.35)
2.10 State prediction: Classic EKF 39 In order to prevent a state correction with measurement outliers, a compatibility test was carried out based on the Mahalanobis distance of the innovation by checking the condition: z⊤Z−1z≤n2 σ,(2.36) having the 95% chance of being an inlier with nσ∼2[pix]. This value can be increased in higher resolution event cameras. As the innovation and its covariance are scalars, Eq. 2.36 becomes a simple division z2 Z. Upon the Mahalanobis test satisfaction, the following steps are described below: Kalman gain: k=PJz x ⊤Z−1∈Rm×1 Observed error: δx←kz∈Rm×1 State update: x←x⊕δx∈Rm×1 Covariance update: P←P−kZk⊤∈Rm×m ,(2.37) where the state update becomes a regular sum for the state blocks ∈R3such as {r,v,ω,α}. For R∈SO(3) the state update is done with the right-plus operator as required for the model in turn (CP, CV, or CA). To improve the execution speed, the matrix sparsity was efficiently handled by computing the Kalman gain using block matrices. 2.10 State prediction: Classic EKF The classic EKF handles the orientation using quaternions following the Hamilton convention q= [qw, qx, qy, qz]⊤∈Has Eq. 8 in [86], and conventional EKF procedures. In this case, the orientation error, denoted as δq, becomes a four-dimensional vector that is linearly applied to the state, as explained ahead in the text. Therefore, the Jacobians map approximately the state covariance onto the quaternion manifold based on the truncation degree selected. Since the time steps between state predictions are small and in the order of microseconds, the Jacobians will be estimated just with a first-order approximation for ease of computation. Classic EKF formulations with higher truncation degrees are detailed in [87]. In addition, considering that Jacobian truncation is an inexact process, quaternion normalization is applied after EKF updates (as detailed in Sec. 2.11) to ensure the orientation lies in the unit quaternion manifold. The trivial state elements for all motion models are common to the Lie EKF formulation. Notation and noise terms are shared with this classic EKF. In order to avoid redundant explanations, only aspects with significant differences will be addressed in the following sections. For
40 Event-based camera tracking all motion models, the state is given by: rkqkvkωkakαk xk=∈Rm CP CV CA δrkδqkδvkδωkδakδαk δxk=∈Rm CP CV CA , where m={7,13,19}for CP,CV and CA respectively. The rotational component for the state transition is denoted in Table 2.3 for CP, CV and CA. The remaining components in the state transition are defined in the previous section in Table 2.2. Table 2.3: Orientation transition with the quaternion manifold. xk+1 =f(··· CP CV CA ) ∈ M qk+1 =qk⊗q{θnωk∆tωk∆t+1 2αk∆t2} ∈ H The integration of all Gaussian perturbations follows the same principle as described with the Lie EKF; therefore, the perturbation matrices computed in Eq. 2.13,2.14 and 2.15 are applicable to this variant. The only difference is in the orientation noise for the CP model. This Gaussian distribution defined as θn∼ N(0,Θ)is now a four-dimensional vector with a covariance matrix Θ∈R4×4. The quaternion theory introduces two important operations. First, the quaternion exponential map q{uθ}that allow to express a rotation expressed with an angle θaround an axis uin the quaternion manifold - operation analogue to the Rodrigues formula in Eq. 2.12- as, q{uθ}≜Exp(uθ) = cos(θ/2) usin(θ/2) ∀θ∈R,u∈R3,(2.38) the second is the quaternion product denoted by ⊗, that can be expressed as left or right product matrices, which can be computed using the operators [·]Land [·]Rdefined as, [q]L= qw−qx−qy−qz qxqw−qzqy qyqzqw−qx qz−qyqxqw ,[q]R= qw−qx−qy−qz qxqwqz−qy qy−qzqwqx qzqy−qxqw ∀q= [qw, qx, qy, qz]⊤,(2.39) therefore, the quaternion product in a matrix form becomes q1⊗q2= [q1]Lq2= [q2]Rq1-see
2.10 State prediction: Classic EKF 41 Sec. 1.2 in [86] for more useful quaternion properties-. The covariance in propagated as Pk=FxPk−1Fx⊤+FnQFn⊤, taking into account the dimensions of Fxand Pelement blocks, which have matrices of sizes proportional to the quaternion element numbers. The Jacobian and covariance blocks are denoted as: I0I∆t0I∆t20 0Jq q0Jq w0Jq α 0 0 I0I∆t0 0 0 0 I0I∆t 0 0 0 0 I0 0 0 0 0 0 I Fx= Prr Prq Prv PrωPra Prα Pqr Pqq Pqv PqωPqa Pqα Pvr Pvq Pvv PvωPva Pvα PωrPωqPωvPωω PωaPωα Par Paq Pav PaωPaa Paα PαrPαqPαvPαω PαaPαα P= CP CV CA .(2.40) The orientation Jacobian with respect to the quaternion denoted, Jq q≜∂q⊗q{ω∆t} ∂q,(2.41) is computed expressing the product as a right matrix operation q⊗q{ω∆t}= [q{ω∆t}]Rq, yielding to a trivial partial derivative equal to [q{ω∆t}]R. The rotation Jacobian with respect to the angular velocity can be derived using the chain rule as, Jq ω≜∂q⊗q{ω∆t} ∂ω=∂q⊗q{ω∆t} ∂q{ω∆t} ∂q{ω∆t} ∂ω,(2.42) where expressing the quaternion product as a left matrix q⊗q{ω∆t}= [q]Lq{ω∆t}, the first derivative of Eq. 2.42 is trivial and results [q]L. The second one requires making a small signal approximation for ω∆t-especially due to time step µs resolution-. Applying a Taylor series expansion and removing second order terms the exponential map in Eq. 2.38 leads to: q{ω∆t}∆t→0 −−−−→ 1 1 2ω∆t where, ∂ 1 1 2ω∆t ∂ω=1 2∆t 000 100 010 001 yielding to
42 Event-based camera tracking Jq ω=1 2∆t −qx−qy−qz qw−qzqy qzqw−qx −qyqxqw .(2.43) Having denoted the most relevant quaternion derivatives, and using a short notation for Eq. 2.43 as Fω, the Jacobians for all motion models are computed as: CP nJq q=I∈R4×4(2.44) CV Jq q= [qω∆t]R Jq ω=Fω ∈R4×4 ∈R4×3(2.45) CA Jq q= [q{ω∆t+1 2α∆t2}]R Jq ω=Fω Jq α=1 2∆tFω ∈R4×4 ∈R4×3 ∈R4×3 (2.46) The perturbation Jacobian matrix Fnand its covariance Qare diagonal matrices as in Sec. 2.8. For example the CP Jacobians matrices are: Fn= I0 0ˆ I Q= Γi0 0ˆ Θi ∈R7×7, with the consideration that rotational blocks -marked with hats in this examplenow belong to ∈R4×4. Continuing with the CP example, the covariance element blocks were efficiently updated exploiting the sparsity and trivial operations as follows: Prr ←Prr +Γi Pqq ←Pqq +ˆ Θi 2.11 State correction: Classic EKF As presented in Sec. 2.9, the Kalman filter seeks to minimize the error between the projected lines land the events egiven a camera pose estimate. The course of action for the state correction was already defined in Sec. 2.9, where the orthogonal event-line distance is used as an innovation function for the filter. To avoid redundant definitions, the correction procedure departs from the endpoint pro-
2.11 State correction: Classic EKF 43 jection expressions defined in Equations 2.23a,2.23b, and 2.24. These equations denote the projection of a 3D line endpoint onto the image plane according to the direct or inverse projection model and a 2D line definition. In this section, it is necessary to adapt the mathematical formulation of such expressions to the quaternion manifold. To this end, first, the camera orientation is expressed as a rotation matrix departing from a quaternion as: R{q}= q2 w+q2 x−q2 y−q2 z2(qxqy−qwqz) 2(qxqz+qwqy) 2(qxqy+qwqz)q2 w−q2 x+q2 y−q2 z2(qyqz−qwqx) 2(qxqz−qwqy) 2(qyqz+qwqx)q2 w−q2 x−q2 y+q2 z ∀q= [qwqxqyqz]⊤∈H, (2.47) Second, to derive the line projection Jacobians lets express a simplified quaternion notation as q= [w, s]⊤∀w∈R,s∈R3that splits the real and imaginary parts to illustrate the following definitions: •The quaternion conjugate, denoted as q∗= [w, −s]⊤. •The rotation matrix in terms of the quaternion elements, R{q}= (w2−s⊤s)I+ 2ss⊤+ 2w[s]×,(2.48) with an inverse rotation matrix defined by, R{q}⊤=R{q∗}= (w2−s⊤s)I+ 2ss⊤−2w[s]×(2.49) •The quaternion rotation action on a vector b∈R3is defined by the product b′=q⊗b⊗q∗=w2b+ 2w(s×b) + 2(s⊤b)s−(s⊤s)b,(2.50) where the Jacobian with respect to the quaternion is given by ∂b′ ∂q=h∂b′ ∂ w ,∂b′ ∂vi∈R3×4 with: ∂b′ ∂ w = 2(wb+s×b)∈R3×1(2.51) ∂b′ ∂s= 2(s⊤bI +sb⊤−w[b]×)∈R3×3(2.52) Note that either the rotation matrix computed from a quaternion R{q}or the quaternion action defined in Eq. 2.50, can be used in the endpoint projection operations. The Jacobians of the line projection with respect to the camera position and orientation given by the relations Jl r=Jl u1Ju1 r+Jl u2Ju2 rand Jl q=Jl u1Ju1 q+Jl u2Ju2 q, are derived for DP
44 Event-based camera tracking and IP applying the definitions in Eq. 2.48 and 2.50 as: DP Juj r=−KR{q}⊤∈R3×3∀j∈[1,2] Juj q=K2(wb−s×b),2(s⊤bI +sb⊤+w[b]×)∈R3×4 b=pj−r∈R3 (2.53a) IP Juj r=K∈R3×3∀j∈[1,2] Juj q=K2(wb+s×b),2(s⊤bI +sb⊤−w[b]×)∈R3×4 b=pj∈R3, (2.53b) where the Jacobians Jl uare the same as in Eq. 2.29. The classic EKF state correction departs from computing the event-line innovation function zwith Eq. 2.32 and its innovation covariance as, Z=HPH⊤+σd2∈R,(2.54) where His the innovation Jacobian with respect to the state, and it is computed from Eq. 2.53a and 2.53b for DP and IP, respectively. The closed form of His obtained using the chain rule as, H=hJz lJl u1Ju1 r+Jl u2Ju2 rJz lJl u1Ju1 q+Jl u2Ju2 q0···0.i∈R1×m(2.55) The required Jacobian blocks are listed in the previous paragraphs, and Jz lis defined in Eq. 2.34. Having the innovation Jacobians and the innovation function the next steps are: Kalman gain: k=PJz x ⊤Z−1∈Rm×1 Observed error: δx=kz∈Rm×1 State update: x←x+δx∈Rm×1 Covariance update: P←P−kZk⊤∈Rm×m . Note that the observed error is applied as a regular sum for all state components, even for the orientation. Unlike the Lie EKF updates, the corrected orientation goes out the scope of the unit quaternion manifold. Thus, the new quaternion needs to be normalized yielding, Quaternion update: ˆ q=q+δq Quaternion normalization: ˆ q←ˆ q ∥ˆ q∥
2.12 Bootstrapping 45 2.12 Bootstrapping The initial camera pose must be determined with respect to the object’s reference frame to launch the proposed tracking system. To this end, a bootstrapping node is in charge of estimating this pose due to the current tracker does not follow a direct feature detection, matching, and triangulation methodology. Since, at this point, the 3D line-based landmarks are known, the bootstrapping system in this chapter takes advantage of such information. The bootstrapping objective is to detect 2D features (points or lines) in the image plane or an event window and the concerning 2D-3D registrations to compute the initial pose. The bootstrap requires the camera to be positioned at an initial guessed position, close enough to match the 2D features with 3D landmark projections. This simple solution provides an initial estimate with a known scale factor. This section presents three bootstrapping options, that were the result of experimenting with different features and pose estimators to predict the initial camera pose. Gray Scale PnP PnPL 3D landmarks Events Image Initial Pose Bootstrap 1 Bootstrap 2 Bootstrap 3 Bootstrap 1 Bootstrap 2 Bootstrap 3 Matched corner Unmatched corner Matched line Unmatched line FAST Points Matching Points Matching Points & Lines Matching FAST HOUGH Line Intersections Figure 2.6: Block diagram for all bootstraps configurations. A performance example using a planar mark is given for each option.
46 Event-based camera tracking A block diagram of each bootstrapping option and their output’s visualization example over a planar marker is show in Fig. 2.6. The operation details are given below. -Option 1 (I+Fast): Detection of FAST [47] corners in the camera’s grayscale image. In this option, detected 2D corners are matched with the projected 3D line endpoints. These points should be close enough (less than 20 pixels) to be associated. The initial pose is computed using the Perspective n Points PnP [88] algorithm and sent to the tracker; afterwards, the bootstrapping process is no longer required. Note that this initial estimation does not require a strict match of all line endpoints; three points are sufficient for the PnP to operate. The PnP algorithm is efficiently implemented in OpenCV. The abbreviation “I” for this option stands for image frame. -Option 2 (E+Fast): Detection of FAST corners on event-integrated-images. This option uses only event data since not every event camera model incorporates grayscale frames. The event image is created by integrating sufficient event data W={ek}N k=1 (∼3ms). The image patch is defined as H(x)≜PN k=1 pk(x), where each pixel xsums the event polarity pk. The resulting image is normalized from 0-255 to display a grayscale image. As this image will not be used in an optimization process as in the contrast maximization framework, the motion distortion is not compensated. Therefore, the corners detected are very noisy due to the sparse nature of the events. However, the corners of our map are among these noisy detections. The initial camera pose can be estimated with a PnP algorithm as it was done in Option 1. The abbreviation “E” for this option stands for events. -Option 3 (E+Hough): Detection of HOUGH lines on event-integrated-images. This eventonly method also uses the integrated-event-images described in Option 2, in which the HOUGH transform is applied. The 2D lines are matched with approximate projections of 3D lines from the map by thresholding the orthogonal distances from the detected endpoints to a projected line, computed as in Eq. 2.32. The detected-line intersections are also computed to use a Perspective n Points and Lines PnPL [89] algorithm to retrieve the initial camera pose. This algorithm requires at least 3 points and 4 lines to operate. Note that the PnPL was selected because of the availability of its implementation in C++. Instead, a Perspective n Lines PnL algorithm could be used to simplify this process. These bootstrapping approaches fundamentally present a similar behavior since all of them rely on a known launching marker. Although the bootstrapping options have differences concerning sensor information, features type and estimators, no significant differences in accuracy were observed in practice. The use of any of the listed options depends on the available information type, considering that not all event camera models incorporate grayscale images.
2.13 Experiments and results 47 The following experiments make use of the E+Hough option since it is more related to the type of features used in this thesis. A more detailed performance analysis is presented in Chapter 4, where these options are used in the initialization process of a full SLAM system. This analysis compares performances for these bootstrapping options and a more general one purely based on event data, that is described in the same chapter. 2.13 Experiments and results This section presents experimental results of this tracking system in challenging sequences. The experiments are carried out different motion intensities -from regular to high speed- and challenging lighting conditions. Ground truth trajectories were recorded with an Optitrack system calibrated with spherical reflective references. The fast motion sequences were created with aggressive hand movements at frequencies up to 6Hz. Challenging lighting conditions were created by turning off and on the lights in the laboratory during run time. In some sequences, the lack of light during the experiment recordings is so severe that zones where the grayscale image is not visible. Another experiment is a stress test to analyze performance and limitations in higher dynamics. To this end, the camera observed a marker attached to a constrained mechanism powered by a DC motor which velocity increases gradually and reaches high speeds. The speed ranges for all the experiments are shown in Table 2.4. The experimental sequences were recorded with artificial markers with different complexities and numbers of lines. These markers are: an A4 plane, a cube, and a large trihedron with printed line patterns, (see Fig. 2.7). The recorded sequences to evaluate the tracking system are named: Cube regular, Cube Fast, Plane regular, Plane fast, Plane 360, Trihedron regular, Trihedron fast, Trihedron light and Trihedron 360. Their accuracy and computational performance are reported later in the text in Tables 2.7 and 2.8. As stated in Sec. 2.6, the proposed tracking system predicts and updates the filter on an event-per-event or window of events basis using several Kalman filter variants for motion - Constant Position (CP), Constant Velocity (CV) and Constant Acceleration (CA)- and projection models - Direct Projection (DP) and Inverse Projection (IP). Results are organized by event-per- event or windows of events method. Each one was assessed with all filter variants. For the benefit of the community, the datasets used to generate these results, parameterized line maps, camera calibration parameters, and detailed information about data format are
54 Event-based camera tracking 0.00 X [m]Y [m]Z [m] Time [s] Time [s] (c) (a) -0.20 -0.10 0.00 0.20 0.10 0.00 -0.05 -0.10 Roll [rad]Pitch [rad]Yaw [rad] 0.50 1.00 1.00 1.00 0.50 0.00 0.50 0.00 -0.50 0.00 15105 20 15105 20 X1 Y1 Z1 X2 Y2 Z2 CP CV CA Ground truth 1 2 3 4 5 On Off Projected lines (b) Time [s] 0 5 10 15 20 25 Event rate [ev/s] x106 0 1.0 2.0 3.0 Input Matched events Figure 2.11: Event-per-event evaluation: Trihedron fast sequence with Lie groups. (a) Position and Orientation pots, (b) Input and matched events rate, (c) Tracking sequence. estimate the pose that might result in spikes along the trajectory. In CP and CA, the model constrains also seem to be violated, but during direction changes, where are concentrated, the larger errors as shown in Fig. 2.12. The overall errors in event-per-event processing are low, especially in regular motion experiments. However, an abrupt increase in the event rate hinders real-time performance and often
2.13 Experiments and results 55 Time [s] Time [s] -0.05 X [m]Y [m] 0.20 -0.25 -0.15 0.08 0.14 Z [m] -0.02 -0.08 -0.05 1.00 Roll [rad]Pitch [rad] 0.80 0.40 0.70 0.10 0.35 Yaw [rad] 1.00 0.45 0.72 15 16 15 16 CV CACPCV CACP RMSE [m] RMSE [rad] X1 Y1 Z1 x10-3 x10-3 x10-3 X2 Y2 Z2 CP CV CA Ground truth Lie Classic Lie Classic CP CV CA Ground truth 0 0 00 0 0.1 0.2 0.3 0.05 0.10 0.15 0.20 0.25 10 20 30 5 15 25 35 45 30 20 10 40 0.05 0.10 0.15 Position Zoom Orientation Zoom Figure 2.12: Event-per-event evaluation: Trihedron fast zoomed position and orientation boxes and sequence’s RMSE box plots. leads to a tracking failure. As a result, other sequences, especially in the Trihedron scenario during fast motion, could not be evaluated, as discussed in the following sections. 2.13.3 Accuracy evaluation: window of events The experiments in this subsection are set with a fixed temporal window of 300µs, in which, each prediction occurs at a central window time and several updates using the matched events as detailed in Sec. 2.7. The camera pose is time stamped with the prediction time and reported after processing all events inside the window. The current throughput rate is about 3.3kHz due to the size of the event window, and it is constant as opposed to the event-per-event operation. As in Sec. 2.13.2, the presented examples were computed using the direct projection models computed with Eq. 2.28a and Eq. 2.53a for Lie and classic EKF, respectively. The experiment shown in Fig. 2.13 corresponds to the Plane
56 Event-based camera tracking X [m]Y [m]Z [m] Time [s] Time [s] (c) (a) (b) 0.20 0.00 -0.20 -0.40 0.20 0.00 -0.20 0.20 0.40 0.00 -0.20 -0.40 Roll [rad]Pitch [rad]Yaw [rad] -0.50 0.50 1.00 1.00 0.50 0.00 0.50 0.00 0.00 10 15 20 25 30 Time [s] 0 5 10 15 20 25 30 35 10 15 20 25 30 X1 Y1 Z1 X2 Y2 Z2 CP CV CA Ground truth On Off Projected lines 1 2 3 4 5 Event rate [ev/s] x106 0 0.8 0.4 1.2 1.6 2.0 Input Matched events Figure 2.13: Window of events evaluation: Plane regular sequence with classic EKF. (a) Position and Orientation pots, (b) Input and matched events rate, (c) Tracking sequence. regular sequence. This experiment deals with a regular motion of about 0.6 m/s with the camera observing a planar marker. In this scenario, the camera performs a variety of movements, twists, and paths constrained by the size of the marker(printed in A4 format). The pose estimates for all motion models are displayed in Fig. 2.13a, and the position and orientation trajectories are computed with classic EKF. The camera describes larger path and rotation changes compared
2.13 Experiments and results 57 Time [s] Time [s] 0.00 X [m]Y [m] 0.20 -0.20 -0.10 -0.10 0.00 Z [m] -0.05 -0.40 -0.22 Roll [rad]Pitch [rad] 0.00 0.40 0.20 Yaw [rad] 0.50 1.00 0.00 0.50 1.00 0.00 25 30 25 30 CV CACPCV CACP RMSE [m] RMSE [rad] X1 Y1 Z1 x10-3 x10-3 x10-3 X2 Y2 Z2 CP CV CA Ground truth Lie Classic Lie Classic CP CV CA Ground truth 0 0 0 0 0 0.1 0.2 0.10 0.20 0.30 10 20 0 10 20 30 15 10 5 0.05 0.10 Figure 2.14: Window of events evaluation: Plane regular zoomed position and orientation boxes and sequence’s RMSE box plots. with the ones in Sec. 2.13.2. There are no significant differences between the motion models since they can handle the experiment’s moderate event rate. The most relevant errors occurred at second 22, as shown in Fig. 2.13a, due to the marker going out of the image plane temporarily, leaving the tracker to work with a few incomplete lines. This relative failure moment was captured in Fig. 2.13c - frame 4. A closer view of the zoomed boxes shown in Fig. 2.14 reveals that CA has the noisiest behavior compared to the other models, especially at the beginning of the sequence. This effect may be caused for the reduced amount of informative events inside the event windows to update the large state of CA during the first seconds. If the camera stops or is barely moving, no motion model can work properly, and the tracker will unavoidably, get lost. Setting a constant number of events to correct the state and evaluate their accuracy impact is a complex task due to their
58 Event-based camera tracking X [m]Y [m]Z [m] Event rate [ev/s] Time [s] Time [s] (c) (b) (a) 0.00 -0.20 -0.40 -0.60 0.20 0.00 -0.20 0.20 Lights off Lights off Lights off Lights off 0.00 -0.20 -0.40 Roll [rad]Pitch [rad]Yaw [rad] -0.50 -1.00 0.50 1.00 0.00 -1.00 1.00 0.00 -1.00 0.00 10 20 30 40 50 60 70 10 20 30 40 50 60 70 10 20 30 40 50 60 70 CP CV CA Ground truth CP CV CA Ground truth x106 X1 Y1 Z1 X2 Y2 Z2 0 1 2 3 4 On Off Projected lines 1 2 3 4 5 Input Matched events Figure 2.15: Window of events evaluation: Trihedron light sequence with Lie groups. (a) Position and Orientation pots. The gray zones mark the time with no scene illumination, (b) Input and matched events rate, (c) Tracking sequence. asynchronous nature; however, based on these experiments, it could be stated that from more than 100 matched events, the estimates appear to be more reliable. In this sense, it was decided to merge event windows with less than 100 events until reaching this minimum. This lack of information is rare and only occurs in very-low motions or at the beginning or end of an experiment when the camera is at rest.
2.13 Experiments and results 59 The Cube regular sequence in Fig. 2.9 is another example of low speed scenario. At the beginning, there is a reduced amount of events, sufficient to start the event-per-event tracking, but it hinders the initial estimations on event windows resulting in large errors. This difference can be seen in the overall results in Table 2.7. The low-motion inaccuracies can also be observed at the beginning of the Regular plane sequence in Fig. 2.13a. It is worth noticing that eventper-event processing handles low event rates more efficiently than windows of events. This phenomenon was observed when experimenting with the low-speed cube sequences with eventper-event representations. A possible cause could be related to the number of predictions and corrections that maintain the state up to date with scarce individual events as soon as they appear. The Trihedron light sequence is a challenging combination of fast motion and varying lighting conditions. The camera was moved aggressively in the Trihedron scenario while the laboratory lights were turned on and off. The motion frequency reached 6-7 Hz with linear velocities of about 2.5 m/s and an input event rate of about 4 million events per second (see Fig. 2.15b). In these conditions, the grayscale image is blurred or entirely dark. Even when the lights are on, there are dark zones as shown in Fig. 2.15c. The position and orientation plots in Fig. 2.15a show an increasing error during the aggressive motion. In such conditions, CP and CA models failed, while the CV model was robust enough to complete the sequence and maintain an acceptable error. The gray zones in Fig. 2.15a indicate when the lights are off. The closer view of the zoomed boxes in Fig. 2.16 shows the points in time when CP and CA got lost while CV was still accurately engaged. The error box plots were computed until second 41 for CP and CA and until the sequence end for CV. Despite the unfair comparison due to lapse time, CV mean error is lower than the other motion models. The Lie groups’ estimations show an overall lower error and, at worst, align with classic EKF. The number of noisy events in zones where there are no lines might also contribute to estimation inaccuracies during fast motions and periods of poor illumination. In dark conditions, these noisy events appear randomly, even if the camera moves at a regular speed. This effect could be minimized by adjusting dynamically the event production bias thresholds described in Sec. 1.1.3. The control of the event camera parameters goes beyond the scope of this thesis. Nevertheless, the latter is a research opportunity to develop a system that produces reduced noise event data in challenging scenarios. It is worth mentioning that due to the aggressive conditions and the consistent amount of events, the event-per-event tracking system could not operate in this sequence. That tracking system fails during the first seconds, being impossible to measure its performance.
60 Event-based camera tracking Time [s] Time [s] 0.20 0.10 X [m]Y [m] 0.00 -0.20 -0.10 Z [m] -0.40 -0.20 -0.30 -0.10 Roll [rad]Pitch [rad] -0.50 0.50 0.00 Yaw [rad] 0.50 0.00 0.50 1.00 0.00 41 43 41 43 CV CACPCV CACP RMSE [m] RMSE [rad] Y1 Z1 x10-2 x10-2 x10-2 X2 Y2 Z2 CP CV CA Ground truth Lie Classic Lie Classic CP CV CA Ground truth 0 1 2 1 2 3 4 5 0.04 0.08 0.12 0.16 0.05 0.10 0.15 0.04 0.08 0.12 0.16 0.20 4 6 8 10 2 3 4 Position Zoom Orientation Zoom Figure 2.16: Window of events evaluation: Trihedron light zoomed position and orientation boxes and sequence’s RMSE box plots. 2.13.4 Accuracy evaluation: mean errors and computational cost The resulting statistics for the evaluated sequences considering all filter variants are presented in Table 2.7. For comparison purposes, the mean position and orientation errors have a scalarminimal representation. The mean position error ϵris expressed as the norm of the Root Mean Square Error (RMSE) for N measurements in a specific sequence given by: ϵr[m] = s1 NX i (ri−ˆ ri)2 ,(2.56) where rand ˆ rare the ground truth and estimated position respectively. The mean orientation error ϵRis computed using a bi-invariant metric on SO(3) ϕRthat defines the shortest geodesic distance between two SO(3) group members expressed in radians in the range [0,π] [91]. The
2.13 Experiments and results 61 orientation error and its metric are given by: ϕRi= Ri⊖ˆ Ri ≜ Log(ˆ R⊤ iRi) ∀R,ˆ R∈SO(3) (2.57) ϵR[rad] =1 NX i ϕRi,(2.58) where Rand ˆ Rare the ground truth and estimated orientation. The error orientation metric with classic EKF requires an equivalent for Eq. 2.57 based on quaternions [91], which is given by: ϕqi=acos(|qi⊤ˆ qi|),(2.59) where each quaternion is handled as an R4vector. The mean orientation error is computed with Eq. 2.58 considering that ϕR= 2ϕq. The overall results show that the CV model exhibits the most accurate performance. It is worth noticing that CP has a non-robust behavior - especially during aggressive movements - despite its low errors in some sequences. Event-per-event representation is also sensitive to abrupt event production and sudden motion changes. In such conditions, the tracker fails when evaluated in challenging sequences, and no data can be retrieved. The failed sequences are blank spaces in Table 2.7. A small but noticeable improvement in accuracy occurs when the tracker Table 2.7: Mean position and orientation errors. The lower errors for each sequence are in bold for both representations, event-per-event and window of events. Data set Window of events Event per event Lie EKF Classic EKF Lie EKF Classic EKF CP CV CA CP CV CA CP CV CA CP CV CA Cube regular Pos [cm] 1.12 1.33 2.32 1.14 1.13 1.51 1.43 0.96 1.10 1.12 0.98 0.009 Rot [rad] 0.028 0.029 0.040 0.043 0.044 0.048 0.044 0.027 0.029 0.034 0.031 0.030 Cube fast Pos [cm] 1.12 0.88 0.83 1.15 1.12 1.14 1.22 0.95 0.99 1.24 0.96 0.009 Rot [rad] 0.037 0.027 0.025 0.042 0.036 0.038 0.047 0.030 0.035 0.047 0.031 0.035 Plane regular Pos [cm] 1.85 1.81 2.54 2.51 2.77 2.62 2.32 2.40 2.44 2.11 2.23 2.25 Rot [rad] 0.111 0.105 0.122 0.110 0.115 0.113 0.118 0.119 0.120 0.117 0.118 0.118 Plane fast Pos [cm] 3.12 2.83 2.95 3.11 2.73 3.10 −2.99 − − 3.44 − Rot [rad] 0.188 0.192 0.193 0.189 0.186 0.188 −0.194 − − 0.195 − Plane 360 Pos [cm] 2.85 2.73 2.76 3.80 3.12 3.17 2.90 2.80 2.84 3.111 2.90 2.92 Rot [rad] 0.095 0.082 0.083 0.099 0.098 0.981 0.091 0.088 0.109 0.095 0.089 0.096 Trihedron regular Pos [cm] 3.85 3.81 4.13 3.95 3.91 4.02 3.24 3.21 3.25 3.84 3.77 3.80 Rot [rad] 0.052 0.051 0.054 0.057 0.056 0.058 0.042 0.040 0.042 0.052 0.053 0.054 Trihedron fast Pos [cm] 2.33 2.24 2.25 2.23 2.21 2.26 3.39 3.41 3.54 3.33 3.32 3.31 Rot [rad] 0.065 0.072 0.072 0.064 0.063 0.068 0.103 0.102 0.106 0.102 0.103 0.101 Trihedron light Pos [cm] 6.64 4.10 5.59 4.68 4.79 4.89 − − − − − − Rot [rad] 0.131 0.114 0.135 0.135 0.124 0.136 − − − − − − Triehdron 360 Pos [cm] 1.88 1.93 2.27 2.25 2.19 2.68 −2.77 2.90 −2.81 2.82 Rot [rad] 0.080 0.081 0.082 0.086 0.087 0.090 −0.107 0.109 −0.109 0.110
62 Event-based camera tracking is implemented with Lie groups. This improvement may be related to the efficient Jacobian computation, and Lie group computations carried out by the manif library. The first order approximations in quaternion’s Jacobian may also contribute to this error difference. It was noticed that handling events in event windows produce a more accurate and robust performance. The fast sequences in event-per-event usually have larger errors than event windows. The time required to perform state predictions and corrections at an event rate may be one of the failure reasons, despite skipping some of them to maintain real-time. Another failure motive could be the impact of outliers in event-per-event estimations. This effect was evidenced in the most demanding sequences like Trihedron fast. This sequence is populated with a considerable number of lines, which benefits the production of events as well as noise during fast movements. The event-per-event accuracy in Trihedron fast is about 30% worst than in window of events representation. The event-per-event representation presented an accurate performance in slower sequences with a moderate event rate production. In this scenario, the number of noisy events is less significant, and the camera pose is updated with the scarce event data and the slightest movements. The tracking system gets lost if the camera stops completely. In windows of events, the reduced data leads to unreliable pose predictions and hence, wrong data associations. Lower event rates are rare situations usually found at the beginning of an experiment when the camera is coming out from rest. Event cameras are not aimed for slow motions as no events are produced, and the data is pruned with noise from the microelectronic components. To assess computational performance, a dimensionless Real-Time Factor (RTF) is defined in this thesis. This factor is computed as the sampling time of an event stream for the DAVIS camera (33ms) divided by the time required to process this stream. It is worth noting that in an event stream, with an event window size of 300µs, the tracker produces about 100 pose estimations in the sampling lapse of 33ms. This number belongs to a throughput rate of 3.3 kHz. Each window should be processed in less than 300µs to maintain real-time performance. On the other hand, the throughput rate with event-per-event is asynchronous, and thousands of pose estimations per event stream could exist. Table 2.8 shows the RTF and the rate of matched events that each tracking variant handles in real-time. An RTF greater than 1 indicates that the event stream was processed in less than 33ms. This factor is greater than 2 for regular motion sequences, meaning that all incoming events were processed in less than 15ms. The most challenging sequences could not be processed in real time for the event-per-event variants resulting in an RTF lower than 1, which is often a cause of tracking failure. Overall, the use of classic EKF is less computationally expensive than Lie groups due to the approximations performed. This added computational expense is the price-to-pay for improved
2.13 Experiments and results 63 Table 2.8: Real time factor and matched events rate. The best real-time performance are in bold for event-per-event and window of events. Higher values implies lower computational cost. Data set Window of events Event per event Lie EKF Classic EKF Lie EKF Classic EKF CP CV CA CP CV CA CP CV CA CP CV CA Cube regular RTF [-] 3.456 3.525 3.244 3.911 3.897 3.538 1.888 2.022 2.012 2.127 2.012 2.247 Rate [Mev/s] 0.177 0.196 0.180 0.184 Cube fast RTF [-] 3.775 3.404 2.710 3.411 3.304 2.655 1.379 1.022 1.416 1.527 1.417 1.247 Rate [Mev/s] 0.273 0.278 0.199 0.200 Plane regular RTF [-] 1.639 1.824 1.760 1.870 1.823 1.646 1.380 1.498 1.104 1.416 1.203 1.058 Rate [Mev/s] 0.628 0.643 0.522 0.470 Plane fast RTF [-] 1.630 1.643 1.618 1.564 1.460 1.583 1.093 0.812 0.786 1.103 1.011 0.876 Rate [Mev/s] 0.907 0.898 0.650 0.651 Plane 360 RTF [-] 2.345 2.332 2.329 2.412 2.405 2.435 1.479 1.446 1.212 1.568 1.417 1.387 Rate [Mev/s] 0.758 0.837 0.707 0.708 Trihedron regular RTF [-] 1.870 1.843 1.918 1.964 1.860 1.783 1.173 1.011 0.935 1.220 1.133 1.039 Rate [Mev/s] 0.828 0.991 0.607 0.607 Trihedron fast RTF [-] 1.535 1.460 1.484 1.620 1.595 1.196 0.794 0.923 0.669 0.994 0.703 0.568 Rate [Mev/s] 1.108 1.146 0.715 0.862 Trihedron light RTF [-] 1.391 1.341 1.065 1.126 1.021 0.981 0.637 0.525 0.429 0.638 0.506 0.468 Rate [Mev/s] 0.995 0.922 0.551 0.574 Triehdron 360 RTF [-] 1.835 1.964 1.864 2.062 2.095 2.016 0.937 0.823 0.961 1.039 1.071 1.057 Rate [Mev/s] 1.108 1.162 0.625 0.662 Event Window Event per Event Real time factor Real time factor 1 2 3 4 5 0 1 2 3 4 5 Lie Classic Lie Classic Figure 2.17: Mean real time factor from the evaluated sequences. The gray area marks real time factors lower than one. accuracy. Despite the reduced size of the CP state, its RTF seems to be comparable to the CV model. The efficient way of handling trivial operations during covariance computations might be the reason for this effect. A summary of mean RTF and event rate values for all experiments is presented in Fig. 2.17. It clearly shows the computational cost advantages of using event windows. RMSE evaluation The RMSE evaluation procedure follows [42,92], and it is intended to evaluate the consistency of each ES-EKF variant in a more general perspective not bound to the sequence used to compute
70 Event-based camera tracking the marker. Nonetheless, the estimation in the Y direction is accurate with only small offsets due to the synchronization of simulation with real data. The X-axis shows noisy estimations, possibly due to the small amount of motion in such axis direction; however, its amplitude is not considerable, yielding errors in the same order as other axes. In the final velocity step, the maximum target speed is 2.38 m/s. In this step, the Z- axis offset is considerable, which leads to a tracking failure. Linear target accelerations reach over 253.23 m/s2or 25.81 g, which are well above the expected range of most demanding robotics applications and above the maximum range of 16 g of the user-programmable IMU chip incorporated in the DAVIS camera. 2.14 Conclusions The main objective of this chapter was to implement and evaluate a camera pose estimation solution using only event data to take advantage of the event camera capabilities without introducing bottlenecks. In this regard, the presented system accurately estimates the 6 DoF of the camera pose using a fast event-to-line data association mechanism and an error-state Kalman Filter with known 3D line features. Based on experimental results from several filer variants, it can be stated that processing events in small temporal windows improves accuracy by about 5% and reduces the computational burden by a factor from 1.5-2 depending on the scene texture level. These metrics are suitable for comparison in regular motion. In fast motion conditions, the performance of event-per-event models is sensitive to noise and the abrupt event rate increasing that usually results in tracking loss. The fast motion sequences that could be evaluated with both event representations (in fast motion) show comparable errors, but the best results for event windows achieve improvements by about 5-15%. Significant event rates hinder the event-per-event processing in real-time. In challenging sequences, event-per-event models could operate during short periods, and they usually lose track when the event rate surpasses the 2 million events/s. The estimation with event window representation successfully operated in the most challenging sequences with rates over 4 million events per second. The experiments showed how the number of events increases proportionally to the speed around all lines, especially in consecutive ones. Therefore it might increase the probability of using outliers to update the camera pose. In such conditions, the performance of eventper-event representations degrades as the speed grows. Single events do not provide enough spatial information - especially if only the perpendicular component to the line contributes to the state updatewhereas a group of events provides more information about outliers and position changes.
2.14 Conclusions 71 The event windows’ size allows a balance between the number of pose estimates, real-time performance and accuracy. The tracking system’s throughput is in the order of kHz (precisely 3.3kHz with a 300µs window), which is faster than the camera’s integrated IMU rate. A high throughput rate allows accurate estimations of high dynamic motions, which are sub-sampled if the operation is limited to the frame rate (∼30-100Hz). Event cameras are not aimed for low motions due to the lack of event production. In such conditions, the presence of empty event windows was noticed, introducing estimations errors; however, event-per-event processing offered an accurate performance since the state is updated with scarce event production. CV provides an accurate and consistent performance with a reduced state size. Its accuracy is compromised in extremely aggressive dynamic motion but operates with an acceptable error and computational burden in real-time. Compared to CV and CA, it achieves an accuracy improvement by about 5-10%, which is more noticeable in fast motion sequences reaching improvements up to 20%. The CV implementation is capable of processing the event stream faster than CA by an outstanding percentage from 30-50%. CA and CV models often have similar results, but the CA’s over-parameterization makes it sensitive to outliers, especially during large event rates. These experiments showed a small improvement when using a Kalman filter parameterized entirely with Lie groups, less than 5%. The Lie group parameterization allowed handling the three-dimensional rotations in an elegant form, with more accurately computed Jacobians. The minimal differences between Lie and classic EKF could be attributed to the small time steps considered, which are in the range of units of microseconds in event-per-event representation and about hundreds of microseconds in event windows. At this scale, the classic EKF approximations are very close to the Lie manifold estimations besides being of first order degree. Higher order approximations might result in a minimal accuracy impact due to the negligible size of Jacobian approximations’ superior order power series. The Lie group library manif [90] efficiently processes rotation operations and Jacobian computations, reducing approximation errors during this system’s implementation. In a most demanding experiment with a mechanic device, it was observed that the camera pose could be estimated at ultra-high dynamics with speeds over 2.4 m/s (15 Hz) and the presence of strong accelerations that exceed 25g. As a reference, it is possible to achieve speeds up to 1m/s with an aggressive hand shaking of 6Hz, and the integrated IMU measures accelerations up to 16g. The CV model showed an estimation degrading at higher speeds, but it exhibited the best performance and robustness in this experiment compared to CP and CA models, which failed at 1.74 m/s (11Hz) and 1.91 (12 Hz), respectively. The proposed tracking system does not learn new line features as the camera moves. Therefore, these landmarks are not part of the system’s state. Chapter 4will address the line detection
72 Event-based camera tracking and extraction to develop a full SLAM system.
3 Events-IMU fusion 3.1 Introduction Nowadays, the most robust visual SLAM systems e.g. ORBSLAM3 [6], SVO [7], are capable of determining robust feature correspondences in texture-rich environments and good light conditions; but, in more complex situations, the lack of textures or poor illumination hinders their estimation. The technological evolution of digital cameras has provided the tools to expand the research on fussing events and IMU. Using Inertial Measurements Units (IMU) is a cheap solution -compared to LIDAR, and RGB-D cameras, among other sensors- to improve the accuracy of Visual Odometry systems [93]. Their cost and portability make them suitable tools for mounting in constrained robotic platforms. Cameras are exteroceptive sensors that measure the 3D geometry of a scene up to scale. On the other hand, an IMU is a proprioceptive sensor that provides a metric for scale and gravity for inter-frame motion estimation [94]. Both sensors operate at significantly different rates, -30-100 Hz for cameras vs >1kHz for IMU. This rate difference introduces the need for measurement integration to fuse IMU and visual information. The ego-motion estimation from a combination of visual information and inertial measurements is called Visual-Inertial Odometry (VIO) and has been an interest of research during the past decades. State-of-the-art VIO frameworks introduced applications like augmented virtual reality (AR/VR) and large inertial-aided navigation systems, among others [95]. Conventional VIO state-of-the-art approaches use IMU integration for ego-motion estimation, state correction using visual measurements, and keyframe-based optimization to minimize estimation errors. That framework’s major drawback is the drift -present over timedue to error integration, highfrequency noise and bias uncertainty [93]. VIO approaches like Foster et al. [94] efficiently handle the IMU integration process with low drift errors in considerably large-scale sequences (>100 m). Other works like WOLF [96]
74 Events-IMU fusion allow for efficient modular coupling between cameras and IMU achieving drift-free estimations in highly noisy robotic platforms. To this day, despite the growing number of VIO approaches, VIO’s breakpoints are the challenging conditions in fast-motion and poor illumination scenarios. The use of event cameras can potentially improve sensor fusion processing in such challenging scenarios to yield a more accurate and robust ego-motion estimation. This chapter aims to present an event-based visual-inertial sensorial fusion that exploits the capabilities of event cameras. It is worth mentioning that the DAVIS camera used in this thesis incorporates an IMU with a 1 kHz frequency - similar to most commercial models (see Table 1.1). Few camera designs -like the CeleX-V- do not incorporate an IMU and, therefore, will require an external inertial sensor for event-IMU sensorial fusion analysis. The proposed sensorial fusion follows the EKF formulation in Chapter 2and incorporates inertial measurements to improve its estimation accuracy. This fusion strategy aims to exploit the event camera’s fast response capabilities without introducing bottlenecks and to achieve real-time performance. This previously proposed tracking system provides a throughput higher than the DAVIS IMU (>3.3kHz with events vs 1kHz for the IMU). In this sense, the paradigm of prediction and correction using visual information and inertial measurements was reevaluated, resulting in three sensor fusion methods from which the best strategy will be established. The first is based on the constant acceleration model to predict the state, and the correction is performed with events and a measurement model of instantaneous inertial values denoted (CA+IA). The acronyms are stated to indicate prediction + correction methodology. Following the same philosophy, the second uses a constant velocity model in the prediction and events combined with a measurement model of mean inertial values in the correction stage (CV+MA). These strategies aim to combine events and IMU, two sensors that operate at different rates, with the objective of preserving the fast response of the event camera. To the best of the author’s knowledge, this thesis is the first to propose this fast-response sensor fusion strategy for event data. The third method is a classical visual-inertial approach which predicts the state with IMU data and corrects it with visual information, which is events, in this case, denoted as (IMU+E). Feature detection and extraction will not be addressed in this chapter, and, like in Chapter 2, the estimations will be performed in a known world to evaluate each method’s behavior. This chapter is organized as follows. Closely related works are given in the next section. Afterwards is presented in Sec. 3.3 an overview of the approaches to be evaluated which are: CA+IA, CV+MA and event-based visual-inertial odometry IMU+E. Specific details for each approach are given in Sec. 3.4, Sec. 3.5 and Sec. 3.6. Experimental results and error analysis with real data are given in Sec. 3.8 and Sec. 3.9. Finally, Sec. 3.10 presents the chapter conclusions and a summary of main contributions.
3.2 Related works 75 3.2 Related works Sensorial fusion between event cameras and other sensors has been addressed since their development in 2008. The seminal event camera models only provided event data with low resolution. In this regard, Censi et al. [53] proposed to fuse events with image frames from an external source to estimate the camera’s rotational motion. The synchronization process between events and frames was a complex but fruitful process based on the event-generation model. Structured light sensors is another external source that has been paired with event cameras. Approaches in this subject focus on dense or semi-dense 3D reconstructions. Event cameras are used to capture the high-frequency light rays and recover the scene depth and object’s shape via non-linear optimization [97,98]. Most current event-camera models incorporate image frames and IMU in perfect synchronization with events. State-of-the-art approaches use this sensor combination to improve their ego-motion accuracy. In this sense, Mueggler’s et al. [99] was one of the first approaches to fuse IMU and event data for the DAVIS240. That work is an extension of [18] for an optimized continuous-time trajectory estimation using sets of 0.1s events and inertial measurements. Results showed a significant accuracy improvement from its predecessor at an expensive computational cost that compromises real-time performance. Similar to the approach in this chapter, that model works in a known world made of lines -experiments with point-based known worlds were also reported. Zhu et al. [72] presented an EVIO model, i.e. event-based visual-inertial odometry system. That work tracks features using an iterative expectation-maximization scheme that estimates optical flow. Given the feature tracks, the camera pose is estimated using an event window of size equal to the features lifespan and a multi-state constrain Kalman filter [100]. It has a fastasynchronous throughput (faster than the IMU) for which the event camera and IMU conform two separated state blocks updated at different rates: one is the pose predicted with IMU data, and the other is a set of keyframe poses. The major drawback in [72] is the computational cost limiting its operation to low motion speeds and reduced number of features as to maintain real-time performance. Their solution to deal with both sensors operating at different rates was an inspiration for the method presented in this chapter. In a more recent approach, Rebeq et al. [71] proposed a visual-inertial system based on a graph optimization that is at least two times faster and more efficient than [72]. That methodology pre-integrates inertial measurements to create visual keyframes from motioncompensated event images and minimizes the reprojection error via non-linear optimization to retrieve the camera pose. That system uses FAST [47] corner detected and tracker across keyframes. The key for this action is the use of uniform and blur-free event images compensated
76 Events-IMU fusion with inertial measurements. The authors stated that non-compensated images created by simply summing the number of events at a pixel position result in highly sparse images not suitable for feature detection. The Ultimate SLAM approach [101], extends the work mentioned above to include feature trackings from the gray-scale frames with only a small accuracy improvement. More related to the line-features approach used in this thesis, IDOL [60] -a visual-inertial systemtracks event clusters associated with line segments. The basis of that approach is the event-per-event tracking fashion and continuous-time representation of the inertial data. It works in human-made scenarios with a reasonable number of lines. However, the computational burden is an issue for reaching real-time performance in densely populated line environments or with high event rates. This chapter’s goal is not to present a visual-inertial system that follows an inertial preintegration methodology as [71] since the proposed approach does not address feature extraction and assumes a known line-based world. The aim is to maximize the throughput rate without compromising real-time performance. To this end, the estimation process takes into account the rate differences between the given sensors as in [72] and proper measurement models. 3.3 Sensor fusion details The tracking system proposed in Chapter 2is capable of estimating the 6DoF of the camera pose with a high throughput rate that exceeds that of the DAVIS’ IMU. It operates either in an eventper-event or windows of events fashion using an ES-EKF as the estimation core. This tracking implementation is a fast and efficient solution that works in line-based known worlds. It operates on an event window to associate events and projected lines. This event representation was the best achieving approach in terms of accuracy and computational cost based on the experimental evaluation of Chapter 2. Considering such precedent, this chapter proposes a sensor fusion mechanism that exploits the event camera capabilities following the Lie EKF structure. This sensorial fusion aims to keep the event camera as a lead sensor that determines the estimation rate, introducing additional correction terms at a lower rate from IMU readings. Note that the DAVIS model used in this thesis incorporates an IMU chip MPU−6500 1composed by a 3-axis accelerometer and 3-axis gyroscope with a sample rate of 1 kHz. As such, three sensor fusion strategies are proposed in this chapter. The first approach is based on the constant acceleration model to predict the state. The correction is performed with events and a measurement model that uses linear acceleration and angular velocity. This model considers these elements as instantaneous values. This method is denoted CA+IA, where the acronyms stand for prediction and correction typologies. IA stands 1http://invensense.tdk.com/wp-content/uploads/2020/06/PS-MPU-6500A-01-v1.3.pdf
3.4 Instantaneous IMU measurements variant (CA+IA) 77 Table 3.1: ES-EKF variants for sensorial fusion analysis. Variant Prediction Correction Comments CA+IA CA IMU + Events IMU readings as instantaneous values CV+MA CV IMU + Events IMU readings as mean values IMU+E IMU Events Classic visual-inertial formulation with event-data for instantaneous acceleration values. The second follows the constant velocity model in the prediction stage with a correction performed by a combination of events and a measurement model that relates linear velocity and angular velocity to estimate the mean linear acceleration and mean angular velocity over a period ∆Tequal to the IMU rate. This approach is denoted as CV+MA, where MA stands for mean acceleration values. These two methods predict the state at central window time and perform partial event corrections from events and their associated lines. Additionally, both operate on small event windows, yielding a throughput at least three times faster than the IMU. The IMU correction is applied as soon as an IMU measurement is available. This correction takes place at central window time for convenience, while partial event corrections are spread along the entire window. The IMU innovation z=y−h(x), makes use of the sensor readings yconcerning linear acceleration and angular velocity, and the respective measurement model h(x), computed with state variables. The third approach differs from the previous ones in using IMU readings to predict the state, but the correction stage follows the same procedure of partial event updates. No event preintegration is required since the predicted state is immediately corrected by an event window with a size matching the IMU rate. This method is denoted IMU+E and follows the classic visual-inertial formulation. E denotes events in the acronym. The Lie EKF variants tested in this chapter are listed in Table 3.1. 3.4 Instantaneous IMU measurements variant (CA+IA) The CA+IA variant is an extension of the constant acceleration (CA) model presented in Sec. 2.8. The IMU measurements are included in the correction stage. They are considered as instantaneous measurements of acceleration and angular velocity at the arrival time. This estimation scheme is capable of predicting and correcting the state with events only. As an IMU reading arrives, the correction process is modified to include the IMU measurements. Details about state and the measurement model are given in the following sections.
78 Events-IMU fusion c p w B w Camera IMU World T = ( R | r ) BB B ww w T = ( R | r ) C C C ww w T = ( R | r ) C C C BB B Figure 3.1: Frame transformations for Camera, IMU and World references. 3.4.1 State Jacobian and perturbation matrices Let W,B,Cdenote the world, body (IMU) and camera frame, respectively. The relative transformation from camera to body frame noted as BTCis a static rigid relation which can be estimated in a calibration process. The relations between each reference frame are shown in Fig. 3.1. The system state xkis defined, in this chapter, in the Bframe. This choice was made because IMU measurements are expressed in the Bframe, which avoids unnecessary Jacobian computations belonging to frame transformations when computing the concerning innovations. The state transition to time k+ 1 is given by: xk+1 = rk+1 =rk+vk∆t+1 2ak∆t2∈R3 vk+1 =vk+ak∆t∈R3 ak+1 =ak+an∈R3 Rk+1 =R⊕{ω∆t} ∈ SO(3) ωk+1 =ωk+ωn∈R3 bak+1 =bak+ban∈R3 bωk+1 =bωk+bωn∈R3 ,(3.1) where R∈SO(3) denotes the orientation from body to world. The remaining elements are vectors denoting position r, linear velocity vangular velocity ωand linear acceleration afor the IMU in world coordinates. ba and bωare the acceleration and angular velocity bias. The state noises are modeled as Gaussian distributions an∼ N(0,Ai),an∼ N(0,Ai),ωn∼ N(0,Ωi), ban∼ N(0,Bai), and bωn∼ N(0,Bωi).
3.4 Instantaneous IMU measurements variant (CA+IA) 79 The error state δxk=hδrkδvkδakδθkδωkδbakδbωkiis a Gaussian distribution δx∼ N(¯ δx,P). The covariance propagation error is Pk+1 =FxPkFx⊤+Q∈R21×21 (3.2) with a state Jacobians and noise covariance given by: Fx= I I∆tI∆t20 0 0 0 0I I∆t0 0 0 0 0 0 I0 0 0 0 0 0 0 JR RJR ω0 0 0 0 0 0 I0 0 0 0 0 0 0 I0 0 0 0 0 0 0 I Q= 0··· 0 0 Ai . . .0 Ωi Bai 0··· Bωi .(3.3) The non-trivial Jacobian blocks in Fxare computed following Lie groups properties as in Eq. 2.21. The noise covariances are random impulses integrated over ∆tyielding: Ai=σ2 an∆tI[m2/s4] Ωi=σ2 ωn∆tI[rad2/s2] Bai=σ2 ban∆tI[m2/s4] Bωi=σ2 bwn∆tI[rad2/s2], (3.4) where σan and σωnwere defined in Eq. 2.15 and 2.14.σban [m/s2√s],σbwn[rad/s√s]are related to the IMU acceleration and angular velocity bias ,and determined in the IMU datasheet. 3.4.2 Measurement model The system state is corrected, in this case, from two sources: events and IMU measurements. Both sensors operate at significantly different rates. Therefore, special considerations were taken to fuse the measurements. Inertial measurements IMU readings are considered instantaneous values of linear acceleration and angular velocity in the body frame. Such measurements are modelled as noisy sensor readings with the state
86 Events-IMU fusion This factor means that on average IMU corrections are incorporated every three event windows. 3.6 Event-based VIO model (IMU+E) The IMU+E variant follows the classic process of visual-inertial odometry systems. This approach differs from the ones in Sec. 3.4 and Sec. 3.5 in how the inertial measurements are used. Here, the state is predicted at the IMU rate incorporating such inertial measurements, and the correction is based on event data association for an event window of 1ms centered at the IMU timestamp. This event window size was selected to match events and IMU rate, which is of 1kHz for the DAVIS IMU sensor. 3.6.1 State Jacobian and perturbation matrices The state transition at time k+ 1 is given by, xk+1 = rk+1 =rk+v∆T∈R3 vk+1 =vk+ (R(am−ba) + g+σa)∆T∈R3 Rk+1 =R⊕{(ωm−bω+σω)∆T} ∈ SO(3) bak+1 =ba +ban∈R3 bωk+1 =bω+bωn∈R3, (3.37) Note that the state is computed in the body frame; additionally, σa, and σωare sensor noise used also in the measurement models in Sec. 3.4.2 and Sec. 3.5.2 expressed as mean values. The prediction time step is ∆Tand depends on the IMU, therefore resulting in values of about 1ms. The error state becomes δxk=hδrkδvkδθkδbakδbωki, with a covariance P∈R15×15. For the covariance propagation, the state and noise Jacobians are given by, Fx= I I∆T0 0 0 0I Jv RJv ba 0 0 0 JR R0JR bω 0 0 0 I0 0 0 0 0 I Q= 0··· 0 Ai Wi . . .Bai 0Bωi ,(3.38) with noise covariances denoted with a different font as Ai=σ2 a∆T2Iand Wi=σ2 ω∆T2I. The Jacobian blocks are computed by, Jv R=−R[am−ba]×(3.39)
3.7 Tracking system overview 87 Jv ba =−R∆T(3.40) JR R=R{(ωm−bω)∆T}⊤(3.41) JR bω=−Jr(ωm−bω)∆T(3.42) The state correction procedure is the same as in Sec. 2.9. The data association for the events in the 1ms event window leads to scalar innovation terms. Recall that the line projections are made as in Sec. 3.4.3 since the state is in the body frame. 3.7 Tracking system overview The block diagram in Fig. 3.2 shows the information flow and processes that take place for CA+IA and CV+MA approaches. It is worth noting that the tracking system operates as constant tk Event Window Data association Visible lines reallocation Tessellation grid Projection Matched: lines & events Projected 3D lines Event correction Event correction Event correction Pose tk+N Prediction Δt = t - t cc-1 Yes For all matched events: No tk+1 tk+N . . . Event correction IMUcorrection Event correction For all matched events: . . . Prediction: Motion model Correction: Events + IMU Exist IMU tk tk central tk+N Instantaneous model Mean model [t ... t ] k k+N Central event window time : tc or Time Events Windows IMU Pose 1 us 300 us 300 us 1 ms tc tc-1 tc+1 Δt TiTi+1 Ti+2 ΔT At IMU time : Ti Figure 3.2: Block diagram for CA+IA and CV+MA variants.
88 Events-IMU fusion velocity or constant acceleration models in the absence of an IMU reading, following the same structure as presented in Fig. 2.5b. When an IMU reading arrives, its contribution to the state correction is added at the central window time, followed by the partial event corrections. Its implementation works with an observation model of either instantaneous or mean values, and the model is selected before launching the system. Note that events and IMU must be synchronized before computing any estimation. The current DAVIS ROS Driver implementation [3,18,28] publishes messages for events stream, grayscale image, camera info and individual IMU readings. This implementation choice introduces delays between the events and the IMU, forcing the system to hold or queue event data until the arrival of IMU readings belonging to the same sampling period. In addition, the different publishing frequencies force to create an independent parallel process to attend to the callbacks from both sensors. The unnecessary delays produced by the message publishing were addressed by performing tk Event Window Data association Visible lines reallocation Tessellation grid Projection Matched: lines & events Projected 3D lines Event correction Event correction Event correction Pose tk+N Prediction tk+1 tk+N . . . Prediction: IMU Correction: Events [t ... t ] k k+N IMU reading Time Events Windows IMU Pose Ti-1 TiTi+1 ΔT 1 us 1 ms 1 ms 1 ms IMU time : Ti ΔT = Ti - Ti-1 Events time Figure 3.3: Block diagram for IMU+E variant.
3.7 Tracking system overview 89 LibCAER DAVIS ROS Driver Publisher Sampling clock: 10ms Bias thresholds Camera ID DATA USB 3.0 Data packets Is available? Is available? Is available? Image Events IMU Bias configuration Packet integration Msg: Event packet IMU packet Msg: Image raw Msg: Camera info ModificationOriginal Figure 3.4: Modification to the DAVIS ROS driver. The new implementation provides a synchronized packet of Events and IMU. slight modifications to the DAVIS ROS driver. The current driver uses a LIBcaer library to manage the camera’s USB communication and the data packets transmitted by the camera. These packets arrive at a constant rate of 10ms (firmware default value) and contain three channels: image, events, and IMU - which are not always available. The driver was modified from this point forward, as can be observed in Fig. 3.4. This modification handles the message publishing, maintaining the data reading structure from the original driver. Events and IMU packets received belong to the 10ms sampling period. Instead of publishing individual IMU readings, these measurements are comprised and transmitted as a single message along with the event data. The stream size is customizable and can be published in 10ms steps. By default, the stream size is set to 30ms to match the image rate. Old datasets can also be used with this modification since ROS allows to create rules to update rosbags from an old event message form to a new modified one. As the IMU readings now arrive in packets, their assignment to an event window does not introduce delays. This process is carried out by comparing the IMU reading timestamp against the window time limits. The implementation details for the IMU+E approach, displayed in Fig. 3.3, show its differences from CA+IA and CV+MA approaches. In this approach, the IMU is fed to the prediction block and the state is updated with partial event corrections. The event window is centered to the IMU timestamp and integrates 1ms of events. A few events may be discarded in order to have uniformly distributed event windows. The system’s throughput is at least three times slower than CA+IA or CV+MA, but it is expected to be less computationally expensive because of its reduced state size and number of predictions made.
90 Events-IMU fusion 3.8 Experiments and results The performance of the sensor fusion models implemented is assessed similarly to Sec. 2.13. The sequences created for this section’s evaluation were recorded with the modified version of the DAVIS ROS driver in which IMU readings are published along with event data avoiding unnecessary delays. The experiments contain ground truth trajectories from an Optitrack and were recorded in landmark scenarios with artificial markers as displayed in Fig. 2.7. These experiments are divided into two parts. The first part is a performance evaluation of random hand-motions with regular (<0.5m/s) and fast speeds (0.5-1 m/s). Some sequences also contain strong illumination changes -from turning on and off the lights- or 360 camera rotations. The experimental sequences were named according to the experiment, marker type and special conditions, as: Plane_regular_IMU, Plane_fast_IMU, Plane_360_IMU, Trihedron_regular_IMU, Trihedron_fast_IMU, Trihedron_360_IMU, and Cube_fast_IMU. The sequences used in the previous chapter could not be evaluated in this section due to their lack of IMU recordings. The second part is a stress experiment to evaluate the tracking limits in high dynamics (> 1m/s). The event camera was subject to aggressive movements induced by a motor-powered mechanism as in the stress experiments in Sec. 2.13.5, but in this case, the camera is mounted on the mechanism. The camera’s velocity was gradually increased until the pose estimation failed. Special care was needed to avoid damages to the camera. The Kalman filter estimations were performed using event windows and the integrated IMU readings. The variants evaluated are Lie EKF with instantaneous IMU values (CA+IA), Lie EKF with mean IMU values (CV+MA), and event-based visual-inertial odometry (IMU+E). For comparison purposes, their event-only counterpart models - constant velocity (CV) and constant acceleration (CA)- were also evaluated for this section’s sequences to analyze the impact of sensorial fusion. 3.8.1 Parameter tuning The Kalman filter perturbations and IMU noise were tuned following the same procedure as in Sec. 2.13.1. The filter variants were evaluated in a fast-motion sequence with ground truth and using a discrete set of parameter values. This process aims to find the best possible parameter ranges that provide a low-error camera pose estimation. In this section, the parameters tuned were those associated with IMU variables and biases. The parameters analyzed were the linear acceleration bias σban, angular velocity bias σbωn, linear acceleration noise σa, and angular velocity noise σω. These parameters are common to all variants. They were initially selected
3.8 Experiments and results 91 Pos. Error [m] Rot. Error [rad] CA + IA sigma range CV + MA sigma range IMU + E sigma range Rot. Error [rad] Rot. Error [rad] Pos. Error [m]Pos. Error [m] CA + IA CV + MA IMU + E Mean pos. error Pos 2σ bound Mean rot. error Rot 2σ bound Pos error evolution Rot error evolution (a) (b) Samples Samples 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 0.6 0.5 0.4 0.3 0.6 0.5 0.4 0.3 0.2 0.6 0.5 0.4 0.3 0.2 0.25 0.35 0.15 0.05 0.25 0.35 0.15 0.05 0.2 0.3 0.1 0.0 20 30 10 0 20 30 10 0 40 60 20 0 σban σbωnx10 σaσωx10 σban σbωnx10 σaσωx10 σban σbωnx10 σaσωx10 Figure 3.5: EKF-IMU tunning evaluation in discrete steps for a fast-motion sequence (a)Position and orientation errors with the estimated 2-sigma bound, (b) Evolution of the parameters value for each discrete step Model Parameters Steps 1 2 3 4 5 6 7 8 CA + IA σban [m/s2√s]0.93 9.307 0.93 9.307 0.93 9.307 0.93 9.307 σbωn[rad/s√s]0.055 0.55 0.0055 0.55 0.055 0.55 0.055 0.55 σa[m/s2]0.053 0.053 0.53 0.53 5.33 5.33 53.33 53.33 σω[rad/s]0.00317 0.00317 0.0317 0.0317 0.317 0.317 3.17 3.17 CV + MA σban [m/s2√s]0.93 9.307 0.93 9.37 0.93 9.37 0.93 9.37 σbωn[rad/s√s]0.055 0.55 0.055 0.55 0.055 0.55 0.055 0.55 σa[m/s2]0.029 0.055 0.2943 0.2943 2.943 2.943 29.43 29.43 σω[rad/s]0.00174 0.00174 0.0174 0.0174 0.174 0.174 1.74 1.74 IMU + E σban [m/s2√s]9.307 0.093 0.93 9.307 0.937 9.307 0.093 9.307 σbωn[rad/s√s]0.55 0.0055 0.055 0.55 0.055 0.55 0.055 0.55 σa[m/s2]0.2943 2.943 29.43 0.02943 2.943 2.943 29.43 29.43 σω[rad/s]0.0174 0.174 1.74 0.00174 0.174 0.174 1.74 1.74 Table 3.2: Discrete steps for IMU parameter tuning considering the information in the MPU-6500 2data sheet, which is the IMU chip integrated into the DAVIS346 model, and the throughput rate of the respective filter variant. The parameters 2https://invensense.tdk.com/download-pdf/mpu-6500-datasheet/
92 Events-IMU fusion Table 3.3: State perturbation and noise parameters for event-IMU variants. Parameter CA+IA CV+MA IMU+E Section State perturbation σ σan [m/s2√s] σωn [rad/s√s] σvn [m/s√s] σωn [rad/s√s]-3.4 3.5 350 14 3.5 7.5 Event window size W [µs] 300 1000 3.3 IMU bias noise σban [m/s2√s]5.37 2.94 2.943 3.4 3.5 3.6 σbωn [rad/s√s]0.317 0.174 0.17 IMU measurement noise σa [m/s2]0.93 3.4 3.5 3.6 σω [rad/s]0.055 0.055 0.0174 Event measurement noise σd [pixels] 4.5 2.9 Event-line-threshold α [pixels] 3.5 2.5.2 IMU-camera relative position rB C[0.000227, 0.004592, 0.048999]⊤3.4.3 of linear velocity and acceleration in MA and IA variants were assumed constant during this analysis for practicality reasons. In other experiments (depending on the used sequence) they usually require slightly larger values than those selected in Chapter 2. The results for each step are plotted in Fig.3.5a, where the mean position and orientation errors along their standard deviation and predicted 2-sigma bound are shown, which were computed with the values stated on Table 3.2. During the tunning process, the sensor noise and biases were increased or decreased by ten until the tracking system became unstable. Step increments smaller than ten showed minimal error variations. The parameter’s magnitude evolution is plotted in Fig.3.5b, where the range of values tested can be observed. On each step, the parameter values aimed for a stable tracking performance (qualitative speaking), but it can be noticed that the measured errors and covariances differ from each other. Small parameter values, as in the first steps in Table 3.2 are associated with small covariance predictions. This effect leads to motion-sensitive performances, as in Chapter 2. The best parameter configurations are highlighted in bold in Table 3.2 and provide a stable operation in regular and fast motion sequences. Table 3.3 shows a summary of parameters for all variants during the experiments. The IMU chip in the DAVIS camera model is the MPU-6500, it has a sensitivity of ±16gand ±2000◦/s. The theoretical noise density is 300µg/√Hz for linear acceleration and 0.01◦/s/√Hz for angular velocity. Considering an IMU sampling rate of 1kHz, the theoretical measurement noise is
3.8 Experiments and results 93 0.093m/s2and 0.0055rad/s, respectively. Higher values were selected for these experiments due to vibrations and strong accelerations, as shown in Table 3.3. During the stress experiment, the IMU measurement noise was multiplied by ten due to the high acceleration levels that saturate the IMU. The IMU-camera relative transform was obtained through a calibration process carried out with Kalibr3[103]. The calibration results show that the relative orientation is approximated as an identity matrix since the IMU frame is perpendicularly aligned to the camera by construction. This relative translation is reported in Table 3.3. In addition, Mueggler et al.. [140] reported a fixed temporal shift of about 2ms between the DAVIS camera and the IMU due to the built-in IMU low pass filter. This time delay was considered when matching event windows and IMU readings. 3.8.2 Accuracy evaluation The following results present the evaluation of the three proposed approaches fusing event and inertial measurements. To avoid redundant information, results comprise information on the challenging sequences named Plane_fast_IMU and Trihedron_360_IMU. Mean accuracy results for the remaining sequences are summarized on informative tables presented later in the text. The trajectory performance on the sequence Plane_fast_IMU for CA+IA, CV+MA and IMU+E is displayed in Fig. 3.6. This experiment belongs to an aggressive camera movement of translation and rotation while observing a planar marker. In this trajectory, the camera was subject to fast shaking at frequencies up to 6 Hz. Due to the trajectory shape, it is hard to distinguish the performance of the evaluated approaches, as seen in Fig. 3.6a. Nonetheless, there are visible differences between IMU+E -plotted in black- and CA+IA -plotted in cyanas CA+IA tends to produce noisy peaks exceeding the ground truth trajectory. The largest errors are produced during direction changes as the marker is not entirely visible in the image plane, as observed in Fig. 3.6c - frame 4. Without direction changes, all models handle fast motion within a certain degree of error, considering the increment in event rate exceeding 6 million events per second. Lights were turned off at the second 20, approximately, and its impact on the overall estimations is neglectable. Fig. 3.7a presents a zoomed box for a one-second slot during an aggressive motion. Results show similar behavior for CV+MA and CA+IA as their paths are almost superimposed. IMU+E presents a smooth estimation more fitting to the ground truth thanks to its reduced state and number of noisy state components. The peaks in CV+MA and CA+IA result from random walks from state components. During a parameter tuning process, it was observed that the 3https://github.com/ethz-asl/kalibr
94 Events-IMU fusion 0.1 Lights off Lights off Lights off Lights off X [m]Y [m]Z [m] Time [s] Time [s] (c) (a) 0.0 -0.1 -0.2 -0.3 0.0 0.2 0.4 0.0 -0.2 -0.3 -0.1 -0.4 Roll [rad]Pitch [rad]Yaw [rad] 1.00 0.00 0.50 -1.00 -0.50 1.00 0.00 0.50 -1.00 -0.50 1.00 0.00 0.50 -1.00 -0.50 105 15 20 25 105 15 20 25 1 2 3 4 5 On Off Projected lines (b) Time [s] 0 5 10 15 20 25 30 35 38 Event rate [ev/s] x106 0 2.0 4.0 8.0 6.0 Input Matched events Y1 Z1 X2 Y2 Z2 Lights off X1 Lights off Z1 CV+MA IMU+ECA+IA Ground truth Figure 3.6: Events-IMU fusion evaluation: Plane_fast_IMU sequence. (a)Position and Orientation plots, (b) Input and matched events rate, (c) Tracking sequence. CV+MA and CA+IA estimation become unstable with larger state-noise constant values, and they lose robustness with lower ones. The tuned parameters result from a compromise between robustness and smoothness, yielding the inevitable presence of peaks when sudden direction changes occur. The trajectories estimated with CV and CA were also included in these zoomed views for
3.8 Experiments and results 95 0.00 X [m]Y [m]Z [m] Time [s] Time [s] (a) (b) -0.20 -0.10 0.20 0.30 0.40 -0.05 -0.10 -0.15 Roll [rad]Pitch [rad]Yaw [rad] 0.20 0.60 -0.20 0.50 0.70 0.90 0.00 0.30 0.20 0.10 12.5 13.0 13.5 14.0 Error [m] 0 0.10 0.07 0.05 0.02 CV+MA CV CA+IA CA IMU+E 12.5 13.0 13.5 14.0 Error [rad] 0 0.50 0.40 0.30 0.20 0.10 CV+MA CV CA+IA CA IMU+E X1 Y1 Z1 X2 Y2 Z2 CV+MA IMU+ECA+IA Ground truthCV CA Figure 3.7: Events-IMU fusion evaluation:(a) Plane_fast_IMU sequence zoomed position and orientation (b) mean position and orientation error boxplots. comparison purposes. Note that CV+MA is the sensor fusion version of CV, the same as CA+IA for CA. Their mean position and orientation errors -compared to the ground truthare shown in Fig. 3.7b. This figure shows that sensor fusion impact has a visible accuracy improvement of about 10-15%, contrasting CV+MA with CV and CA+IA with CA. The best achieving model was IMU+E which has a smaller error than the second best achieving model, CV+MA. In order to compare these approaches, all pose estimations were transformed to camera frame. Therefore, offsets and errors observed in CV and CA in some axes are among other reasons due to their performance. The impact of the relative IMU-camera transform is minimal and affects only translation as both frames are aligned by construction. The linear acceleration and angular velocity bias estimations are displayed in Fig. 3.8. It shows the biases for CA+IA, CV+MA and IMU+E during this experiment. These biases were modeled as random walks, and their estimation seems different in all cases. IMU+E produces
102 Events-IMU fusion motor whose speed was gradually increased from 100 to 1000 rpm in steps of about 20 rpm, yielding motion frequencies from 2 to 16 Hz. The motor speed on each step is fairly constant thanks to a PI controller that has speed feedback from a tachometer attached to the motor’s shaft. Once the tracking system is launched, the marker lines are projected using the estimated camera pose. A tracking sequence during the last seconds previous to the failure is displayed in Fig. 3.14 frames b-f. Note that event production is increasing considerably during the aggressive camera motion reaching about 7 millions event/s during the fastest camera movement, as shown in Fig, 3.15. In such instants, the tracking starts to degrade. The last tracking snapshot Fig. 3.14 - frame f, shows that the event camera is about to enter a saturation state due to the distortion in the event plots compared to other tracking frames. The rate of events matched to a line (matched rate) does not increase proportionally to the input rate, as shown in Fig, 3.15. This implies that the noise production increases on every speed step. The combination of noisy events and camera saturation at the fastest motion causes tracking failure. The approaches considered in this experiment are CV+MA (plot in orange), CA+IA (plot in cyan), and IMU+E (plot in black) for the sensor fusion evaluation, and CV (plot in dark-blue) as Figure 3.14: Speed evaluation: (a) constrained mechanism modified for camera holding, (b-f) tracking sequences prior system failure.
3.9 Speed limits evaluation 103 Time [s] 0 10 20 30 40 50 60 70 80 90 100 Event rate [ev/s] x106 1 2 3 4 5 6 7 Input Matched events Figure 3.15: Speed evaluation: experiment event rate. Rate evolution for raw and lineassociated events. the best achieving event-only motion model. The position estimations over time are displayed in Fig. 3.16. These plots belong to the camera pose with respect to the world frame, whose origin is marked in Fig. 3.14a. The estimations for CV+MA, CA+IA and IMU+E were transformed from body frame to camera frame for comparison purposes with CV. At the top of Fig. 3.16 there is the motor speed evolution with relevant information for each speed step. Experiments are evaluated from 100 rpm to about 1000 rpm resulting in motion frequencies from 2.2 Hz to 16 Hz. The motion limits for the mechanism are plotted in red and were obtained with a kinematic simulation considering the device’s known dimensions, as performed in experiments in Sec. 2.13.5. Each speed step is marked with vertical lines aligned for the X, Y and Z axes. Similar to the stress evaluation in Sec. 2.13.5, the camera is placed about 25 cm away from the marker. The movement takes place mostly in the YZ plane with small amplitude motion along the X axis. As such, the motion limit for the X axis is a reference line. Each position plot is followed by the RMSE computed for the corresponding speed step. Due to the amount of data, it is not easy to distinguish and compare the performance of each evaluated approach. For visualization purposes, zoomed plots for six steps are shown in Fig. 3.17. The simulated ground truth shows that the position for Y and Z are phase-shifted sinusoidal signals. It is worth noticing that IMU+E is capable of estimating the trajectory path shape in a more accurate way than other approaches. IMU+E estimated trajectories are almost perfect sinusoidals, while CV+MA, CA+IA and CV have different discrepancies during direction changes. Additionally, IMU+E achieves the lowest estimation error in most speed steps. Regardless, IMU+E is the first approach to reach a failure point at step 28 with a 700rpm and 12 Hz motion. CV+MA and CA+IA are the next best achieving approaches and are capable of reaching 900 rpm and a 15 Hz motion at step 35. Both models present similar performance in every speed step and fail almost simultaneously. The CV approach produces less accurate estimations. However, this model’s most remarkable relevance is its capacity to stay engaged for five additional speed steps despite degrading quickly during the last moments. A possible explanation for this phenomenon is observed in Fig. 3.18,
104 Events-IMU fusion X [m] Motor speed [rpm]Y [m] 0 5 Z [m] 3 35 20 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2.2 2.9 3.7 4.4 5.1 5.9 6.6 7.3 8.1 8.8 9.9 10.6 11.3 12.1 12.9 13.6 14.3 15.1 15.8 16.5 100 300 500 700 900 Step: Frequency: 40 60Time [s] Time [s] Time [s] 80 100 20 40 60 80 100 20 40 60 80 100 Time [s]20 40 60 80 100 10 37 RMSE [m] 1.0 1.5 0.5 27 25 0 x10-2 x10-2 RMSE [m] 1.0 1.5 0.5 0 x10-2 RMSE [m] 4 5 6 -3 x10 -2 x10 -2 x10 CA+IA CV Ground truthIMU+ECV+MA Figure 3.16: Speed evaluation: Position estimation followed by error evolution per speed step. Each model’s error is represented with colored lines. The simulated motion limits are denoted with red lines. which presents plots for the inertial measurements along the estimations in body frame by CA+IA and CV+MA for the linear acceleration and angular velocity, respectively. From step 24 and beyond, the acceleration in the Y and Z axis exceeds 16gor 157 m/s2, causing the IMU to saturate. This saturation affects IMU+E most, as its state predictions depend exclusively on IMU measurements. IMU saturation hinders state prediction and has an immediate effect on the performance of IMU+E, resulting in failure at step 27 at about second 80. Note that the
3.9 Speed limits evaluation 105 X [m] STEP 10 Y [m]Z [m] 24 31 31.5 32 73.2 73.4 73.6 90.4 90.5 90.6 90.7 94 94.1 94.2 94.3 86 86.2 86.4 56 56.25 56.5 IMU+E CA+IA CV+MA CV 26 28 4.5 2.5 1.5 4.5 3.5 1.5 35 36 24 26 28 35 36 24 26 28 4.5 3.5 1.5 35 36 0 0 10 20 0 10 20 5 10 x10-2 x10-3 X [m] STEP 19 Y [m]Z [m] 0 0 20 10 30 0 10 20 5 10 x10-2 x10-3 X [m] STEP 23 Y [m]Z [m] 0 10 0 30 20 0 10 20 5 10 x10-2 x10-3 X [m] STEP 31 Y [m]Z [m] 22 24 26 4.5 3.5 1.5 35 34 37 0 0 10 20 30 0 10 20 30 5 10 36 x10-2 x10-3 X [m] STEP 35 Y [m]Z [m] 20 25 30 6 4 0 34 38 0 0 60 20 40 0 10 20 30 10 20 36 x10-2 x10-3 X [m] STEP 39 Y [m]Z [m] 20 25 30 6 4 0 34 38 40 0 0 20 40 0 20 60 40 10 20 30 36 x10-2 x10-3 CV+MA CV CA+IA Ground truthIMU+E CV IMU+E CA+IA CV+MA CV IMU+E CA+IA CV+MA CV CA+IA CV+MA CV CA+IA CV+MA CV Figure 3.17: Speed evaluation: zoomed plots for selected speed steps.
106 Events-IMU fusion -2 0 2 -10 0 10 20 -10 -20 0 10 20 -5 0 5 -100 0 100 -200 0 200 -100 0 100 Frequency : -100 -200 0 2.23.3 4.8 5.9 7.0 7.7 8.1 9.6 9.9 11.0 12.5 14.7 16.5 Step : 1 4 8 11 14 16 17 20 21 24 28 34 39 Zoomed sections 200 -200 0 200 -200 -400 0 100 Time [s] Time [s] a X [m/s2]a Y [m/s2]a Z [m/s2]ω X [rad/s]ω Y [rad/s]ω Z [rad/s] 83.120 30 40 50 60 70 80 90 100 Y2 -2 0 2 4 -5 -10 0 5 10 83.3 83.5 Estimated Acceleration IA Measured Acceleration IMU IMU saturation zone Estimated Angular velocity MA Measured Angular velocity IMU Z2 X2 Z1 Y1 X1 X1 Y1 Z1 X2 Y2 Z2 Figure 3.18: Speed evaluation: IMU measurements contrasted with acceleration from CA+IA and angular velocity from CV+MA estimated in body frame. Note that the acceleration exceeds the IMU range yielding to a saturated measurement. The gray area marks the saturation zone. integrated IMU was set up with the highest acceleration and angular velocity scales, but the strong acceleration produced by the mechanism exceeded such limits after 500 rpm. Event data provides a certain degree of robustness against inertial saturation. The acceleration is still estimated because it is part of the state and does not depend on IMU readings, as shown in the zoomed sections in Fig. 3.18. The saturated IMU readings do not correct the state properly and introduce inaccuracies that make CV+MA and CA+IA fail at step 35, just
3.10 Conclusions 107 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 Bias a X [m/s 2 ]Bias a Y [m/s 2 ] Bias a Z [m/s 2 ] Bias ω X [rad/s]Bias ω Y [rad/s] Bias ω Z [rad/s] Time [s] (a) (b) Time [s] 2 4 0 -10 6 8 10 0 -15 -5 5 10 20 0 30 0.00 -0.10 -0.05 -0.15 -0.20 -0.25 0.05 0.10 0.00 -0.05 -0.10 0.0 0.1 0.2 0.3 CV+MA IMU+ECA+IA CV+MA IMU+ECA+IA Figure 3.19: Speed evaluation: (a) estimated bias for linear acceleration, (b) estimated bias for angular velocity. a few steps after IMU+E. As observed in the previous chapter, strong accelerations violate the constant velocity model, but the reduced amount of motion contained in a small event window compensates for such inaccuracies yielding a more robust but not much accurate estimation. Increasing acceleration leads to estimation offsets and non-uniform trajectory shapes, as shown in the CV plots in Fig. 3.17. The aggressiveness of this experiment forced an increase in the acceleration and angular velocity noise constants, from 0.93 to 9.3 and 0.0174 to 0.174, respectively. This modification allowed reaching higher dynamics before the tracking failed. The bias estimation for CV+MA, CA+IA and IMU+E shows convergence signs, and both CA+IA and IMU+E present the most uniform estimations as shown in Fig. 3.19. Note that the bias estimation for CV+MA diverges faster than the other approaches from second 80 onwards. This is a possible effect of the IMU saturation that affects the sensor from this point. The saturation impact on the CV+MA bias is higher than for CA+IA. The saturation effect on IMU+E is almost instantaneous yielding to bias estimations out of range from second 80 until failure. 3.10 Conclusions This chapter presents three sensor fusion strategies to combine event data and inertial measurements. The main objective was to create a more accurate tracking system that benefits from the fast response of the event camera and IMU readings.
108 Events-IMU fusion Following a similar tracking scheme to the one proposed in Chapter 2, two strategies were presented based on the constant velocity and constant acceleration models with event windows. The proposed approaches are CV+MA and CA+IA, which consider measurement models with instantaneous or mean IMU readings. In this sense, the overall tracking system has a high rate throughput, at least three times faster than the IMU when using event windows of 300µs. The inertial measurements were used in the state correction process to aid the event data in the linear acceleration and angular velocity estimations. The third implemented approach follows the conventional VIO methodology without integrating IMU readings. In this approach, the system is predicted using inertial measurements and corrected with event data. The event window size was raised to 1ms to match the IMU rate. Note that the event-line association process used in all approaches is the same one described in Sec. 2.5, and all Jacobians and orientation operations were handled with Lie theory using the manif library. The sensorial fusion improved the tracking accuracy by about 10% at the cost of increasing by about 6-12% the computational burden, considering that the state size of CA+IA and CV+MA have bigger states than their event-only versions, yielding processing matrices of larger size. The proper handling of the Jacobian sparsity and the covariance symmetry aids these solutions in reaching real-time performance. The preference for CV+MA or CA+IA strategies becomes indifferent in terms of accuracy since they exhibit differences below 3%. In this case, concerning computational performance, the best achieving was CV+MA since it was less expensive than CA+IA by about 5%. The cost-benefit balance goes towards the variant IMU+E. This approach has a smaller state size of all sensor fusion variants and the most accurate results in most evaluated sequences. The computational time surpasses by about 20% all event-only and event-inertial variants. The presented sensorial fusion approaches preserve the high throughput characterization of the tracking system; at worst, this feature is reduced up to 1 kHz, which corresponds to the IMU sampling rate in the DAVIS camera. Nonetheless, this rate could be enhanced if using an external IMU with better technical specifications. The current IMU technical features are the limiting factor in the estimation process. At extremely high speeds, the existing accelerations may saturate the IMU, which has a different impact degree for IMU+E, CV+MA and CA+IA. In normal conditions (i.e. camera hand motion, robotic displacements, etc.), the acceleration levels barely reach 10g. In mechanical systems, this value easily exceeds 25g and saturates the DAVIS IMU sensor, which is designed to operate up to 16g. In such conditions, IMU+E accurately estimates up to 11Hz motions before failing due to the IMU saturation. However, its estimations capture better the high dynamic motion than CA+IA and CV+MA with reduced degradation due to speed increase. The sensorial fusion allowed CA+IA and CV+MA to operate until a 14 Hz motion with errors higher than IMU+E. The CV model, an event only variant, presented
3.10 Conclusions 109 the most considerable accuracy degradation as the speed was increased, but it was capable of estimating higher dynamics up to 16 Hz motion with speeds of about 2.5 m/s. Data synchronization is crucial to producing fast estimations. In a scenario with independent measurements of IMU and events, the asynchronous nature of events will force to introduce delays in waiting for IMU readings. The event-IMU data packet processing with the modified DAVIS ROS Driver solves the delay handling issue. However, the synchronization must be addressed carefully by any means for those event camera models that do not integrate an IMU chip (i.e CeleX-V model).
4 Event-based tracking and mapping 4.1 Introduction In mobile robotics, simultaneous localization and mapping (SLAM) aims to build a metric representation of the environment while, at the same time, positioning the robot in it [104]. The fundamental components of this problem have been studied for decades. Laser Imaging Detection and Ranging (LIDAR), Visual or visual-inertial solutions are the most common pipelines to perceive the environment. Depending on the commercial sensor, visual-based solutions are usually the cheapest, economically speaking. In a visual SLAM process, the robot should explore and memorize environmental particularities by observing salient features to understand its surroundings and locate itself in it [43]. A basic visual-SLAM system should meet the following conditions: 1)static world for a stable estimation, and 2) incremental operation for an up-to-date map ready to position the robot [43]. Additionally, good lighting and smooth motion should be ensured for accurate sensing with conventional digital cameras. These last two conditions are constraints for visual sensors and have been a research interest in modern computer vision [95]. Event-based vision is a relatively new research area that addresses the SLAM problem from a new perspective. Since events are fundamentally different from images, most of the concepts developed for conventional cameras cannot be applied [9]. Therefore, the research task is to develop new methodologies to unlock the event camera capabilities and address the most challenging conditions in which conventional cameras cannot operate. The asynchronous events, lack of image intensity, motion-based scene appearance variation, and noise make the feature extraction a complex and -depending on the approachcomputationally expensive task [9]. In this sense, most of the literature related to event-based SLAM proposes event-only solutions based on direct 2D-3D registration (tracking) and semi-dense reconstruction (mapping) [105,106] split into parallel modules. This featureless estimation is bonded with cost-function minimization
118 Event-based tracking and mapping 4.4 Line Parameterization In the tracking module, line parameterization used the two 3D line endpoints pj∀j{1,2} ∈ R3projection onto the image plane as 3D points, see Sec. 2.9. In this chapter, 3D lines are represented with an origin-direction parameterization, L= A B ∈R6,(4.1) where Lis the notation used to define a line landmark, and it carries a unique identification number id. A∈R3is the origin point that can be any point in the line path, and B∈ R3is a director unit vector. Any point in the 3D line can be defined with the parametric equation A+λB, where λis a scalar value, see Fig. 4.3. Unlike points, lines can be partially occluded; therefore, 3D line endpoints cannot be established from single observations, and are generally not re-observable [42]. It is a common practice to estimate infinite lines supporting the segments, and to keep track of the segment’s endpoints separately via heuristic policies. The origin-point representation is related to the endpoints by, A=p1+p2 2(4.2) B=p2−p1 ∥p2−p1∥,(4.3) where Acould be stated with any line point -but this chapter uses the midpoint. In line-fitting or optimization processes, the endpoints will be managed to cope with line growing or merging actions. In this sense, the endpoints are updated as the closest point to a 3D line if the line parameters change. Other line parameterizations are detailed in [42]. Some examples are Plücker lines reprep1 u1 p2 A B u2l L C π Figure 4.3: Origin-direction line back-projection: Lis the line that lies on a semi-infinite plane π.
4.4 Line Parameterization 119 sentation as in [49], or bundle adjustment structure from motion works as in Zhang et al. [131]. The latter is a geometrical representation composed by a director and a normal vector to a plane containing the line and origin, subject to an orthogonality constraint. As discussed in Zhang’s work, the Plücker constraint is guaranteed during the initialization but should also be ensured during the optimizations process. This issue leads to using a Cayley representation of the Plücker line to guarantee the constraint satisfaction for bundle adjustment [131]. As a result, the optimization process becomes more complex and requires more computational power to maintain real-time performance. The simplicity of the origin-direction representation, and the fact that the bundle adjustment solver works with this parameterization, were determinants for its selection. 4.4.1 Line projection and frame transformations The linear expression for the projected line in homogeneous coordinates l= [a, b, c]⊤∈P2can be derived from the projection of its endpoints. The following derivations use the same notation for orientation, translation and intrinsic matrices as in previous chapters. For the origin-direction parameterization, the 3D line endpoints can be expressed as A= p1+λ1Band p2=A+λ2B. Therefore, their projection onto the image plane can be expressed as uj=KR⊤(A+λjB−r)with j∈ {1,2},(4.4) which yields a homogeneous 2D line l=u1×u2.(4.5) Analyzing Eq. 4.4 for two specific points at λ1= 0 and λ2= 1 and combining it with Eq. 4.5 leads to l=KR⊤(A−r)×KR⊤(A+B−r),(4.6) where applying the cross-product identity (Ma)×(Mb) = det(M)M−⊤(a×b)with M=KR⊤, the line projection for the origin-direction representation can be defined as, l=KR⊤(A−r)×Bwith (4.7)
120 Event-based tracking and mapping K= αv0 0 0αu0 −αvu0−αuv0αuαv ,(4.8) Kis the camera intrinsic matrix expressed in a canonical form obtained from the expansion of det(K)K−⊤ and knowing that det(R⊤)(R⊤)−⊤ =R⊤. The 3D line projections onto the image plane for line estimation processes in this chapter will be carried out with Eq. 4.7. The frame transformation for a line Lis straightforward, and analogue to the transformation of a 3D point. The line parameters transformation from frame Fto Gis carried out by the following expressions: GA=RFA+r(4.9) GB=RFB.(4.10) Recall that a calligraphic font is used to denote the name of a reference frame, and that F and Gare generic frames to illustrate the transformations. Ris a simplified notation for GRF which represents the rotation matrix from Fto G, and ris the short notation for rG Fwhich represents the translation of frame’s Forigin expressed in frame Gcoordinates. 4.5 Space discretization via ray tracing The mapping module proposed in this chapter relies on EMVS [108] to discretize the scene and recover depth. The event-driven fashion and parallelization possibility makes it suitable for real-time performance applications. Works like [105,125], have used EMVS in their 3D reconstructions achieving accurate results, and [61] has connections with it. The EMVS space discretization divides the scene into a three-dimensional spatial grid. An event back-projects to the image plane through a ray. As the camera moves, the same scene feature will back-project through different rays from events fired at the new camera locations. Voxels in the grid with dense concentration of ray intersections indicate the presence of a 3D scene feature. The space-sweep was first proposed by Collins et al. [132] in 1996. The sweeping term comes from the volumetric ray-counting of the intersections at discrete depth planes. This approach was initially meant for depth recovery of Canny edges from conventional intensity images. The extension to event data was introduced by EMVS [108] with slight modifications. The following paragraphs summarize the operational principle of the space-sweep algorithm, how it was adapted to be compatible with the work in this thesis, and how it will be used to recover 3D lines from the scene.
4.5 Space discretization via ray tracing 121 4.5.1 Grid description: shape The space-sweep algorithm requires a spatial grid located at a reference viewpoint V, which pose concerning the world frame is noted as TV= (RV|rV). In this work, the grid is set up with a constant size of w×h×N, where wand hmatch the image size and Nis the number of depth planes. The grid is composed of voxels, which receive one vote each time a sweeping ray passes through it. These rays are infinite lines projecting each event into the 3D space at any given viewpoint pose Ti= (Ri|ri), that the tracking node provides it. Since the camera pose does not change significantly during the micro-second lapse between events, a time window Wi with several events can be processed for the same pose Ti. The grid shape is a critical factor that limits depth estimation accuracy. The back-projected rays generate a cone in space whose size grows quadratically with depth, as discussed in [108]. A ray in a uniformly-distributed grid in Euclidean space would cover more voxels of a particular depth plane as it goes away from the camera’s optical center. This issue can be remedied using a grid distributed in a projective space that compensates for the voxel size, increasing the grid size with the distance covering roughly one voxel, as illustrated in Fig. 4.4. Mathematical support for this claim can be found in [108]. The projective grid in this work has axes noted by [U, V, D], D V ρ min ρ max T T T V U U Reference keyframe V i+1 i-1 Figure 4.4: Projective grid shape illustration. The grid’s shape cope with the back-projection cones that grows in depth as the voxel’s size does. The depth planes are disposed in inverse depth for an accurate 3D line recovery.
122 Event-based tracking and mapping which are aligned to the camera frame axes. The depth axis noted as Dis not infinite; instead, it is limited by minimum, and maximum depth values noted as ρmin and ρmax. 4.5.2 Grid description: depth arrangement The depth planes in the projective grid displayed in Fig. 4.4 can be arranged uniformly or proportionally to the inverse depth. This arrangement affects the shape of the back-projection rays that pass through the voxels. A ray in the Euclidean space can be represented by a starting point Cwhich is the optical camera center, a director vector Ddetermined by the corresponding projected point at infinity, and a uniformly distributed depth factor ρrelated by the parametric equation p=C+ρD= [X, Y, Z]⊤[133]. In projective space, this point is described by p=X Z,Y Z, Z⊤yielding p=hCx+ρDx Cz+ρDz,Cy+ρDy Cz+ρDz, Cz+ρDzi⊤. The projective point’s rate of change with respect to the depth is, ∂p ∂ρ =CzDx−CxDz (Cz+ρDz)2,CzDy−CyDz (Cz+ρDz)2, Dz⊤ ,(4.11) 00 50 100 150 200 100 50 Uniform depth planes U [voxels] 100 close far close far 0 50 100 150 200 0 50 Inverse depth planes U [voxels] 0 50 100 150 50 0 100 150 200 50 0 100 200 U [voxels] V [voxels] Depth planes 0 50 100 150 0 100 50 150 200 50 100 200 U [voxels] V [voxels] Depth planes Back-projection rays Line recovery approximation (a) (b) Figure 4.5: Back-projection rays visualization for uniform and inverse depth: (a) rays shape, (b) line recovery simulation. Note how the rays become almost-parallel in the farthest depth planes with an uniform depth sampling. Ray intersections are better defined in inverse depth grid.
4.5 Space discretization via ray tracing 123 where for small forward displacements Cz≪Dz(close depth planes), is noticeable that if ρ→0, the projective point describes a quadratic path with a tangent that tends to be parallel to the XY plane. On the other hand, if ρ→ ∞ (far depth planes), the tangent to the ray has a director vector that tends to be aligned to the Dgrid’s axis, as shown in Fig. 4.5a -top. If the projective grid is uniformly sampled with inverse depth, Z would be approximate proportional to 1 Cz+ρDzhaving a projective point denoted by p≈h(Cx+ρDx)(Cz+ρDz),(Cy+ρDy)(Cz+ρDz),1 Cz+ρDzi⊤. Observing in this case the rate of change with respect to ρ, ∂p ∂ρ ≈(CxDz+CzDx+ 2ρDyDz),(CyDz+CzDy+ 2ρDyDz),−Dz (Cz+ρDz)2⊤ ,(4.12) it is noticeable that for small forward displacements the rays will change linearly in the UV plane in the grid while varying the depth from ∞(for the closest depth plane) to 0 (the farthest depth plane at infinite) becoming an almost straight ray, see Fig. 4.5a -bottom. A mathematical proof to this statement, considering changes in the back-projection cone’s section, can be found in [108]. The shape of the ray in the 3D grid significantly impacts the depth estimation. In a grid with uniform depth, rays that belong to distant objects might intersect in a zone where all of them have almost the same direction, which will increase the uncertainty of locating a 3D point in the gird, as observed in Fig. 4.5a - top. On the other hand, the ray’s intersection in inverse depth is better conditioned and would allow the recovery of straight segments from the edges of the scene, see Fig. 4.5a - bottom. Line recovery in uniform depth was carried out in simulation for a long straight line in the Euclidean space that covers closer and farther depth planes and a batch of camera poses, as shown in Fig. 4.5b - top. The line was split into five well-identified control points on each camera pose. These points were back-projected onto the projective grid -composed of infinitesimally equalized voxels for simulation purposesat a reference position. The given 3D test line can be detected in the voxel space joining the intersection points from all back-projection rays As expected, the detected edge becomes curved as depth increases since each voxel in the grid accounts for a larger volume. Note also that the ray intersection points in Fig. 4.5b - top could be indistinguishable in farther depth planes due to the ray’s parallelism in these zones, i.e., from depth plane 50 forward. Now, using an inverse depth grid, the simulation result is displayed in Fig. 4.5b -bottom. It shows how the sweep algorithm produces straight rays (gray lines), and the detected edge becomes a straight 3D line (blue). Therefore, inverse depth is a much better alternative for the representativeness of the projective grid. It will allow the segment detection on voxel space directly with the lowest deformation possible and the best accuracy.
124 Event-based tracking and mapping 4.5.3 Rays back-projection As previously mentioned, the back-projection rays are infinite lines from the event projection onto the spatial grid. In order to efficiently compute the ray intersection with a grid’s depth plane, Rebeq et al. [108] proposes two steps. First, mapping the events from each event window pose Tionto the first depth plane Z0in the reference view TVvia planar homography. The homography induced by the plane Z0to map a point in ionto Vis given by HZ0 ≜VHi(Z0) = VRi+rV in⊤ Z0∈R3×3,(4.13) where n= [0,0,1]⊤is a unit normal plane to Z0and the rotation and orientation components are computed via frame transformation yielding VTi=TV−1Ti= (VRi|rV i). Note that Kis the intrinsic camera matrix expressed in the conventional form as in Eq. 2.25. The projective homography GZ0 ≜VGi(Z0) = KHZ0K−1∈R3×3,(4.14) is used to compute the corresponding event coordinates as eZ0=GZ0e.(4.15) Recall that the operator ·denotes a pixel in homogeneous coordinates that for an event is e= [u, v, 1]⊤. The estimated point eZ0should be normalized by dividing it by its third element. The second step is transferring the mapped events to other depth planes Zi. The key idea Ti Ti T V T V T V Z0 Z1 Ziez0 Gz0 Gzi e ezi w h U V D u0v0 ( ), u1v1 ( ), uivi ( ), (1) (2) Figure 4.6: Two-folded ray back-projection process. (1) All events are mapped onto the first depth plane Z0via planar homography at the reference view, (2) efficient event map from Z0to any other depth plane Zi.
4.5 Space discretization via ray tracing 125 is finding a closed form for the homography that relates Z0,Ziand the camera poses. To this end, Collins et al. [132] propose a mathematical arrangement that expresses the homography in terms of its inverse components. Following the notation of Eq. 4.13, the homography is GZi ≜iHV(Zi)−1iHV(Z0),(4.16) which is related to the inverse transformation VTi −1= (VRi ⊤| −VRi ⊤rV i) = (iRV|ri V). The individual homographies can be computed as in Eq. 4.13, and expressed in column terms. Using a condensed notation for r≜ri V, results in GZi=R1,R2,R3+r Zi−1 K−1KR1,R2,R3+r Z0,(4.17) where R1,R2and R3are column vectors of iRV. After developing Eq. 4.17, and considering the orthonormal vector identity [a,b,c]−1∼[(b×c),(c×a),(a×b)]⊤results, GZi= 1 + R⊤ 3r Zi01 Z0−1 ZiR⊤ 1r 0 1 + R⊤ 3r Zi1 Z0−1 ZiR⊤ 2r 0 0 1 + R⊤ 3r Zi = 1−Cz Zi01 Zi−1 Z0Cx 0 1 −Cz Zi1 Zi−1 Z0Cy 0 0 1 −Cz Zi, (4.18) with C= [Cx, Cy, Cz]⊤=−iRV ⊤ri V=rV i. The expression in Eq. 4.18 maps an event onto a plane Zideparting from the plane Z0as eZi=GZieZ0.(4.19) It is worth noticing that an event is mapped onto Z0only once and that this result is used to compute the estimation in other planes. This last step is not a sequential process; hence, it can be parallelized to improve the algorithm’s response time. This process is illustrated in Fig. 4.6. A voxel located at [eZi(1),eZi(2), Zi]receives one vote. The larger the number of votes, the higher the probability of containing a 3D point. Note that the computed ray intersection with a depth plane is not an integer number and must be rounded to select the voting voxel. This simple rounding introduces noise in counting votes. This effect was overcome in [108] by splitting the vote proportionally to the voxel closest neighbours. The impact of simple and bilinear voting strategies is displayed in Fig. 4.7. This figure represents a grid’s section along the plane UD showing the number of votes received in such voxels. The points in this figure correspond to a portion of a 3D line; therefore, the most voted voxels should have a linear tendency. The simple voting is not uniform and introduces local maxima points that hinder the identification of the
126 Event-based tracking and mapping 50 40 Votes Votes U [voxels] U [voxels] Depth planes Depth planes 30 20 10 0 50 40 30 20 10 0 49 48 50 51 49 48 50 51 020 40 60 80 100 020 40 60 80 100 1 1/a 1/b 1/d1/c Simple voting 1 Voxel = 1 Vote Bilinear voting 4 Voxels = 1/a + 1/b + 1/c +1/d = 1 (a) (b) Figure 4.7: Voting strategies: (a) simple, (b) bilinear. most voted voxel, see Fig. 4.7a. On the other hand, the vote uniformity in the bilinear vote is observable in Fig. 4.7b. 4.5.4 3D line extraction from the spatial grid The line extraction process departs from a grid populated with rays and votes on each voxel. The most voted voxels have a higher probability of containing a 3D point; nonetheless, as most voxels contain votes, there is a large percentage of noise. Line extraction procedure is illustrated in the flow diagram in Fig. 4.8. Noise filtering The filtering stages to prune the grid (Fig. 4.8 - frames a - b) follow the same procedure as in [108]. This procedure is detailed as follows. In order to have the most relevant scene information, a maximization process returns the voxel’s position of the local voting maxima along each pixel’s projective ray, across all depth planes. The remaining voxels are no longer considered since most have a negligible amount of votes compared to the number of events in the ray-tracing process. The most relevant voxels are condensed from the maximized grid into two spatial images of size w×h. Each pixel encodes the votes’ local maxima (frame a.1) and the depth plane information of where such local maxima appear (frame a.2). For visualization purposes, those values are normalized from 0-255 and expressed as a color gradient in Fig. 4.8.
4.5 Space discretization via ray tracing 127 The votes’ spatial image is filtered through adaptive Gaussian thresholding [134]. The filtering output highlights the edges and removes noise in empty spaces creating a binary edge representation (frame b.1) that is later used as a mask. The threshold adjustment in this process is proportional to the pruning intensity. It allows highlighting small distant edges at the cost of increasing noise in the closer ones. The pruning procedure for the depth spatial image is carried out by a median filter that regularizes the depth value of the pixels in the given mask (frame b.2). The colour gradient in the output image represents depth from far (dark) to near (light). Note that depth is expressed as a depth plane number ranging from [0toN−1]. Therefore, the filter returns the median depth plane value of a pixel’s neighbourhood found in the mask. Both operations can be performed with OpenCV. Line recovering The following stages displayed in Fig. 4.8 frames c - d, state the 3D line searching and recovery process proposed in this thesis as complement to EMVS [108]. The line recovery is a two-step process: first, to detect inliers that belong to straight segments in the voxel space, and second, to recover the best 3D line fit in a metric space. These steps are detailed in the following paragraphs. Note that the voxel space is limited by the horizontal and vertical number of voxels and the number of depth planes considered to build the spatial grid. Inlier detection: As shown in Fig. 4.8 - frame b.1, the object’s straight edges are clearly distinguishable, and they are composed by a space set of 2D points with implicit depth information. (a.2) Depth (a.1) Votes (b.2) Filter (b.1) Mask Median Filtering Gaussian Thresh. Δs > Δθ > θ U V (c) Hough Transform (d) 2D line merge (d.1) Merging thresholds c θ c /ρ s Δd> c d Figure 4.8: Line extraction visual-flow diagram, figure adapted from [8].