Traffic Intelligence Project
- March 24th 2015: added more details on the use of the
compute-homography.pyscript in the tutorial
- June 4th 2014: added functionality to deal with radial distortion (aka fish eye effect, eg from GoPro cameras). This means that more parameters are needed in the configuration file. The file cannot be updated automatically, see How to update configuration files for solutions.
- Past News
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)
- Compilation and programming environment
- Programming style guide
- Compilation instructions for the C++ code, in particular feature-based tracking
- the requirements of the tools written in Python are described in the requirements.txt file in the python subdirectory. Matplotlib and Numpy are must haves. To replay the video (with the extracted trajectories) or compute a homography, the Python bindings for OpenCV must be installed.
- How to add the Python modules to your path
- How to use the Python modules on Windows
- How to update configuration files (when a new program version requires to change the configuration file)
- Step-by-step examples:
- Information on camera calibration and homographies (and how to use the provided script to create a homography)
- Tutorial to extract road user trajectories from video data
- (Python) Simple example of loading road user trajectories from the NGSIM dataset
- (Python) Load and visualize some video tracking results
- (Python) Various methods implemented for road user classification (work in progress)
- (Python) How to measure tracking performance (CLEAR MOT metrics)
Compiled Video Analysis Binary for Windows
Although Linux is the preferred development platform, binaries are provided for Windows on the Downloads page (compiled on Windows 7 (32 bit) using the provided compiled libraries, it should work on several Windows version, from XP to 8, 32 or 64 bit). Pick the newest version in general. Please report bugs and consider contributing to the project.
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 http://dx.doi.org/10.3141/2365-12
- 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 http://dx.doi.org/10.3141/2147-06
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]polymtl.ca and learn more about our work at http://nicolas.saunier.confins.net.
Collaborators are listed on this page.