of Fig. 5. A speed event is a sequence of at least
three adjacent good peaks. The event amplitude is
the mean height of all the good peaks comprising the
event. Event boundaries are set at the boundaries of
the first and last peak comprising the event. (When
detecting crawling actions, the algorithm additionally
requires that a crawling event is terminated by any
event in cast or crabspeed signal, Fig. 5).
Event detection in a non-oscillating signal. Our
procedure is an extension of the ”Schmitt trigger”
approach previously used for detection of movement
events in flies (Robie et al., 2010). It employs four
adjustable thresholds, which are specifically tuned for
each type of signal. The thresholds are: 1) the upper
and 2) the lower amplitude threshold, shown as the
solid and dashed horizontal green line, respectively,
in Fig. 5 (cast and crabspeed plots) and in Fig. 6;
3) the width threshold; and 4) the gap threshold. An
event starts when the absolute value of a signal, while
increasing as a function of time, crosses the upper am-
plitude threshold. An event ends when the absolute
value of a signal, while decreasing as a function of
time, crosses the lower amplitude threshold. Event
duration is the difference between the event end and
event start times. Event amplitude is the highest abso-
lute value of a signal during the event. A single event
of duration less than the width threshold will not be
detected (i.e., will be ignored). However, if two or
more adjacent events of the same type (all peaks or all
wells) are less than the gap threshold apart one from
another, and the time duration between the start of the
first event and the end of the last event exceeds the
width threshold, then all the events will be merged
into a single detected event, as illustrated by the crab-
speed plot in Figure 5.
3.2 Detection of Behavioral Actions
Detection of the most of actions listed in Table 1, with
the only exception for rolling, requires simultaneous
processing of more than one signal. This requirement
can be illustrated by comparing the strong cast (Fig.
3(b), middle chart), hunch, Fig. 3(c), and digging ac-
tion, Fig. 3(e). During any of these actions, a drop
in the midline signal is observed, so the shape of a
tracked animal object is close to a ball (and there-
fore the MWT may be unable to properly identify the
spine line). Thus, while the midline signal can be used
for detecting these actions, it may not be sufficient
for their reliable discrimination, so additional signals
must be used.
Our model algorithm for detection of a strong cast
action makes use of the cast, midline and morpwidth
signals, as illustrated in Fig. 6. First, we note that a
strong cast must be accompanied not only by a well
in the midline signal, but also by a peak in the mor-
pwidth signal. (The morpwidth peak is not expected
to be observed neither during hunch nor during dig-
ging action.) Second, a strong cast can only appear
as a part of the sequence of states schematically de-
picted in Fig. 3(b). Thus, one should always observe
cast signal events (peaks or wells) on both sides of a
midline well/morpwidth peak during the strong cast
action, as illustrated by Fig. 6.
Detection of a hunch action makes use of the same
three variables as detection of cast action, but employs
additional thresholds to make sure there are no signif-
icant cast and morpwidth events in a close vicinity of
the midline well.
Our algorithm for detection of a digging action, in
addition to the presence of a deep well in a midline
signal, requires that the values of both x and y sig-
nal stay constrained to a certain small region within a
certain period of time, since the tracked animal object
practically does not move while the animal digs.
A following action is detected similarly to the de-
tection of digging action, but does not require the
presence of a midline well and requires that ∆x/∆y
stays below a certain small threshold for a certain
period of time, since in all the experiments we used
scratches were parallel to the y axis.
Detection of taxis actions is more sophisticated.
For example, during chemotaxis, an animal usually
performs two or more head casts, both left and right
ones, and compares the local concentrations of an
odorant at the position (headx, heady) of its nose dur-
ing each cast (Gomez-Marin et al., 2011). It then
changes its orientation, described by the tail vec-
tor with components (taivecx, tailvecy), and subse-
quently crawls for a certain time in the newly chosen
direction.
3.3 Feature Extraction
The features defined for detected actions can be sub-
divided into two categories: those computed per-
event, e.g. event amplitude, and those computed per-
animal, e.g. an event frequency, i.e. number of events
detected per unit time interval. Table 1 lists the fea-
tures extracted for detected actions. For crawling ac-
tion, only per-event features are defined: the mean
peak amplitude (height), frequency of oscillation (de-
termined by applying the Fourier transform to the por-
tion of speed signal comprising the action event, and
the event duration. For head cast, hunch and rolling
actions, the features are the event amplitude (maximal
value of a signal during the event) and event duration,
as well as the event frequency. For digging, the only
BIOSIGNALS2013-InternationalConferenceonBio-inspiredSystemsandSignalProcessing
178