Pig herd monitoring and undesirable tripping and stepping prevention

Ruta Gronskyte, Line Katrine Harder Clemmensen, Marchen Sonja Hviid, Murat Kulahci

Research output: Contribution to journalJournal articleResearchpeer-review


Humane handling and slaughter of livestock are of major concern in modern societies. Monitoring animal wellbeing in slaughterhouses is critical in preventing unnecessary stress and physical damage to livestock, which can also affect the meat quality. The goal of this study is to monitor pig herds at the slaughterhouse and identify undesirable events such as pigs tripping or stepping on each other. In this paper, we monitor pig behavior in color videos recorded during unloading from transportation trucks. We monitor the movement of a pig herd where the pigs enter and leave a surveyed area. The method is based on optical flow, which is not well explored for monitoring all types of animals, but is the method of choice for human crowd monitoring. We recommend using modified angular histograms to summarize the optical flow vectors. We show that the classification rate based on support vector machines is 93% of all frames. The sensitivity of the model is 93.5% with 90% specificity and 6.5% false alarm rate. The radial lens distortion and camera position required for convenient surveillance make the recordings highly distorted. Therefore, we also propose a new approach to correct lens and foreshortening distortions by using moving reference points. The method can be applied real-time during the actual unloading operations of pigs. In addition, we present a method for identification of the causes leading to undesirable events, which currently only runs off-line. The comparative analysis of three drivers, which performed the unloading of the pigs from the trucks in the available datasets, indicates that the drivers perform significantly differently. Driver 1 has 2.95 times higher odds to have pigs tripping and stepping on each other than the two others, and Driver 2 has 1.11 times higher odds than Driver 3. (C) 2015 Elsevier B.V. All rights reserved.
Original languageEnglish
JournalComputers and Electronics in Agriculture
Issue numberNovember
Pages (from-to)51-60
Publication statusPublished - 2015


  • Abnormal behavior detection
  • Animal welfare
  • Optical flow
  • Pig unloading
  • Video analysis


Dive into the research topics of 'Pig herd monitoring and undesirable tripping and stepping prevention'. Together they form a unique fingerprint.

Cite this