Various methods to automate traffic data collection have recently been developed by many researchers. A macroscopic data collection through image processing has been proposed. For microscopic traffic flow data, such as individual speed and time or distance headway, tracking of individual movement is needed. The tracking algorithms for pedestrian or vehicle have been developed to trace the movement of one or two pedestrians based on sign pattern, and feature detection. No research has been done to track many pedestrians or vehicles at once. This paper describes a new and fast algorithm to track the movement of many individual vehicles or pedestrians
Tracking Algorithm for Microscopic Flow Data Collection
Kardi Teknomo1, Yasushi Takeyama2, Hajime Inamura3
Introduction
Various methods to automate traffic data collection have recently been developed by many researchers. A
macroscopic data collection through image processing has been proposed [1]. For microscopic traffic flow
data, such as individual speed and time or distance headway, tracking of individual movement is needed.
The tracking algorithms for pedestrian or vehicle have been developed to trace the movement of one or two
pedestrians based on sign pattern [2], and feature detection [3,4]. No research has been done to track many
pedestrians or vehicles at once. This paper describes a new and fast algorithm to track the movement of
many individual vehicles or pedestrians.
Tracking Algorithm
We have slices of images and each slice may contain several points that represent objects (vehicles or
pedestrian). Each object is represented by one point in position
)
y
,x
(
at slice s . Moreover, each point
represents the centroid of an area of an object in an image slice. The object can enter the screen, change
position, and go out of the screen. Starting from the first slice, each object is numbered by a unique object-
number. The objective of the tracking algorithm is to match the points between slices by giving an object
number to each point in each slice. Two points are matched if and only if the two points represent one object.
Since each point in each slice denote a location at a time, the distance between two match points in two
consecutive slices can also represent the speed of that object. Matrix
s
D is a binary matrix that represents
the distance between point i in slice s and point j in slice
1
s + and
↔
≤
↔
T
d
0
T
d
1
)j,i(
D
ij
ij
s
Where,
T is the threshold between objects in a slice.
ij
d = Distance between points i in slice s and j in slice. If q is
number of points in slice s and r is number of points in slice
1
s + , then
s
D is matrix q by r . If the
distance between points in two slices is the smallest and it is smaller than the threshold, then the two points
are the same object, or
i
ij
j
G
}j,i{
)
T
d
(
min
∈
⇔
≤
∀
.
In other words, we assumed that distance between objects is bigger than the distance between points in two
consecutive slices. This assumption is acceptable if the number of frame/second is quite large. Assuming a
linear relationship between speed and density, then the number of frames per second depend on the free flow
speed,
f
µ , and the gradient between the speed and density of an object, b, is
b
4
2
f
n
µ
Binary distance matrix
s
D has the following properties:
!
If all the entries in a row i are zeros, then that the object i in slice s has no match in slice
1
s + . Object
i will go out of the screen at slice
1
s + .
!
If all the entries in a column j are zeros, then that the object j in slice
1
s + has no match in slice s .
Object j is a newcomer to the screen at slice
1
s + .
!
If one point represents one object, and there is no occlusion, then the row element and column element
of matrix
s
D has only one entry, which is 1.
Based on those properties, the matching algorithm can be described mathematically as follow:
1.
For slice s = 1:
s
i
G = i and H ={
s
i
G }
2. For slice s = 2 to max Slice:
a.
}
G
H
{
H
},
1
)
H
{max(
G
0
)j,i(
D
s
j
s
j
i
1
s
∪
=
⇒
∑
−
1 Doctoral Student, Graduate School of Information Sciences, Tohoku University Japan
2 Associate Professor, Graduate School of Information Science, Tohoku University Japan
3 Professor, Graduate School of Information Science, Tohoku University Japan
b.
}
G
H
{
H
0
)j,i(
D
1
s
i
j
1
s
−
−
−
⇒
∑
c.
}
H
G
G
G
{
1
)j,i(
D
and
1
)j,i(
D
s
j
1
s
i
s
j
j
1
s
i
1
s
∈
⇒
=
−
−
−
∑
∑
Where H as a set of object-numbers that is still on the screen.
s
i
G is a set of object-numbers at slice s row i .
s
j
G is set of object-numbers at slice s column j. For the first time, the object-number is an ordered number,
similar to the row of matrix
1
D . For the second slice up to the end of the stack, the algorithm is as follow:
•
If all entries of the column vector of matrix
1
s
D −are zeros, put an object-number in slice s ,
s
i
G , as the
maximum number in set H plus one, and then put this new
s
i
G into set H .
•
If all entries of the row vector of matrix
1
s
D −are zeros, remove the object-number in slice s-1 row i ,
1
s
i
G −, from set H .
•
If there is only one entry in matrix
1
s
D −row i column j , put the object-number of row j in slice s ,
s
j
G ,
as the object-number of row i in slice
1
s −,
1
s
i
G −, where the
s
j
G is also subset of H .
Experiments Result and Discussion
The above algorithm was implemented on real world car and pedestrian traffic. Video taking was recorded
with a fixed focus, at the top of the road or walkway to avoid projection and occlusion between o
This content is AI-processed based on open access ArXiv data.