Animal in-vitro temperature monitoring method and device for animal husbandry and veterinary medicine
Patent Information
- Application Number
- CN202510353909.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-25
AI Technical Summary
In infrared thermal image denoising processing, traditional bilateral filtering algorithms cannot effectively deal with the problem of different degrees of noise interference from different pixel points, resulting in some data noise being unable to be effectively filtered out or the data being overly smoothed, affecting the accuracy of temperature monitoring.
By analyzing the temperature noise interference of each superpixel block in the current infrared thermal image, the filter window size of each pixel point is dynamically adjusted to adapt to the noise interference level in different regions, and then more effective denoising processing is carried out.
It improves the denoising effect of temperature data in infrared thermal images, reduces the possibility that data is overly smoothed, and thus improves the accuracy of temperature monitoring of animal husbandry animals.
Smart Images

Figure CN119887752A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of animal external temperature monitoring, and specifically to a method and device for animal external temperature monitoring for animal husbandry and veterinary medicine. Background Art
[0002] The body temperature of livestock is an important physiological indicator to measure their health status. By monitoring the body temperature of livestock, potential diseases of livestock can be monitored and diagnosed. The in vitro temperature monitoring method based on infrared thermography (IRT) technology has the advantages of non-contact, non-destructive, convenient and fast. It can realize real-time and comprehensive monitoring of the body temperature of livestock, reduce interference and potential harm to livestock, and then help livestock veterinarians evaluate the disease status, site of disease and pathological stage of animals.
[0003] In the process of using infrared thermal imaging devices for temperature monitoring, the randomness of photons absorbed by infrared detectors and the random thermal motion of charge carriers in conductors usually cause the collected infrared thermal images to be affected by photon noise and thermal noise. Infrared thermal imagers may also be affected by environmental electromagnetic interference. Therefore, denoising algorithms are usually used to denoise the collected infrared thermal images, such as bilateral filtering algorithms, to reduce the interference of noise on the data in infrared thermal images.
[0004] However, the denoising effect of the bilateral filtering algorithm depends on the setting of the filter window size. When the traditional bilateral filtering algorithm denoises infrared thermal images, the same filter window size is usually set for all pixels in the infrared thermal image. However, in fact, the degree to which each pixel in the infrared thermal image is interfered by noise is different, which will cause the noise of some data in the infrared thermal image to not be effectively filtered out or cause the data to be over-smoothed, affecting the final denoising effect of the infrared thermal image, and further affecting the temperature monitoring of livestock. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a method and device for monitoring the external temperature of animals for animal husbandry and veterinary medicine. The technical solutions adopted are as follows: In a first aspect, an embodiment of the present application provides a method for monitoring the external temperature of an animal for animal husbandry and veterinary medicine, the method comprising the following steps: Step 1: continuously collecting a preset number of frames of infrared thermal images of the target livestock; Step 2: Analyze the temperature noise interference of each super pixel block in the foreground image of the current frame infrared thermal image; specifically: S1: Perform super-pixel block segmentation on the foreground image of the infrared thermal image of the current frame; S2: Obtain the superpixel block at the same position of any superpixel block according to the distance between the central pixel points of the superpixel block; determine the sharp change degree of temperature distribution of any superpixel block by using the temperature difference between any superpixel block in the current frame and the superpixel block at the same position in the previous adjacent frame, and the average difference level between the temperature difference and the superpixel blocks at the same position in all adjacent frames before the current frame; S3: Based on the difference in average temperature between any super-pixel block and its neighboring super-pixel blocks in the infrared thermal image of the current frame, a temperature sequence of the neighboring parts of any super-pixel block is constructed; the overall difference between the temperature sequence of the neighboring parts of any super-pixel block and the temperature sequences of the neighboring parts of all super-pixel blocks in the same position is analyzed to determine the relative temperature distribution mutation degree of any super-pixel block; S4: forwardly fuse the temperature distribution sharp change degree and the temperature relative distribution mutation degree to construct the temperature distribution anomaly degree of any super pixel block; S5: using the chaotic distribution of the temperature mean in the background image of all frames of infrared thermal images, determining the ambient temperature fluctuation coefficient of the current frame of infrared thermal image; combining the ambient temperature fluctuation coefficient and the temperature distribution abnormality of any super pixel block, determining the temperature noise interference degree of any super pixel block; Step 3: Analyze the filter window size of each pixel in the infrared thermal image of the current frame using the temperature noise interference degree, and use it to filter the infrared thermal image of the target livestock.
[0006] Preferably, the foreground image is an image of the livestock body surface temperature portion obtained by performing Otsu threshold segmentation on the infrared thermal image of the current frame.
[0007] Preferably, the method for obtaining the superpixel block at the same position as any superpixel block is: in all frames of infrared thermal images, all superpixel blocks at other center pixels closest to the center pixel of any superpixel block are taken as the superpixel blocks at the same position as any superpixel block.
[0008] Preferably, the degree of rapid change of the temperature distribution of any superpixel block is determined by the product of the temperature difference and the average difference level.
[0009] Preferably, the temperature difference is further determined as the Bhattacharyya distance between temperature histograms of superpixel blocks.
[0010] Preferably, the process of constructing the temperature sequence of the neighboring parts of any superpixel block includes: In the infrared thermal image of the current frame, a preset number of super-pixel blocks having the smallest position distances to the central pixel point of any super-pixel block are used as neighboring super-pixel blocks of any super-pixel block; The average temperatures of the neighboring superpixel blocks of any superpixel block are arranged into a sequence from small to large according to the position distance; The values of the sequence that are greater than the average temperature of any super pixel block are marked as 1, otherwise they are marked as 0, and the marked sequence is recorded as the temperature sequence of the adjacent parts of any super pixel block.
[0011] Preferably, the abnormality of the temperature distribution of any super-pixel block is determined by the product of the rapid change degree of the temperature distribution of any super-pixel block and the sudden change degree of the relative temperature distribution.
[0012] Preferably, the temperature noise interference degree of any super-pixel block is obtained by reversely fusing the temperature distribution anomaly degree of any super-pixel block and the ambient temperature fluctuation coefficient.
[0013] Preferably, the analysis process of the filter window size of each pixel is: The filter window size of the i-th pixel d(N,i) in the infrared thermal image A(N) is recorded as R(N,i); ; In the formula, d(N,i) represents the i-th pixel in the infrared thermal image A(N); A(N,m) represents the m-th superpixel block in the infrared thermal image A(N); G(N,m) represents the temperature noise interference of the superpixel block A(N,m); norm[] represents the Min-Max normalization function; round{} represents the rounding function; r1 and r2 both represent the adjustment parameters of the filter window size.
[0014] In the second aspect, an embodiment of the present application also provides an animal external temperature monitoring device for animal husbandry and veterinary medicine, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of any one of the above-mentioned methods for monitoring the external temperature of an animal for animal husbandry and veterinary medicine are implemented.
[0015] This application has at least the following beneficial effects: The present application obtains the superpixel blocks at the same position of any superpixel block according to the distance between the central pixel points of the superpixel blocks; determines the degree of sharp change in temperature distribution of any superpixel block by using the temperature difference between any superpixel block in the current frame and the superpixel block at the same position in the adjacent previous frame, and the average difference level between the temperature difference and the superpixel blocks at the same position in all adjacent frames before the current frame, so as to more accurately evaluate the degree of sharp change in temperature distribution of various parts of livestock; constructs the temperature sequence of the adjacent parts of any superpixel block based on the difference in temperature distribution characteristics between any superpixel block and its adjacent superpixel blocks in the infrared thermal image of the current frame; analyzes the overall difference between the temperature sequence of the adjacent parts of any superpixel block and the temperature sequences of the adjacent parts of all superpixel blocks at the same position, and determines the mutation degree of relative temperature distribution of any superpixel block, so as to more accurately evaluate the degree of abnormality in the relative distribution characteristics of body surface temperature between the same part and its adjacent parts of livestock; and The temperature distribution anomaly of any super-pixel block is forwardly fused with the temperature relative distribution mutation degree to construct the temperature distribution anomaly of any super-pixel block; the ambient temperature fluctuation coefficient of the current frame infrared thermal image is determined by using the chaotic distribution of the temperature mean in the background image of all frames of infrared thermal images; the temperature noise interference degree of any super-pixel block is determined by combining the ambient temperature fluctuation coefficient and the temperature distribution anomaly of any super-pixel block, thereby reducing the influence of ambient temperature on the evaluation of the degree of noise interference of pixels in the livestock area in the infrared thermal image, thereby being able to more accurately evaluate the degree of noise interference of the pixels; the temperature noise interference degree is used to analyze the filter window size of each pixel in the current frame infrared thermal image, which is used to filter the infrared thermal image of the target livestock. Compared with directly using the same filter window size in the traditional bilateral filtering algorithm to denoise the infrared thermal image of the livestock, the denoising effect of the temperature data of the livestock in the infrared thermal image can be improved, the possibility of excessive smoothing of the temperature data can be reduced, and the temperature monitoring results of the livestock can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A flow chart of a method for monitoring the external temperature of animals for animal husbandry and veterinary medicine provided in this application; Figure 2 A flow chart of a method for determining the temperature noise interference degree of each super-pixel block provided in this application. DETAILED DESCRIPTION
[0018] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, describes in detail a method and device for monitoring the external temperature of animals for animal husbandry and veterinary medicine proposed in the present application, its specific implementation, structure, features and effects. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0019] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0020] The specific scheme of the animal external temperature monitoring method and device for animal husbandry and veterinary medicine provided by the present application is described in detail below with reference to the accompanying drawings.
[0021] An embodiment of the present application provides a method and device for monitoring the external temperature of animals for animal husbandry and veterinary medicine.
[0022] Specifically, a method for monitoring the external temperature of animals for animal husbandry and veterinary medicine is provided as follows. Figure 1 , the method comprises the following steps: Step 1: Continuously collect a preset number of frames of infrared thermal images of the target livestock.
[0023] In this embodiment, an infrared thermal imager is used to collect infrared thermal images of target livestock (such as cows and pigs) to monitor the temperature of the target livestock. The value of each pixel in the infrared thermal image represents the temperature value of the surface of the object corresponding to the pixel. The data sampling frequency of the infrared thermal imager is 10Hz, which can be set by the implementer.
[0024] Taking the t-th temperature detection time t of the target livestock as an example, N frames of infrared thermal images are continuously acquired, where the temperature detection time t is the end time, and the value of N is 30, which can be set by the implementer. That is, the N-th frame of infrared thermal image is the last frame of infrared thermal image acquired, that is, the infrared thermal image of the current frame.
[0025] At this point, a preset number of frames of continuous infrared thermal images of the target livestock can be acquired.
[0026] Step 2: Analyze the temperature noise interference of each super-pixel block in the foreground image of the current frame infrared thermal image.
[0027] In this application, the flow chart of the method for determining the temperature noise interference degree of each super pixel block is as shown in the attached figure. Figure 2 As shown, specifically: S1: Perform super-pixel block segmentation on the foreground image of the infrared thermal image of the current frame.
[0028] The collected infrared thermal images usually include the temperature information of livestock and the temperature information of the environment. Since livestock and animal are living things, they will generate heat during their metabolism, which will be dissipated into the environment through their body surface. However, the environment does not have a continuous heat source like the animal's body surface, so the body surface of livestock and animal in the infrared thermal image has a higher temperature distribution than the environment.
[0029] Therefore, taking the acquired Nth frame of infrared thermal image A(N) as an example, the Otsu threshold segmentation algorithm is used to segment the foreground image B1(N) and the background image B2(N) of the infrared thermal image A(N), wherein the foreground image B1(N) is used to characterize the temperature distribution of the body surface of livestock in the infrared thermal image A(N), and the background image B2(N) is used to characterize the temperature distribution of the environment in the infrared thermal image A(N). The Otsu threshold segmentation algorithm is a well-known technology, and the specific process will not be repeated here.
[0030] Due to the different physiological structures and functions of different parts of livestock animals, different parts of livestock animals usually have different body surface temperatures. For example, exposed parts (nose, feet) have lower temperatures than parts covered with hair, and core organ areas such as the heart and lungs have faster blood circulation and higher temperatures than other parts.
[0031] Based on this, this embodiment uses the SLIC (Simple Linear Iterative Clustering) superpixel segmentation algorithm to divide the foreground image B1(N) into M superpixel blocks to obtain M superpixel blocks of the infrared thermal image A(N), each superpixel block represents the image area where a part of the livestock is located in the infrared thermal image A(N), where M takes a value of 16. The STL superpixel segmentation algorithm is a well-known technology and the specific process will not be repeated here.
[0032] S2: Obtain the superpixel block at the same position of any superpixel block according to the distance between the central pixel points of the superpixel block; determine the sharp change degree of temperature distribution of any superpixel block by using the temperature difference between any superpixel block in the current frame and the superpixel block at the same position in its adjacent previous frame, as well as the average difference level between the temperature difference and the superpixel blocks at the same position in all adjacent frames before the current frame.
[0033] Under normal circumstances, the change in the surface temperature of a living organism is a continuous and gradual process, because the physiological processes and metabolic activities in the organism are continuous, and these activities will cause the body temperature to change slowly, so that the surface temperature of the same part of the livestock in adjacent frames of infrared thermal images usually does not show a large mutation, unless there is interference from external factors, such as a sudden change in ambient temperature or noise interference during the data acquisition process of the infrared thermal image, otherwise it will not cause a sharp change in the surface temperature.
[0034] Based on the above analysis, taking the mth superpixel block A(N,m) in the infrared thermal image A(N) as an example, the temperature histogram of the temperature values of all pixels in the superpixel block A(N,m) is extracted to characterize the distribution of the body surface temperature of the livestock parts corresponding to the superpixel block A(N,m) when the Nth frame of the infrared thermal image is collected. And the mean value of the coordinates of all pixels in the superpixel block A(N,m) is recorded as the coordinates of the central pixel of the superpixel block A(N,m).
[0035] The central pixel point of the superpixel block with the smallest distance between the coordinates of the central pixel point of the superpixel block A(N,m) in each frame of infrared thermal image is obtained, and they are recorded as the superpixel blocks at the same position of the superpixel block A(N,m). The set of all the superpixel blocks at the same position obtained is recorded as the set C1(N,m) at the same position of the superpixel block A(N,m), which is used to characterize the set of superpixel blocks corresponding to the livestock animal parts corresponding to the superpixel block A(N,m) in all frames of infrared thermal image. In this embodiment, the Euclidean distance is used to calculate the distance between the coordinates, and the Manhattan distance can also be used in other embodiments.
[0036] Furthermore, the degree of sharp change in temperature distribution of any superpixel block is determined by utilizing the temperature difference between any superpixel block in the current frame and the superpixel block in the same position in its adjacent previous frame, as well as the average difference level between the temperature difference and the superpixel blocks in the same position in all adjacent frames before the current frame.
[0037] Taking the superpixel block A(N,m) as an example, the temperature distribution sharp change degree S1(N,m) of the superpixel block A(N,m) is used to characterize the degree of sharp change in the body surface temperature distribution of the livestock animal part corresponding to the superpixel block A(N,m) when the Nth frame of infrared thermal image is collected. The expression is: S1(N,m)=p(N,N-1)* ; Wherein, p(n,n-1) represents the Bhattacharyya distance between the temperature histograms of the superpixel block A(N,m) in the infrared thermal image of the nth frame and the superpixel block A(N,m) in the infrared thermal image of the (n-1)th frame; p(N,N-1) represents the Bhattacharyya distance between the temperature histograms of the superpixel block A(N,m) in the infrared thermal image of the Nth frame and the superpixel block A(N,m) in the infrared thermal image of the (N-1)th frame; N represents the total number of frames of the acquired infrared thermal image. The calculation of the Bhattacharyya distance is a well-known technique and will not be described in detail.
[0038] It should be noted that the greater the temperature distribution difference between the temperature of the livestock animal part corresponding to the superpixel block A(N,m) in the infrared thermal image A(N) and the temperature of the livestock animal part in the previous frame of infrared thermal image, that is, the greater p(N,N-1) is, and the greater the difference between the temperature distribution difference and the temperature distribution difference of the livestock animal part in the remaining adjacent frames of infrared thermal image, that is, The larger it is, the more likely that the surface temperature distribution of the livestock part will change dramatically when the Nth frame of infrared thermal image is collected, and the greater the degree of the dramatic change, that is, the greater the dramatic change degree S1(N,m) of the temperature distribution.
[0039] S3: Based on the difference in temperature distribution characteristics between any superpixel block and its adjacent superpixel blocks in the infrared thermal image of the current frame, a temperature sequence of the adjacent parts of any superpixel block is constructed; the overall difference between the temperature sequence of the adjacent parts of any superpixel block and the temperature sequences of the adjacent parts of all superpixel blocks in the same position is analyzed to determine the relative temperature distribution mutation degree of any superpixel block.
[0040] Secondly, since livestock are usually warm-blooded animals, and warm-blooded animals can maintain a relatively stable body temperature through their own physiological mechanisms, and when livestock are in a quiet state, the heat produced by viscera is greater than the heat produced by skeletal muscles, which is greater than the heat produced by the brain, which is greater than the heat produced by other organs, and when livestock are working or exercising, the heat produced by skeletal muscles is greater than the heat produced by viscera, which is greater than the heat produced by the brain, which is greater than the heat produced by other organs, this body temperature regulation mechanism and heat production pattern help to maintain the relative size of the surface temperature of a certain part of livestock and its adjacent parts in a short period of time. The stability will not change significantly over time, unless there is interference from external factors, such as a sudden change in ambient temperature or noise interference during the data acquisition process of infrared thermal images, otherwise the relative distribution characteristics of the surface temperature of a certain part of livestock and its adjacent parts will not be destroyed.
[0041] Based on the above analysis, taking the superpixel block A(N,m) as an example, the average temperature value of all pixels in the superpixel block A(N,m) is calculated, which is recorded as the average temperature a(N,m) of the superpixel block A(N,m).
[0042] From all superpixel blocks of the infrared thermal image A(N), k superpixel blocks with the smallest Euclidean distance to the coordinates of the central pixel point of the superpixel block A(N,m) are selected and recorded as the neighboring superpixel blocks of the superpixel block A(N,m). In this embodiment, the value of k is 4. The average temperature values of all the selected superpixel blocks are arranged in ascending order according to the Euclidean distance, and the amplitude of the data points in the obtained sequence whose average temperature is greater than the average temperature a(N,m) is set to 1, and the amplitude of the remaining data points is set to 0. The reassigned sequence is recorded as is the temperature sequence C2(N,m) of the neighboring parts of the superpixel block A(N,m) in the Nth frame, which is used to characterize the distribution of the relative temperature between the surface temperature of the corresponding part of the superpixel block A(N,m) in the livestock and the surface temperature of its multiple neighboring parts when the infrared thermal image of the Nth frame is collected. The value of a data point in the temperature sequence C2(N,m) of the neighboring parts is 1, which means that the surface temperature of the corresponding part of the data point in the livestock and animal is greater than the surface temperature of the superpixel block A(N,m) in the livestock and animal, and vice versa.
[0043] The same method as the neighboring temperature sequence C2(N,m) is used, and for each superpixel block in the same-part set C1(N,m) of the superpixel block A(N,m), the neighboring temperature sequence of its corresponding superpixel block in the same part is calculated respectively, so as to characterize the distribution of the relative temperature between the surface temperature of the corresponding part of the superpixel block A(N,m) in livestock and the surface temperatures of its multiple neighboring parts when the infrared thermal image of the corresponding frame of each superpixel block is collected.
[0044] The average of the Euclidean distances between the temperature sequence C2(N,m) of the adjacent parts and the temperature sequences of all the superpixel blocks in the same part set C1(N,m) is recorded as the temperature relative distribution mutation degree S2(N,m) of the superpixel block A(N,m), which is used to characterize the degree of mutation in the relative distribution characteristics of the body surface temperature of the part of the livestock animal corresponding to the superpixel block A(N,m) and the body surface temperature of its adjacent parts when the Nth frame of infrared thermal image is collected. The larger the Euclidean distance, the greater the difference between the relative distribution characteristics and the relative distribution characteristics when the remaining frames of infrared thermal images are collected, the greater the degree of mutation, that is, the greater the temperature relative distribution mutation degree S2(N,m).
[0045] S4: Forward fusion of the temperature distribution sharp change degree and the temperature relative distribution mutation degree is performed to construct the temperature distribution anomaly degree of any superpixel block.
[0046] It can be understood that forward fusion is a fusion method such as addition and multiplication between data. The specific forward fusion method is determined by the implementer according to the actual situation, and this application does not impose any special restrictions.
[0047] Furthermore, the product of the temperature distribution sharp change degree S1(N,m) and the temperature relative distribution mutation degree S2(N,m) is recorded as the temperature distribution abnormality S(N,m) of the superpixel block A(N,m), which is used to characterize the degree of abnormality in the data distribution of the surface temperature of the livestock animal part corresponding to the superpixel block A(N,m) when the Nth frame of infrared thermal image is collected. The larger the product, the greater the degree of abnormality, that is, the greater the temperature distribution abnormality S(N,m).
[0048] S5: Determine the ambient temperature fluctuation coefficient of the current frame infrared thermal image by utilizing the chaotic distribution of the temperature mean in the background image of all frames of infrared thermal images; determine the temperature noise interference degree of any super pixel block by combining the ambient temperature fluctuation coefficient and the temperature distribution abnormality of any super pixel block.
[0049] In order to reduce the influence of ambient temperature on the degree of noise interference of the temperature data of each part of the target livestock in the image area corresponding to the infrared thermal image A(N), the following processing is performed: Furthermore, taking the Nth frame infrared thermal image A(N) as an example, the average temperature value of all pixels in the background image B2(N) is used as the ambient temperature of the infrared thermal image A(N). The chaotic distribution of ambient temperature in all frames of infrared thermal images is used as the ambient temperature fluctuation coefficient of the current frame of infrared thermal image.
[0050] Specifically, the standard deviation of the ambient temperature of all frames of the infrared thermal image is recorded as the ambient temperature fluctuation coefficient H(N) of the infrared thermal image A(N), which is used to characterize the degree of drastic fluctuation in the temperature of the environment in which the target livestock is located during the data acquisition period of the Nth frame of the infrared thermal image. The larger the standard deviation, the greater the fluctuation degree, that is, the larger the ambient temperature fluctuation coefficient H(N).
[0051] Furthermore, the temperature noise interference degree of any super-pixel block is determined by combining the ambient temperature fluctuation coefficient and the temperature distribution abnormality of any super-pixel block.
[0052] The temperature noise interference degree of any super-pixel block is obtained by reversely fusing the temperature distribution anomaly degree of any super-pixel block with the ambient temperature fluctuation coefficient.
[0053] Specifically, taking the superpixel block A(N,m) as an example, the temperature noise interference degree G(N,m) of the superpixel block A(N,m) is obtained, which is used to characterize the degree to which the temperature data of the corresponding image area of the livestock animal part corresponding to the superpixel block A(N,m) in the Nth frame of infrared thermal image is interfered by noise. The calculation method of the temperature noise interference degree G(N,m) of the superpixel block A(N,m) is: G(N,m)= , where S(N,m) represents the temperature distribution anomaly of the superpixel block A(N,m); H(N) represents the ambient temperature fluctuation coefficient of the infrared thermal image A(N); Represents the parameter constant. In order to prevent the denominator from being 0, The value is 0.01 and can be set by the implementer.
[0054] It should be understood that when the Nth frame of infrared thermal image is collected, the greater the degree of abnormality in the data distribution of the surface temperature of the part of the livestock corresponding to the superpixel block A(N,m), that is, the larger S(N,m), which means that the temperature value of the pixel in the superpixel block A(N,m) is more affected by the sudden change of the ambient temperature or the noise interference during the data collection process of the infrared thermal image, and during the data collection of the Nth frame of infrared thermal image, the smaller the degree of drastic fluctuation of the temperature of the environment in which the target livestock is located, that is, the smaller H(N), the more likely the abnormality of the temperature value of the pixel in the superpixel block A(N,m) is caused by noise interference, and the temperature value of the pixel in the superpixel block A(N,m) is more affected by noise interference, that is, the temperature noise interference degree G(N,m) is larger.
[0055] Step 3: Analyze the filter window size of each pixel in the infrared thermal image of the current frame using the temperature noise interference degree, and use it to filter the infrared thermal image of the target livestock.
[0056] Taking the i-th pixel d(N,i) in the infrared thermal image A(N) as an example, the filter window size R(N,i) of the pixel d(N,i) is calculated to characterize the denoising of the infrared thermal image A(N) using the bilateral filtering algorithm. Among them, Gaussian filtering, median filtering, etc. can also be used when denoising the infrared thermal image using the filter window.
[0057] Among them, the calculation method of the filter window size R(N,i) of the i-th pixel d(N,i) in the infrared thermal image A(N) is: ; In the formula, d(N,i) represents the i-th pixel in the infrared thermal image A(N); A(N,m) represents the m-th superpixel block in the infrared thermal image A(N); G(N,m) represents the temperature noise interference of the superpixel block A(N,m); norm[] represents the Min-Max normalization function; round{} represents the rounding function; r1 and r2 both represent the adjustment parameters of the filter window size, which are used to adjust the specific filter window when using the filtering algorithm, where r1 and r2 are 3 and 6 respectively, which can be set by the implementer.
[0058] It should be understood that the pixel point d(N,i) belongs to the corresponding pixel point of the body surface of the target livestock animal in the infrared thermal image A(N), that is, , and if the temperature data of the corresponding image area of the livestock animal part where the pixel point d(N,i) is located in the infrared thermal image A(N) is more disturbed by noise, that is, G(N,m) is larger, then in order to effectively reduce the influence of noise on the temperature data, the filtering window of the pixel point d(N,i) in the bilateral filtering algorithm should be larger, that is, R(N,i) should be larger, if G(N,m) is smaller, then in order to avoid excessive smoothing of the temperature data, R(N,i) should be smaller; and if the pixel point d(N,i) belongs to the pixel point corresponding to the environmental area where the target livestock animal is located in the infrared thermal image A(N), that is In order to enhance the recognizability of the temperature data of the target livestock in the infrared thermal image A(N), the filtering window of the pixel point d(N,i) in the bilateral filtering algorithm is set to r1+r2.
[0059] The same method as the filter window size R(N,i) is used to calculate the filter window size of each pixel in the infrared thermal image A(N), and the infrared thermal image A(N) is denoised using a bilateral filtering algorithm, wherein the filter window size of each pixel is used as the size of the filter window of the pixel in the bilateral filtering algorithm to obtain a denoised infrared thermal image A1(N), wherein the bilateral filtering algorithm is a well-known technology and the specific process is not repeated here.
[0060] The infrared thermal image A1 (N) is used as the external temperature monitoring result of the target livestock animal at the t-th temperature detection moment, thereby completing the external temperature monitoring of the target livestock animal.
[0061] Based on the same inventive concept as the above method, an embodiment of the present application also provides an animal external temperature monitoring device for animal husbandry and veterinary medicine, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of a method for monitoring the external temperature of an animal for animal husbandry and veterinary medicine described in any one of the above methods are implemented.
[0062] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0063] It should be noted that, unless otherwise specified and limited, terms such as "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of further restrictions, an element defined by the sentence "including one..." does not exclude the existence of other identical elements in the article or device including the element. In addition, the term "and\or" used herein includes any and all combinations of one or more related listed items.
[0064] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not invented by the present application.
[0065] It will be appreciated that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine, characterized in that: The method comprises the following steps: Step 1: continuously collecting a preset number of frames of infrared thermal images of the target livestock; Step 2: Analyze the temperature noise interference of each super pixel block in the foreground image of the current frame infrared thermal image; specifically: S1: Perform super-pixel block segmentation on the foreground image of the infrared thermal image of the current frame; S2: Obtain the superpixel block at the same position of any superpixel block according to the distance between the central pixel points of the superpixel block; determine the sharp change degree of temperature distribution of any superpixel block by using the temperature difference between any superpixel block in the current frame and the superpixel block at the same position in the previous adjacent frame, and the average difference level between the temperature difference and the superpixel blocks at the same position in all adjacent frames before the current frame; S3: Based on the difference in average temperature between any super-pixel block and its neighboring super-pixel blocks in the infrared thermal image of the current frame, a temperature sequence of the neighboring parts of any super-pixel block is constructed; the overall difference between the temperature sequence of the neighboring parts of any super-pixel block and the temperature sequences of the neighboring parts of all super-pixel blocks in the same position is analyzed to determine the relative temperature distribution mutation degree of any super-pixel block; S4: forwardly fuse the temperature distribution sharp change degree and the temperature relative distribution mutation degree to construct the temperature distribution anomaly degree of any super pixel block; S5: using the chaotic distribution of the temperature mean in the background image of all frames of infrared thermal images, determining the ambient temperature fluctuation coefficient of the current frame of infrared thermal image; combining the ambient temperature fluctuation coefficient and the temperature distribution abnormality of any super pixel block, determining the temperature noise interference degree of any super pixel block; Step 3: Analyze the filter window size of each pixel in the infrared thermal image of the current frame using the temperature noise interference degree, and use it to filter the infrared thermal image of the target livestock.
2. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine according to claim 1, characterized in that: The foreground image is an image of the livestock animal's body surface temperature portion obtained by performing Otsu threshold segmentation on the infrared thermal image of the current frame.
3. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine according to claim 1, characterized in that: The method for obtaining the superpixel block in the same position as any superpixel block is as follows: in all frames of infrared thermal images, all superpixel blocks where other central pixels are closest to the central pixel of any superpixel block are taken as the superpixel blocks in the same position as any superpixel block.
4. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine according to claim 1, characterized in that: The degree of rapid change in the temperature distribution of any superpixel block is determined by the product of the temperature difference and the average difference level.
5. A method for monitoring the external temperature of animals for animal husbandry and veterinary use as claimed in claim 4, characterized in that: The temperature difference is further determined as the Bhattacharyya distance between the temperature histograms of the superpixel blocks.
6. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine according to claim 1, characterized in that: The process of constructing the temperature sequence of the neighboring parts of any super pixel block includes: In the infrared thermal image of the current frame, a preset number of super-pixel blocks having the smallest position distances to the central pixel point of any super-pixel block are used as neighboring super-pixel blocks of any super-pixel block; The average temperatures of the neighboring superpixel blocks of any superpixel block are arranged into a sequence from small to large according to the position distance; The values of the sequence that are greater than the average temperature of any super pixel block are marked as 1, otherwise they are marked as 0, and the marked sequence is recorded as the temperature sequence of the adjacent parts of any super pixel block.
7. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine according to claim 1, characterized in that: The abnormality of the temperature distribution of any super pixel block is determined by the product of the rapid change degree of the temperature distribution of any super pixel block and the sudden change degree of the relative temperature distribution.
8. A method for monitoring the external temperature of animals for animal husbandry and veterinary medicine according to claim 1, characterized in that: The temperature noise interference degree of any super-pixel block is obtained by reversely fusing the temperature distribution anomaly degree of any super-pixel block and the ambient temperature fluctuation coefficient.
9. A method for monitoring the external temperature of animals for animal husbandry and veterinary use according to claim 1, characterized in that: The analysis process of the filter window size of each pixel is as follows: The filter window size of the i-th pixel d(N,i) in the infrared thermal image A(N) is recorded as R(N,i); ; In the formula, d(N,i) represents the i-th pixel in the infrared thermal image A(N); A(N,m) represents the m-th superpixel block in the infrared thermal image A(N); G(N,m) represents the temperature noise interference of the superpixel block A(N,m); norm[] represents the Min-Max normalization function; round{} represents the rounding function; r1 and r2 both represent the adjustment parameters of the filter window size.
10. An animal external temperature monitoring device for animal husbandry and veterinary medicine, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of a method for monitoring the external temperature of animals for animal husbandry and veterinary use as described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Superpixel-based electric transmission and transformation equipment infrared fault image segmentation method
CN104217425A
Animal body temperature intelligent monitoring system for animal husbandry and veterinary medicine based on data enhancement
CN117237244A
Animal body temperature detection system for animal husbandry and veterinary medicine based on IR thermal imaging
CN117893870A
Infrared image acquisition and early warning system for animal epidemic disease monitoring
CN118261821A
Animal body temperature detection system for animal husbandry and veterinary medicine
CN118362207A