Noninvasive Physiological Monitoring

An investigation of the feasibility of using a thermal camera with Python and R to noninvasively gather and process heart rate variability data from domestic pigs. | Created as a capstone project for UT Austin's Anthropology Honors program.

Overview

As a native Texan, I’m no stranger to livestock. Pigs were a big hoot in my high school’s Future Farmers of America (FFA) program. Some time after graduating high school, I began wondering how the meticulous caretaking practices my peers described might be improved with the aid of commercially available technology. I became particularly intrigued by infrared thermal cameras, which appeared to offer myriad ways of assessing mammalian welfare without the need for physical touch. The FFA pigs endured plenty of healthcare assessments that, while accurate and useful, stuck out to me as invasive for the pigs. Of course, where invasive practices prevail, stress is sure to follow. Stress not only wears out an animal’s body but may incite dangerous reactions to human caretakers as well. Noncontact monitoring of physiological metrics reduces these negative effects and reveals new possibilities for monitoring the physiology of wild animals.

Support from the University of Texas at Austin’s Liberal Arts Honors and Anthropology Honors programs made it possible for me to undergo training as an animal caretaker at Central Texas Pig Rescue and gather materials for my project. I took care to purchase the most affordable technology available at the time to test my hypotheses with an eye to making replicability as widely accessible as possible. Using a thermal camera extension for my smartphone, I recorded videos of the well-vascularized backside of the pigs' ears. I wrote Python scripts to preprocess my data and extract relevant information. With the help of the RHRV package in R, I explored the possible ways to convert my processed data into meaningful heart rate variability metrics. Ultimately, my findings pointed to a limited but notable possibility that a cost-effective thermal camera could be used to accurately assess pulse rate in resting domestic pigs.


My Paper

Sorry! Something went wrong loading this document. Feel free to click here to download the PDF file.



Code & Data

The MatLab and shell script files I used for this project as well as some data generated from this project are available on my GitHub page here. Acknowledgements are listed at the beginning of each script. The original video data and cropped video data are available for use upon request.