Skip to main content

Segmentation and tracking of piglets in images


An algorithm was developed for the segmentation and tracking of piglets and tested on a 200-image sequence of 10 piglets moving on a straw background. The image-capture rate was 1 image/140 ms. The segmentation method was a combination of image differencing with respect to a median background and a Laplacian operator. The features tracked were blob edges in the segmented image. During tracking, the piglets were modelled as ellipses initialised on the blobs. Each piglet was tracked by searching for blob edges in an elliptical window about the piglet's position, which was predicted from its previous two positions.

This is a preview of subscription content, access via your institution.


  • Deshazer JA, Moran P, Onyango CM, Randall JM, Schofield CP (1988) Imaging sysems to improve stockmanship in pig production. Silsoe Research Institute, Div. Note DN1459, Wrest Park, Silsoe, Bedford, UK

    Google Scholar 

  • Geers R, Goedseels V, Parduyns G, Nijns P, Wouters P, Bosschaerts L (1990) Integrated control of air and floor temperature in piglet houses: animal and engineering aspects. Ann Zootech 39:19–25

    Google Scholar 

  • Kokuer M, Clark AF (1992) Feature and model tracking for modelbased coding. International Conference on Image Processing and its Applications 354:135–138, 153

    Google Scholar 

  • Mount LE (1968) The climatic physiology of the pig. Edward Arnold, London

    Google Scholar 

  • Peng SL, Medioni G (1988) Spatio-temporal analysis of an image with occlusion. Image-understanding Workshop, Vols 1–2, 105, 433–442

    Google Scholar 

  • Roberts K, Nashman M (1992) Real-time model-based tracking combining spatial and temporal features. J Intell Robotic Syst 5:25–38

    Google Scholar 

  • Schofield CP (1993) Image analysis for non-intrusive weight and activity monitoring of live pigs. 4th International Symposium on Livestock Environment, University of Warwick, ASAE, 2950 Miles Rd, St Joseph, Michigan, USA pp 503–510

    Google Scholar 

  • Van der Stuyft E, Schofield CP, Randall JM, Wambacq P, Goedseels V (1991) Development and application of computer vision systems for use in livestock production. Comput Electronics Agriculture 6:243–265

    Google Scholar 

  • Yang YH, Levine MD (1992) The background primal sketch: an approach for tracking moving objects. Machine Vision Appl 5:17–34

    Google Scholar 

Download references

Author information

Authors and Affiliations


Rights and permissions

Reprints and Permissions

About this article

Cite this article

McFarlane, N.J.B., Schofield, C.P. Segmentation and tracking of piglets in images. Machine Vis. Apps. 8, 187–193 (1995).

Download citation

  • Issue Date:

  • DOI:

Key words

  • Tracking
  • Segmentation
  • Pigs
  • Animals
  • Computer vision