Automatic Health Check in Dairy Farms Using FLIR Thermal Imaging Cameras

Modern farms increasingly resemble factories in their makeup as they become more and more industrialized. The present day farmer spends less time performing menial tasks and more time behind the computer. In these circumstances good automatic monitoring systems are a must to ensure quality and continuity. One company that realizes this is the Linköping, Sweden, based Agricam, which has developed an automatic monitoring system for dairy cows using FLIR thermal imaging cameras.

"A big problem in present day dairy farming is a disease called Mastitis", explains Ellinor Eineren, founder of Agricam. "Mastitis is a persistent inflammation in the cow's udders. This potentially fatal mammary gland infection is the most common disease in dairy cattle. It can be treated very easily if diagnosed in an early stage. Usually the infected cow will simply be milked more often to ensure that there is little to no milk left in the udder for the bacteria that cause the infection to replicate in. This allows the animal's natural defense system to get rid of the bacterial intruder before the Mastitis becomes clinical."

With the old-fashioned manual milking methods diagnosing developing Mastitis was a relatively easy task, according to Eineren. "This disease can be identified by a rise in temperature in the udder caused by increased blood flow, which is a common sign of inflammation. The farmer would have plenty of hands-on experience in detecting these symptoms. In modern times this is not so easy, as the milking is nowadays often done by milking machines, rather than human hands."

The FLIR A310 thermal imaging camera provides fully radiometric thermal footage at a resolution of 320 x 240 pixels.
Automatic analysis software uses advanced algorithms to detect developing Mastitis in thermal images of cow udders.

Discarded milk

As the milking is no longer done by hand in most modern dairy farms, the farmer does not feel the increased temperature of the udders that warns of developing Mastitis. "This is a big problem for the milking industry. Mastitis causes pain and general discomfort for the animal and it has to be treated with antibiotics. This not only leads to veterinary costs. Due to strict European rules the milk has to be discarded until all of the antibiotic drug residues have left the animal's system."

Estimates vary, but it is certain that the total annual cost of Mastitis in dairy cows for European farmers runs in tens of millions. "I was shocked to find that the average dairy farmer is currently losing 20,000 to 60,000 Euros each year due to Mastitis. That is a large sum of money. We therefore set out to find a solution for this problem: an automatic early detection system based on thermal imaging technology."

Inflammation detection tool

Veterinarians all over the world use handheld thermal imaging cameras to detect inflammations in domesticated animals. From horses and cows to dogs and cats, thermal imaging cameras are becoming more and more accepted by animal health professionals as a diagnostic tool for inflammation and other health issues. "But in those cases there has to be a human operator present to manually record the images and to analyze the thermographic data. To my knowledge there is no system available that can do this automatically."

That is why Eineren and the company Agricam developed a patented system called CaDDi, an abbreviation of Cattle Disease Diagnostics. "We cooperated with the Linköping based FLIR products distributor Termisk Systemteknik to test the feasibility of such a product. The first thing we did was to determine whether thermal imaging cameras can detect Mastitis by manually recording thermal images of cow udders with a FLIR P660 thermal imaging camera and analyzing the resulting thermal images in cooperation with veterinarians from the Swedish National Veterinary Institute."

To protect the FLIR A310 against the adverse conditions in a dairy farm the cameras are mounted in a waterproof housing with automatic window cleaning system.

Automatic analysis with advanced algorythms

"The next step was to build a system that could do that automatically", Eineren continues. "But that was easier said than done. Not every warm area in the thermal image indicates an inflammation. Animals' body temperatures fluctuate naturally and there also are many subtle differences between thermal patterns of individual animals. We therefore needed advanced analysis to prevent unwanted alarms. In that area we greatly benefited from the expertise of our partner Termisk Systemteknik."

"Here at Termisk Systemteknik we have over three decades of experience in all sorts of image analysis, including the analysis of thermal images", says Termisk Systemteknik's CEO Stefan Sjökvist. "But this particular application was still a difficult challenge, for we needed to take into account the particular thermal properties of each individual animal to be able to achieve an accurate result."

FLIR A310 thermal imaging camera

Sjökvist and his colleagues installed two FLIR A310 thermal imaging cameras in rugged waterproof housings at the sides of the milking machine in a dairy farm near Linköping. "With a thermal sensitivity of 50mK and a resolution of 320 x 240 pixels the FLIR A310 thermal imaging cameras provide exactly the kind of detailed images and thermal data that we need for this application", explains Sjökvist.

Ellinor Eineren, founder of Agricam, demonstrates the use of thermal imaging cameras for the early detection of Masitis in dairy cows.

These two FLIR A310 thermal imaging cameras recorded thermal images of the dairy cow udders for a period of six months. Using the identification system with RIFD collars that is part of the automatic milking machine a database of thermal images was created for each individual cow. "Using that database the software determines the normal thermal patterns of each individual animal. By comparing each new reading to the earlier recorded data the system can now accurately detect the type of thermal anomalies that indicate Mastitis. And the accuracy of this self learning system will improve as the database expands."

The two FLIR A310 thermal imaging cameras record images of the cow's udder from both sides.

Detecting other health issues

According to Sjökvist there are plans to expand the system to other health issues. "The technology should be able to detect a wide variety of health issues, such as other types of inflammation, nerve damage, skeletal problems or injuries, even before the animals exhibit any clinical symptoms." Eieren agrees. "The product we currently market is CaDDi Mastitis, but in the future modules for other diseases and for other animals will be developed. We work closely with veterinarians from the Swedish National Veterinary Institute to verify the accuracy of all our present and future modules."

Comparing thermal imaging suppliers

"In an early stage of concept development we compared the thermal imaging products available on the market today, but we soon learned that there is no other thermal imaging supplier that provides solutions with the same level of performance while remaining as cost effective as the thermal imaging solutions offered by FLIR Systems."

Related Articles