The aim of this study is to develop a method for continuous automated detection of aggressive behaviour
among pigs by means of image processing. Five repetitions of the same experiment were performed. In
each of the experiment, 24 piglets were mixed after weaning from four litters in two pens with 12 piglets
each and captured on video for a total of 60 h. From these video recordings, a dataset containing 150 episodes
with and 150 episodes without aggressive interactions was built through manual labelling. The
Motion History Image was used to gain information about the pigs’ motion and to relate this information
to aggressive interactions. Two features were extracted from the segmented region of the Motion History
Image: the mean intensity of motion and the occupation index. Based on these two features, the Linear
Discriminant Analysis was used to classify aggressive interactions in every episode. Applying leave-oneout
cross-validation, the accuracy of the system was 89.0% with a sensitivity of 88.7% and a specificity of
89.3%. These results show that it is possible to use image analysis in order to automatically detect aggressive
behaviours among pigs.