4___PETI#8870___27-33 Proceedings of Engineering and Technology Innovation, vol. 21, 2022, pp. 27-33 Development of Non-Contact Real-Time Monitoring System for Animal Body Temperature Kuo-Hsiung Tseng 1,* , Meng-Yun Chung 1 , Wei-Hong Jhou 1 , Wei-Jer Chang 2 , Chen-Han Xie 2 1 Department of Electrical Engineering, National Taipei University of Technology, Taiwan 2 MOREPETS Company Limited by Shares, Taiwan Received 09 November 2021; received in revised form 13 February 2022; accepted 14 February 2022 DOI: https://doi.org/10.46604/peti.2022.8870 Abstract Body temperature is an important indicator of health monitoring. However, since animals are covered with fur, it is difficult to obtain their accurate body temperature with the traditional infrared measurement technology. To deal with this problem, this research proposes a non-contact real-time monitoring system using an infrared method combined with object detection. The system is developed based on general infrared thermal imaging technology and an infrared thermal imaging module with an image tracking algorithm. YOLO is used to detect animals, and a thermal imaging camera is used to measure the body surface temperature of animals. The result shows that the proposed system can accurately measure the body temperature of animals without being influenced by animals’ fur. In the future, it can be applied to monitor the body temperature of sick animals in veterinary hospitals. Keywords: animal body temperature sensing, Internet of things, image detection, infrared thermography 1. Introduction Infrared thermometers were developed in the mid-1980s [1-2]. With pyroelectric sensors, infrared thermometers can effectively detect the heat radiation emitted from a target surface and measure the temperature of the surface in a non-contact way [3-4]. Infrared thermometers have been extensively used for body temperature measurement, but their limitation is that they can only conduct close-distance measurement with a small detection range. Infrared thermography is a technique combined with image processing to generate visual images with different colors indicating different temperatures on different parts of the target surface [5-7]. This technique is characterized by remote observation, timeliness, and heat distribution observation. Notably, it has been used in animal medical diagnosis for decades, e.g., the diagnosis for mammals. Mammals generate heat energy by metabolism to maintain constant body temperature [8]. As their skin surface temperature can reflect the condition of tissue metabolism and blood circulation, the lesion of surface inflammation or circulation abnormality can be found when the body temperature is observed to be abnormal. Thus, body temperature is an important index for diagnosing diseases. Many studies attempted to use infrared thermometers to measure the body temperature of animals, including cats, pigs, and cattle [9]. However, due to animals’ fur and physiological structures, the probability of error is quite high when using infrared thermometers, making it difficult to replace conventional thermometers with infrared thermometers. Furthermore, when using conventional thermometers in veterinary clinics, veterinarians have to insert the thermometers into animals’ anuses to measure the core body temperature, making the animals suffer from severe stress and discomfort and even resulting in injuries of the animals or the veterinarians. Moreover, it is impractical to use conventional thermometers for repeated measurement, especially for hospitalized animals that require constant monitoring to check whether there is fever or hypothermia. Hence, there is an urgency to develop a non-contact continuous animal temperature monitoring system to meet the existing clinical need [10]. * Corresponding author. E-mail address: f10473@mail.ntut.edu.tw Tel.: +886-2-27712171#2173; Fax: +886-2-27317187 Advances in Technology Innovation, vol. 21, 2022, pp. 27-33 In addition to the study need and clinical need, there is also a commercial need that motivates the researchers to develop a non-contact monitoring system for measuring the body temperature of animals. Livestock’s commercial value is highly dependent on the health conditions of livestock. However, there is still no effective approach to monitor the health conditions of livestock because of the limitations in fields, manpower, and equipment. Infrared thermography is a possible solution that can monitor animals without direct contact and simultaneously measure the temperature distribution of multiple targets in the field of view [11]. Infrared thermography is free from the effect of ambient light source conditions and thus is highly suitable for animal temperature monitoring, aiding the early detection of infectious diseases. This research uses the infrared method combined with object detection to develop a non-contact real-time monitoring system to accurately measure the body temperature of animals, without being influenced by animals’ fur. In the rest of this article, the research method and measurement equipment used are explained in section 2, the results and discussion are presented in section 3, and the concluding remarks are provided in section 4. 2. Materials and Research Method 2.1. Experimental construction The experimental process of this study is shown in Fig. 1. First, a field (e.g., veterinary hospitals, ranches, or farms) is selected as the site where the experiment is conducted. Then, the type of animal subjects is selected, and the non-contact and contact methods are used to measure the body temperature of animal subjects. After that, the obtained temperature data are compared and sent to a veterinarian and the owners of animal subjects. In this study, a veterinary hospital is chosen as the experimental field, and an adult pet dog is selected as the animal subject. This study performs target detection for image recognition in the early stage [12]. A visible-light/infrared twin-lens module is used for detection, and is combined with an image tracking algorithm for animal temperature monitoring with target tracking and positioning functions. Two groups are set up in this study: a control group (the traditional body temperature measurement conducted by a veterinarian) and an experimental group (the non-contact infrared measurement using the proposed system). An adult pet dog is used for both groups. In the early setup, the compensation for fur interference cannot be regulated accurately, and the module’s precision is adjusted by comparing the data of contact measurement. It must be noted that, unlike human beings, animals cannot tell their conditions. Thus, in this study, the dog subject’ body temperature is initially measured to examine and determine fever or other symptoms. Subsequently, the measured body temperature is transferred via the Internet of Things (IoT) to the computer of the verification domain as the criterion of diagnosis and treatment for the veterinarian. In addition, as the owner of the dog subject is concerned about the status of the dog, instant information is also sent via IoT to the owner’s mobile phone for first-hand updates on the dog’s condition at the hospital [13]. A temperature and humidity sensor is used to detect the dog subject’s internal temperature and humidity, determining whether the subject’s condition is influenced by external factors. Fig. 1 Experimental process Field selection Pet selection Non-contact temperature measurement Contact temperature measurement Data comparison Send message Veterinarian Owner Pet´s state 28 Proceedings of Engineering and Technology Innovation, vol. 21, 2022, pp. 27-33 An FLIR C5 thermal imaging camera is used in this study to measure the body temperature of the dog, as shown in Fig. 2. The specification of the camera is shown in Table 1. The camera has a size of 135 × 85 × 25 mm and is only 0.19 kg, which is suitable for conducting the measurement. It can store more than 5000 images by its internal memory and onboard FLIR Ignite cloud connectivity with Wi-Fi. The infrared sensor provides 160 × 120 (19,200 pixels) images, and can be used under the ambient temperature of -10 to 50°C to measure the subjects having the temperature of -20 to 400°C. The FLIR camera is a long wave infrared (LWIR) camera and receives infrared radiation with a wavelength of 8-14 µ m. Under the atmospheric window, water vapor and carbon dioxide have weak absorption of the radiation. This facilitates the infrared body temperature measurement. With the ambient temperature of 15 to 35°C, the accuracy of measuring the subjects with 0 to 100°C is ±3°C, and the accuracy of measuring the subjects with 100 to 400°C is ±3%. Parameters such as ambient temperature, ambient humidity, and the emissivity of the subjects can be adjusted. The lightness and portability of the camera make it easy to set up experiments. Before each experiment, the environmental parameters (temperature and humidity) of the camera are adjusted according to the indoor temperature and humidity count value. The emissivity of the animal fur can also be set in the range of 0.98-1. Fig. 2 FLIR C5 infrared thermal imaging camera Table 1 Specification of an FLIR C5 thermal imaging camera Model C5 Camera size (L × W × H) 138 × 84 × 24 mm Infrared ray (IR) sensor 160 × 120 (19,200 pixels) Operating temperature range -10 to 50°C (14 to 122°F) Object temperature range -20 to 400°C (-4 to 752°F) Spectral range 8 to 14 µ m Accuracy At ambient temp. 15 to 35°C (59 to 95°F): 0 to 100°C (32 to 212°F): ±3°C (±5.5°F) 100 to 400°C (212 to 752°F): ±3% Company FLIR Country Estonia 2.2. Infrared radiation In spectra, the wavelength exceeding 0.75 µm is called infrared ray (IR). From the wavelength 0.75 µm to the longest wave band, IR can extend to 1000 µm. The wavelength range covered in this section can be divided into three according to the application domains: 0.75-2.5 µm (near-IR), 2.5-25 µm (mid-IR), and above 25 µm (far-IR). 2.2.1. Planck’s law Planck’s law, also known as Planck’s black body radiation law, is a mathematical relationship proposed by a German physicist Max Planck in 1990. It refers to the relationship between the radiance and frequency of electromagnetic radiation emitted from a black body at an arbitrary temperature T [14]. 2.2.2. Wien’s displacement law Wien’s law, also known as Wien’s displacement law, was proposed by Wilhelm Wien. It is a law describing the inverse relationship between the peak wavelength of spectral radiosity of a black body’s electromagnetic radiation and its temperature in physics [15]. The relationship is expressed as Eq. (1). Wien’s displacement law also describes that the hotter an object is, the shorter the radiation wavelength or the higher the radiation frequency is. 29 Advances in Technology Innovation, vol. 21, 2022, pp. 27-33 max b λ T = (1) where λmax is the peak wavelength of radiation (unit: m), and T is the absolute temperature of the black body (unit: K). b is the proportional constant, called Wien’s displacement constant; the value is 2.897 7729 × 10 –3 m· K. 2.2.3. Stefan-Boltzmann law The Stefan-Boltzmann law, also known as Stefan’s law, means that the total energy radiated from the surface of a black body per unit area in unit time (radiosity or energy flux density of object) j* is proportional to the fourth power of thermodynamic temperature T (absolute temperature) of the black body [16]. The relationship is expressed in Eq. (2). * 4 j σT= ε (2) where the radiosity j* has the dimension of power density given in Eq. (3). According to the International System of Units, the standard unit of the radiosity j* is J/(s × m 2 ), i.e., W/m 2 . 2 energy time distance× (3) The standard unit of absolute temperature T is K. ϵ is the radiation coefficient of the black body; if the black body is an absolute black body, then ϵ = 1. The scale factor σ is called Stefan-Boltzmann’s constant or Stefan’s constant. Given that it can be worked out of the known basic physical constants of the nature, it is not considered a basic physical constant. The value of the constant is expressed as Eq. (4). 5 4 8 1 2 4 2 3 2π k σ 5.670400 10 Js m K 15c h − − − −= = × (4) where k is the value of Boltzmann’s constant 1.38064852 × 10 -23 J/K, h is the Planck’s constant 6.62607015 × 10 −34 (J· s), and c is the light velocity in a vacuum with the value of 3.00 ×10 8 m/s. 2.3. Object detection The traditional thermal imaging equipment mostly performs data acquisition for a single object. Thus, the information analysis and processing are local and have low volume computation. To the extent of the information of the whole space, the obtained thermal image information will expand greatly, and the demand for computing resources will grow sharply, becoming the system load [17]. Without an intelligent zed improvement method, the system will fail. Therefore, this project uses the visible-light/infrared twin-lens module and visible light features for recognizing image objects. Meanwhile, target locking is established automatically to reduce the range of image information analysis to improve the excessive operation [18]. This study uses YOLO object detection technology, where the image input to the prediction result of YOLO only depends on one convolutional neural network (CNN). Multiple bounding boxes are predicted simultaneously by using CNN, and the probability of an object is calculated for each box. The object is recognized in the local region compared to the sliding window and region proposals [19]. YOLO aims at the full image in the training and operational phases, paving the way for a better detection effect on the background. The background error detection rate of YOLO is only half of that of a fast region-based convolutional neural network (fast R-CNN). Further, YOLOv4 has better recognition speed and accuracy and less hardware requirement than YOLOv3 [20]. This study employs the Jetson Nano developer edition for development. This edition is characterized by powerful computation capability, lightness, easy disposition, and applicability to mobile equipment. 30 Proceedings of Engineering and Technology Innovation, vol. 21, 2022, pp. 27-33 3. Results and Discussion This study employs one adult dog as the animal subject for non-contact and contact temperature measurements (the contact one is the control group and the non-contact one is the experimental group). For the control group, the body temperature of the adult dog is measured using the rectal thermometer. As can be seen in Table 2, the dog’s body temperature got from the rectal thermometer is higher than the normal human body temperature which is in the range of 36-37°C. For the experimental group, the FLIR C5 thermal imaging camera is used. The eye and abdomen temperatures of the dog are measured at a fixed time in the morning from January 26 2021 to February 02 2021. As shown in Figs. 3-5, the square frame is the measuring area of a thermal imager, and the white point is the center point of the measuring area. The temperatures at the red and blue points are the maximum and minimum temperatures in the measuring area, respectively. In Fig. 3, it is observed that the density of fur distribution can influence the temperatures measured. The red point is the area with sparse fur and the blue point is the area with fur. The maximum temperature measured in the abdomen area occurs in the region covered with sparse fur. Meanwhile, in Fig. 4, the region having the maximum temperature measured on the face is the eye. The eye temperature is different from the abdomen temperature. It can be seen that the difference in fur density affects the value of temperature, as shown in Fig. 5. This is the reason why this study applies the infrared temperature measurement to animals. In addition to the material emissivity, the fur density also causes measurement difficulties and errors. As shown in Fig. 6, it is observed that the eye temperature is approximate to the actual body temperature, and the side temperature is a little lower than the actual body temperature. Table 2 Result of the contact temperature measurement Date Temperature (°C) 2021/1/26 39.4 2021/1/27 39.0 2021/1/28 38.6 2021/1/29 38.7 2021/1/30 38.7 2021/1/31 38.6 2021/2/1 38.7 2021/2/2 39.0 Fig. 3 Flank temperature Fig. 4 Eye temperature Fig. 5 Effect of fur density 24 26 28 30 32 34 36 38 2021/1/26 2021/1/27 2021/1/28 2021/1/29 2021/1/30 2021/1/31 2021/2/1 2021/2/2 T e m p e ra tu re (˚ C ) Date Eye temperature(°C) Abdomen temperature(°C) Fig. 6 Result of the non-contact temperature measurement 31 Advances in Technology Innovation, vol. 21, 2022, pp. 27-33 4. Conclusions In Asian countries (e.g., Taiwan), the number of dogs and cats could reach 3 million in 2020, exceeding the number of children below the age of 15. With the increasing number of dogs and cats, the number of animal hospitals has also been increased to more than 1,700. To ensure that the aging pets receive adequate medical care, the pet owners pay close attention to their pets’ medical service quality. Since the intelligentized monitoring systems can save the labor cost for animal hospistals and thus reduce the medical payments for pet owners, admitting such intelligentized monitoring systems will be the future trend. In clinical scenarios, the body temperature of hopitalized animals need to be continuously monitored by veterinarians. However, when veterinarians employ traditional thermometers to measure the temperature through animals’ anuses, the animals are severely discomforted and the veterinarians may be injured if the animals defend themselves. To deal with this problem, a non-contact continuous animal temperature monitoring system is desired. This study combines non-contact infrared measurement with object detection, and uses an optical lens to conduct the measurement. Specific regions can be extracted by the YOLO algorithm to reduce excessive operation information. The temperatures of the subjects with specific positions can be captured by infrared thermal imaging technology and instantly conveyed to veterinarians. With the proposed system, the risk and inconvenience induced by contact measurement can be avoided. Acknowledgements The authors would like to thank the Ministry of Science and Technology (MOST 109-2622-E-027-033-) for the financial support of this research. Also, the authors would like to thank Mr. Jue-Hao Chen (Department of Electrical Engineering, National Taipei University of Technology, Taiwan) and Yuan Lin Animal Hospital for their kind assistance. Conflicts of Interest The authors declare that there are no conflicts of interest regarding the publication of this study. Statement of Ethical Approval All procedures performed in studies involving animals were in accordance with the ethical standards of the institution or practice at which the studies were conducted. References [1] J. L. Hatfield, “Measuring Plant Stress with an Infrared Thermometer,” HortScience, vol. 25, no. 12, pp. 1535-1538, December 1990. [2] E. J. Sadler, C. R. Camp, D. E. Evans, and J. A. Millen, “Corn Canopy Temperatures Measured with a Moving Infrared Thermometer Array,” Transactions of the American Society of Agricultural Engineers, vol. 45, no. 3, pp. 581-591, 2002. [3] T. Matsukawa, M. Ozaki, T. Nishiyama, M. Imamura, and T. Kumazawa, “Comparison of Infrared Thermometer with Thermocouple for Monitoring Skin Temperature,” Critical Care Medicine, vol. 28, no. 2, pp. 532-536, February 2000. [4] S. Abbasbandy, “Homotopy Analysis Method for Heat Radiation Equations,” International Communications in Heat and Mass Transfer, vol. 34, no. 3, pp. 380-387, March 2007. [5] C. A. Balaras and A. A. Argiriou, “Infrared Thermography for Building Diagnostics,” Energy and Buildings, vol. 34, no. 2, pp. 171-183, February 2002. [6] B. B. Lahiri, S. Bagavathiappan, T. Jayakumar, and J. Philip, “Medical Applications of Infrared Thermography: A Review,” Infrared Physics and Technology, vol. 55, no. 4, pp. 221-235, July 2012. [7] S. Bagavathiappan, B. B. Lahiri, T. Saravanan, J. Philip, and T. Jayakumar, “Infrared Thermography for Condition Monitoring—A Review,” Infrared Physics and Technology, vol. 60, pp. 35-55, September 2013. [8] L. S. Peck, M. S. Clark, S. A. Morley, A. Massey, and H. Rossetti, “Animal Temperature Limits and Ecological Relevance: Effects of Size, Activity, and Rates of Change,” Functional Ecology, vol. 23, no. 2, pp. 248-256, March 2009. 32 Proceedings of Engineering and Technology Innovation, vol. 21, 2022, pp. 27-33 [9] D. M. Newsom, G. L. Bolgos, L. Colby, and J. A. Nemzek, “Comparison of Body Surface Temperature Measurement and Conventional Methods for Measuring Temperature in the Mouse,” Journal of the American Association for Laboratory Animal Science, vol. 43, no. 5, pp. 13-18, September 2004. [10] G. J. Tattersall and V. Cadena, “Insights into Animal Temperature Adaptations Revealed through Thermal Imaging,” The Imaging Science Journal, vol. 58, no. 5, pp. 261-268, July 2010. [11] P. A. Warn, M. W. Brampton, A. Sharp, G. Morrissey, N. Steel, D. W. Denning, et al., “Infrared Body Temperature Measurement of Mice as an Early Predictor of Death in Experimental Fungal Infections,” Laboratory Animals, vol. 37, no. 2, pp. 126-131, April 2003. [12] N. A. Othman and I. Aydin, “A New Deep Learning Application Based on Movidius NCS for Embedded Object Detection and Recognition,” 2nd International Symposium on Multidisciplinary Studies and Innovative Technologies, pp. 1-5, October 2018. [13] T. H. Chung, W. S. Jung, E. H. Nam, J. H. Kim, S. H. Park, and C. Y. Hwang, “Comparison of Rectal and Infrared Thermometry for Obtaining Body Temperature of Gnotobiotic Piglets in Conventional Portable Germ Free Facility,” Asian-Australasian Journal of Animal Sciences, vol. 23, no. 10, pp. 1364-1368, October 2010. [14] J. C. Cuevas and F. J. García-Vidal, “Radiative Heat Transfer,” ACS Photonics, vol. 5, no. 10, pp. 3896-3915, September 2018. [15] J. K. Baird and T. R. King, “A Wien Displacement Law for Impact Radiation,” International Journal of Impact Engineering, vol. 23, no. 1, pp. 39-49, December 1999. [16] W. Shi, J. Cao, Q. Zhang, Y. Li, and L. Xu, “Edge Computing: Vision and Challenges,” IEEE Internet of Things Journal, vol. 3, no. 5, pp. 637-646, October 2016. [17] G. Montambaux, “Generalized Stefan-Boltzmann Law,” Foundations of Physics, vol. 48, no. 4, pp. 395-410, March 2018. [18] Q. Zhu, H. Zheng, Y. Wang, Y. Cao, and S. Guo, “Study on the Evaluation Method of Sound Phase Cloud Maps Based on an Improved YOLOv4 Algorithm,” Sensors, vol. 20, no. 15, Article no. 4314, August 2020. [19] J. M. Zurada, Introduction to Artificial Neural Systems, Saint Paul: West Publishing, 1992. [20] A. Bochkovskiy, C. Y. Wang, and H. Y. M. Liao, “Yolov4: Optimal Speed and Accuracy of Object Detection,” https://arxiv.org/pdf/2004.10934v1.pdf, April 23, 2020. Copyright© by the authors. Licensee TAETI, Taiwan. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY-NC) license (https://creativecommons.org/licenses/by-nc/4.0/). 33