This repository is for detecting vehicles from a highway surveillance camera footage project
This project is done using MATLAB and its image processing toolbox
You should provide a video from a highway (at least 100 frames) for the algorithm to work
A sample video is already provided in the repository
Run VehicleDetection.m
make sure the video2.mp4 is in the same directory of your m-file
(IMAGE PROCESSING SECTION)
First, the Background is calculated by the median filter over the temporal dimension of the video (across the frames)
Then, by subtracting the Background from each frame, the foreground is calculated
After that, using tresholding and some morphological operations, we are ready to detect vehicles
(COMPUTER VISION SECTION)
The black and white frames are fed into a Blob Analysis algorithm which returns the coordinates of the detected vehicle