\section{Introduction}

Affordable computing and flexible and inexpensive sensor technology are transforming current practice and methods for traffic data collection, monitoring, and analysis: big data is changing how we interact with our environment and how we approach problem solving tasks in the field of transportation. This should come as no surprise as the complexity and pervasiveness in daily life of urban mobility lends itself naturally to large amounts of data. In this context, the use of mobile and/or fixed video sensors for traffic monitoring and data collection is becoming a common practice not only for freeways but also for urban streets. Early and notable examples include the NGSIM project which included a dataset of extracted trajectories from video data of four corridors (freeways and urban arterials) \cite{Kim_2005} and the SAVEME project which fielded a small but early implementation of video tracking for surrogate safety analysis \cite{Ervin_2000, Gordon_2012}. The availability of such large data sets opens up possibilities for more dynamic traffic load balancing and congestion easing of road networks and in return provides researchers with participatory network usage data collection. This new situation in which traffic data is being collected intensively demands more intelligent and automated methods for traffic data analysis; it is then not surprising that computer vision techniques have gained popularity given their potential for transforming the existing CCTV infrastructure (or inexpensive consumer-grade video sensors \cite{Jackson_2013}) into a highly detailed traffic data collection tool to identify and study traffic behaviours.

One of the most prominent behavioural study application is in proactive road safety diagnosis using surrogate safety methods. This has been a long-standing goal in the field of transportation safety, as traditional statistical methods using accident data require long observation periods (years of crash data): one must wait for (enough) accidents to occur in this time. Beginning in the 1960s, attempts were made to predict the number of collisions based on observations without a collision rather than historical accident records \cite{Perkins_1968}. The Traffic Conflict Technique (TCT) \cite{Hyd_n_1984, Parker_1989} was one of the earliest methods proposed which entailed the observation of qualitatively-defined quasi-collision events: situations in which road users were exposed to some recognizable risk (probability) of collision, e.g. a {\textquotedblleft}near-miss{\textquotedblright}. However, several problems limited their adoption: manual data collection is costly and may not be reliable, and the definition and objective measurement of these events were lacking \cite{Hauer_1978, Williams_1981, Kruysse_1991, Chin_1997}.

Today, with technological improvements in computing power, data storage, ubiquitous sensor technologies, and advances in artificial intelligence, these issues are rapidly being addressed. This research presents the application of a video-based automated trajectory analysis solution which combines the latest advances in high-resolution traffic data acquisition \cite{Saunier_2010} and machine learning methods to model and predict collision potential \cite{Mohamed_2013, St_Aubin_2014} from relatively short, but extremely rich traffic data. This data is typically obtained from ordinary video data via computer vision from a camera situated at 10~metres or more above the road surface \cite{Jackson_2013}, although some of the early footage was taken at 5~metres above the road surface. This trajectory data consists of position and velocity measurements of road users captured 15 to 30 times per second to a relatively high degree of accuracy. This amounts to several million individual instantaneous measurements over a period of one day at a typical site (for each camera).

One of the limitations of past studies involving surrogate analysis is the use of few sites or small datasets. This paper presents, step-by-step, a complete automated system for proactive road safety analysis using large amounts of video data. To the authors' knowledge, the presented system is the most comprehensive to be applied to such a large amount of data collected in the field for a real world traffic engineering study. A large video data set was collected at nearly 40 roundabout weaving zones in Queb{\'{e}}c across 20 different roundabouts for the specific purpose of studying road user behaviour and corresponding safety using surrogate safety analysis. Roundabout weaving zones are defined as the area within the roundabout delimited by an approach and the next following exit. Each camera recorded 12 to 16 hours of video on a typical workday, constituting a dataset of over 470 hours of video data. Applying the proposed method to this large dataset yielded a considerable number of indicators, from individual road user measurements, e.g. speed, to individual interaction measurements, e.g. time to collision (TTC), to aggregated indicators per road user or interaction, to aggregated indicators per site over time and space.

This paper is organized as follows: the next section outlines the methodology, briefly reviews surrogate safety theory, and is followed by a step-by-step review of the methodology with practical examples drawn from the roundabout dataset; the results section provides early video data calibration results, safety indicator aggregation and prediction comparisons, and initial results of the complete roundabout study.