Detecting wheels of cars from the input video and showing speed in pixels/frame.
Given the assumptions:
- cars move from left to right
- cars don't overlap
- 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.