term activities are represented as Event Calculus fluents in order to use the holdsFor **predicate for computing the intervals of these activities. Eg,** holdsFor(moving(id1 , id3 ) = true,
[(0, 40),(340, 380)]) states that id1 was moving together with id3 **in the intervals (**0, 40),
and (340, 380).

To recognise long-term activities, LTAR processes the input information as follows. First, given input type (i), ie the short-term activities detected at each time-point and recorded using the happensAt **predicate, LTAR computes the maximal duration of each short-term**
activity, and represents it using the happensFor **predicate. Eg,** happensFor(**walking**(id5 ), [(40, 400), (600, 720)]) expresses that the maximal intervals for which id5 **was walking** are (40, 400) and (600, 720). appear (A) and disappear (A**) are instantaneous events. (They**
occur at one time point.) Second, given input type (ii), LTAR computes the distance between two tracked entities and compares the distance with pre-defined thresholds. Eg, holdsAt(close(id3 , id5 , 30) = true, 80) expresses that id3 is 'close' to id5 at time 80 **in the**
sense that their distance is at most 30 **pixel positions. Further, LTAR computes the maximal**
intervals for which two tracked entities are 'close' - eg, holdsFor(close(id3 , id5 , 24) = true, [(40, 80)]) states that (40, 80**) is the maximal interval for which the distance between** id3 and id5 is continuously at most 24 **pixel positions.**
Long-term activity recognition is based on a knowledge base of long-term activity definitions. Next we present example definition fragments of LTAR's knowledge base.

## 4 Long-Term Acitivity Definitions

The 'leaving an object' activity is defined as follows:
initiatedAt(leaving object(P, Obj) = true, T) ←

happensAt(_appear_(_Obj_), _T_),  happensAt(_inactive_(_Obj_), _T_),  holdst_(_close_(_P_, _Obj_, _30_) = true, _T_),  holdst_(_person_(_P_) = true, _T_),  happensAt(_appear_(_P_), _T_0_), _T_0_ < _T_  terminates_(_leaving_object_(_P_, _Obj_) = true, _T_) $\leftarrow$  happensAt(_disappear_(_Obj_), _T_)
In the CAVIAR videos an object carried by a person is not tracked - **only the person that** carries it is tracked. The object will be tracked, ie 'appear', if and only if the person leaves it somewhere. Moreover, objects (as opposed to persons) can exhibit only inactive short-term activity. Accordingly, axiom (9) expresses the conditions in which 'leaving an object' is recognised. The fluent recording this activity, leaving object(P, Obj**), becomes** true **at time** T if Obj 'appears' at T , its short-term activity at T is 'inactive', there is a person P **'close'** to Obj at T , and P has 'appeared' at some time earlier than T . Recall that appear (A**) is** an event that takes place at the first time A is tracked and that the close(A, B, D**) fluent is**
true when the distance between A and B is at most D pixel positions. The value of 30 **pixel**
positions was determined from an empirical analysis of CAVIAR.

In CAVIAR there is no explicit information that a tracked entity is a person or an inanimate object. Therefore, in the activity definitions we try to deduce whether a tracked entity is a person or an object given, among others, the detected **short-term activities. We**
defined the fluent person(P**) to have value** true if P **has exhibited an active, walking, running**
or abrupt motion short-term activity since P 'appeared'. The value of person(P) is timedependent because in CAVIAR, the identifier P **of a tracked entity that 'disappears' (is no**