|
Algorithm 1: Pseudo-code of pig behavior analysis. |
Input: A video sequence ; object detector ; tracking score threshold is set 0.75; Frames per second ; Output: Tracks of the video |
-
1
Initialization:
-
2
for frame in do
-
3
-
4
Initialize time-count array including four elements for time statistics
-
5
Set variable
-
6
-
7
Associate with using OC-SORT:
-
8
if succeed to match then
-
9
Call the update or re-activate function to update the status of tracks
-
10
Set variable
-
11
-
12
end
-
13
if failed to match and then
-
14
Call the function to create a new track.
-
15
Initialize time-count array
-
16
-
17
end
-
18
End
-
19
|
| Return
|