Clone wiki

TrafficIntelligence / Home

Traffic Intelligence Project


  • February 2nd 2019: The C++ code has been updated to OpenCV4 (you also need to update the trajectory management and analysis library). Python code seem to need no update as tests are passed.
  • June 15th 2018: The Python code is now put in a trafficintelligence package (namespace) and can be installed in your Python dist-packages using pip.
  • June 13th 2018: Re-uploading the Laurier sample data and adding an example of videor with lens distortion, plus a metadata.sqlite file
  • May 27th 2018: Brand new version with latest OpenCV3 and Python3 support. Please report bugs!
  • Past News

To receive automatically updates and announcements, please register on the Yahoo Group.


Welcome the homepage of the Traffic Intelligence project. This software project provides a set of tools developed by Nicolas Saunier and his collaborators for transportation data processing, in particular road traffic, motorized and non-motorized. The project consists in particular in tools for the most typical transportation data type, trajectories, i.e. temporal series of positions. The original work targeted automated road safety analysis using video sensors.

This software is being developed for many projects and purposes. This project contains:

  • C++ code under the c and include directories: a feature-based moving object tracking tool and some examples of the use of the OpenCV and KLT libraries
  • Python modules for several applications
    • classes for trajectories and moving objects (objects with some characteristics and a series of time-stamped positions): this growing body of code allows the interpretation of trajectory data produced by the C++ video analysis code
    • some basic code for simple traffic engineering problems (fundamental diagram and traffic signal timing)


Compiled Video Analysis Binary for Windows

Linux is the preferred development platform. All Python code should work on all platforms where the required Python libraries are available.

An old 32 bit Windows binary for the tracker exists on the Downloads page (using the provided compiled libraries), but has not been updated. Please volunteer to contribute Windows binaries for the tracker.


We are very interested in outside contributions and to start a collective effort to make video analysis more accessible and widespread in transportation applications. Do not hesitate to contact Nicolas Saunier and to give feedback on the code, documentation, etc. When you find an error and have a workaround, please send a message about the error so that others will not be stuck in the same place.


The code is licensed under the MIT open source license.


Funding for these developments comes partially through the funding of the students listed on the collaborators' page, supported by NSERC Grant No 402320-2011, FRQNT-MTQ-FRQS grant 2012-SO-163493 (road safety research program 2011-2014) and several MTQ research contracts.

If you make use of this piece of software, please cite one of our papers, for example

  • for the tracking software, S. Jackson, L. Miranda-Moreno, P. St-Aubin, and N. Saunier. A flexible, mobile video camera system and open source video analysis software for road safety and behavioural analysis. Transportation Research Record: Journal of the Transportation Research Board, 2365:90-98, 2013
  • for surrogate road safety analysis N. Saunier, T. Sayed and K. Ismail. Large Scale Automated Analysis of Vehicle Interactions and Collisions. Transportation Research Record: Journal of the Transportation Research Board, 2147:42-50, 2010

We would be very happy in any case to know about any use of the code, and to discuss any opportunity for collaboration.

Contact me at nicolas.saunier[at] and learn more about our work at

Collaborators are listed on this page.