A non-contact infrared body temperature monitoring device and method for livestock veterinarians

By screening and analyzing key corner points in infrared body temperature monitoring images, and adjusting image enhancement parameters in combination with position sequence and relative clarity, the problem of insufficient image contrast and clarity of infrared body temperature monitoring systems is solved, achieving more accurate temperature difference display and higher monitoring accuracy.

CN119784765BActive Publication Date: 2025-06-10DALIAN JIAYUAN TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510287179.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-10
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

When existing infrared body temperature monitoring systems capture the weak thermal radiation changes of animals, the image contrast and clarity are low, making it difficult to accurately reflect small temperature differences.

Method used

By analyzing the grayscale characteristics of corner points and their neighboring pixel points in infrared images, screening key corner points, and analyzing distribution characteristics and grayscale characteristics in the connecting domain of key corner points, combining position sequence and relative clarity, determining the credibility of the image, and adjusting the gain coefficient of the linear transform according to the credibility, image enhancement is completed.

Benefits of technology

The contrast and clarity of infrared body temperature monitoring images are improved, so that smaller temperature differences can be reflected in the image more accurately, and the accuracy of body temperature monitoring is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784765B_ABST
    Figure CN119784765B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image enhancement, and particularly relates to a non-contact infrared body temperature monitoring device and method for livestock veterinarians. The present invention screens key corner points by analyzing the gray-scale features of corner points and their neighboring pixel points; within the connected domain of the key corner points, analyzes the distribution features of other key corner points and the gray-scale features of pixel points to obtain the final key nature of the key corner points; analyzes the changes in distance and angle of the connected domain in consecutive frame images, and combines the position changes and the changes in the final key nature to obtain the relative clarity of the connected domain; in each frame of image, analyzes the area ratio of the connected domain to the target area, and combines the relative clarity to determine the credibility of each frame of image, obtains the gain coefficient in the linear transformation, and completes the image enhancement. By performing enhancement processing on the infrared image, the present invention can accurately reflect smaller temperature differences on the image, improving the contrast and clarity of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle networking data transmission, and particularly relates to a non-contact infrared body temperature monitoring device and method for veterinary use in livestock farming. Background Art

[0002] When some animals in a farm show symptoms of suspected infectious diseases, such as coughing, diarrhea, listlessness, etc., in order to determine whether the disease is contagious and whether it has spread in the group, it is necessary to isolate the animals with suspected infectious disease symptoms and monitor their body temperature for a long time, so as to detect infected individuals in time and treat them as early as possible.

[0003] An intelligent body temperature monitoring system is a system that uses computer vision technology and artificial intelligence algorithms to identify body temperature. This system usually consists of an infrared thermometer, a camera, a computer, artificial intelligence algorithms, etc., and can measure the temperature of livestock animals without contact and automatically identify livestock animals with abnormal body temperature. The principle of infrared temperature measurement for livestock animals is to convert the infrared image of livestock animals into an infrared grayscale image of livestock animals, and then convert the grayscale value of the infrared grayscale image of livestock animals into a temperature value. Infrared images are formed based on the thermal radiation differences of objects. However, the temperature differences between different parts of an animal's body are not particularly significant, and the detector sensitivity of infrared thermal imaging equipment is limited, with insufficient ability to capture weak thermal radiation changes, so that small temperature differences cannot be accurately reflected in the image, resulting in low contrast and clarity of the image. When using linear transformation to enhance the image, an inappropriate gain coefficient will result in poor image enhancement effect. Summary of the Invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a non-contact infrared body temperature monitoring device and method for veterinary use in livestock farming.

[0005] According to the first aspect of the embodiments of the present invention, a non-contact infrared body temperature monitoring method for veterinary use in livestock farming is provided, and the technical solution adopted is specifically as follows:

[0006] Collect infrared images, and determine the target area in each frame of image and all corner points in the target area;

[0007] Analyze the gray-scale features of the corner points and their neighboring pixel points, determine the initial criticality of the corner points, and screen out key corner points;

[0008] Within the connected domain of the key corner points, analyze the distribution features of other key corner points and the gray-scale features of pixel points, and combine the initial criticality to obtain the final criticality of the key corner points;

[0009] Analyze the position sequence of the key corner points in consecutive frame images to obtain the final criticality sequence of the key corner points;

[0010] Analyze the changes in distance and angle of the connected region in consecutive frame images, and combine the position sequence and the final key sequence to obtain the relative clarity of the connected region.

[0011] In each frame image, analyze the area ratio of the connected region to the target region, and combine the relative clarity to determine the credibility of each frame image.

[0012] Determine the gain coefficient in the linear transformation according to the credibility to complete image enhancement.

[0013] In some embodiments of the present invention, analyze the gray-scale features of the corner points and their neighboring pixel points, determine the initial key properties of the corner points, and screen key corner points, including:

[0014] Taking the corner point as the center, construct a corner point window.

[0015] Within the corner point window, taking the corner point as the center, analyze the gradient magnitudes of pixel points in different directions to obtain the gray-scale change speed within the corner point window.

[0016] Within the corner point window, analyze the gray-scale difference between the corner point and other pixel points to obtain the gray-scale difference magnitude within the corner point window.

[0017] Combine the gray-scale change speed and the gray-scale difference magnitude to obtain the initial key property of the corner point.

[0018] According to the initial key property, screen to obtain key corner points.

[0019] In some embodiments of the present invention, within the connected region of the key corner points, analyze the distribution characteristics of other key corner points and the gray-scale features of pixel points, and combine the initial key property to obtain the final key property of the key corner points, including:

[0020] Obtain the connected region of the key corner point.

[0021] Calculate the average gray-scale value of all pixel points within the connected region to obtain the gray-scale feature of the connected region.

[0022] Determine the center point of the connected region, obtain the distances from other key corner points within the connected region to the center point, and combine the initial key property of other key corner points to obtain the influence of other key corner points within the connected region.

[0023] According to the gray-scale feature and the influence, correct the initial key property of the key corner point to obtain the final key property of the key corner point.

[0024] In some embodiments of the present invention, after obtaining the connected component of the key corner points, the following steps are further included:

[0025] Obtain the number of key corner points within the connected component;

[0026] If the number of key corner points is 1, then the initial criticality of the key corner point is used as the final criticality of the key corner point.

[0027] In some embodiments of the present invention, analyze the changes in distance and angle of the connected component in consecutive frame images, and combine the position sequence and the final criticality sequence to obtain the relative clarity of the connected component, including:

[0028] In the consecutive frame images where the key corner points appear, analyze the area ratio of the connected component in the first frame image and other frame images, and analyze the difference in the number of key corner points of the connected component in the first frame image and other frame images, to obtain the degree of change in distance and angle of the connected component in consecutive frame images;

[0029] According to the degree of change in distance and angle, combine the position sequence and the final criticality sequence to obtain the relative clarity of the connected component.

[0030] In some embodiments of the present invention, according to the degree of change in distance and angle, combine the position sequence and the final criticality sequence to obtain the relative clarity of the connected component, including:

[0031] According to the position sequence, calculate the absolute value of the Euclidean distance of the key corner point in the first frame image and other frame images to obtain a distance factor;

[0032] According to the final criticality sequence, calculate the absolute value of the difference in the final criticality of the key corner point in the first frame image and other frame images to obtain a criticality factor;

[0033] According to the degree of change in distance and angle, the final criticality of the key corner point in the first frame image, and the number of consecutive frame images, combine the distance factor and the criticality factor to obtain the relative clarity of the connected component.

[0034] In some embodiments of the present invention, determine the gain coefficient in the linear transformation according to the credibility to complete image enhancement, including:

[0035] Preset the original gain coefficient of the linear transformation;

[0036] According to the credibility, correct the original gain coefficient to obtain the gain coefficient in the linear transformation;

[0037] According to the gain coefficient, perform enhancement on each frame of the image.

[0038] In some embodiments of the present invention, obtaining the connected domain of the corner points includes:

[0039] Performing region growing with the key corner points as seed points to obtain the connected domain of the key corner points.

[0040] In some embodiments of the present invention, determining the target region and all corner points in the target region in each frame of image includes:

[0041] Converting each frame of image into a grayscale image;

[0042] Performing threshold segmentation on the grayscale image using the Otsu algorithm to obtain the target region;

[0043] Performing corner detection on all target regions using the Harris corner detection algorithm to obtain all corner points in the target region of each frame of image.

[0044] According to the second aspect of the embodiments of the present invention, a non-contact infrared body temperature monitoring device for livestock and veterinary use is provided, including:

[0045] A data acquisition module for acquiring infrared images and determining the target region and all corner points in the target region in each frame of image;

[0046] A key corner point determination module for analyzing the gray-scale features of the corner points and their neighboring pixel points, determining the initial criticality of the corner points, and screening key corner points;

[0047] A criticality analysis module for analyzing the distribution features of other key corner points and the gray-scale features of pixel points within the connected domain of the key corner points, and combining the initial criticality to obtain the final criticality of the key corner points;

[0048] A relative clarity analysis module for analyzing the position sequence of the key corner points in consecutive frames of images to obtain the final criticality sequence of the key corner points; and analyzing the changes in distance and angle of the connected domain in consecutive frames of images, and combining the position sequence and the final criticality sequence to obtain the relative clarity of the connected domain;

[0049] An image credibility analysis module for analyzing the area ratio of the connected domain to the target region in each frame of image, and combining the relative clarity to determine the credibility of each frame of image;

[0050] An image enhancement module for determining the gain coefficient in the linear transformation according to the credibility to complete image enhancement.

[0051] Compared with the prior art, a non-contact infrared body temperature monitoring device and method for livestock and veterinary use provided by the present invention have the following beneficial effects:

[0052] 1. By analyzing the gray-scale features of all corner points and their neighboring pixel points in the target area of each frame of the image, the initial criticality of the corner points is determined, and the key corner points are screened. On the one hand, screening the key corner points reduces the amount of data for subsequent analysis and improves the analysis efficiency; more importantly, it eliminates interfering or unimportant corner points, providing a true and reliable data basis for subsequent analysis;

[0053] 2. By analyzing the distribution characteristics of other key corner points and the gray-scale features of pixel points within the connected domain of the key corner points, that is, comprehensively considering the number of key corner points contained in the connected domain and the distribution of the key corner points, the initial criticality is corrected, improving the accuracy of the criticality calculation of the key corner points, and further enhancing the contrast of small temperature differences presented in the image;

[0054] 3. By analyzing the changes in distance and angle of the connected domain in consecutive frames of the image, combined with the position changes and final criticality changes of the key corner points in consecutive frames of the image, the relative clarity of the connected domain is obtained, that is, considering the influence of the movement characteristics of the cattle body on the clarity of the connected domain of the key corner points, and then obtaining an appropriate gain coefficient to improve the contrast and clarity of the image when enhancing the image using linear transformation;

[0055] 4. By performing enhancement processing on the images obtained by the infrared body temperature monitoring device, small temperature differences can be accurately presented in the image, improving the contrast and clarity of the image, enabling doctors to better grasp the body temperature of livestock through the enhanced images. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0057] Figure 1 It is a schematic diagram of the basic process of a non-contact infrared body temperature monitoring method for livestock veterinarians provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0058] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation manner, structure, features, and effects of a non-contact infrared body temperature monitoring device and method for livestock veterinarians proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. Terms such as "including", "comprising", or any other variant thereof are intended to cover non-exclusive inclusion, such 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 elements inherent to such article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the presence of additional identical elements in the article or device including the element.

[0060] The following specifically describes the specific solution of a non-contact infrared body temperature monitoring method for livestock veterinarians provided by the present invention in conjunction with the accompanying drawings.

[0061] Please refer to Figure 1 , which shows the basic process of a non-contact infrared body temperature monitoring method for livestock veterinarians provided by one embodiment of the present invention.

[0062] As Figure 1 shown, a non-contact infrared body temperature monitoring method for livestock veterinarians provided by one embodiment of the present invention specifically includes:

[0063] S100: Collect infrared images, and determine the target area in each frame of the image and all corner points in the target area.

[0064] For animals that need to be continuously monitored for body temperature for a long time, such as during the recovery observation period after surgery, the suspected infectious disease symptom confirmation observation period, or the close observation period after being infected with a disease, an infrared imager is usually used to continuously monitor the body temperature of the isolated animals for a long time, detect the infrared video data, and obtain several frames of infrared images according to the infrared video data. Specifically, the infrared imager can be fixed in the corner of the isolation shed and adjusted to a suitable position to ensure that the entire space inside the isolation shed can be photographed, so as to ensure that the cattle can be monitored when they are in different positions in the shed.

[0065] To facilitate the subsequent data analysis, after obtaining several frames of infrared images, further determine the target area and all corner points in the target area in each frame of the image. The specific implementation method is as follows: for each frame of infrared image in the monitored infrared video data, first convert it into a grayscale image to obtain the grayscale image corresponding to each frame of infrared image, and the subsequent analysis is also performed on the grayscale image; in the infrared image, there is a certain difference between the body temperature of the cow and the background environment area, which will also show a certain difference in the grayscale image, so the Otsu algorithm is used to perform threshold segmentation on the grayscale image, determine the optimal threshold, and take the area composed of pixels with grayscale values ​​greater than the optimal threshold in the grayscale image as the area of ​​the cow's body, record it as the target area, and then obtain the target area in each frame of grayscale image; use the Harris corner detection algorithm to perform corner detection on all target areas to obtain all corner points of the target area in each frame of image.

[0066] S200: Analyze the grayscale features of the corner points and their neighboring pixels, determine the initial criticality of the corner points, and select the key corner points.

[0067] In infrared images, areas with higher temperatures usually appear brighter in color, while areas with lower temperatures appear darker in color. After conversion to grayscale images, brighter areas appear larger in grayscale values, while dark areas appear relatively smaller in grayscale values.

[0068] Under normal circumstances, the temperature of different areas of the cow's body will vary to a certain extent. The core area, such as the chest or abdomen, is relatively high, which can better reflect the animal's body temperature; while the extremities, ears and other parts will have relatively low temperatures due to faster heat dissipation. If there is a disease, the body temperature will usually rise, but there will be certain differences in different body areas.

[0069] Since most of the detected corner points appear at the contour edges of the cow's body, at the joints, or at the junctions of different temperature zones, there may be multiple corner points in the key area of ​​body temperature monitoring. Each corner point has different representativeness for the key area. Therefore, it is necessary to further screen out the key corner points.

[0070] Corner points are points where the grayscale changes significantly in all directions. Therefore, the distribution of grayscale values ​​at each corner point and its neighborhood is uneven. For example, a corner point on the body contour and its neighborhood may have some pixels representing the cow's body with higher grayscale values, and some pixels representing the background area with lower grayscale values. There may also be uneven grayscale values ​​at the corner points at the junction of different temperature areas and their neighborhoods. Therefore, for any corner point, the more uneven the distribution of grayscale values ​​in its neighborhood, the more drastic the change in the cow's body temperature at the corner point, and the more critical the corner point is for the cow's body temperature detection; conversely, the less critical the corner point is for the cow's body temperature detection.

[0071] Based on the above analysis, in the embodiments of the present invention, by analyzing the gray-scale features of corner points and their neighboring pixel points, the initial key importance of corner points is determined, and key corner points are screened. Further, it includes:

[0072] First, a corner window is constructed with the corner point as the center. The specific implementation is: with each corner point as the center, a window of size 10×10 is constructed, denoted as the corner window.

[0073] Then, within the corner window, with the corner point as the center, the gradient magnitudes of pixel points in different directions are analyzed to obtain the gray-scale change speed within the corner window. The specific implementation is: within each corner window, with the corner point as the center, calculate the gradient magnitudes of pixel points in different directions (horizontal, vertical, diagonal), denoted as , which is used to represent the gray-scale change speed in different directions within the corner window. The larger the gradient magnitude, the faster the gray-scale change of pixel points in this direction, and the more uneven the gray-scale.

[0074] Next, within the corner window, the gray-scale difference between the corner point and other pixel points is analyzed to obtain the magnitude of the gray-scale difference within the corner window. The specific implementation is: calculate the absolute value of the gray-scale difference between each pixel point in the corner window and the corner point, and then obtain the maximum value of the absolute value of the gray-scale difference between each pixel point in the corner window and the corner point, denoted as , which represents the gray-scale change range within the corner window; and calculate the variance of the gray-scale differences between all pixel points in the corner window and the corner point, denoted as , The larger the value of , the more inconsistent the gray-scale differences between all pixel points in the corner window and the corner point, indicating that the gray-scale difference within the corner window is larger; by using the maximum value of the absolute value of the gray-scale difference as the weight of the variance of the gray-scale difference , the magnitude of the gray-scale difference within the corner window is obtained.

[0075] Furthermore, by combining the gray-scale change speed and the magnitude of the gray-scale difference, the initial key importance of the corner point is obtained. The specific implementation is: since the faster the gray-scale change speed, the more uneven the gray-scale; and the larger the magnitude of the gray-scale difference, the greater the gray-scale difference; therefore, an initial key importance calculation formula for each corner point for bovine body temperature monitoring is constructed as:

[0076]

[0077] In the formula, represents the initial key importance of the th corner point for bovine body temperature monitoring; represents the mean value of the gradient magnitudes in different directions within the th corner point window; represents the The variance of the gray - level differences between all pixel points within a corner - point window and the corner point; Denote the maximum value of the absolute value of the gray - level differences between each pixel point within the

[0078] Denote the gray - level change range within the corner - point window. The larger the gray - level change range within the corner - point window, and the greater the gray - level difference between the corner point and all other pixel points within the corner - point window, it indicates that the gray - level difference within the corner - point window is greater, and the greater the initial key importance for bovine body temperature monitoring, that is the larger the value of Denote the mean value of the gradient amplitudes in different directions within the corner - point window. The larger this value, it indicates that the gray - level changes of pixel points in all directions within the corner - point window are faster, indicating that the gray - level within the corner - point window is more uneven, and the greater the initial key importance for bovine body temperature monitoring. That is the larger the value of

[0079] Finally, according to the initial key importance, key corner points are screened. The specific implementation method is: through the linear normalization function , normalize the initial key importance data to the range of ; preset the key - importance threshold as 0.6. When the initial key - importance value is greater than 0.6, mark this corner point as a key corner point, and then all key corner points are screened.

[0080] S300: Within the connected domain of the key corner points, analyze the distribution characteristics of other key corner points and the gray - level characteristics of pixel points, and combine with the initial key importance to obtain the final key importance of the key corner points.

[0081] After obtaining the key corner points, each key corner point corresponds to an initial key importance. In order to more accurately evaluate the key importance of the key corner points for bovine body temperature detection, in the embodiments of the present invention, within the connected domain of the key corner points, analyze the distribution characteristics of other key corner points and the gray - level characteristics of pixel points, and combine with the initial key importance to obtain the final key importance of the key corner points. Further, it includes:

[0082] Obtain the connected domain of the key corner points. The specific implementation method is: perform region growing with the key corner point as the seed point to obtain the connected domain of the key corner point. The shape and size of the connected domain corresponding to each key corner point, and the gray - level characteristics within the region are not exactly the same, and the gray - level difference from the surrounding connected domains is also relatively obvious.

[0083] In the connected component of each obtained key corner point, the number of key corner points included is different. Some may have only one key corner point, while some may contain multiple key corner points. Therefore, in some embodiments of the present invention, after obtaining the connected component of the key corner point, it further includes: obtaining the number of key corner points in the connected component; if the number of key corner points is 1, the initial criticality of the key corner point is used as the final criticality of the key corner point, that is, when there is only one key corner point in the connected component of the key corner point, the value of the key corner point can be used as its final criticality for bovine body temperature monitoring; when there are multiple key corner points in the connected component of the key corner point, it is necessary to comprehensively consider the number of key corner points included in the connected component and the distribution of the key corner points.

[0084] When there are multiple key corner points in the connected component of the key corner point, the method for analyzing the final criticality of the key corner point includes: calculating the average gray value of all pixel points in the connected component to obtain the gray feature of the connected component; determining the center point of the connected component, obtaining the distances from other key corner points in the connected component to the center point, and combining the initial criticality of other key corner points to obtain the influence of other key corner points in the connected component; correcting the initial criticality of the key corner point according to the gray feature and the influence to obtain the final criticality of the key corner point. The formula for constructing the final criticality of the key corner point for bovine body temperature monitoring is:

[0085]

[0086] In the formula, represents the final criticality of the th key corner point for bovine body temperature monitoring; represents the average value of the gray values of all pixel points in the connected component of the th key corner point; represents the number of other key corner points included in the connected component of the th key corner point; represents the distance from the th other key corner point to the center point of the connected component in the connected component of the th key corner point; represents the initial criticality of the th other key corner point in the connected component of the th key corner point; represents the initial criticality of the th key corner point; represents the linear normalization function.

[0087] The larger the value of The larger the value, that is, the more other key corner points are included in the connected region corresponding to the key corner point, the more important the connected region corresponding to the key corner point is, indicating that the key corner point is more crucial for the monitoring of the cattle body temperature; The smaller the value, it indicates that the th other key corner point can better represent the connected region, and the credibility is greater, because the body temperature monitoring generally focuses on the center of the key area; The larger the value, it indicates that the initial criticality of the other key corner points included in the connected region corresponding to the key corner point is greater, indicating that the overall criticality of the connected region corresponding to the key corner point is greater, and the corresponding key corner point is more crucial for the monitoring of the cattle body temperature; represents the influence degree of all other key corner points included in the connected region corresponding to the key corner point on the criticality of the key corner point. When the number of other key corner points in the connected region is more, the distance from the center point is smaller, and the initial criticality is also greater, the influence on the initial criticality of the th key corner point is greater; through to the initial criticality of the th key corner point is corrected to obtain the final criticality of the th key corner point .

[0088] Similarly, determine the final criticality of all key corner points for the cattle body temperature monitoring in each frame of the image.

[0089] S400: Analyze the position sequence of the key corner points in the consecutive frame images to obtain the final criticality sequence of the key corner points.

[0090] Since during the entire body temperature monitoring process, the monitor is fixed, while the monitored cattle is not fixed and can move around at will, so its position may be different at different times and is also different in the monitored infrared video. Therefore, it is also necessary to analyze the differences between the key corner points in adjacent frame images.

[0091] Therefore, in the embodiment of the present invention, first, by analyzing the position sequence of the key corner points in the consecutive frame images, the final criticality sequence of the key corner points is obtained. It is convenient to analyze the differences between the key corner points in adjacent frame images later. The specific implementation method is as follows:

[0092] First, use the optical flow method to obtain the positions of all key corner points in each frame of the image within the target time period, and obtain the position sequence of each key corner point. Taking the th frame of the image as an example, determine all key corner points and their positions in each frame of the image after the th frame, and obtain the The position sequence of each key corner point in the frame images. Here, the position sequence means that the key corner points appear continuously. When a key corner point does not exist in a certain frame image, the position sequence stops. For example, the th key corner point in the th frame appears in each frame after the th frame and disappears in the th frame. Then, the position sequence of the th key corner point in the th frame is only composed of the positions of the th key corner point in the th frame to the

[0093] Then, according to the position sequence of each key corner point, the final criticality sequence of each key corner point is obtained correspondingly. Due to the movement of the cow, the appearance time of each key corner point is different, and the lengths of the corresponding final criticality sequence and position sequence are also different. Since the positions of the key corner points are different when they appear in each frame image, and infrared imaging is affected by distance and angle. When the distance is too close, the temperature of the target will be too high. When the distance is too far, the temperature will be too low, and the gray-scale features shown in the image are also different. Therefore, the final criticality of the key corner points in each frame image is not exactly the same.

[0094] S500: Analyze the changes in distance and angle of the connected domain in consecutive frame images, and combine the position sequence and the final criticality sequence to obtain the relative clarity of the connected domain.

[0095] After obtaining the position sequence and the corresponding final criticality sequence of the key corner points in consecutive frame images, in the embodiment of the present invention, by analyzing the changes in distance and angle of the connected domain in consecutive frame images, and combining the position sequence and the final criticality sequence, the relative clarity of the connected domain is obtained. Further included:

[0096] First, in the consecutive frame images where the key corner points appear, analyze the area ratio of the connected domain in the first frame image and other frame images, and analyze the difference in the number of key corner points of the connected domain in the first frame image and other frame images, to obtain the change degree of the distance and angle of the connected domain in consecutive frame images. Specifically, construct the formula for the change degree of the distance and angle of the connected domain in consecutive frame images as:

[0097]

[0098] In the formula, represents the change degree of the distance and angle of the connected domain of the th key corner point in consecutive frame images; represents the The connected domain area of a key corner point in the first frame image of the final key sequence; denotes the th key corner point in the th frame image of the final key sequence; denotes the number of key corner points contained within the connected domain of the th key corner point in the first frame image of the final key sequence; denotes the number of key corner points contained within the connected domain of the th key corner point in the th frame image of the final key sequence; denotes the exponential function with the natural constant as the base.

[0099] denotes the change in the connected domain area corresponding to the th key corner point between the first frame image and other frame images in the final key sequence. The closer the value of is to 1, the more consistent the connected domain area is; denotes the difference in the number of key corner points contained within the connected domain corresponding to the th key corner point between the first frame image and other frame images; when the area of the connected domain is close in the

[0100] th frame and the first frame, the closer the number of key corner points contained within the connected domain is, indicating that the changes in angle and distance are smaller, the impact on clarity is smaller, and the relative clarity of the connected domain is greater. ; and according to the final key sequence, calculate the absolute value of the final key difference of the key corner point between the first frame image and other frame images to obtain the key factor ; according to the degree of change in distance and angle , the final key of the key corner point in the first frame image, and the number of consecutive frame images , combine the distance factor and the key factor to obtain the relative clarity of the connected domain corresponding to the key corner point. The formula for constructing the relative clarity of the connected domain corresponding to the key corner point is:

[0101]

[0102] In the formula, denotes the The relative clarity of the connected component of a key corner point; Denote the maximum number of consecutive appearances of the th key corner point in the image, that is, the number of data in its final criticality sequence; Denote the first final criticality value in the final criticality sequence of the th key corner point; Denote the absolute value of the difference between the first final criticality value in the final criticality sequence of the th key corner point and other final criticality values after the first value; Denote the Euclidean distance between the positions in other frame images and the position in the first frame image in the position sequence; Denote the degree of change in distance and angle of the connected component of the th key corner point in consecutive frame images; Denote the exponential function with the natural constant

[0103] The maximum number of consecutive appearances of the key corner point in the image The larger it is, the greater the relative clarity of the connected component of the key corner point; the first final criticality value in the final criticality sequence of the key corner point The larger it is, the more critical the key corner point is, and thus the greater the relative clarity of the connected component of the key corner point; in the final criticality sequence, the smaller the criticality difference between other values and the first value, and in the position sequence, the smaller the position difference between other values and the first value, that is The smaller it is, the more credible the criticality of the key corner point; the degree of change in distance and angle of the connected component of the key corner point in consecutive frame images The smaller it is, the smaller the movement of the cattle body during the target time period, and thus the greater the relative clarity of the connected component of the key corner point.

[0104] Similarly, the relative clarity of the connected component of each key corner point in each frame image is obtained.

[0105] S600: In each frame image, analyze the area ratio of the connected component to the target area, and combine with the relative clarity to determine the credibility of each frame image.

[0106] For each frame image, if the area of the connected component therein is large and the relative clarity is large, then the credibility of this frame image is high. Therefore, in the embodiments of the present invention, in each frame image, analyze the area ratio of the connected component to the target area, and combine with the relative clarity to determine the credibility of each frame image. Specifically, a credibility calculation formula for each frame image is constructed as:

[0107]

[0108] In the formula, represents the credibility of the th frame image; represents the number of connected regions of key corner points in the th frame image; represents the area of the target region in the th frame image, that is, the area of the connected region representing the cow; represents the area of the connected region of the th key corner point in the th frame image; represents the average clarity of all connected regions in the th frame image.

[0109] represents the ratio of the area of the th connected region to the area of the target region. The larger the ratio of the area of the connected region to the target region and the greater the clarity, the greater the credibility of the image, corresponding to with a larger value.

[0110] S700: Determine the gain coefficient in the linear transformation according to the credibility to complete image enhancement.

[0111] Determine the gain coefficient in the linear transformation according to the credibility to complete image enhancement. The specific implementation method is as follows:

[0112] First, preset the original gain coefficient of the linear transformation. The original gain coefficient is denoted as , and its value can be 10. Use the linear normalization function to normalize the credibility to , and then take the opposite number, that is, normalize the credibility to the range of . Then, according to the normalized credibility, correct the original gain coefficient to obtain the gain coefficient in the linear transformation; construct the calculation formula for the gain coefficient in the linear transformation as:

[0113]

[0114] In the formula, represents the adjusted gain coefficient when using linear transformation; represents the preset original gain coefficient; represents the normalized credibility of the th frame image.

[0115] represents The degree of adjustment is such that when the credibility is greater, the degree of adjustment is smaller, and the adjusted value is closer to the original preset value; conversely, when the credibility is smaller, the degree of adjustment is greater.

[0116] Then, according to the gain coefficient, each frame of the image is enhanced. Based on the determined credibility of each frame of the image and the gain coefficient when using linear variation, each frame of the image is adjusted to enhance the contrast of each frame of the image, so that the adjusted and enhanced image can better reflect the body temperature of the cow, which helps to more accurately monitor the body temperature and master the body temperature situation of the cow.

[0117] Based on the same inventive concept as the above method, this embodiment also provides a non-contact infrared body temperature monitoring device for livestock and veterinary use.

[0118] A non-contact infrared body temperature monitoring device for livestock and veterinary use includes: a data acquisition module, a key corner point determination module, a key analysis module, a relative sharpness analysis module, an image credibility analysis module, and an image enhancement module. Among them:

[0119] The data acquisition module is configured to acquire infrared images and determine the target area in each frame of the image and all corner points in the target area;

[0120] The key corner point determination module is configured to analyze the gray-scale features of the corner points and their neighboring pixel points, determine the initial key nature of the corner points, and screen the key corner points;

[0121] The key analysis module is configured to analyze the distribution features of other key corner points and the gray-scale features of pixel points within the connected domain of the key corner points, and combine the initial key nature to obtain the final key nature of the key corner points;

[0122] The relative sharpness analysis module is configured to analyze the position sequence of the key corner points in consecutive frames of images to obtain the final key nature sequence of the key corner points; and analyze the changes in distance and angle of the connected domain in consecutive frames of images, and combine the position sequence and the final key nature sequence to obtain the relative sharpness of the connected domain;

[0123] The image credibility analysis module is configured to analyze the area ratio of the connected domain to the target area in each frame of the image, and combine the relative sharpness to determine the credibility of each frame of the image;

[0124] The image enhancement module is configured to determine the gain coefficient in the linear transformation according to the credibility and complete the image enhancement.

[0125] It should be noted that the above sequence of embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0126] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments.

Claims

1. A non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine, characterized in that: The method comprises: Collect infrared images and determine the target area and all corner points in the target area in each frame of the image; Analyze the grayscale features of the corner point and its neighboring pixel points, determine the initial criticality of the corner point, and screen the key corner points; construct a corner point window with the corner point as the center; within the corner point window, analyze the gradient amplitudes of the pixel points in different directions with the corner point as the center, and obtain the grayscale change speed within the corner point window; within the corner point window, analyze the grayscale difference between the corner point and other pixel points, and obtain the grayscale difference size within the corner point window; combine the grayscale change speed and the grayscale difference size to obtain the initial criticality of the corner point; and screen and obtain the key corner point according to the initial criticality; In the connected domain of the key corner point, the distribution characteristics of other key corner points and the grayscale characteristics of the pixel points are analyzed, and the final criticality of the key corner point is obtained by combining the initial criticality; Analyzing the position sequence of the key corner points in the continuous frame images to obtain the final key sequence of the key corner points; Analyze the changes in distance and angle of the connected domain in the continuous frame images, and combine the position sequence and the final key sequence to obtain the relative clarity of the connected domain; in the continuous frame images where the key corner points appear, analyze the area ratio of the connected domain in the first frame image and other frame images, and analyze the difference in the number of key corner points of the connected domain in the first frame image and other frame images to obtain the degree of change of the distance and angle of the connected domain in the continuous frame images; according to the degree of change of the distance and angle, combine the position sequence and the final key sequence to obtain the relative clarity of the connected domain; In each frame of the image, analyzing the area ratio of the connected domain and the target area, and combining the relative clarity to determine the credibility of each frame of the image; The gain coefficient in the linear transformation is determined according to the credibility to complete the image enhancement.

2. The non-contact animal husbandry and veterinary infrared body temperature monitoring method according to claim 1, characterized in that: In the connected domain of the key corner point, the distribution characteristics of other key corner points and the grayscale characteristics of the pixel points are analyzed, and the final criticality of the key corner point is obtained by combining the initial criticality, including: Obtaining a connected domain of the key corner points; Calculating the mean grayscale value of all pixels in the connected domain to obtain the grayscale feature of the connected domain; Determine the center point of the connected domain, obtain the distances from other key corner points in the connected domain to the center point, and obtain the influence of other key corner points in the connected domain in combination with the initial criticality of other key corner points; The initial criticality of the key corner point is modified according to the grayscale feature and the influence to obtain the final criticality of the key corner point.

3. The non-contact animal husbandry and veterinary infrared body temperature monitoring method according to claim 2, characterized in that: Obtaining the connected domain of the key corner points, and then further comprising: Obtaining the number of key corner points in the connected domain; If the number of key corner points is 1, the initial key point of the key corner point is used as the final key point of the key corner point.

4. The non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine according to claim 1, characterized in that: According to the degree of change of the distance and the angle, the relative clarity of the connected domain is obtained by combining the position sequence and the final critical sequence, including: According to the position sequence, calculating the absolute value of the Euclidean distance between the key corner point in the first frame image and other frame images to obtain a distance factor; According to the final critical sequence, the final critical difference absolute value of the key corner point in the first frame image and other frame images is calculated to obtain a critical factor; The relative clarity of the connected domain is obtained by combining the distance factor and the criticality factor according to the degree of change of the distance and the angle, the final criticality of the key corner point in the first frame image and the number of consecutive frame images.

5. The non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine according to claim 1, characterized in that: Determining a gain coefficient in a linear transformation according to the credibility to complete image enhancement includes: Preset the original gain coefficient of the linear transformation; According to the credibility, the original gain coefficient is corrected to obtain the gain coefficient in the linear transformation; Each frame of image is enhanced according to the gain coefficient.

6. The non-contact animal husbandry and veterinary infrared body temperature monitoring method according to claim 1 or 2, characterized in that: Obtaining a connected domain of the corner point includes: Region growing is performed with the key corner points as seed points to obtain connected regions of the key corner points.

7. The non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine according to claim 1, characterized in that: Determine the target area and all corner points in each frame of the image, including: Convert each frame image into a grayscale image; Perform threshold segmentation on the grayscale image using the Otsu algorithm to obtain a target area; Harris corner detection algorithm is used to detect corners of all target areas to obtain all corner points of the target area in each frame image.

8. A non-contact infrared body temperature monitoring device for livestock and veterinary use, characterized in that: The device comprises: A data acquisition module, used to acquire infrared images and determine the target area and all corner points in the target area in each frame of the image; The key corner point determination module is used to analyze the grayscale features of the corner point and its neighboring pixel points, determine the initial keyness of the corner point, and screen the key corner points; construct a corner point window with the corner point as the center; within the corner point window, with the corner point as the center, analyze the gradient amplitudes of the pixel points in different directions to obtain the grayscale change speed within the corner point window; within the corner point window, analyze the grayscale difference between the corner point and other pixel points to obtain the grayscale difference size within the corner point window; combine the grayscale change speed and the grayscale difference size to obtain the initial keyness of the corner point; and screen and obtain the key corner point according to the initial keyness; A criticality analysis module, used to analyze the distribution characteristics of other key corner points and the grayscale characteristics of pixels in the connected domain of the key corner point, and obtain the final criticality of the key corner point by combining the initial criticality; A relative clarity analysis module is used to analyze the position sequence of the key corner points in the continuous frame images to obtain the final key sequence of the key corner points; and to analyze the change of the distance and angle of the connected domain in the continuous frame images, and to obtain the relative clarity of the connected domain in combination with the position sequence and the final key sequence; in the continuous frame images where the key corner points appear, the area ratio of the connected domain in the first frame image and other frame images is analyzed, and the difference in the number of key corner points of the connected domain in the first frame image and other frame images is analyzed to obtain the degree of change of the distance and angle of the connected domain in the continuous frame images; according to the degree of change of the distance and angle, the relative clarity of the connected domain is obtained in combination with the position sequence and the final key sequence; An image credibility analysis module, used to analyze the area ratio of the connected domain and the target area in each frame of the image, and determine the credibility of each frame of the image in combination with the relative clarity; The image enhancement module is used to determine the gain coefficient in the linear transformation according to the credibility to complete the image enhancement.

Citation Information

Patent Citations

  • Human tissue focus detection method based on infrared thermal imaging technology

    CN105962904A

  • Image enhancement method for gear

    CN115082481A