A non-contact infrared body temperature monitoring device and method for animal husbandry and veterinary medicine
By analyzing the key corner points and connection domain characteristics in the infrared image in the infrared body temperature monitoring system, combining the position sequence and relative clarity, and adjusting the image gain coefficient, the problem of insufficient image contrast and clarity in the infrared body temperature monitoring system is solved, and more accurate temperature difference display is achieved.
Patent Information
- Application Number
- CN202510287179.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-12
AI Technical Summary
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 smaller temperature differences.
By analyzing the grayscale characteristics of corner points and their neighboring pixel points in infrared images, screening key corner points, and analyzing the distribution characteristics and grayscale characteristics in their connectivity domain, combining position sequences and relative clarity to determine the credibility of the image, thereby adjusting the gain coefficient of the linear transformation to complete image enhancement.
The contrast and clarity of infrared body temperature monitoring images are improved, so that smaller temperature differences can be reflected more accurately, helping doctors better grasp the body temperature of animal husbandry animals.
Smart Images

Figure CN119784765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle networking data transmission, and in particular to a non-contact infrared body temperature monitoring device and method for animal husbandry and veterinary medicine. Background Art
[0002] When some animals in a farm show symptoms of suspected infectious diseases, such as coughing, diarrhea, and mental depression, in order to determine whether the disease is contagious and whether it has spread in the group, animals with suspected infectious disease symptoms need to be isolated and their body temperature monitored for a long time so that infected individuals can be detected in time and treated as soon as possible.
[0003] The intelligent body temperature monitoring system is a system that uses computer vision technology and artificial intelligence algorithms to identify body temperature. The system is usually composed of an infrared thermometer, a camera, a computer, an artificial intelligence algorithm, etc. It can measure the temperature of livestock animals without contact and automatically identify livestock animals with abnormal body temperatures. The principle of infrared temperature measurement of 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 based on the difference in thermal radiation of objects. However, the temperature difference between different parts of the animal's body is not particularly significant, and the detector sensitivity of infrared thermal imaging equipment is limited. It is insufficient to capture weak thermal radiation changes, so it is impossible to accurately reflect small temperature differences in the image, resulting in low contrast and clarity of the image. When using linear changes to enhance the image, an inappropriate gain coefficient will result in poor image enhancement. Summary of the invention
[0004] In order to solve the above technical problems, the object of the present invention is to provide a non-contact infrared body temperature monitoring device and method for animal husbandry and veterinary medicine.
[0005] According to a first aspect of an embodiment of the present invention, a non-contact infrared body temperature monitoring method for livestock and veterinary use is provided, and the technical solution adopted is as follows: 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 pixels, determine the initial criticality of the corner point, and select the key corner point; 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 continuous frame images, and obtain the relative clarity of the connected domain by combining the position sequence and the final critical sequence; 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.
[0006] In some embodiments of the present invention, analyzing the grayscale features of the corner point and its neighboring pixels, determining the initial criticality of the corner point, and screening the key corner point includes: Constructing a corner point window with the corner point as the center; In the corner point window, with the corner point as the center, the gradient amplitudes of the pixels in different directions are analyzed to obtain the grayscale change speed in the corner point window; In the corner point window, analyzing the grayscale difference between the corner point and other pixel points to obtain the grayscale difference in the corner point window; Combining the grayscale change speed and the grayscale difference size, obtaining the initial criticality of the corner point; According to the initial criticality, key corner points are screened and obtained.
[0007] In some embodiments of the present invention, within 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.
[0008] In some embodiments of the present invention, the process of obtaining a connected domain of the key corner points further includes: 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.
[0009] In some embodiments of the present invention, analyzing the changes in distance and angle of the connected domain in consecutive frame images, combining the position sequence and the final critical sequence, and obtaining the relative clarity of the connected domain includes: In the continuous frame images where the key corner points appear, analyzing the area ratio of the connected domain in the first frame image and the other frame images, and analyzing the difference in the number of key corner points of the connected domain in the first frame image and the 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 the angle, the relative clarity of the connected domain is obtained by combining the position sequence and the final critical sequence.
[0010] In some embodiments of the present invention, the relative clarity of the connected domain is obtained according to the degree of change of the distance and the angle, in combination with 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.
[0011] In some embodiments of the present invention, determining a gain coefficient in a linear transformation according to the credibility to perform 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.
[0012] In some embodiments of the present invention, obtaining the 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.
[0013] 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: 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.
[0014] According to a second aspect of an embodiment of the present invention, a non-contact animal husbandry and veterinary infrared body temperature monitoring device is provided, comprising: 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; A key corner point determination module is used to analyze the grayscale characteristics of the corner point and its neighboring pixels, determine the initial keyness of the corner point, and select the key corner point; 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 critical sequence of the key corner points; and to analyze the changes in the distance and angle of the connected domain in the continuous frame images, and to obtain the relative clarity of the connected domain by combining the position sequence and the final critical 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.
[0015] Compared with the prior art, the non-contact animal husbandry and veterinary infrared body temperature monitoring device and method provided by the present invention have the following beneficial effects: 1. By analyzing the grayscale features of all corner points and their neighboring pixels 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. The screening of key corner points can reduce the amount of data for subsequent analysis and improve the efficiency of analysis. More importantly, it can eliminate interfering or unimportant corner points to provide a real and reliable data basis for subsequent analysis. 2. By analyzing the distribution characteristics of other key corner points and the grayscale characteristics of pixels in the connected domain of the key corner point, that is, comprehensively considering the number of key corner points contained in the connected domain and the distribution of key corner points, the initial criticality is corrected to improve the accuracy of the criticality calculation of the key corner points, thereby improving the contrast of smaller temperature differences on the image; 3. By analyzing the changes in distance and angle of the connected domain in continuous frame images, combined with the position changes and final key changes of key corner points in continuous frame images, the relative clarity of the connected domain is obtained, that is, the influence of the movement characteristics of the cow's body on the clarity of the connected domain of the key corner points is considered, and then the appropriate gain coefficient is obtained to improve the contrast and clarity of the image when using linear changes to enhance the image; 4. By enhancing the images obtained by the infrared body temperature monitoring device, smaller temperature differences can be accurately reflected in the image, improving the contrast and clarity of the image, so that doctors can better understand the body temperature of livestock through the enhanced images. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A schematic diagram of the basic flow of a non-contact infrared body temperature monitoring method for livestock and veterinary use provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a non-contact animal husbandry and veterinary infrared body temperature monitoring device and method proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. 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 otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. Terms such as "comprises", "comprising" 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 phrase "comprising a ..." does not exclude the presence of other identical elements in the article or device including the element.
[0020] The specific scheme of a non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0021] See also Figure 1 , which shows the basic process of a non-contact infrared body temperature monitoring method for livestock and veterinary use provided by an embodiment of the present invention.
[0022] like Figure 1 As shown, an embodiment of the present invention provides a non-contact animal husbandry and veterinary infrared body temperature monitoring method, which specifically includes: S100: Collect infrared images and determine the target area and all corner points in the target area in each frame of the image.
[0023] For animals that require long-term continuous temperature monitoring, such as during the recovery observation period after surgery, the observation period for confirmation of suspected infectious disease symptoms, or the close observation period after infection, infrared imagers are usually used to monitor the temperature of isolated animals for a long time, detect infrared video data, and obtain several frames of infrared images based on 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 all spatial positions in the entire isolation shed can be captured to ensure that the cattle can be monitored at different positions in the shed.
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] Based on the above analysis, in an embodiment of the present invention, the initial criticality of the corner point is determined by analyzing the grayscale characteristics of the corner point and its neighboring pixels, and the key corner point is screened. Further including: First, a corner point window is constructed with the corner point as the center. The specific implementation method is: a window with a size of 10×10 is constructed with each corner point as the center, which is recorded as the corner point window.
[0031] Then, in the corner point window, with the corner point as the center, the gradient amplitude of the pixel points in different directions is analyzed to obtain the grayscale change speed in the corner point window. The specific implementation method is: in each corner point window, with the corner point as the center, the gradient amplitude of the pixel points in different directions (horizontal, vertical, oblique) is calculated and recorded as , which is used to indicate the grayscale change speed in different directions within the corner point window. The larger the gradient amplitude, the faster the grayscale change of the pixel in that direction and the more uneven the grayscale.
[0032] Then, in the corner point window, the grayscale difference between the corner point and other pixels is analyzed to obtain the grayscale difference in the corner point window. The specific implementation method is: calculate the absolute value of the grayscale difference between each pixel and the corner point in the corner point window, and then obtain the maximum absolute value of the grayscale difference between each pixel and the corner point in the corner point window, which is recorded as , represents the grayscale variation range within the corner point window; and calculates the variance of the grayscale difference between all pixels in the corner point window and the corner point, recorded as , The larger the value, the more inconsistent the grayscale difference between all pixels in the corner point window and the corner point, which means the greater the grayscale difference in the corner point window; the maximum value of the absolute value of the grayscale difference As the variance of the grayscale difference The weight of is used to obtain the grayscale difference within the corner point window.
[0033] Then, the initial criticality of the corner point is obtained by combining the grayscale change speed and the grayscale difference. The specific implementation method is: since the faster the grayscale change speed, the more uneven the grayscale; and the larger the grayscale difference, the greater the grayscale difference; therefore, the initial criticality calculation formula for each corner point for cattle temperature monitoring is constructed as follows: In the formula, Indicates The initial criticality of corner points for cattle temperature monitoring; Indicates The average value of the gradient amplitude in different directions within the corner point window; Indicates The variance of the grayscale difference between all pixels and the corner points in the corner point window; Indicates The maximum absolute value of the grayscale difference between each pixel and the corner point in the corner point window.
[0034] It indicates the grayscale variation range in the corner point window. The larger the grayscale variation range in the corner point window, and the greater the grayscale difference between the corner point and all other pixels in the corner point window, the greater the grayscale difference in the corner point window, and the greater the initial criticality for cattle temperature monitoring, that is, The larger the value of; It represents the mean value of the gradient amplitude in different directions within the corner point window. The larger the value, the faster the grayscale of the pixels in all directions within the corner point window changes, the more uneven the grayscale within the corner point window, and the greater the initial criticality for cattle temperature monitoring. The larger the value of .
[0035] Finally, according to the initial criticality, the key corner points are screened. The specific implementation method is: through the linear normalization function , the initial critical Data normalized to The preset criticality threshold is 0.6. When the initial criticality value When it is greater than 0.6, the corner point is recorded as a key corner point, and then all key corner points are screened.
[0036] S300: Analyze the distribution characteristics of other key corner points and the grayscale characteristics of the pixel points in the connected domain of the key corner point, and combine the initial criticality to obtain the final criticality of the key corner point.
[0037] After the key corner points are obtained, each key corner point corresponds to an initial criticality. In order to more accurately evaluate the criticality of the key corner points for cattle temperature detection, in an embodiment of the present invention, the distribution characteristics of other key corner points and the grayscale characteristics of the pixel points are analyzed in the connected domain of the key corner points, and the final criticality of the key corner points is obtained by combining the initial criticality. Further, it includes: The specific implementation method of obtaining the connected domain of the key corner point is: using the key corner point as the seed point to perform region growth 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 grayscale characteristics in the region are not completely the same, and the grayscale difference with the surrounding connected domain is also quite obvious.
[0038] The number of key corner points included in the connected domain of each key corner point obtained is different, some may have only one key corner point, and some may contain multiple key corner points. Therefore, in some embodiments of the present invention, the connected domain of the key corner point is obtained, and then the following steps are included: obtaining the number of key corner points in the connected domain; 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 domain of the key corner point, the value of the key corner point can be used as its final criticality for cattle body temperature monitoring; when the connected domain of the key corner point contains multiple key corner points, the number of key corner points contained in the connected domain and the distribution of the key corner points need to be comprehensively considered.
[0039] When the connected domain of the key corner point contains multiple key corner points, the final criticality analysis method of the key corner point includes: calculating the mean grayscale value of all pixels in the connected domain to obtain the grayscale characteristics of the connected domain; determining the center point of the connected domain, obtaining the distance from other key corner points in the connected domain to the center point, combining the initial criticality of other key corner points, and obtaining the influence of other key corner points in the connected domain; according to the grayscale characteristics and influence, the initial criticality of the key corner point is corrected to obtain the final criticality of the key corner point. The final criticality calculation formula for constructing the key corner point for cattle temperature monitoring is: In the formula, Indicates The key corner points are of ultimate importance for cattle temperature monitoring; Indicates The mean gray value of all pixels in the connected domain of key corner points; Indicates The number of other key corner points contained in the connected domain of the key corner points; Indicates In the connected domain of key corner points, The distance from other key corner points to the center point of the connected domain; Indicates In the connected domain of key corner points, The initial criticality of the other key corner points; Indicates The initial criticality of the key corner points; represents the linear normalization function.
[0040] The larger the value is, the higher the gray value in the connected domain corresponding to the key corner point is as a whole. The higher the body temperature of the corresponding cattle is, the more likely there is fever in the area, and the more critical it is for monitoring the body temperature of cattle. The larger the value is, the more other key corner points are contained in the connected domain corresponding to the key corner point, which means that the connected domain corresponding to the key corner point is more important, and the key corner point is more critical for the monitoring of cattle body temperature. The smaller the value, the The more other key corner points can represent the connected domain, the greater the credibility, because body temperature monitoring is generally based on the center of the key area; The larger the value is, the greater the initial criticality of other key corner points contained in the connected domain corresponding to the key corner point is, which means that the overall criticality of the connected domain corresponding to the key corner point is greater, and the corresponding key corner point is more critical for the monitoring of cattle body temperature; Indicates the degree of influence of all other key corner points contained in the connected domain corresponding to the key corner point on the key corner point. The more other key corner points in the connected domain are, the smaller the distance from the center point is, and the greater the initial criticality is, the more important it is for the first The greater the impact of the initial criticality of the key corner points, the greater the impact of the initial criticality of the key corner points. For Initial criticality of key corner points Make corrections and get The final criticality of the key corners .
[0041] Similarly, determining the ultimate criticality of all key corner points in each frame of the image for cattle temperature monitoring.
[0042] S400: Analyze the position sequence of key corner points in continuous frame images to obtain a final key sequence of key corner points.
[0043] During the entire temperature monitoring process, the monitor is fixed, but the monitored cow is not fixed and can move around freely. Therefore, its position may be different at different times, and will be displayed differently in the monitored infrared video. Therefore, it is also necessary to analyze the differences in key corner points between adjacent frame images.
[0044] Therefore, in the embodiment of the present invention, the final key sequence of key corner points is obtained by first analyzing the position sequence of key corner points in consecutive frame images, which is convenient for subsequent analysis of the difference between key corner points in adjacent frame images. The specific implementation method is as follows: First, the optical flow method is used to obtain the positions of all key corner points in each frame of the target time period, and the position sequence of each key corner point is obtained. Take the frame image as an example to determine the All key corner points and their positions in each frame after the frame are obtained. The position sequence of all key corner points in the frame image. The position sequence here means that the key corner points appear continuously. When a frame image does not contain the key corner point, the position sequence stops. For example, The first Key corner points, from Appears in every frame after the start of the frame, until disappears from the frame, then Frame The position sequence of key corner points is only composed of the first The key corner point is Frame to The position in the frame.
[0045] Then, according to the position sequence of each key corner point, the final key sequence of each key corner point is obtained. Due to the movement of the cow, the appearance time of each key corner point is different, and the length of its corresponding final key sequence and position sequence is also different. Since the key corner points appear in different positions in each frame of the 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, and when the distance is too far, the temperature will be too low, and the grayscale characteristics shown in the image are also different, so the final key of the key corner points in each frame of the image is not exactly the same.
[0046] S500: Analyze the changes in distance and angle of the connected domain in continuous frame images, and combine the position sequence and the final key sequence to obtain the relative clarity of the connected domain.
[0047] After obtaining the position sequence of key corner points in continuous frame images and the corresponding final key sequence, in an embodiment of the present invention, by analyzing the changes in distance and angle of the connected domain in continuous frame images, combining the position sequence and the final key sequence, the relative clarity of the connected domain is obtained. Further comprising: First, in the continuous frame images where the key corner points appear, the area ratio of the connected domain in the first frame image and the other frame images is analyzed, as well as the difference in the number of key corner points of the connected domain in the first frame image and the other frame images, to obtain the degree of change of the distance and angle of the connected domain in the continuous frame images. Specifically, the formula for constructing the degree of change of the distance and angle of the connected domain in the continuous frame images is: In the formula, Indicates The degree of change in distance and angle of the connected domain of the key corner points in consecutive frame images; Indicates The area of the connected domain of the key corner points in the first frame of the final key sequence; Indicates The key corner point is in the final key sequence The area of the connected domain in the frame image; Indicates that in the first frame of the final critical sequence, The number of key corner points contained in the connected domain of key corner points; Indicates that in the final critical sequence In the frame image, The number of key corner points contained in the connected domain of key corner points; Expressed as a natural constant An exponential function with base .
[0048] Indicates the first frame image and the other frame images in the final critical sequence. The change of the area of the connected domain corresponding to the key corner points, The closer the value is to 1, the closer the area of the connected domain is to consistency; Indicates The difference in the number of key corner points contained in the connected domain corresponding to the first frame image and the other frame images; When the area of the connected domain is close in the frame and the first frame, the closer the number of key corner points contained in the connected domain is, the smaller the change in angle and distance is, the smaller the impact on clarity is, and the greater the relative clarity of the connected domain is.
[0049] Then, according to the degree of change of distance and angle, combined with the position sequence and the final key sequence, the relative clarity of the connected domain is obtained. The specific implementation method is: according to the position sequence, the absolute value of the Euclidean distance between the key corner points in the first frame image and other frame images is calculated to obtain the distance factor ; and according to the final critical sequence, calculate the final critical difference absolute value of the key corner point in the first frame image and other frame images to obtain the critical factor ; According to the degree of change of distance and angle , the final key of the key corner point in the first frame image And the number of consecutive frame images , combined with the distance factor and key factors , and obtain the relative clarity of the connected domain corresponding to the key corner point. The calculation formula for the relative clarity of the connected domain corresponding to the key corner point is: In the formula, Indicates The relative clarity of the connected domain of the key corner points; Indicates The maximum number of times a key corner point appears consecutively in the image, that is, the number of data in its final key sequence; Indicates The first final critical value in the final critical sequence of the key corner points; Indicates The absolute value of the difference between the first final critical value in the final critical sequence of the key corner points and the other final critical values after the first value; Indicates the Euclidean distance between the positions in other frame images and the position in the first frame image in the position sequence; Indicates The degree of change in distance and angle of the connected domain of the key corner points in consecutive frame images; Expressed as a natural constant An exponential function with base .
[0050] The maximum number of times a key corner point appears consecutively in the image The larger the value, the greater the relative clarity of the connected domain of the key corner point; the first final key value in the final key sequence of the key corner point The larger the value is, the more critical the key corner point is, so the relative clarity of the connected domain of the key corner point is greater; in the final critical sequence, the smaller the critical difference between other values and the first value is, and in the position sequence, the smaller the position difference between other values and the first value is, that is, The smaller the value, the more reliable the key corner point is; the degree of change of distance and angle of the connected domain of the key corner point in the continuous frame image The smaller it is, the less the cow's body moves during the target time period, so the relative clarity of the connected domain of the key corner point is greater.
[0051] Similarly, the relative clarity of the connected domain of each key corner point in each frame of the image is obtained.
[0052] S600: In each frame of the image, the area ratio of the connected domain and the target region is analyzed, and the credibility of each frame of the image is determined in combination with the relative clarity.
[0053] For each frame of image, if the area of the connected domain within it is large and the relative clarity is large, the credibility of the frame of image is high. Therefore, in the embodiment of the present invention, in each frame of image, the area ratio of the connected domain and the target area is analyzed, and the credibility of each frame of image is determined in combination with the relative clarity. Specifically, the credibility calculation formula for each frame of image is constructed as follows: In the formula, Indicates Credibility of frame images; Indicates The number of connected domains of key corner points in the frame image; Indicates In the frame image, the area of the target region is the area of the connected domain representing the cow; Indicates In the frame image, The area of the connected domain of the key corner points; Indicates The average clarity of all connected domains in the frame image.
[0054] Indicates The area of the connected domain accounts for the proportion of the target area. The larger the proportion of the connected domain to the target area and the greater the clarity, the greater the credibility of the image. The larger the value of .
[0055] S700: Determine the gain coefficient in the linear transformation according to the credibility to complete the image enhancement.
[0056] The gain coefficient in the linear transformation is determined according to the credibility to complete the image enhancement. The specific implementation method is as follows: First, the original gain coefficient of the preset linear transformation is recorded as , The value can be 10. Use linear normalization function , the credibility Normalize to , and then take the opposite number, that is, the credibility Normalize to The original gain coefficient is then corrected according to the normalized credibility to obtain the gain coefficient in the linear transformation. The calculation formula for the gain coefficient in the linear transformation is constructed as follows: In the formula, Indicates the adjusted gain coefficient when using linear change; Indicates the preset original gain coefficient; Indicates The credibility of the normalized frame image.
[0057] express The greater the reliability, the smaller the adjustment degree, and the adjusted value is closer to the original preset value; conversely, the smaller the reliability, the greater the adjustment degree.
[0058] Then, each frame of the image is enhanced according to the gain coefficient. According to the credibility of each frame of the image and the gain coefficient when using linear changes, 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 cattle, which is helpful for more accurate body temperature monitoring and mastering the body temperature of the cattle.
[0059] 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.
[0060] A non-contact animal husbandry and veterinary infrared body temperature monitoring device includes: a data acquisition module, a key corner point determination module, a criticality analysis module, a relative clarity analysis module, an image credibility analysis module and an image enhancement module. Among them: A data acquisition module is configured to acquire infrared images and determine a target area and all corner points in the target area in each frame of the image; A key corner point determination module is configured to analyze the grayscale features of the corner points and their neighboring pixels, determine the initial keyness of the corner points, and select the key corner points; The criticality analysis module is configured to analyze the distribution characteristics of other key corner points and the grayscale characteristics of the pixel points in the connected domain of the key corner point, and obtain the final criticality of the key corner point by combining the initial criticality; The relative clarity analysis module is configured to analyze the position sequence of key corner points in continuous frame images to obtain the final critical sequence of key corner points; and analyze the changes in distance and angle of connected domains in continuous frame images, and combine the position sequence and the final critical sequence to obtain the relative clarity of the connected domain; The image credibility analysis module is configured 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 configured to determine the gain coefficient in the linear transformation according to the credibility to complete the image enhancement.
[0061] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages 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 some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0062] The various embodiments in this specification 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.
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 pixels, determine the initial criticality of the corner point, and select the key corner point; 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 continuous frame images, and obtain the relative clarity of the connected domain by combining the position sequence and the final critical sequence; 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: Analyze the grayscale features of the corner point and its neighboring pixels, determine the initial criticality of the corner point, and select the key corner point, including: Constructing a corner point window with the corner point as the center; In the corner point window, with the corner point as the center, the gradient amplitudes of the pixels in different directions are analyzed to obtain the grayscale change speed in the corner point window; In the corner point window, analyzing the grayscale difference between the corner point and other pixel points to obtain the grayscale difference in the corner point window; Combining the grayscale change speed and the grayscale difference size, obtaining the initial criticality of the corner point; According to the initial criticality, key corner points are screened and obtained.
3. The non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine 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.
4. The non-contact animal husbandry and veterinary infrared body temperature monitoring method according to claim 3, 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.
5. The non-contact infrared body temperature monitoring method for animal husbandry and veterinary medicine according to claim 1, characterized in that: Analyzing the changes in distance and angle of the connected domain in continuous frame images, combining the position sequence and the final critical sequence, and obtaining the relative clarity of the connected domain, including: In the continuous frame images where the key corner points appear, analyzing the area ratio of the connected domain in the first frame image and the other frame images, and analyzing the difference in the number of key corner points of the connected domain in the first frame image and the 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 the angle, the relative clarity of the connected domain is obtained by combining the position sequence and the final critical sequence.
6. The non-contact infrared body temperature monitoring method for livestock and veterinary use according to claim 5, 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.
7. 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.
8. The non-contact animal husbandry and veterinary infrared body temperature monitoring method according to claim 1 or 3, 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.
9. The non-contact infrared body temperature monitoring method for livestock and veterinary use 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.
10. 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; A key corner point determination module is used to analyze the grayscale characteristics of the corner point and its neighboring pixels, determine the initial keyness of the corner point, and select the key corner point; 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 critical sequence of the key corner points; and to analyze the changes in the distance and angle of the connected domain in the continuous frame images, and to obtain the relative clarity of the connected domain by combining the position sequence and the final critical 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
Thread region extraction method and system for pedal thread recognition
CN113902668A
Image enhancement method for gear
CN115082481A
Government affair machine terminal verification platform based on multi-level feature information step-by-step identification
CN117058770A
Building construction safety monitoring and early warning method based on machine vision
CN117876971A
Cited By
Operating panel sheet printing positioning method based on machine vision
CN120726128A
Non-contact infrared body temperature and breathing frequency synchronous monitor for veterinarian
CN120770783A