Skip to content

An automatic vehicle speed measurement and speeding violation detection approach

License

Notifications You must be signed in to change notification settings

alitourani/vehicle-speed-measurement

Repository files navigation

Motion-based Vehicle Speed Measurement

This project is a vehicle speed measurement application for video-based Intelligent Transportation Systems (ITS). These systems utilize roadway camera outputs to apply video processing techniques and extract the desired information, which is instantaneous vehicle speed in this particular case. This approach can estimate the vehicles' speed by their motion features (if a correct calibration is provided). Thus, by analyzing each vehicle’s motion parameters inside a pre-defined Region of Interest (ROI), the amount of displacement in sequential frames is provided, which is an essential parameter for calculating instantaneous speed.

⚠️ Note: This repository contains the implementation source code for Master's thesis with the same name.

Ali Tourani Vehicle Speed Measurement

🔥 Algorithms

Each moving object (vehicle or non-vehicle) is detected as it enters the ROI using the Mixture-of-Gaussian background subtraction method. Then, by applying morphological transformations, including the opening and closing and the FloodFill algorithm, the distinct parts of these objects turn into unified, filled shapes. Then, some defined filtration functions leave behind only the things with the highest possibility of being a vehicle. Detected vehicles are then tracked using blob tracking algorithm, and their displacement among sequential frames are calculated for final speed measurement purpose. It should be noted that the process is not done in real-time and the outputs of the system have acceptable accuracy only if the configurations are correct based on the vehicle images/frames.

🔣 Inputs/Outputs

The system's input can be a video (default) or a series of images that need to be calibrated for further analysis and correct calculations. Calibration parameters include the ground-truth speed of each vehicle (to be compared to the calculated speed) in the format of an XML type, the actual width and height of the ROI, and Image processing parameters (e.g., morphology kernel sizes, Gaussian filter kernel size, etc.). The system's output is a series of vehicle images with their corresponding speed, detected frame, and the status of committing a speeding violation.

🔨 Environment

The project is implemented by C# EmguCV and AForge.Net image processing libraries.

🎥 Demo

You can see a demo of the system in this link.

Ali Tourani Vehicle Speed Measurement

💡 How to employ?

Simply Clone the repository and install the required packages using NuGet Package Manager. Here's the list of the packages to be installed:

  1. EmguCV - Version 3.0.0 (link)
  2. AForge - Version 2.2.5 (link)
  3. AForge.Imaging - Version 2.2.5 (link)

🔗 Citation

Please cite the following paper if you have used this repo:

@article{Tourani2019,
	author = {Tourani, Ali and Shahbahrami, Asadollah and Akoushideh, Alireza and Khazaee, Saeed and Suen, Ching Y.},
	title = {{Motion-based Vehicle Speed Measurement for Intelligent Transportation Systems}},
	doi = {10.5815/ijigsp.2019.04.04},
	issn = {20749074},
	journal = {International Journal of Image, Graphics and Signal Processing},
	number = {4},
	pages = {42-54},
	volume = {11},
	year = {2019}
}