Cameras and Accessories

3D vision system monitors the behavior of pigs

Researchers in Scotland have developed a 3D vision system that is used to autonomously detect the tail position of pigs to alert farmers to when an outbreak of tail biting is imminent, so they can attempt to prevent it from happening.
Nov. 28, 2018
4 min read

Researchers in Scotland have developed a 3D vision system that is used to autonomously detect the tail position of pigs to alert farmers to when an outbreak of tail biting is imminent, so they can attempt to prevent it from happening.

Tail biting in growing pigs starts without warning, and outbreaks of tail biting result in pain and sickness for bitten pigs and economic losses for farmers, especially when infection through tail wounds results in the meat becoming spoiled, according to Scotland’s Rural College (SRUC), which collaborated with

Scottish farm technology company Innovent Technology Ltd, pig supply chain partners including north-east animal feed firm Harbro, and the Agricultural Engineering Precision Innovation Centre (Agri-EPI) on the project.

Furthermore, tail docking of piglets is partly effective at reducing tail biting in later life, but is seen as undesirable mutilation, and its routine use is banned in the European Union, per Council Directive 2008/120/EC. Numerous risk factors exist when it comes to tail biting in growing pigs, and outbreaks can start without warning or obvious cause, making it difficult to manage on farms. Recent research shows that pigs’ behavior changes before a damaging tail biting outbreak starts. Specifically, pigs seem to lower their tails right before a potential incident.

To alert farmers to a potential biting incident, the project team developed an automated system based on 3D cameras to detect tail position. Each pig pen had an IFM O3D301 3D camera oriented to cover around 1/3 of the pen area, located above the feeder, pointing vertically down. This camera uses Time of Flight technology, which sends a pulse of infrared light from an LED 25 times a second, and then records the delay between the pulse and its reach to each pixel. Ethernet cables feed the acquired data from each camera to a fit-PC4 industrial fanless PC fromCompuLab, connected to a broadband internet connection, enabling data download.

Each pen was also equipped with two 2D CCTV bullet cameras fromGamutwith a Sony effio chipset , mounted in the ceiling; one capturing the entire pen, and one capturing above the feeding area where the 3D camera was positioned. These cameras, along with the 3D camera, recorded continuously, 24 hours a day, with video data stored on the hard drive of a PC-based CCTV system from GeoVision.3D and 2D video images were watched simultaneously to validate the 3D data “by eye.”

Proprietary algorithms developed by Innovent Technology Ltd. were used to locate pigs and orient them, according to the academic paper,Automatic early warning of tail biting in pigs: 3D cameras can detect lowered tail posture before an outbreak. For each pig that was present under the camera and standing up, an algorithm was used that locates the tail and measures its angle relative to the body on a scale of 0 to 90°, where 0 is a tail hanging down or tucked against the body so it does not stand out from the curve of the back/rump, and 90 is a tail standing up at 90°.

Validation of the camera setup and algorithm found an accuracy of 73.9% at detecting low vs. not low tails (sensitivity 88.4%, specificity 66.8%). In the tests, 23 groups of 29 pigs per group were reared with non-docked tails under typical commercial conditions over 8 batches. Fifteen groups had tail biting outbreaks, and when this occurred, enhancements were added to the pen and biters and/or victims were removed and treated. 3D data from outbreak groups showed the proportion of low tail detections increased pre-outbreak and declined post-outbreak.

"This research has achieved everything we hoped for. We can automatically measure tail posture, and we’ve proved it can act as an early warning of tail biting,” said lead author Dr. Rick D’Eath from SRUC. “The challenge for us now is to develop this promising technology into a robust on-farm early warning system that works on any pig farm.”

This work will be further developed in a new three-year project calledTailTech, which—as a result of £676,000 in funding fromInnovate UK—will collect data from more diverse pig farms and develop and test a prototype early warning system. Other pig supply partners will also be involved.

View a press release from SRUC.
View the academic paper.
View the project page from SRUC.

Share your vision-related news by contactingJames Carroll,Senior Web Editor, Vision Systems Design

To receive news like this in your inbox, 
click here.

Join ourLinkedIn group | Like us on Facebook | Follow us on Twitter

About the Author

James Carroll

Former VSD Editor James Carroll joined the team 2013.  Carroll covered machine vision and imaging from numerous angles, including application stories, industry news, market updates, and new products. In addition to writing and editing articles, Carroll managed the Innovators Awards program and webcasts.

Sign up for Vision Systems Design Newsletters

Voice Your Opinion!

To join the conversation, and become an exclusive member of Vision Systems Design, create an account today!