Skip to content

brochj/SpeedTCC

Repository files navigation

SpeedTCC

How it works

Image Pre-processing

Image processing

The next steps can be performed independently. From now on, we work with three images, one for each track/lane.

Apply new Perspective

Applying a new perspective to linearize object detection. It makes tracking and speed calculation easier and more reliable.

Apply Foreground Mask

Apply Foreground Mask to highlight pixels that have changed from previous frames.

Apply Eroded Mask

Apply Eroded Mask to remove noise.

Apply Dilated Mask

Apply Dilated Mask to highlight the vehicle/object

Apply Convex Hull

Apply convex hull to smooth edges.

GIF to ilustrate

Calculate the speed

In order to calculate the vehicle speed we use the center points and frame quantity.


Installing

git clone https://github.com/brochj/SpeedTCC.git
cd SpeedTCC

1. Create a virtual environment

python -m venv .venv

2. Activate the virtual environment

On Linux or MacOs, using bash
source .venv/bin/activate
On Windows using the Command Prompt:
.venv\Scripts\activate.bat
On Windows using PowerShell:
.venv\Scripts\Activate.ps1

3. Installing the dependencies

pip install -r requirements.txt

4. Download the Videos

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages