Automatic computer analysis of pig play

P. Šustr1, M. Špinka1 and R.C. Newberry2

1Group of Ethology, Research Institute of Animal Production, Prague, Czech Republic
2Center for the Study of Animal Well-being, Washington State University, Pullman, WA, U.S.A.

We designed an experiment in which we wanted to assess the importance of pre-weaning social experience for later social behavior. The testing involved 4 pigs (either all from the same litter or two pairs from two litters) interacting in a 2x2 m arena. We knew that in pig fights and play fights, mutual spatial positions of the two contestants are important. For a human observer, it is impractical to score these positions directly as the mutual orientation of the opponents may change several times within a single second. We took advantage of the ability of EthoVision Color-Pro (Noldus Information Technology) to follow several differently colored objects at a time (Figure 1). For further analysis of basic position data from EthoVision we wrote a FoxPro program for cleaning data and mutual position analysis.

Figure 1. Four pigs in a pen with color markers applied to their back.

The first task, cleaning the data, is achieved in three steps. First, the system identifies invalid data points based on a combination of different criteria. Next, it replaces these invalid data points by interpolations calculated from the nearest correct positions of the object. Third, it checks once more whether the interpolated values meet a criterion of a reasonable distance between the two markers on the same piglet.

After the data are cleaned in this way, an algorithm is applied that finds out, in three runs, what is the mutual position of the two pigs. First, the positions of the snouts and the tails of the two colored pigs are calculated by extrapolating the "head marker - back marker" vectors into the appropriate directions. For this purpose, the relative lengths "snout - head marker", "head marker - back marker" and "back marker - tail" were measured for each pig individually from the screen and put into the program as parameters. In the second run, it is determined how close the pigs are to each other and which of them is "active" at the moment, i.e. has its snout nearer to the body of the second one. The whole two-pig configuration is rotated in the second run so that the passive pig has its snout at x=0, y=0 point and its body falls on the negative half of the y-axis. Finally the angle of the two bodies and the point of contact is calculated. For the purpose of our study, we classified all possible positions into contact - non contact, 3 basic orientations (parallel, anti-parallel and perpendicular) and two classes according to whether the active piglet was snout-contacting the other either in front or behind the ear base.


Paper presented at Measuring Behavior 2000, 3rd International Conference on Methods and Techniques in Behavioral Research, 15-18 August 2000, Nijmegen, The Netherlands

© 2000 Noldus Information Technology b.v.