Skip to content

Detecting wheels of cars from the input video and showing speed in pixels/frame.

Notifications You must be signed in to change notification settings

shivam529/Car-wheel-velocity-detection-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Car-wheel-velocity-detection-OpenCV

Detecting wheels of cars from the input video and showing speed in pixels/frame.

Given the assumptions:

  1. cars move from left to right
  2. cars don't overlap
  3. wheels are in the same plane throughout
    Method:
    I used OpenCV for hough lines.
    GrayScaled,Binary Thresholded, and Found Edges using canny edge operator.
    This edge image was used to find circles in.
    Car no. are found from patterns, since every new car starts with 1 wheel at start and then 2 wheel in between and then 1 again at the end
    This pattern is used to find the car number and tire number respectively.

REMOVAL of false circles detected:
Limted circles to empirically found vertical range of actual tires
Using template matching(checking similarity) for a circle patch with a tire.
Thid final step gave me perfect circles(wheels) for the given video.

SPEED was calculated keeping a track of each wheel and X distance travelled along with no. of frames elapsed at each point.

Output can be seen at the link: https://youtu.be/9YvrOLn3mqc
Or be recreated by running the program again.

About

Detecting wheels of cars from the input video and showing speed in pixels/frame.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages