Veterinary animal body temperature detection method and system based on infrared image recognition
By constructing a three-dimensional observation model to correct infrared radiation and synthesizing a thermal gradient vector field, the problem of temperature data distortion in body temperature detection in existing technologies has been solved, enabling accurate detection of animal body temperature and lesion localization, and improving the reliability and accuracy of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU XIANGYUAN TECH CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-04-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing veterinary animal body temperature detection technologies ignore the significant absorption and scattering of infrared radiation by the hair layer, and do not take into account the complex curved surface geometry of the body and the differences in observation angles, resulting in distorted temperature data, making it impossible to accurately identify deep metabolic heat sources, and easily leading to missed detections or misjudgments.
By constructing a high-precision three-dimensional observation model, correcting the infrared radiation intensity value, generating a corrected temperature distribution matrix, synthesizing the body surface thermal gradient vector field, calculating the cumulative divergence map of heat flow, and combining it with the threshold for determining the lesion heat source, accurate detection of animal body temperature can be achieved.
It significantly improves the reliability of body temperature detection data in complex body surface environments, accurately locates hidden lesion areas, enhances the ability to capture weak metabolic pyrogen signals, and suppresses random background noise interference.
Smart Images

Figure CN121890958A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method and system for detecting the body temperature of veterinary animals based on infrared image recognition. Background Technology
[0002] The field of computer vision technology is a technology that uses computer systems to acquire, analyze and understand targets in images or videos. It typically analyzes the appearance or physical state of the observed object based on pixel distribution, grayscale changes or thermal radiation characteristics, forming an image-based information acquisition and judgment technology system in scenarios such as industrial inspection, medical monitoring, and agricultural breeding.
[0003] Among them, the animal body temperature detection method for veterinary use refers to the process of collecting infrared thermal images of the animal's body surface through infrared imaging equipment during veterinary diagnosis and treatment or animal health monitoring, and then distinguishing the animal's body surface area according to the temperature value distribution corresponding to each pixel in the image. Usually, preset body surface locations such as the head, ear base, and abdomen are selected as temperature measurement areas. The animal's body temperature status is determined by reading, comparing and recording the temperature pixels in this area.
[0004] Current technologies in veterinary diagnosis typically rely solely on infrared devices to collect surface radiation intensity and make judgments based on two-dimensional pixel values of preset locations. This intuitive reading method ignores the significant absorption and scattering of infrared radiation by the animal's hair layer, resulting in the energy received by the detector failing to accurately reflect the thermodynamic state of the skin surface. Furthermore, it does not consider the directional attenuation of radiation caused by the complex curved geometry of the body surface and differences in observation angles, leading to severe distortion of temperature data in edge areas or areas with high curvature. Simply relying on absolute temperature difference comparisons of static images lacks in-depth analysis of the dynamic heat transfer characteristics and cannot effectively eliminate interference from environmental thermal noise or non-pathological hot spots on the body surface, making it difficult to accurately identify deep metabolic heat sources and causing missed detections or misdiagnoses. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a method and system for detecting the body temperature of veterinary animals based on infrared image recognition.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a veterinary animal body temperature detection method based on infrared image recognition, comprising the following steps: S1: Obtain the original infrared radiation intensity image sequence of the animal's body surface area facing the animal's body surface area and the camera imaging calibration parameters, establish the three-dimensional spatial coordinate system of the camera optical center, and extract the geometric observation feature parameters of the animal's body surface under the coordinate system; S2: Based on the geometric observation feature parameters of the animal body surface, the infrared radiation hair layer path extension factor is retrieved from the preset path extension factor value comparison table, the infrared radiation intensity value is corrected, and a corrected temperature distribution matrix is generated. S3: Based on the corrected temperature distribution matrix, set the horizontal and vertical vector components of the animal's surface thermal gradient vector to synthesize the surface thermal gradient vector field; S4: Determine the scalar value of the spatial divergence of the animal's body surface heat flow based on the thermal gradient vector field of the body surface, extract the positive spatial divergence value of the animal's body surface heat flow corresponding to each pixel in the multi-frame original infrared radiation intensity image sequence of the animal's body surface and perform an accumulation operation to construct a heat flow cumulative divergence map. S5: Compare the heat flow cumulative divergence map with the preset lesion heat source determination threshold, determine the coordinates of the target metabolic heat production area and map it into the corrected temperature distribution matrix, and calculate the average temperature to generate lesion location and body temperature detection results.
[0007] As a further aspect of the present invention, the geometric observation feature parameters of the animal body surface include the cosine value of the infrared ray incident angle and the local radius of curvature of the animal body surface; the corrected temperature distribution matrix includes the Celsius temperature value obtained by compensation and conversion through the inverse attenuation recovery operator; the body surface thermal gradient vector field includes the horizontal vector component and the vertical vector component of the animal body surface thermal gradient vector; the heat flow cumulative divergence map includes the heat flow cumulative divergence value obtained by performing numerical accumulation operation on the same pixel coordinate position; and the lesion localization and body temperature detection results include the coordinates of the target metabolic heat production area covered by the independent target divergence connected region and the average temperature of the lesion area.
[0008] As a further aspect of the present invention, the steps for obtaining the geometric observation feature parameters of the animal body surface are specifically as follows: S111: Acquire the original infrared radiation intensity image sequence of the animal's body surface area by using an infrared thermal imaging acquisition device, call the preset camera imaging calibration parameters to establish the camera optical center three-dimensional space coordinate system, and use the camera imaging calibration parameters to project and map the two-dimensional plane coordinates of the pixels in the original infrared radiation intensity image sequence of the animal's body surface to the spatial position under the camera optical center three-dimensional space coordinate system, thereby obtaining the three-dimensional space coordinates of the animal's body surface. S112: Calculate the unit normal vector of the animal surface point corresponding to each of the three-dimensional spatial coordinates of the animal body surface one by one. Based on the directional change of the unit normal vector of the animal surface point in the local neighborhood centered on the current three-dimensional spatial coordinates of the animal body surface, calculate the local radius of curvature of the animal body surface. Perform a reciprocal operation on the local radius of curvature of the animal body surface to determine it as the reciprocal of the local radius of curvature of the animal body surface. S113: Construct the observation line vector pointing from the camera's optical center to the animal's three-dimensional spatial coordinates, calculate the dot product of the observation line vector and the unit normal vector of the animal's surface point to obtain the cosine value of the infrared ray incident angle, and combine it with the reciprocal of the local curvature radius of the animal's surface to generate the geometric observation feature parameters of the animal's surface.
[0009] As a further aspect of the present invention, the step of obtaining the corrected temperature distribution matrix specifically includes: S211: Extract the cosine of the infrared ray incident angle and the reciprocal of the local curvature radius of the animal body surface from the geometric observation feature parameters of the animal body surface as index coordinates, and search for the corresponding infrared ray penetration path magnification in the preset path extension factor value comparison table to determine the infrared ray hair layer path extension factor. S212: Construct an inverse attenuation recovery operator based on Beer-Lambert's law, with the infrared ray hair layer path extension factor as the exponent. Substitute the infrared radiation intensity values in the original infrared radiation intensity image sequence of the animal body surface into the inverse attenuation recovery operator to perform compensation operations and obtain the compensated infrared radiation intensity values. S213: Convert each of the compensated infrared radiation intensity values in the original infrared radiation intensity image sequence of the animal's body surface into Celsius temperature values, and construct a corrected temperature distribution matrix.
[0010] As a further aspect of the present invention, the step of obtaining the thermal gradient vector field of the body surface specifically includes: S311: Based on the row and column arrangement structure of pixel data in the corrected temperature distribution matrix, calculate the numerical difference between each temperature value in the corrected temperature distribution matrix and its adjacent temperature value in the horizontal direction along the horizontal coordinate axis, and divide it by the corresponding physical coordinate spacing to obtain the derivative value of the temperature spatial distribution gradient in the horizontal direction, and set it as the horizontal vector component of the animal body surface thermal gradient vector. S312: Based on the row and column arrangement structure of pixel data in the corrected temperature distribution matrix, calculate the numerical difference between each temperature value in the corrected temperature distribution matrix and its adjacent temperature value in the vertical direction along the vertical coordinate axis, and divide it by the corresponding physical coordinate spacing to obtain the derivative value of the temperature spatial distribution gradient in the vertical direction, and set it as the vertical vector component of the animal body surface thermal gradient vector. S313: The horizontal vector component and the vertical vector component of the animal's body surface thermal gradient vector are vector synthesized to construct a two-dimensional vector corresponding to each temperature value in degrees Celsius, thus obtaining the body surface thermal gradient vector field.
[0011] As a further aspect of the present invention, the step of obtaining the heat flux cumulative divergence map specifically includes: S411: Based on the surface thermal gradient vector field, calculate the partial derivatives of the horizontal vector component along the horizontal coordinate axis and the partial derivatives of the vertical vector component along the vertical coordinate axis, and calculate the scalar value of the spatial divergence of the animal's surface heat flux based on the two partial derivatives. S412: Extract the scalar value of the spatial divergence of the animal's body surface heat flow corresponding to the sequence of multiple frames of original infrared radiation intensity images of the animal's body surface, filter the positive divergence values of the spatial divergence of the animal's body surface heat flow that are greater than zero, and generate a sequence of multiple frames of positive spatial divergence of the animal's body surface heat flow. S413: Perform numerical accumulation operation on the scalar sequence of spatial divergence of heat flow on the surface of the animal in multiple frames at the same pixel coordinate position, count the total heat flow divergence of the same pixel coordinate position in the observation time of multiple frames, and reorganize the accumulated value corresponding to each pixel coordinate position into a two-dimensional image form to obtain the heat flow cumulative divergence map.
[0012] As a further aspect of the present invention, the steps for obtaining the lesion localization and body temperature detection results are specifically as follows: S511: Compare each heat flow cumulative divergence value in the heat flow cumulative divergence map with a preset lesion heat source determination threshold, filter pixel coordinates whose heat flow cumulative divergence values are greater than the lesion heat source determination threshold, determine the adjacency relationship of each pixel coordinate and merge adjacent pixel coordinates to generate a target divergence connected region. S512: Extract the set of pixel coordinates covered by the target divergence connected region as the coordinates of the target metabolic heat production region, and map it to the corrected temperature distribution matrix. Index and extract all corresponding Celsius temperature values in the set of pixel coordinates to generate a set of Celsius temperature values. S513: Calculate the average value of the set of Celsius temperature values corresponding to the coordinates of the target metabolic heat production area, set it as the average temperature of the lesion area, and combine it with the coordinates of the target metabolic heat production area to generate the lesion location and body temperature detection results.
[0013] A veterinary animal body temperature detection system based on infrared image recognition, the system comprising: The animal surface observation module acquires the original infrared radiation intensity image sequence of the animal surface area facing the animal surface and the camera imaging calibration parameters, establishes a three-dimensional spatial coordinate system of the camera optical center, and extracts the geometric observation feature parameters of the animal surface in the coordinate system. The infrared temperature correction module, based on the geometric observation feature parameters of the animal's body surface, simultaneously retrieves the infrared radiation hair layer path extension factor from a preset path extension factor value lookup table, corrects the infrared radiation intensity value, and generates a corrected temperature distribution matrix. The body surface thermal gradient construction module sets the horizontal and vertical vector components of the animal's body surface thermal gradient vector according to the corrected temperature distribution matrix, and synthesizes the body surface thermal gradient vector field. The heat flux divergence accumulation module determines the scalar value of the spatial divergence of the animal's body surface based on the surface thermal gradient vector field, extracts the positive spatial divergence value of the animal's body surface corresponding to each pixel in the multi-frame original infrared radiation intensity image sequence of the animal's body surface and performs an accumulation operation to construct a heat flux accumulation divergence map. The lesion localization and body temperature calculation module compares the cumulative heat flow divergence map with the preset lesion heat source determination threshold, determines the coordinates of the target metabolic heat production area and maps it to the corrected temperature distribution matrix, and calculates the average temperature to generate lesion localization and body temperature detection results.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, a high-precision three-dimensional observation model is constructed to accurately quantify the microscopic curvature of the body surface and the viewing angle. Combined with the physical transmission path extension mechanism of light in the hair layer medium, a correction factor is obtained by using bilinear interpolation and an inverse attenuation recovery model is constructed. This mathematically compensates for the radiation energy loss caused by hair occlusion and geometric projection, restoring the true thermodynamic distribution of the skin surface. A thermal gradient vector field and divergence calculation logic with energy dissipation constraints are introduced to deeply analyze the spatial divergence characteristics of heat flow in biological tissues. Multi-frame temporal cumulative operation is used to enhance weak metabolic heat source signals and suppress random background noise, achieving keen capture and accurate positioning of heat flow dynamics in hidden lesion areas. This significantly improves the data reliability of body temperature detection and pathological screening in complex body surface environments. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the workflow of the present invention; Figure 2 This is a flowchart of the process for extracting geometric observation feature parameters of animal body surface according to the present invention; Figure 3 This is a flowchart illustrating the generation process of the temperature distribution correction matrix in this invention. Figure 4 This is a flowchart illustrating the synthesis process of the thermal gradient vector field on the body surface in this invention. Figure 5 This is a flowchart illustrating the construction process of the cumulative heat flux divergence map of the present invention. Figure 6 This is a flowchart for generating lesion localization and body temperature detection results in this invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0017] Please see Figure 1This invention provides a technical solution for detecting the body temperature of veterinary animals based on infrared image recognition, comprising the following steps: S1: Obtain the original infrared radiation intensity image sequence of the animal's body surface area facing the animal's body surface area and the camera imaging calibration parameters, establish the three-dimensional spatial coordinate system of the camera optical center, and extract the geometric observation feature parameters of the animal's body surface under the coordinate system; S2: Based on the geometric observation characteristics of the animal's body surface, the infrared radiation hair layer path extension factor is retrieved from the preset path extension factor value comparison table, the infrared radiation intensity value is corrected, and a corrected temperature distribution matrix is generated. S3: Based on the correction temperature distribution matrix, set the horizontal and vertical vector components of the animal's surface thermal gradient vector to synthesize the surface thermal gradient vector field; S4: Determine the scalar value of the spatial divergence of the animal's body surface heat flow based on the surface thermal gradient vector field, extract the positive spatial divergence value of the animal's body surface heat flow corresponding to each pixel in the multi-frame original infrared radiation intensity image sequence of the animal's body surface, perform an accumulation operation, and construct a heat flow cumulative divergence map. S5: Compare the cumulative heat flow divergence map with the preset lesion heat source determination threshold, determine the coordinates of the target metabolic heat production area and map it to the corrected temperature distribution matrix, and calculate the average temperature to generate lesion location and body temperature detection results.
[0018] The geometric observation parameters of the animal body surface include the cosine value of the infrared ray incident angle and the local curvature radius of the animal body surface. The corrected temperature distribution matrix includes the Celsius temperature value obtained by compensation and conversion through the inverse attenuation recovery operator. The body surface thermal gradient vector field includes the horizontal vector component and the vertical vector component of the animal body surface thermal gradient vector. The heat flow cumulative divergence map includes the heat flow cumulative divergence value obtained by performing numerical accumulation operation on the same pixel coordinate position. The lesion localization and body temperature detection results include the coordinates of the target metabolic heat production area covered by the independent target divergence connected region and the average temperature of the lesion area.
[0019] Please see Figure 2 The specific steps for obtaining geometric observational characteristic parameters of animal body surfaces are as follows: S111: Acquire the original infrared radiation intensity image sequence of the animal's body surface area by using an infrared thermal imaging acquisition device, call the preset camera imaging calibration parameters to establish the camera optical center three-dimensional space coordinate system, and use the camera imaging calibration parameters to project and map the two-dimensional plane coordinates of the pixels in the original infrared radiation intensity image sequence of the animal's body surface to the spatial position under the camera optical center three-dimensional space coordinate system, thereby obtaining the three-dimensional space coordinates of the animal's body surface. First, the process starts and integrates photon energy across the animal's body surface on the veterinary examination table within its field of view within a preset integration time. This generates a two-dimensional digital image matrix containing the original radiation intensity information. During this process, the infrared detector's focal plane array needs to be corrected for non-uniformity to eliminate fixed pattern noise. Then, the process calls upon camera imaging calibration parameters pre-obtained using the Zhang Zhengyou calibration method. These parameters are obtained by taking more than 20 images of a black-and-white checkerboard calibration board at different angles using an infrared camera, extracting the corner pixel coordinates, solving the homography matrix constraint equation, and using a maximum likelihood estimation optimization algorithm to calculate the camera's intrinsic parameter matrix (including focal length and principal point coordinates) and the extrinsic parameter matrix (rotation matrix and translation vector) for each image. The process utilizes the inverse projection logic of the pinhole camera imaging model. It takes the horizontal and vertical coordinates of each pixel on the two-dimensional image plane as input, combines this with depth information synchronously acquired by a depth sensor or a preset reference surface model, and maps the two-dimensional pixel coordinates to a three-dimensional Cartesian coordinate system with the camera's optical center as the origin through matrix inverse operations and coordinate rotation and translation transformations. This allows for the calculation of the precise position data of the corresponding pixel in three-dimensional space, i.e., obtaining the three-dimensional spatial coordinates of the animal's body surface. For example, if the coordinates of a pixel on the image plane are 320 x 240 and 1500 mm, after correction using the focal length and principal point offset parameters of the intrinsic parameter matrix, and combined with spatial transformation operations using the rotation matrix and translation vector of the extrinsic parameter matrix, the coordinates of this point in the camera coordinate system are determined to be -200 mm in the X-axis direction, 150 mm in the Y-axis direction, and 1500 mm in the Z-axis direction.
[0020] S112: Calculate the unit normal vector of the animal surface point corresponding to the three-dimensional spatial coordinates of each animal surface one by one. Based on the directional change of the unit normal vector of the animal surface point in the local neighborhood centered on the current three-dimensional spatial coordinates of the animal surface, calculate the local radius of curvature of the animal surface. Perform a reciprocal operation on the local radius of curvature of the animal surface to determine the reciprocal of the local radius of curvature of the animal surface. The process obtains the three-dimensional spatial coordinates of each animal's body surface and its adjacent coordinates within its local neighborhood. First, principal component analysis is used to calculate the tangent plane corresponding to each coordinate point, thereby determining the unit normal vector of each point on the animal's body surface. To accurately describe the influence of the body surface's micro-geometry on thermal radiation transmission, a discrete curvature estimation algorithm based on weighted angle differences is introduced. This algorithm considers the weighted differences in the contribution of spatial distances between different neighboring points and the center point to curvature, constructing a weighted average curvature calculation model. The process sets the spatial coordinates of the center point as... Its corresponding unit normal vector is , and a local neighborhood of the center point is selected. The nth adjacent point, of which the nth The spatial coordinates of the adjacent points are The corresponding unit normal vector is The process calculates the angle between the unit normal vector of the center point and the unit normal vector of each adjacent point, and assigns Gaussian weights based on the spatial Euclidean distance. This weight value decreases with increasing distance to ensure that the curvature feature focuses on small local changes. The process calculates the reciprocal of the local curvature radius of the animal's body surface using the following formula. : , in the formula, This represents the reciprocal of the calculated local radius of curvature of the animal's body surface, with the dimension of the reciprocal of length. The larger the value, the more significant the surface curvature. When the surface is flat, the value approaches 0. This represents the total number of adjacent points participating in the calculation within the local neighborhood. It is usually selected as the number of valid points within a 3x3 or 5x5 neighborhood centered on the center point. The index number of the adjacent point; For the first The distance weight coefficients corresponding to each adjacent point are set based on the Gaussian function. ,in The scale parameter for controlling the weight decay rate is set based on the spatial resolution of the infrared camera and the preset minimum resolvable feature size. This represents the dot product operation between the center point normal vector and the normal vectors of adjacent points; It is an inverse cosine function used to obtain the angle in radians between normal vectors; Indicates the coordinates of the center point and the first The Euclidean distance between the coordinates of adjacent points. For example, in actual calculations, the center point is selected. The coordinates are (0, 0, 0), and the normal vector is... Given (0, 0, 1), select an adjacent vertex. The coordinates are (1, 0, 0), and the distance is... It is 1 millimeter. If there is a slight bend at this point, the normal vector... The value is (0.05, 0, 0.99875). At this point, the dot product of the center point normal vector and the normal vectors of adjacent points is... The corresponding included angle Approximately 0.05 radians. Set the weighting coefficient. The value is 0.9. Substitute the data into the formula to calculate: The calculation result, accurate to 0.05 millimeters, quantifies the curvature of the body surface at a microscale. The numerical result of 0.05 indicates that there is a certain degree of protrusion structure on the surface at this location, which will significantly increase the path length of infrared rays penetrating the hair layer. This parameter is directly used for subsequent path extension factor retrieval.
[0021] S113: Construct the observation line vector from the camera optical center to the three-dimensional spatial coordinates of the animal's body surface, calculate the dot product of the observation line vector and the unit normal vector of the animal's body surface point to obtain the cosine value of the infrared ray incident angle, and combine it with the reciprocal of the local curvature radius of the animal's body surface to generate the geometric observation feature parameters of the animal's body surface. The process involves subtracting the corresponding components of the camera's optical center coordinates from the three components of the animal's three-dimensional spatial coordinates (since the camera's optical center is at the origin of its own coordinate system, this is subtracted as 0), and then normalizing the resulting vector to a magnitude of 1. This determines the direction of the ray pointing from the camera to the animal's surface. Next, the process performs a dot product operation between this observation line-of-sight vector and the unit normal vector of the animal's surface points calculated in the previous steps. This involves multiplying the components of the two vectors along the X, Y, and Z axes respectively, and then summing the three products. The scalar result of this dot product operation is the cosine of the infrared ray incident angle, which directly represents the angle between the observation angle and the surface normal. Finally, the process pairs the calculated cosine of the infrared ray incident angle with the reciprocal of the local radius of curvature of the animal's surface obtained in the previous step to form a two-dimensional feature vector containing both geometric angle and surface morphology information, thus generating the geometric observation feature parameters of the animal's surface. For example, if the observation line vector is (0.5, 0, 0.866) and the surface normal vector is (0, 0, 1), then the dot product operation is performed: 0.5×0 + 0×0 + 0.866×1 = 0.866. This result, 0.866, is the cosine of the 30-degree incident angle. This value, together with the reciprocal of the radius of curvature (0.05) calculated in the previous step, constitutes the characteristic parameter (0.866, 0.05), which is used for subsequent thermal radiation path correction.
[0022] Please see Figure 3 The specific steps for obtaining the corrected temperature distribution matrix are as follows: S211: Extract the cosine of the infrared ray incident angle and the reciprocal of the local curvature radius of the animal body surface from the geometric observation feature parameters of the animal body surface as index coordinates, and search for the corresponding infrared ray penetration path magnification in the preset path extension factor value comparison table to determine the infrared ray hair layer path extension factor. Feature parameters including the cosine of the infrared incident angle and the reciprocal of the local radius of curvature of the animal's body surface are extracted and used as index keys for bilinear interpolation, which are then retrieved from a pre-defined path extension factor numerical comparison table. This comparison table is constructed based on surface sample data of animals of different species, locations, and with varying densities of hair layers. Precise experimental measurements were conducted to determine the actual infrared penetration depth under different combinations of surface curvature radii and infrared incident angles. The measured penetration depth was compared with the standard depth for perpendicular incident on a flat surface, and the ratio was calculated as the path multiplier. These ratios were then organized into a discretized numerical matrix. The process involves finding the four nearest nodes in the horizontal and vertical directions based on the input cosine and reciprocal radius of curvature. If the input value lies between these nodes, bilinear interpolation is performed to obtain the precise multiplier value, which is determined as the infrared hair layer path extension factor. For example, when the cosine of the input infrared ray incident angle is 0.866 and the reciprocal of the local radius of curvature of the animal's body surface is 0.05, the process first locates the columns corresponding to the cosine values of 0.8 and 0.9, and the rows corresponding to the reciprocals of the radii of curvature of 0.04 and 0.06. It then extracts the preset factor values at these four intersection points, assuming they are 1.18, 1.15, 1.22, and 1.19 respectively (the values increase with increasing curvature and angle). Through bilinear interpolation, in this example, it directly matches the accurate value recorded in the table, namely, the infrared ray hair layer path extension factor is 1.20. This numerical result indicates that, due to the tilt of the observation angle and surface curvature, the actual hair layer path penetrated by infrared rays is 1.2 times that in the vertical state.
[0023] S212: Based on Beer-Lambert's law, an inverse attenuation recovery operator with the infrared ray hair layer path extension factor as the exponent is constructed. The infrared radiation intensity values in the original infrared radiation intensity image sequence of the animal body surface are substituted into the inverse attenuation recovery operator to perform compensation operation and obtain the compensated infrared radiation intensity values. Based on the physical mechanism of radiation attenuation described by the Beer-Lambert law, an inverse attenuation recovery model is constructed. This model uses the base of the natural logarithm (a constant e, approximately 2.718) as its base, and the product of the infrared ray path extension factor in the hair layer, a preset attenuation coefficient per unit of hair layer thickness, and the thickness of the hair layer on the animal's surface as a positive exponential term to construct the inverse attenuation recovery operator. The preset attenuation coefficient per unit of hair layer is obtained by collecting infrared thermograms of standard locations of a specific animal breed in a healthy state and true temperature thermograms of the skin after hair removal. The trend data of radiation intensity attenuation with increasing hair thickness in multiple samples are statistically analyzed. A negative exponential attenuation curve is fitted using the least squares method to calculate the average attenuation coefficient per unit thickness of hair layer. The process multiplies the grayscale value or radiant flux value of the corresponding pixel in the original infrared radiation intensity image sequence of the animal's surface by this inverse attenuation recovery operator, performing a compensation calculation. This step aims to mathematically offset the radiation energy loss caused by the hair layer and the observation angle, restoring the true radiation intensity of the animal's skin surface. For example, if the original infrared radiation intensity value is 1000 analog-to-digital quantization (ADU) values, the calculated path extension factor is 1.20, the preset unit attenuation coefficient is 0.2, and the corresponding hair layer thickness is 1.0 (normalized equivalent length unit), then first calculate the exponent term: 1.20 × 0.2 × 1.0 = 0.24. Next, calculate the operator value: e^0.24 ≈ 1.271, and perform the compensation multiplication: 1000 × 1.271 = 1271. The resulting compensated infrared radiation intensity value is 1271 analog-to-digital quantization (ADU) values.
[0024] S213: Convert each compensated infrared radiation intensity value in the original infrared radiation intensity image sequence of the animal body surface into a Celsius temperature value, and construct a corrected temperature distribution matrix; The process of converting each compensated infrared radiation intensity value in the original infrared radiation intensity image sequence of the animal's body surface into a Celsius temperature value is as follows: Call the pre-stored infrared emissivity parameters of the animal's body surface and the Stefan-Boltzmann physical constant; The radiant flux ratio is obtained by dividing the compensated infrared radiation intensity value by the product of the animal's infrared emissivity parameter and the Stefan-Boltzmann physical constant. Perform a fourth square root operation on the radiant flux ratio to obtain the Kelvin absolute temperature value at the corresponding pixel location; Subtract the preset Kelvin to Celsius conversion constant from the Kelvin absolute temperature scale value to obtain the Celsius temperature value; The infrared emissivity parameter of the animal's body surface is set by selecting skin samples from different regions of the animal's body surface, measuring their average emissivity in the infrared band using a high-precision spectrometer, and taking the statistical average (e.g., 0.98) as the preset parameter. The Stefan-Boltzmann physical constant is a universal physical constant, with a value of approximately 5.67 multiplied by 10 to the power of -8 watts per square meter per Kelvin 4. The process first divides the compensated infrared radiation intensity value (this value needs to be mapped to radiant exitance in this step, for example, by mapping 1271 analog-to-digital conversion quantization values (ADU) to 520 watts per square meter through the system calibration curve) by the product of the emissivity parameter and the physical constant to obtain the radiant flux ratio. Subsequently, the radiant flux ratio is subjected to a fourth root operation, i.e., its quarter-power is calculated, thereby solving for the thermodynamic Kelvin absolute temperature scale value of the corresponding pixel position. Finally, the process subtracts the Kelvin to Celsius conversion constant (precise value of 273.15) from the Kelvin value to obtain the temperature value conforming to the Celsius temperature scale. The process iterates through all pixels, repeating the above calculations. The generated temperature values are then rearranged according to the spatial distribution order of the original image to construct a corrected temperature distribution matrix. For example, if the compensated radiation intensity corresponds to 520 watts per square meter, the emissivity is 0.98, and the constant is 5.67 multiplied by 10 to the power of -8. The denominator is calculated as: 0.98 × 5.67 × 10^-8 ≈ 5.5566 × 10^-8. The ratio is calculated as: 520 ÷ (5.5566 × 10^-8) ≈ 9358364303. The fourth root is calculated as: 9358364303^0.25 ≈ 311.3. Converted to degrees Celsius: 311.3 - 273.15 = 38.15. Therefore, the temperature at that point is 38.15 degrees Celsius.
[0025] Please see Figure 4 The specific steps for obtaining the thermal gradient vector field on the body surface are as follows: S311: Based on the row and column arrangement structure of pixel data in the correction temperature distribution matrix, calculate the numerical difference between each temperature value in the correction temperature distribution matrix and its adjacent temperature value in the horizontal direction along the horizontal coordinate axis, divide it by the corresponding physical coordinate spacing, obtain the derivative value of the temperature spatial distribution gradient in the horizontal direction, and set it as the horizontal vector component of the animal body surface thermal gradient vector. The temperature value of the current pixel in the matrix is selected and subtracted from the temperature value of its horizontally adjacent pixel (e.g., the pixel to the right), resulting in a temperature difference value. This temperature difference value is then divided by the actual horizontal distance between these two pixels in physical space. This distance parameter is calculated using the camera's imaging resolution, pixel pitch, and shooting distance parameters (e.g., each pixel represents an actual physical width of 0.001 meters). The result is the rate of temperature change in the horizontal direction, designated as the horizontal vector component of the animal's surface thermal gradient vector. For example, if the current temperature is 38.15 degrees Celsius as calculated in the previous step, and the temperature of the adjacent pixel to the right is 38.05 degrees Celsius (indicating a decrease in temperature towards the right), then the temperature difference is: 38.15 - 38.05 = 0.1. The horizontal vector component is calculated as: 0.1 ÷ 0.001 = 100. This value of 100 degrees Celsius per meter represents the spatial trend of heat change in the horizontal direction.
[0026] S312: Based on the row and column arrangement structure of pixel data in the correction temperature distribution matrix, calculate the numerical difference between each temperature value in the correction temperature distribution matrix and the adjacent temperature value in the vertical direction along the vertical coordinate axis, divide it by the corresponding physical coordinate spacing, obtain the derivative value of the temperature spatial distribution gradient in the vertical direction, and set it as the vertical vector component of the animal body surface thermal gradient vector. The temperature value of the current pixel in degrees Celsius is read and subtracted from the temperature values of its vertically adjacent pixels (such as the adjacent pixels below). This subtraction operation yields the vertical temperature difference. Next, this difference is divided by the physical spatial distance between the pixels in the vertical direction to obtain the derivative of the temperature gradient in the vertical direction. This value quantifies the drastic change in the temperature field along the vertical axis and is defined as the vertical vector component of the animal's surface thermal gradient vector. For example, if the current pixel temperature is 38.15 degrees Celsius, the pixel temperature below is 37.95 degrees Celsius (indicating a faster temperature drop below), and the physical distance is 0.001 meters, then the temperature difference is: 38.15 - 37.95 = 0.2. The vertical vector component is calculated as: 0.2 ÷ 0.001 = 200. This value of 200 degrees Celsius per meter indicates a significant gradient change in heat along the vertical direction.
[0027] S313: Combine the horizontal vector component and the vertical vector component of the animal's body surface thermal gradient vector to construct a two-dimensional vector corresponding to each temperature value in Celsius, and obtain the body surface thermal gradient vector field. The horizontal component is used as the X-axis coordinate of the vector, and the vertical component as the Y-axis coordinate, thus defining a physical vector with magnitude and direction at each pixel location. This process traverses the entire temperature matrix, generating a vector field data structure with the same resolution as the original image, namely the body surface thermal gradient vector field. This vector field intuitively describes the flow trend of heat distribution on the animal's body surface. The direction of the vector arrow represents the specific direction of temperature change, and the magnitude of the vector represents the intensity of temperature change. For example, for the current pixel, its horizontal component is 100 and its vertical component is 200, then the two-dimensional gradient vector of this point is represented as (100, 200). The synthesized vector magnitude is approximately 223.6, and the direction points to the lower right, indicating that this point is in a high-temperature, high-gradient state relative to its neighborhood, and the rate of change in the vertical direction dominates the thermal distribution characteristics of this point.
[0028] Please see Figure 5 The specific steps for obtaining the cumulative divergence map of heat flux are as follows: S411: Based on the surface thermal gradient vector field, calculate the partial derivatives of the horizontal vector component along the horizontal coordinate axis and the partial derivatives of the vertical vector component along the vertical coordinate axis, and calculate the scalar value of the spatial divergence of the animal's surface heat flux based on the two partial derivatives. Divergence is calculated based on the surface thermal gradient vector field to quantify the source and sink characteristics of heat flow. To improve the detection sensitivity of weak metabolic pyrogens and suppress background thermal noise, a weighted divergence calculation algorithm with energy dissipation constraints is employed. This algorithm introduces a suppression term based on local thermal energy intensity to filter stochastic gradient fluctuations in non-lesion regions, building upon traditional divergence calculations. The horizontal coordinate variable is defined as follows: The vertical coordinate variable is The horizontal vector component in the thermal gradient vector field of the body surface is extracted as follows: and vertical vector components are The process is calculated separately. along Partial derivatives in direction and along The partial derivatives in the direction are introduced, and a scalar field based on local temperature is introduced. and preset dissipation coefficient The correction term is calculated using the following formula to determine the scalar value of the spatial divergence of heat flux on the animal's body surface. : , in the formula, The value represents the calculated spatial divergence of heat flow on the animal's body surface, with the dimension being temperature per square meter. A positive value indicates heat flow divergence, while a negative value indicates heat flow convergence. This represents the spatial rate of change of the horizontal vector component along the horizontal direction, calculated from adjacent pixels. Obtaining the difference ratio of values; This represents the rate of change of the vertical vector component along the vertical direction. This is a dimensionless dissipation suppression coefficient. The coefficient is set based on the analysis of the noise level of the thermal gradient on the surface of healthy animals. The optimal segmentation threshold is determined by the maximum inter-class variance method and is usually between 0.1 and 0.3. The square of the magnitude of the thermal gradient vector reflects the intensity of the thermal gradient. To correct the corrected absolute temperature scale values at pixels aligned with the spatial coordinates of the current thermal gradient vector field pixel location in the temperature distribution matrix, a normalization factor is used to prevent numerical overflow. For example, in a practical example, corresponding to the aforementioned pixel, the horizontal vector component... 100, vertical vector component The value is 200. Assuming the horizontal partial derivative is calculated using finite difference,... The partial derivative in the vertical direction is 150. The local absolute temperature at this point is 150. Approximately 311.3 Kelvin (i.e., 38.15 degrees Celsius). Set the dissipation suppression coefficient. The value is 0.15. Substitute the specific value into the formula to calculate: The calculation result of 275.9 indicates that there is a strong positive heat flow dispersion in this area. Even after noise suppression correction, the numerical result is still significant, confirming its physical property as a heat source center and providing high-confidence data support for subsequent lesion screening.
[0029] S412: Extract the scalar values of spatial divergence of animal body surface heat flow corresponding to the original infrared radiation intensity image sequence of animal body surface in multiple frames, filter the positive divergence values of animal body surface heat flow spatial divergence scalar values that are greater than zero, and generate a multi-frame positive animal body surface heat flow spatial divergence scalar sequence. The above divergence calculation is repeated along a continuous time axis to generate a divergence map for the corresponding time series of acquired multi-frame images of the original infrared radiation intensity of the animal's body surface. The process scans the spatial divergence scalar value of the animal's body surface heat flow at each pixel frame by frame, using numerical comparison logic to filter out or set values less than or equal to 0, retaining only positive divergence values greater than 0. This filtering operation is based on the fact that lesion metabolism in organisms typically exhibits active heat production, and its heat flow field must show divergent characteristics, i.e., positive divergence; while background or endothermic regions exhibit negative divergence, belonging to non-target signals. After filtering, the process generates a multi-frame sequence of positive spatial divergence scalar values of the animal's body surface heat flow, including the time dimension. For example, for a pixel with a divergence value of 275.9 calculated above, the divergence values over five consecutive observation frames are 275.9, -50, 300, 0, and 250, respectively. The process removes -50 as a non-positive value and removes 0 as an invalid value. After filtering, the retained sequence is 275.9, 300, and 250, ensuring that subsequent cumulative calculations only enhance suspected heat source signals.
[0030] S413: Perform numerical accumulation operation on the scalar sequence of spatial divergence of heat flow on animal body surface in multiple frames under the same pixel coordinate position, count the total heat flow divergence of the same pixel coordinate position in multiple observation time, and reorganize the accumulated value corresponding to each pixel coordinate position into a two-dimensional image form to obtain the heat flow cumulative divergence map. For the same pixel coordinate location, all retained values in the scalar sequence of spatial divergence of heat flow on the animal surface across multiple frames are extracted and summed. This operation aims to enhance weak but persistent metabolic heat signals through time integration while suppressing random thermal noise fluctuations. The process statistically sets the divergence sum for each pixel within a specified observation time window (e.g., 50 frames). The calculated accumulated values are written into a new two-dimensional matrix, with the rows and columns corresponding one-to-one with the pixels in the original images. Finally, this two-dimensional matrix is visualized or formatted as a cumulative heat flow divergence map. Higher pixel values indicate a stronger, sustained heat flow divergence characteristic at that location during the observation period. For example, for the aforementioned location, the preliminary sum of the retained sequence is calculated as: 275.9 + 300 + 250 = 825.9. Assuming that the positive divergence value of this point persists throughout the full 50-frame observation period, and the final cumulative sum reaches 5000, while the cumulative sum of the surrounding normal skin area is only 500, then this point will exhibit a significant highlight feature in the heat flow cumulative divergence map, intuitively indicating a potential abnormal heat generation center.
[0031] Please see Figure 6 The specific steps for lesion localization and obtaining body temperature detection results are as follows: S511: Compare each cumulative divergence value in the cumulative divergence map with the preset threshold for determining the lesion heat source, filter the pixel coordinates whose cumulative divergence values are greater than the threshold for determining the lesion heat source, determine the adjacency relationship of each pixel coordinate, and merge adjacent pixel coordinates to generate the target divergence connected region. First, a threshold for determining the lesion's heat source is established. This threshold is based on statistical analysis of a large amount of heat flow divergence data from the body surfaces of healthy animals. Specifically, thousands of cumulative heat flow divergence map samples from animals confirmed by veterinarians to be healthy are selected. The cumulative divergence values of all pixels are extracted to construct a histogram distribution. The mean (e.g., a mean of 500) and standard deviation (e.g., a standard deviation of 100) are calculated. Based on the principle of statistical normal distribution, the mean is added to three times the standard deviation as a baseline (500 + 3 × 100 = 800) to cover 99.7% of the normal physiological fluctuation range. Values exceeding this range are considered abnormal. The process iterates through each pixel data in the cumulative heat flow divergence map, comparing the cumulative heat flow divergence value with this threshold. If the cumulative divergence value of a pixel is greater than the threshold, it is marked as a candidate lesion pixel. Subsequently, the process analyzes the spatial adjacency relationships of all marked pixels, employing a four-neighbor or eight-neighbor connected component labeling algorithm. The algorithm's execution process is as follows: The binarized image is scanned row by row. When a marked pixel is encountered, its left and upper pixel labels are checked. If adjacent pixels already have labels, the current pixel inherits those labels. If adjacent pixels have different labels, the label equivalence relationship is recorded. If there are no adjacent labels, a new label is assigned. After scanning, equivalent labels are merged using a disjoint-set data structure algorithm, merging contacting or overlapping candidate pixels into an independent connected region. After denoising and morphological closing operations, the resulting cluster of connected pixels is the target divergence connected region. For example, the cumulative divergence value of the aforementioned point is 5000, far exceeding the set threshold of 800. Therefore, it is marked as a candidate point by the system and, together with other high-value pixels, forms a target divergence connected region, representing an independent suspected lesion site.
[0032] S512: Extract the set of pixel coordinates covered by the target divergence connected region as the coordinates of the target metabolic heat production region, and map it to the correction temperature distribution matrix. Index and extract all corresponding Celsius temperature values in the set of pixel coordinates to generate a set of Celsius temperature values. The process iterates through the target divergence connected region, extracting the row and column coordinate indices of all pixels covered by the region to form a coordinate set, i.e., the coordinates of the target metabolic heat-producing region. Subsequently, this coordinate set is used as a mask and mapped back to the corrected temperature distribution matrix generated in the previous steps. Based on the coordinate indices, the process reads the corresponding Celsius temperature values in the corrected temperature distribution matrix one by one. This step achieves cross-domain data association from thermodynamic characteristics (divergence) to thermodynamic state characteristics (temperature), generating a set of Celsius temperature values containing only the temperature data of the lesion region. For example, if the connected region contains 3 pixels, whose coordinate indices correspond to the aforementioned high-temperature point and its neighborhood, the process will accurately extract the temperature values corresponding to these 3 coordinates from the full-image temperature matrix, assuming they are 38.15 degrees Celsius, 38.25 degrees Celsius, and 38.05 degrees Celsius, respectively, thus eliminating interference from surrounding healthy tissue and background temperature.
[0033] S513: Calculate the average value of the set of Celsius temperature values corresponding to the coordinates of the target metabolic heat production area, set it as the average temperature of the lesion area, and generate lesion location and body temperature detection results by combining the coordinates of the target metabolic heat production area. An arithmetic mean operation is performed on the set of Celsius temperature values corresponding to the extracted target metabolic heat-producing region coordinates. Specifically, all temperature values in the set are summed to obtain a total temperature, which is then divided by the number of elements in the set (i.e., the total number of pixels). The result is set as the average temperature of the lesion region. This average temperature index can robustly reflect the overall thermometabolic level of the lesion site, mitigating random errors from single-point measurements. Finally, the process combines the calculated average temperature of the lesion region with its spatial coordinates in the image (such as centroid coordinates or bounding box coordinates), and outputs the formatted results as lesion localization and body temperature detection. For example, if the set of values contains the aforementioned three temperature data points 38.15, 38.25, and 38.05, the sum is first calculated: 38.15 + 38.25 + 38.05 = 114.45. Then the average is calculated: 114.45 ÷ 3 = 38.15. The final output indicates that lesions were detected in the area covering the above-mentioned points within the coordinate range, with an average body temperature of 38.15 degrees Celsius.
[0034] A veterinary animal body temperature detection system based on infrared image recognition, the system includes: The animal surface observation module acquires the original infrared radiation intensity image sequence of the animal surface area facing the animal surface and the camera imaging calibration parameters, establishes a three-dimensional spatial coordinate system of the camera optical center, and extracts the geometric observation feature parameters of the animal surface in the coordinate system. The infrared temperature correction module corrects the infrared radiation intensity value and generates a corrected temperature distribution matrix based on the geometric observation feature parameters of the animal's body surface and simultaneously retrieves the infrared radiation hair layer path extension factor from a preset path extension factor value comparison table. The body surface thermal gradient construction module sets the horizontal and vertical vector components of the animal's body surface thermal gradient vector based on the correction temperature distribution matrix, and synthesizes the body surface thermal gradient vector field. The heat flux divergence accumulation module determines the scalar value of the spatial divergence of the animal's body surface based on the surface thermal gradient vector field, extracts the positive spatial divergence value of the animal's body surface corresponding to each pixel in the multi-frame original infrared radiation intensity image sequence of the animal's body surface, performs accumulation operation, and constructs a heat flux accumulation divergence map. The lesion localization and body temperature calculation module compares the cumulative heat flow divergence map with the preset lesion heat source determination threshold, determines the coordinates of the target metabolic heat production area and maps it to the corrected temperature distribution matrix, and calculates the average temperature to generate lesion localization and body temperature detection results.
[0035] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for detecting body temperature in veterinary animals based on infrared image recognition, characterized in that, Includes the following steps: S1: Obtain the original infrared radiation intensity image sequence of the animal's body surface area facing the animal's body surface area and the camera imaging calibration parameters, establish the three-dimensional spatial coordinate system of the camera optical center, and extract the geometric observation feature parameters of the animal's body surface under the coordinate system; S2: Based on the geometric observation feature parameters of the animal body surface, the infrared radiation hair layer path extension factor is retrieved from the preset path extension factor value comparison table, the infrared radiation intensity value is corrected, and a corrected temperature distribution matrix is generated. S3: Based on the corrected temperature distribution matrix, set the horizontal and vertical vector components of the animal's surface thermal gradient vector to synthesize the surface thermal gradient vector field; S4: Determine the scalar value of the spatial divergence of the animal's body surface heat flow based on the thermal gradient vector field of the body surface, extract the positive spatial divergence value of the animal's body surface heat flow corresponding to each pixel in the multi-frame original infrared radiation intensity image sequence of the animal's body surface and perform an accumulation operation to construct a heat flow cumulative divergence map. S5: Compare the heat flow cumulative divergence map with the preset lesion heat source determination threshold, determine the coordinates of the target metabolic heat production area and map it into the corrected temperature distribution matrix, and calculate the average temperature to generate lesion location and body temperature detection results.
2. The veterinary animal body temperature detection method based on infrared image recognition according to claim 1, characterized in that, The geometric observation feature parameters of the animal body surface include the cosine value of the infrared ray incident angle and the local radius of curvature of the animal body surface. The corrected temperature distribution matrix includes the Celsius temperature value obtained by compensation and conversion through the inverse attenuation recovery operator. The body surface thermal gradient vector field includes the horizontal vector component and the vertical vector component of the animal body surface thermal gradient vector. The heat flow cumulative divergence map includes the heat flow cumulative divergence value obtained by performing numerical accumulation operation on the same pixel coordinate position. The lesion localization and body temperature detection results include the coordinates of the target metabolic heat production area covered by the independent target divergence connected region and the average temperature of the lesion area.
3. The veterinary animal body temperature detection method based on infrared image recognition according to claim 2, characterized in that, The specific steps for obtaining the geometric observation feature parameters of the animal body surface are as follows: S111: Acquire the original infrared radiation intensity image sequence of the animal's body surface area by using an infrared thermal imaging acquisition device, call the preset camera imaging calibration parameters to establish the camera optical center three-dimensional space coordinate system, and use the camera imaging calibration parameters to project and map the two-dimensional plane coordinates of the pixels in the original infrared radiation intensity image sequence of the animal's body surface to the spatial position under the camera optical center three-dimensional space coordinate system, thereby obtaining the three-dimensional space coordinates of the animal's body surface. S112: Calculate the unit normal vector of the animal surface point corresponding to each of the three-dimensional spatial coordinates of the animal body surface one by one. Based on the directional change of the unit normal vector of the animal surface point in the local neighborhood centered on the current three-dimensional spatial coordinates of the animal body surface, calculate the local radius of curvature of the animal body surface. Perform a reciprocal operation on the local radius of curvature of the animal body surface to determine it as the reciprocal of the local radius of curvature of the animal body surface. S113: Construct the observation line vector pointing from the camera's optical center to the animal's three-dimensional spatial coordinates, calculate the dot product of the observation line vector and the unit normal vector of the animal's surface point to obtain the cosine value of the infrared ray incident angle, and combine it with the reciprocal of the local curvature radius of the animal's surface to generate the geometric observation feature parameters of the animal's surface.
4. The veterinary animal body temperature detection method based on infrared image recognition according to claim 3, characterized in that, The specific steps for obtaining the corrected temperature distribution matrix are as follows: S211: Extract the cosine of the infrared ray incident angle and the reciprocal of the local curvature radius of the animal body surface from the geometric observation feature parameters of the animal body surface as index coordinates, and search for the corresponding infrared ray penetration path magnification in the preset path extension factor value comparison table to determine the infrared ray hair layer path extension factor. S212: Construct an inverse attenuation recovery operator based on Beer-Lambert's law, with the infrared ray hair layer path extension factor as the exponent. Substitute the infrared radiation intensity values in the original infrared radiation intensity image sequence of the animal body surface into the inverse attenuation recovery operator to perform compensation operations and obtain the compensated infrared radiation intensity values. S213: Convert each of the compensated infrared radiation intensity values in the original infrared radiation intensity image sequence of the animal's body surface into Celsius temperature values, and construct a corrected temperature distribution matrix.
5. The veterinary animal body temperature detection method based on infrared image recognition according to claim 4, characterized in that, The specific steps for obtaining the surface thermal gradient vector field are as follows: S311: Based on the row and column arrangement structure of pixel data in the corrected temperature distribution matrix, calculate the numerical difference between each temperature value in the corrected temperature distribution matrix and its adjacent temperature value in the horizontal direction along the horizontal coordinate axis, and divide it by the corresponding physical coordinate spacing to obtain the derivative value of the temperature spatial distribution gradient in the horizontal direction, and set it as the horizontal vector component of the animal body surface thermal gradient vector. S312: Based on the row and column arrangement structure of pixel data in the corrected temperature distribution matrix, calculate the numerical difference between each temperature value in the corrected temperature distribution matrix and its adjacent temperature value in the vertical direction along the vertical coordinate axis, and divide it by the corresponding physical coordinate spacing to obtain the derivative value of the temperature spatial distribution gradient in the vertical direction, and set it as the vertical vector component of the animal body surface thermal gradient vector. S313: The horizontal vector component and the vertical vector component of the animal's body surface thermal gradient vector are vector synthesized to construct a two-dimensional vector corresponding to each temperature value in degrees Celsius, thus obtaining the body surface thermal gradient vector field.
6. The veterinary animal body temperature detection method based on infrared image recognition according to claim 5, characterized in that, The specific steps for obtaining the cumulative heat flow divergence map are as follows: S411: Based on the surface thermal gradient vector field, calculate the partial derivatives of the horizontal vector component along the horizontal coordinate axis and the partial derivatives of the vertical vector component along the vertical coordinate axis, and calculate the scalar value of the spatial divergence of the animal's surface heat flux based on the two partial derivatives. S412: Extract the scalar value of the spatial divergence of the animal's body surface heat flow corresponding to the sequence of multiple frames of original infrared radiation intensity images of the animal's body surface, filter the positive divergence values of the spatial divergence of the animal's body surface heat flow that are greater than zero, and generate a sequence of multiple frames of positive spatial divergence of the animal's body surface heat flow. S413: Perform numerical accumulation operation on the scalar sequence of spatial divergence of heat flow on the surface of the animal in multiple frames at the same pixel coordinate position, count the total heat flow divergence of the same pixel coordinate position in the observation time of multiple frames, and reorganize the accumulated value corresponding to each pixel coordinate position into a two-dimensional image form to obtain the heat flow cumulative divergence map.
7. The veterinary animal body temperature detection method based on infrared image recognition according to claim 6, characterized in that, The specific steps for obtaining the lesion location and body temperature detection results are as follows: S511: Compare each heat flow cumulative divergence value in the heat flow cumulative divergence map with a preset lesion heat source determination threshold, filter pixel coordinates whose heat flow cumulative divergence values are greater than the lesion heat source determination threshold, determine the adjacency relationship of each pixel coordinate and merge adjacent pixel coordinates to generate a target divergence connected region. S512: Extract the set of pixel coordinates covered by the target divergence connected region as the coordinates of the target metabolic heat production region, and map it to the corrected temperature distribution matrix. Index and extract all corresponding Celsius temperature values in the set of pixel coordinates to generate a set of Celsius temperature values. S513: Calculate the average value of the set of Celsius temperature values corresponding to the coordinates of the target metabolic heat production area, set it as the average temperature of the lesion area, and combine it with the coordinates of the target metabolic heat production area to generate the lesion location and body temperature detection results.
8. The veterinary animal body temperature detection method based on infrared image recognition according to claim 4, characterized in that, The process of converting each compensated infrared radiation intensity value in the original infrared radiation intensity image sequence of the animal's body surface into a Celsius temperature value is as follows: Call the pre-stored infrared emissivity parameters of the animal's body surface and the Stefan-Boltzmann physical constant; The radiant flux ratio is obtained by dividing the compensated infrared radiation intensity value by the product of the animal's infrared emissivity parameter and the Stefan-Boltzmann physical constant. Perform a fourth square root operation on the radiant flux ratio to obtain the Kelvin absolute temperature value at the corresponding pixel location; Subtract the preset Kelvin to Celsius conversion constant from the Kelvin absolute temperature scale value to obtain the Celsius temperature value.
9. The veterinary animal body temperature detection method based on infrared image recognition according to claim 6, characterized in that, scalar value of spatial divergence of heat flux on animal body surface The formula used is: ; in, For horizontal coordinate variables, Vertical coordinate variable This refers to the horizontal vector component in the thermal gradient vector field on the body surface. This represents the vertical vector component in the thermal gradient vector field on the body surface. The rate of change of the horizontal vector component along the horizontal direction. The rate of change of the vertical vector component along the vertical direction. This is the dissipation suppression coefficient, with a value ranging from 0.1 to 0.
3. The square of the magnitude of the thermal gradient vector. To correct the absolute temperature scale values in the temperature distribution matrix.
10. A veterinary animal body temperature detection system based on infrared image recognition, characterized in that, The veterinary animal body temperature detection method based on infrared image recognition according to any one of claims 1-9, the system comprising: The animal surface observation module acquires the original infrared radiation intensity image sequence of the animal surface area facing the animal surface and the camera imaging calibration parameters, establishes a three-dimensional spatial coordinate system of the camera optical center, and extracts the geometric observation feature parameters of the animal surface in the coordinate system. The infrared temperature correction module, based on the geometric observation feature parameters of the animal's body surface, simultaneously retrieves the infrared radiation hair layer path extension factor from a preset path extension factor value lookup table, corrects the infrared radiation intensity value, and generates a corrected temperature distribution matrix. The body surface thermal gradient construction module sets the horizontal and vertical vector components of the animal's body surface thermal gradient vector according to the corrected temperature distribution matrix, and synthesizes the body surface thermal gradient vector field. The heat flux divergence accumulation module determines the scalar value of the spatial divergence of the animal's body surface based on the surface thermal gradient vector field, extracts the positive spatial divergence value of the animal's body surface corresponding to each pixel in the multi-frame original infrared radiation intensity image sequence of the animal's body surface and performs an accumulation operation to construct a heat flux accumulation divergence map. The lesion localization and body temperature calculation module compares the cumulative heat flow divergence map with the preset lesion heat source determination threshold, determines the coordinates of the target metabolic heat production area and maps it to the corrected temperature distribution matrix, and calculates the average temperature to generate lesion localization and body temperature detection results.