If the person has its body completely
inside the risk zone for an specific time (kl), the loitering alarm is
given off. Empirically, kl is a time around 30 s that has been determined by security experts. This algorithm also considers the percentage of body that the suspicious person has inside the risk
zone, increasing slowly its alarm ratio (ka) if the person has not
the whole body inside this zone, as is exposed in Eq. (14), where
k
c is the current time, ki is the time when the object enters inside
the zone and w and h are the width and height of the bounding
boxes of the suspicious person (ti) and the risk zone (r)