Given a traffic video or a sequence of frame figures as input.
(see demo.py for example)
Using KLT tracking algorithm to extract feature points and get
their corresponding trajectory infomation.
Save the trajectory info as .Mat file.
The KLT tracking parameters are tunable.
Filter out bad trajectories based on:
1) the duration length, (trjs too short will be eliminated),
2) the maximum speed, (low speed trjs will be eliminated).
Low speed trajectories can come from stationary feature points from
the background such as buildings or streets, or from the walking pedestrians.
As normally there exists multiple feature point trajectories on one
vehicle, we group those who are very close and merge them.
Construct an adjacent matrix:
Trajectories who share similar horizontal speed and vertical speed
will be treated as nearby, and be grouped together.
Correspondingly these locations in the adjacent matrix will be assigned as 1.
In order to speed up the process and also save the memory, we
process the video in chunks,
truncation length = 600 frames.
Hence long trajectories who span across differnt chunks may be assigned
to differnt labels and need to be unified and kept consistent.
Chenge Li, New York University, cl2840@nyu.edu
An-ti Chiang, New York University, dawnandyknight@gmail.com
Supervisors:
Prof. Yao Wang, New York University, yw523@nyu.edu
Dr. Greg Dobler, New York University, greg.dobler@nyu.edu
If you have any questions or need more detailed explanations, please email Chenge Li for further information. :D
MIT License