A method and system for identifying termite damage to dams based on infrared characteristic attributes
Through a multi-spectral infrared camera, multi-band images are acquired and combined with temperature compensation and thermal feature database, the environmental dependence and adaptability problems of infrared recognition methods in the prior art are solved, and efficient and accurate identification of termite activities in dams are achieved.
Patent Information
- Application Number
- CN202411400462.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The existing dam termite hazard identification methods based on infrared characteristic attributes are susceptible to environmental conditions, have poor identification accuracy and poor adaptability, making it difficult to effectively identify termite active areas on dams of different types or structures.
A multi-spectral infrared camera is used to collect short-wave, medium-wave and long-wave infrared band images, and extract hot spot areas through temperature compensation, bilateral filters and sobel operators. A thermal characteristic database is established based on the historical data of termite activity, and the heat spot difference index is calculated to judge termites. Activity area.
It improves the accuracy and recognition efficiency of infrared thermal imaging data, can penetrate material layers at different depths, accurately locate temperature abnormalities, quickly identify potential termite activities, reduce false alarms and missed reports, and improve adaptability and recognition accuracy.
Smart Images

Figure CN118918532B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of termite pest monitoring, and in particular to a method and system for identifying dam termite damage based on infrared characteristic attributes. Background Art
[0002] As an important water conservancy measure, the structural stability of dams is crucial to flood prevention and disaster relief. However, the erosion of dams by termites will reduce the structural strength of dams and increase safety hazards. In addition, termite activities are often very hidden and difficult to detect in time through traditional physical inspection methods. Traditional termite monitoring and identification rely on manual inspections and physical exploration, which are costly and inefficient. In recent years, infrared thermal imaging technology has become increasingly mature. It can identify termite activity areas in dams by capturing the thermal radiation characteristics of the surface of objects. However, infrared thermal imaging is easily affected by environmental conditions, and it is difficult to accurately determine the characteristics of termite activity areas based on infrared imaging alone. Therefore, there is an urgent need for a solution that uses infrared feature attributes combined with algorithm processing to improve the accuracy and efficiency of termite damage identification.
[0003] In the prior art, publication number CN117474895A discloses a method for identifying termite pests and diseases based on the infrared characteristic attributes of the dam. The dam is scanned by an infrared thermal line device to obtain point cloud data of the dam. At least one ant source area, water-facing slope, water-facing slope and dam top position data of the dam are extracted based on the point cloud data of the dam. A dam disease identification model is trained based on existing water conservancy project example samples. The position data is input into the trained dam disease identification model to predict the termite damage level.
[0004] The main problems with the above method are: it is easily affected by environmental conditions. Infrared scanning is significantly affected by factors such as weather, which leads to fluctuations in the quality of point cloud data and affects the accuracy of judgment; it is trained based on specific water conservancy project example samples. When faced with dams of different types or structures, the model needs to be adjusted or retrained, resulting in poor adaptability of the solution.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The purpose of the present invention is to provide a method and system for identifying termite damage on dams based on infrared characteristic attributes, so as to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for identifying termite damage to dams based on infrared characteristic attributes, the specific steps include:
[0009] Step 1: Collect infrared thermal imaging images of the short-wave infrared band, medium-wave infrared band and long-wave infrared band of the target area of the dam once every 10 minutes, and fuse the infrared thermal imaging images of the three bands to generate the first recognition image;
[0010] Step 2: Each time an infrared thermal imaging image is collected, the real-time ambient temperature is collected in the same area at the same time interval, the temperature value of each pixel point and the ambient temperature at the corresponding moment are obtained, and a temperature compensation formula is generated to correct the temperature value of each pixel point;
[0011] Step 3: Filter the first recognition image using a bilateral filter, perform threshold segmentation on the filtered first recognition image, identify the foreground part and the background part, extract the foreground part to reconstruct the second recognition image, and establish a rectangular coordinate system in the first recognition image to map the pixel positions of the first recognition image and the second recognition image one by one;
[0012] Step 4: Calculate the horizontal and vertical gradient values of the second recognition image by using the Sobel operator, preset the edge threshold, extract the edge pixels to generate the hot spot area, and calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot;
[0013] Step 5: Using historical data of termite activities, record the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of termite activities, and establish a thermal feature database of termite activities;
[0014] Step 6: Calculate the feature difference between each hot spot in the second recognition image and the hot spots in the thermal feature database, generate a hot spot difference index, preset a difference threshold, and determine whether the hot spot is a termite activity area based on the hot spot difference index and the difference threshold.
[0015] Furthermore, the equipment used to collect infrared thermal imaging images is: a multispectral infrared camera, which can capture infrared radiation data in the short-wave infrared band ranging from 300 to 500 nm, the medium-wave infrared band ranging from 500 to 800 nm, and the long-wave infrared band ranging from 800 to 1500 nm.
[0016] Furthermore, the principle for generating the temperature compensation formula to correct the temperature value of each pixel is as follows:
[0017] ;
[0018] in, Indicates The temperature of each pixel after correction, Indicates The temperature of each pixel before correction, is the compensation coefficient, and , Indicates the real-time ambient temperature. Indicates the reference ambient temperature.
[0019] Furthermore, the principle for generating the second recognition image is:
[0020] The grayscale histogram consisting of the frequency of occurrence of pixels at each level in the 256 grayscale levels is counted, the inter-class variance of each threshold in the histogram is calculated, and the optimal segmentation threshold is selected through the maximum inter-class variance;
[0021] The principle for selecting the best segmentation threshold by maximizing the inter-class variance is:
[0022] ;
[0023] in, represents the segmentation threshold, The threshold is The between-class variance at The threshold is The ratio of the foreground part to the total image is The threshold is When the gray value of the foreground part is The threshold is The ratio of the background part to the total image is The threshold is The gray value of the background part;
[0024] when When the maximum value is taken, the corresponding threshold is the optimal segmentation threshold;
[0025] The first recognition image is segmented using the optimal segmentation threshold, and the foreground portion segmented in advance is the second recognition image.
[0026] Furthermore, the principle for extracting edge pixels is:
[0027] The principle for generating the gradient amplitude of a pixel is:
[0028] The grayscale value of each pixel and the grayscale values of its eight adjacent pixels are multiplied by the horizontal template of the Sobel operator, and all the products are added to obtain the horizontal gradient value of the pixel; the grayscale value of each pixel and the grayscale values of its eight adjacent pixels are multiplied by the vertical template of the Sobel operator, and all the products are added to obtain the vertical gradient value of the pixel; the horizontal gradient value calculation formula is:
[0029] ;
[0030] The vertical gradient value calculation formula is:
[0031] ;
[0032] in, The horizontal axis is , the vertical axis is The horizontal gradient value of the pixel point, The horizontal axis is , the vertical axis is The vertical gradient value of the pixel point, The horizontal axis is , the vertical axis is The gray value of the pixel;
[0033] The formula for generating the gradient magnitude is:
[0034] ;
[0035] in, The horizontal axis is , the vertical axis is The gradient amplitude of the pixel point;
[0036] If the pixel gradient amplitude is greater than the edge threshold, the pixel is retained, otherwise the pixel is set to black, and the retained pixel is the edge pixel.
[0037] Furthermore, the principle for calculating the hot spot average temperature and the hot spot temperature gradient amplitude is:
[0038] ;
[0039] ;
[0040] ;
[0041] in, represents the average temperature of the hot spots in the second identification image, Represents the index of the pixel point in the hot spot area, Indicates the number of pixels in the hot spot area, Indicates the hot spot The temperature of each pixel, Indicates the temperature of the pixel in the hot spot area, The coordinates of the hot spot are The temperature gradient of the pixel point, Represents the temperature gradient magnitude in the second recognition image.
[0042] Furthermore, the principle for generating the hot spot difference index is:
[0043] ;
[0044] in, represents the hot spot difference index, represents the hot spot area in the second recognition image, represents the average area of hot spots in the thermal signature database, represents the average temperature of the hot spots in the second identification image, represents the average temperature of hot spots in the thermal signature database, represents the temperature gradient amplitude in the second recognition image, represents the mean value of the temperature gradient amplitude in the thermal signature database, They represent the influence weights of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot, respectively. , the weight value is determined by expert scoring method;
[0045] When the hot spot difference index is greater than the difference threshold, it means that the hot spot area is a termite activity area.
[0046] The present invention also provides a dam termite damage identification system based on infrared characteristic attributes, and the system is used to implement the above-mentioned dam termite damage identification method based on infrared characteristic attributes, which specifically includes:
[0047] An image acquisition module is used to collect infrared thermal imaging images of the short-wave infrared band, the medium-wave infrared band and the long-wave infrared band of the target area of the dam once every 10 minutes, and fuse the infrared thermal imaging images of the three bands to generate a first recognition image;
[0048] The temperature correction module is used to collect the real-time ambient temperature in the same area at the same time interval each time the infrared thermal imaging image is collected, obtain the temperature value of each pixel point and the ambient temperature at the corresponding moment, and generate a temperature compensation formula to correct the temperature value of each pixel point;
[0049] An image processing module is used to filter the first recognition image using a bilateral filter, perform threshold segmentation on the filtered first recognition image, identify a foreground portion and a background portion, extract the foreground portion to reconstruct a second recognition image, establish a rectangular coordinate system in the first recognition image, and map pixel positions of the first recognition image and the second recognition image one by one;
[0050] An edge extraction module is used to calculate the horizontal and vertical gradient values of the second recognition image by using a Sobel operator, preset an edge threshold, extract edge pixels to generate a hot spot area, and calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot;
[0051] A database generation module is used to record the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of termite activities through historical data of termite activities, and establish a thermal characteristic database of termite activities;
[0052] The comprehensive judgment module is used to calculate the feature difference between each hot spot in the second recognition image and the hot spots in the thermal feature database, generate a hot spot difference index, preset a difference threshold, and judge whether the hot spot is a termite activity area based on the hot spot difference index and the difference threshold.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The present invention collects images in the short-wave infrared, medium-wave infrared and long-wave infrared bands, can penetrate material layers of different depths, and comprehensively obtain thermal information of the dam area, thereby improving the recognition accuracy of the overall solution; and collects ambient temperature in real time, and corrects the temperature of each pixel in the collected thermal imaging image, thereby eliminating errors caused by ambient temperature changes and improving the accuracy of infrared thermal imaging data. The edge points in the infrared thermal imaging image are extracted to generate a hot spot area, which can accurately locate the position of the temperature anomaly, and comprehensively calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot. The multi-dimensional analysis helps to more comprehensively evaluate the thermal anomaly of the dam, and can quickly and accurately identify potential problems of the dam.
[0055] The present invention also establishes a thermal signature database through historical data of termite activities, which can quickly compare new data, quickly identify potential termite activities, reduce detection time and manpower consumption, and add the detected data to the database, thereby improving the timeliness of the database. With the accumulation and optimization of the database, the accuracy of recognition is gradually improved; according to the difference between the hot spots collected in real time and the hot spots in the thermal signature database, accurate identification of anomalies is achieved, false alarms and missed alarms are reduced, and the difference threshold can be flexibly adjusted according to different areas or conditions to improve the adaptability of the solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a schematic diagram of a method flow of an embodiment of the present invention;
[0057] Figure 2 Schematic diagram of system modules according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0059] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0060] Example:
[0061] See also Figure 1 , the present invention provides a technical solution:
[0062] A method for identifying termite damage to dams based on infrared characteristic attributes, the specific steps include:
[0063] Step 1: Collect infrared thermal imaging images of the short-wave infrared band, medium-wave infrared band and long-wave infrared band of the target area of the dam once every 10 minutes, and fuse the infrared thermal imaging images of the three bands to generate the first recognition image;
[0064] In this embodiment, the device used to collect infrared thermal imaging images is: a multispectral infrared camera capable of capturing infrared radiation data in the short-wave infrared band of 300-500nm, the medium-wave infrared band of 500-800nm, and the long-wave infrared band of 800-1500nm;
[0065] The short-wave infrared band can penetrate the surfaces of some objects and help identify termite activities hidden inside wood or walls; the medium-wave infrared band is suitable for detecting subtle heat changes generated by termite activities and can be used to identify active termite colonies; the long-wave infrared band can detect changes in thermal patterns around termite nests and help locate termite nests.
[0066] The pixel values of each pixel point of the infrared thermal imaging images of the three bands are weighted and fused to generate the first recognition image. The principle is as follows:
[0067] ;
[0068] in, Indicates the first recognition image The pixel value of a pixel, Indicates the infrared thermal imaging image in the short-wave infrared band The pixel value of a pixel, Indicates the infrared thermal imaging image in the medium-wave infrared band. The pixel value of a pixel, Indicates the infrared thermal imaging image in the long-wave infrared band. The pixel value of a pixel.
[0069] Step 2: Each time an infrared thermal imaging image is collected, the real-time ambient temperature is collected in the same area at the same time interval, the temperature value of each pixel point and the ambient temperature at the corresponding moment are obtained, and a temperature compensation formula is generated to correct the temperature value of each pixel point;
[0070] In this embodiment, the principle for generating the temperature compensation formula to correct the temperature value of each pixel is:
[0071] ;
[0072] in, Indicates The temperature of each pixel after correction, Indicates The temperature of each pixel before correction, is the compensation coefficient, and , Indicates the real-time ambient temperature. Indicates the reference ambient temperature.
[0073] Take 25℃ as the reference ambient temperature, and calibrate the pixel temperature according to the deviation between the real-time ambient temperature and the reference ambient temperature. It reflects the influence of ambient temperature changes on infrared signals. The larger the compensation coefficient, the more significant the influence of ambient temperature on infrared signals, and the more sensitive the system is to ambient temperature changes. The temperature of the pixel after correction is proportional to the temperature before correction, proportional to the compensation coefficient, and proportional to the temperature difference between the real-time ambient temperature and the reference ambient temperature.
[0074] Step 3: Filter the first recognition image using a bilateral filter, perform threshold segmentation on the filtered first recognition image, identify the foreground part and the background part, extract the foreground part to reconstruct the second recognition image, and establish a rectangular coordinate system in the first recognition image to map the pixel positions of the first recognition image and the second recognition image one by one;
[0075] In this embodiment, the principle for generating the second recognition image is:
[0076] The grayscale histogram consisting of the frequency of occurrence of pixels at each level in the 256 grayscale levels is counted, the inter-class variance of each threshold in the histogram is calculated, and the optimal segmentation threshold is selected through the maximum inter-class variance;
[0077] The principle for selecting the best segmentation threshold by maximizing the inter-class variance is:
[0078] ;
[0079] in, represents the segmentation threshold, The threshold is The between-class variance at The threshold is The ratio of the foreground part to the total image is The threshold is When the gray value of the foreground part is The threshold is The ratio of the background part to the total image is The threshold is The gray value of the background part;
[0080] when When the maximum value is taken, the corresponding threshold is the optimal segmentation threshold;
[0081] The first recognition image is segmented using the optimal segmentation threshold, and the foreground portion segmented in advance is the second recognition image.
[0082] Step 4: Calculate the horizontal and vertical gradient values of the second recognition image by using the Sobel operator, preset the edge threshold, extract the edge pixels to generate the hot spot area, and calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot;
[0083] In this embodiment, the principle for extracting edge pixels is:
[0084] The principle for generating the gradient amplitude of a pixel is:
[0085] The grayscale value of each pixel and the grayscale values of its eight adjacent pixels are multiplied by the horizontal template of the Sobel operator, and all the products are added to obtain the horizontal gradient value of the pixel; the grayscale value of each pixel and the grayscale values of its eight adjacent pixels are multiplied by the vertical template of the Sobel operator, and all the products are added to obtain the vertical gradient value of the pixel; the horizontal gradient value calculation formula is:
[0086] ;
[0087] The vertical gradient value calculation formula is:
[0088] ;
[0089] in, The horizontal axis is , the vertical axis is The horizontal gradient value of the pixel point, The horizontal axis is , the vertical axis is The vertical gradient value of the pixel point, The horizontal axis is , the vertical axis is The gray value of the pixel;
[0090] The formula for generating the gradient magnitude is:
[0091] ;
[0092] in, The horizontal axis is , the vertical axis is The gradient amplitude of the pixel point;
[0093] If the pixel gradient amplitude is greater than the edge threshold, the pixel is retained, otherwise the pixel is set to black, and the retained pixel is the edge pixel.
[0094] The principle for calculating the hot spot average temperature and the hot spot temperature gradient amplitude is:
[0095] ;
[0096] ;
[0097] ;
[0098] in, represents the average temperature of the hot spots in the second identification image, Represents the index of the pixel point in the hot spot area, Indicates the number of pixels in the hot spot area, Indicates the hot spot The temperature of each pixel, Indicates the temperature of the pixel in the hot spot area, The coordinates of the hot spot are The temperature gradient of the pixel point, Represents the temperature gradient magnitude in the second recognition image.
[0099] The average temperature of the hot spot is the average of the corrected temperatures of all pixels in the hot spot, which is proportional to the corrected temperature of each pixel. The temperature gradient of the pixels in the hot spot is determined by the rate of change of the temperature of the pixel in the horizontal direction and the rate of change of the temperature in the vertical direction, and they are directly proportional. The average value of the temperature gradient of each pixel in the hot spot area is the temperature gradient amplitude of the hot spot area. The temperature gradient amplitude is proportional to the temperature gradient of the pixels in the hot spot and inversely proportional to the total number of pixels in the hot spot.
[0100] Step 5: Using historical data of termite activities, record the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of termite activities, and establish a thermal feature database of termite activities;
[0101] In this embodiment, a thermal signature database of termite activity is established, areas known to have termite activity are selected for monitoring, hot spot information is captured by infrared thermal imaging equipment, experts in the field determine which hot spot areas are termite activity areas, hot spot areas of termite activity are segmented by image processing technology, the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of the hot spot areas of termite activity are calculated, and a thermal signature database of termite activity is generated after multiple acquisitions and monitoring. The hot spots determined to be generated by termite activity through the thermal signature database are updated in real time into the database to ensure the timeliness and accuracy of the database.
[0102] Step 6: Calculate the feature difference between each hot spot in the second recognition image and the hot spots in the thermal feature database, generate a hot spot difference index, preset a difference threshold, and determine whether the hot spot is a termite activity area based on the hot spot difference index and the difference threshold;
[0103] In this embodiment, the principle for generating the hot spot difference index is:
[0104] ;
[0105] in, represents the hot spot difference index, represents the hot spot area in the second recognition image, represents the average area of hot spots in the thermal signature database, represents the average temperature of the hot spots in the second identification image, represents the average temperature of hot spots in the thermal signature database, represents the temperature gradient amplitude in the second recognition image, represents the mean value of the temperature gradient amplitude in the thermal signature database, They represent the influence weights of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot, respectively. , the weight value is determined by expert scoring method;
[0106] The thermal feature database contains multiple sets of data on hot spot area, hot spot average temperature and temperature gradient amplitude. The average value of these data is taken to reflect the overall characteristics.
[0107] The hot spot difference index reflects the difference between the hot spot to be identified and the hot spot of termite activity in the thermal feature database. The larger the hot spot difference index is, the greater the difference between the hot spot to be identified and the hot spot of termite activity is, and the less likely the hot spot to be identified is a hot spot caused by termite activity. The smaller the hot spot difference index is, the smaller the difference between the hot spot to be identified and the hot spot of termite activity is, and the more likely the hot spot to be identified is a hot spot caused by termite activity. The hot spot difference index is proportional to the difference in hot spot area, the difference in hot spot average temperature, and the difference in hot spot temperature gradient amplitude between the hot spot to be identified and the hot spot in the thermal feature database.
[0108] The influence weights of hot spot area, hot spot average temperature and hot spot temperature gradient amplitude are determined based on which factor's change is highly correlated with the change in the frequency of termite activity during the actual monitoring process, and which factor is more critical in termite activity according to the judgment of experts in the field. The basic weights of each indicator are set based on actual experience and expert opinions, and adjusted according to the monitoring results.
[0109] The difference threshold is used to determine whether the hot spot is consistent with the characteristics of termite activity. By comparing the hot spot difference index and the difference threshold, it is determined whether the hot spot area is a termite activity area. A lower difference threshold may lead to ignoring some potential termite activities and increase the probability of false alarms. A higher difference threshold may lead to greater sensitivity to small differences and increase the probability of false alarms. When setting the difference threshold, use the ROC curve tool to select the point that balances the false alarm rate and the false alarm rate as the difference threshold.
[0110] When the hot spot difference index is less than the difference threshold, it means that the hot spot area is a termite activity area.
[0111] See also Figure 2 The present invention also provides a dam termite damage identification system based on infrared characteristic attributes, the system is used to implement the above-mentioned dam termite damage identification method based on infrared characteristic attributes, specifically comprising:
[0112] An image acquisition module is used to collect infrared thermal imaging images of the short-wave infrared band, the medium-wave infrared band and the long-wave infrared band of the target area of the dam once every 10 minutes, and fuse the infrared thermal imaging images of the three bands to generate a first recognition image;
[0113] The temperature correction module is used to collect the real-time ambient temperature in the same area at the same time interval each time the infrared thermal imaging image is collected, obtain the temperature value of each pixel point and the ambient temperature at the corresponding moment, and generate a temperature compensation formula to correct the temperature value of each pixel point;
[0114] An image processing module is used to filter the first recognition image using a bilateral filter, perform threshold segmentation on the filtered first recognition image, identify a foreground portion and a background portion, extract the foreground portion to reconstruct a second recognition image, establish a rectangular coordinate system in the first recognition image, and map pixel positions of the first recognition image and the second recognition image one by one;
[0115] An edge extraction module is used to calculate the horizontal and vertical gradient values of the second recognition image by using a Sobel operator, preset an edge threshold, extract edge pixels to generate a hot spot area, and calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot;
[0116] A database generation module is used to record the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of termite activities through historical data of termite activities, and establish a thermal characteristic database of termite activities;
[0117] The comprehensive judgment module is used to calculate the feature difference between each hot spot in the second recognition image and the hot spots in the thermal feature database, generate a hot spot difference index, preset a difference threshold, and judge whether the hot spot is a termite activity area based on the hot spot difference index and the difference threshold.
[0118] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0119] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A method for identifying termite damage to dams based on infrared characteristic attributes, characterized in that: The specific steps include: Step 1: Collect infrared thermal imaging images of the short-wave infrared band, medium-wave infrared band and long-wave infrared band of the target area of the dam once every 10 minutes, and fuse the infrared thermal imaging images of the three bands to generate the first recognition image; Step 2: Each time an infrared thermal imaging image is collected, the real-time ambient temperature is collected in the same area at the same time interval, the temperature value of each pixel point and the ambient temperature at the corresponding moment are obtained, and a temperature compensation formula is generated to correct the temperature value of each pixel point; Step 3: Filter the first recognition image using a bilateral filter, perform threshold segmentation on the filtered first recognition image, identify the foreground part and the background part, extract the foreground part to reconstruct the second recognition image, and establish a rectangular coordinate system in the first recognition image to map the pixel positions of the first recognition image and the second recognition image one by one; Step 4: Calculate the horizontal and vertical gradient values of the second recognition image by using the Sobel operator, preset the edge threshold, extract the edge pixels to generate the hot spot area, and calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot; Step 5: Using historical data of termite activities, record the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of termite activities, and establish a thermal feature database of termite activities; Step 6: Calculate the feature difference between each hot spot in the second recognition image and the hot spots in the thermal feature database, generate a hot spot difference index, preset a difference threshold, and determine whether the hot spot is a termite activity area based on the hot spot difference index and the difference threshold; The equipment used to collect infrared thermal imaging images is: a multispectral infrared camera that can capture infrared radiation data in the short-wave infrared band ranging from 300 to 500 nm, the medium-wave infrared band from 500 to 800 nm, and the long-wave infrared band from 800 to 1500 nm; The principle for generating the temperature compensation formula to correct the temperature value of each pixel is: T r =T′ r +k·(T env -T0) Among them, T r Represents the temperature of the rth pixel after correction, T′ r represents the temperature of the rth pixel before correction, k is the compensation coefficient, and 0<k≤1, T env Indicates the real-time ambient temperature, T0 indicates the reference ambient temperature; The principle for calculating the hot spot average temperature and the hot spot temperature gradient amplitude is: in, represents the average temperature of the hot spot, n represents the index of the pixel point in the hot spot area, N represents the number of pixels in the hot spot area, T n represents the temperature of the nth pixel in the hot spot, T represents the temperature of the pixel in the hot spot area, |T(x,y)| represents the temperature gradient of the pixel with coordinates (x,y) in the hot spot, and Y represents the temperature gradient amplitude of the hot spot area; The principle for generating the hot spot difference index is: in, represents the hot spot difference index, S represents the hot spot area in the second recognition image, represents the average area of hot spots in the thermal signature database, represents the average temperature of the hot spots in the second identification image, represents the average temperature of the hot spots in the thermal signature database, Y represents the temperature gradient amplitude in the second recognition image, represents the mean value of the temperature gradient amplitude in the thermal feature database, ω1, ω2, and ω3 represent the influence weights of the hot spot area, the average temperature of the hot spot, and the hot spot temperature gradient amplitude, respectively, ω1+ω2+ω3=1, and the weight value is determined by the expert scoring method; When the hot spot difference index is greater than the difference threshold, it means that the hot spot area is a termite activity area.
2. The method for identifying termite damage to dams based on infrared characteristic attributes according to claim 1, characterized in that: The principle for generating the second recognition image in step 3 is: The grayscale histogram consisting of the frequency of occurrence of pixels at each level in the 256 grayscale levels is counted, the inter-class variance of each threshold in the histogram is calculated, and the optimal segmentation threshold is selected through the maximum inter-class variance; The principle for selecting the best segmentation threshold by maximizing the inter-class variance is: g(a) 2 =ωaω′ a (μa-μ′ a ) 2 Among them, a represents the segmentation threshold, g(a) represents the inter-class variance when the threshold is a, ω a Indicates the proportion of the foreground part to the total image when the threshold is a, μ a Indicates the gray value of the foreground part when the threshold is a, ω′ a Indicates the ratio of the background part to the total image when the threshold is a, μ′ a Indicates the gray value of the background part when the threshold is a; When g(a) reaches the maximum value, the corresponding threshold a is the optimal segmentation threshold; The first recognition image is segmented using the optimal segmentation threshold, and the foreground portion segmented in advance is the second recognition image.
3. The method for identifying termite damage to dams based on infrared characteristic attributes according to claim 1, characterized in that: The principle for extracting edge pixels in step 4 is: The principle for generating the gradient amplitude of a pixel is: The grayscale value of each pixel and the grayscale values of its eight adjacent pixels are multiplied by the horizontal template of the Sobel operator, and all the products are added to obtain the horizontal gradient value of the pixel; the grayscale value of each pixel and the grayscale values of its eight adjacent pixels are multiplied by the vertical template of the Sobel operator, and all the products are added to obtain the vertical gradient value of the pixel; the horizontal gradient value calculation formula is: The vertical gradient value calculation formula is: Wherein, Gx(i, j) represents the horizontal gradient value of the pixel with abscissa i and ordinate j, Gy(i, j) represents the vertical gradient value of the pixel with abscissa i and ordinate j, and X(i, j) represents the grayscale value of the pixel with abscissa i and ordinate j. The formula for generating the gradient magnitude is: Where G(i, j) represents the gradient amplitude of the pixel with abscissa i and ordinate j; If the pixel gradient amplitude is greater than the edge threshold, the pixel is retained, otherwise the pixel is set to black, and the retained pixel is the edge pixel.
4. A dam termite damage identification system based on infrared characteristic attributes, characterized by: The system is used to implement the method for identifying dam termite damage based on infrared characteristic attributes as described in any one of claims 1 to 3, and specifically includes: An image acquisition module is used to collect infrared thermal imaging images of the short-wave infrared band, the medium-wave infrared band and the long-wave infrared band of the target area of the dam once every 10 minutes, and fuse the infrared thermal imaging images of the three bands to generate a first recognition image; The temperature correction module is used to collect the real-time ambient temperature in the same area at the same time interval each time the infrared thermal imaging image is collected, obtain the temperature value of each pixel point and the ambient temperature at the corresponding moment, and generate a temperature compensation formula to correct the temperature value of each pixel point; An image processing module is used to filter the first recognition image using a bilateral filter, perform threshold segmentation on the filtered first recognition image, identify a foreground portion and a background portion, extract the foreground portion to reconstruct a second recognition image, establish a rectangular coordinate system in the first recognition image, and map pixel positions of the first recognition image and the second recognition image one by one; An edge extraction module is used to calculate the horizontal and vertical gradient values of the second recognition image by using a Sobel operator, preset an edge threshold, extract edge pixels to generate a hot spot area, and calculate the area of the hot spot area, the average temperature of the hot spot, and the temperature gradient amplitude of the hot spot; A database generation module is used to record the hot spot area, hot spot average temperature and hot spot temperature gradient amplitude of termite activities through historical data of termite activities, and establish a thermal characteristic database of termite activities; The comprehensive judgment module is used to calculate the feature difference between each hot spot in the second recognition image and the hot spots in the thermal feature database, generate a hot spot difference index, preset a difference threshold, and judge whether the hot spot is a termite activity area based on the hot spot difference index and the difference threshold.
