Defect detection method and device, equipment, storage medium and program product
By performing pixel point segmentation and connecting domain marking on infrared images, combining defect temperature threshold and geometric model, the problems of unclear equipment boundaries and noise interference in traditional infrared defect positioning methods are solved, and the precise positioning of power equipment defects is achieved.
Patent Information
- Application Number
- CN202510713084.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-05-30
AI Technical Summary
In the traditional infrared defect positioning method, the equipment boundaries are unclear, and the equipment profile of infrared imaging is intertwined with the background, so the continuity information of the device pixel points cannot be fully tapped, resulting in insufficient defect positioning accuracy and susceptible to environmental noise, making it difficult to accurately identify the real temperature information and defect location of the device.
By segmenting pixel points on infrared images, marking the device and background pixel points respectively, the device pixel connection area is determined using the connection domain marking algorithm, combining defect temperature threshold and geometric model, the initial defect area is corrected, and the defect area is accurately positioned.
It improves the accuracy of defect positioning, reduces noise interference, improves processing efficiency, and can accurately locate infrared defect areas of power equipment.
Smart Images

Figure CN120235867A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular, to a defect detection method, device, equipment, storage medium, and program product. Background Art
[0002] Currently, the detection and location of power equipment failures usually rely on manual inspection, infrared thermal imaging, and basic image processing algorithms. However, the traditional infrared defect location method has the following disadvantages:
[0003] The boundaries of the equipment are not clear, and the equipment contours in the infrared image are intertwined with the background. The traditional method relies on simple threshold segmentation and edge detection, and cannot fully exploit the continuity information of the equipment pixel points, resulting in insufficient defect location accuracy. In addition, the infrared image is easily affected by factors such as environmental noise and reflection, making it difficult to accurately identify the true temperature information and defect location of the equipment. Summary of the Invention
[0004] Based on this, it is necessary to provide a defect detection method, device, equipment, storage medium, and program product that can accurately locate the defects of power equipment for the above technical problems.
[0005] In a first aspect, this application provides a defect detection method, including:
[0006] Obtain a to-be-tested infrared image, segment the pixel points of the to-be-tested infrared image to obtain device pixel points belonging to the device area and background pixel points belonging to the background area;
[0007] Mark the device pixel points and the background pixel points respectively;
[0008] Based on the markings of the device pixel points and the markings of the background pixel points, determine the device pixel connected regions in the to-be-tested infrared image;
[0009] Identify the initial defect region in the to-be-tested infrared image, and correct the initial defect region based on the device pixel connected regions to obtain a corrected defect region.
[0010] In one of the embodiments, the segmenting of the pixel points of the to-be-tested infrared image includes:
[0011] Perform edge detection on the to-be-tested infrared image to determine the device edge region of the to-be-tested device;
[0012] Based on the operating temperature range of the to-be-tested device, determine the device gray value interval;
[0013] Pixels whose grayscale values belong to the device grayscale value range and are within the device edge area are determined as the device pixels, and the remaining pixels in the infrared image to be measured except the device pixels are determined as the background pixels.
[0014] In one embodiment, determining the device pixel connected regions in the infrared image to be measured based on the marks of the device pixels and the marks of the background pixels includes:
[0015] Mark the device pixels with a first preset value and mark the background pixels with a second preset value;
[0016] Based on the first preset value and the second preset value, use the connected component labeling algorithm to determine multiple initial connected regions including device pixels;
[0017] Calculate the grayscale value differences of adjacent pixels in the initial connected regions, determine the continuous pixels in the initial connected regions based on the grayscale value differences, and determine the device pixel connected regions based on the continuous pixels.
[0018] In one embodiment, identifying the initial defect regions in the infrared image to be measured and correcting the initial defect regions based on the device pixel connected regions to obtain the corrected defect regions includes:
[0019] Obtain the defect temperature threshold and the corresponding defect temperature grayscale threshold, determine the defect pixels as the pixels in the infrared image to be measured whose grayscale values are greater than the defect temperature grayscale threshold, and determine the set of the defect pixels as the initial defect regions;
[0020] Determine the intersection between the initial defect regions and the device pixel connected regions as the corrected defect regions.
[0021] In one embodiment, the method further includes:
[0022] Obtain the geometric model of the device to be measured, and determine the device spatial coordinates based on the geometric model;
[0023] Map the pixel coordinates of the corrected defect regions to the device spatial coordinates through geometric transformation to obtain the predicted defect positions corresponding to the corrected defect regions.
[0024] In one embodiment, the method further includes:
[0025] Evaluate the defect type of the current defect based on the defect temperature data, the region size of the corrected defect regions, and the operating state of the device to be measured;
[0026] Obtain corresponding repair measures and processing priorities based on the defect type and the predicted defect location.
[0027] In a second aspect, the present application further provides a defect detection device, including:
[0028] A segmentation module, configured to obtain an infrared image to be measured, segment pixel points of the infrared image to be measured, and obtain device pixel points belonging to a device area and background pixel points belonging to a background area;
[0029] A marking module, configured to mark the device pixel points and the background pixel points respectively;
[0030] A determination module, configured to determine a device pixel connected area in the infrared image to be measured based on the markings of the device pixel points and the markings of the background pixel points;
[0031] A correction module, configured to identify an initial defect area in the infrared image to be measured, and correct the initial defect area based on the device pixel connected area to obtain a corrected defect area.
[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Obtain an infrared image to be measured, segment pixel points of the infrared image to be measured, and obtain device pixel points belonging to a device area and background pixel points belonging to a background area;
[0034] Mark the device pixel points and the background pixel points respectively;
[0035] Determine a device pixel connected area in the infrared image to be measured based on the markings of the device pixel points and the markings of the background pixel points;
[0036] Identify an initial defect area in the infrared image to be measured, and correct the initial defect area based on the device pixel connected area to obtain a corrected defect area.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0038] Obtain an infrared image to be measured, segment pixel points of the infrared image to be measured, and obtain device pixel points belonging to a device area and background pixel points belonging to a background area;
[0039] Mark the device pixel points and the background pixel points respectively;
[0040] Determine the device pixel connected regions in the infrared image to be measured based on the markings of the device pixels and the markings of the background pixels;
[0041] Identify the initial defect regions in the infrared image to be measured, and correct the initial defect regions based on the device pixel connected regions to obtain corrected defect regions.
[0042] In a fifth aspect, the present application also provides a computer program product, including a computer program, which when executed by a processor implements the following steps:
[0043] Obtain an infrared image to be measured, segment the pixels of the infrared image to be measured to obtain device pixels belonging to the device region and background pixels belonging to the background region;
[0044] Mark the device pixels and the background pixels respectively;
[0045] Determine the device pixel connected regions in the infrared image to be measured based on the markings of the device pixels and the markings of the background pixels;
[0046] Identify the initial defect regions in the infrared image to be measured, and correct the initial defect regions based on the device pixel connected regions to obtain corrected defect regions.
[0047] The above defect detection method, device, equipment, storage medium and program product first segment the pixels of the infrared image to be measured, mark the device pixels and the background pixels respectively, and then determine the connected regions of the device pixels according to the marking information of the device pixels. Correct the initial defect regions based on the device pixel connected regions, so as to obtain a more accurate defect region and improve the accuracy of defect location. The present application can solve the problems of insufficient positioning accuracy, serious noise interference, low processing efficiency, etc. in traditional infrared image processing methods, and accurately locate the infrared defect regions of power equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 It is a flowchart of the defect detection method in an embodiment;
[0050] Figure 2 It is a schematic diagram of the application scenario of the defect detection method in an embodiment;
[0051] Figure 3 Schematic diagram of the application scenario of the defect detection method in another embodiment;
[0052] Figure 4 Block diagram of the structure of the defect detection device in one embodiment;
[0053] Figure 5 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners
[0054] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] Currently, the detection and location of power equipment failures usually rely on manual inspection, infrared thermal imaging, and basic image processing algorithms. However, the traditional infrared defect location method faces the following difficulties:
[0056] Fuzzy device area: The boundary of the device is not clear, and the contour of the device in the infrared image is intertwined with the background; Noise interference: The infrared image is easily interfered by factors such as environmental noise and reflection, making it difficult to accurately identify the true temperature information and defect location of the device; Low location accuracy: The traditional method relies on simple threshold segmentation and edge detection, and cannot fully exploit the continuity information of device pixels, resulting in insufficient defect location accuracy.
[0057] To solve these problems, the present application proposes an infrared defect precise location method based on the continuity of device pixels, which can accurately locate the infrared defect area of power equipment through mathematical algorithms and topological rules.
[0058] Specifically, in one embodiment, as Figure 1 shown, a defect detection method is provided. In this embodiment, the application of this method to a terminal is taken as an example for illustration. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is realized through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0059] Step 101: Obtain a to-be-detected infrared image, segment the pixel points of the to-be-detected infrared image to obtain device pixel points belonging to the device area and background pixel points belonging to the background area;
[0060] Step 102: Mark the device pixel points and the background pixel points respectively;
[0061] Step 103: Based on the markings of the device pixel points and the markings of the background pixel points, determine the device pixel connected regions in the infrared image to be measured.
[0062] Step 104: Identify the initial defect regions in the infrared image to be measured, and correct the initial defect regions based on the device pixel connected regions to obtain the corrected defect regions.
[0063] Among them, the infrared image to be measured is an infrared image of the device to be measured captured by an infrared imaging device (such as an infrared thermal imager or a drone, etc.), and each pixel point in the image contains the temperature value at that position.
[0064] The device region refers to the region formed by the set of device pixel points in the infrared image to be measured obtained through segmentation. All the pixel points in the infrared image to be measured except the device pixel points belong to the background pixel points, and the set of background pixel points forms the background region.
[0065] Perform different markings on the device pixel points and the background pixel points to facilitate subsequent continuity analysis based on the markings, and then determine the device pixel connected regions. Correct the initial defect regions based on the obtained device pixel connected regions. This is because during defect detection, some defects will be misdetected, and the detected initial defect regions are not within the actual device region. Through correction, these misdetected defects can be removed.
[0066] In some embodiments, assume that each point (x, y) in the infrared image I(x, y) to be measured has a temperature value T(x, y). It is necessary to preprocess the infrared image to be measured to make the temperature difference between the device and the defect regions more obvious.
[0067] Specifically, the commonly used denoising method is Gaussian filtering. The formula for Gaussian filtering can be seen in Formula 1:
[0068] ;
[0069] Among them, G(x, y) is the Gaussian kernel, is the standard deviation, which controls the smoothness. Perform smoothing processing on the image I(x, y) through convolution operation:
[0070] Please refer to Formula 2:
[0071] ;
[0072] Among them, * represents the convolution operation.
[0073] The defect detection method provided in this embodiment segments the device area and the background area of the infrared image to be measured, determines the device pixel connected area based on the segmentation result, and can accurately locate the device area in the infrared image to be measured; corrects the detected initial defect area based on the device pixel connected area to obtain a corrected defect area, avoiding the problem of false detection. This application can solve problems such as insufficient positioning accuracy, serious noise interference, and low processing efficiency in traditional infrared image processing methods, and can accurately locate the infrared defect area of power equipment.
[0074] In an exemplary embodiment, the segmentation of the pixel points of the infrared image to be measured includes:
[0075] Perform edge detection on the infrared image to be measured to determine the device edge area of the device to be measured; determine the device gray value interval based on the operating temperature range of the device to be measured; determine the pixel points whose gray values belong to the device gray value interval and are within the device edge area as the device pixel points, and determine the remaining pixel points in the infrared image to be measured except the device pixel points as the background pixel points.
[0076] Edge detection is for the preliminary positioning of power equipment, extracting the contour of the equipment, and separating the equipment area from the background. This is because the shape of each power equipment is continuous, but to separate the equipment area of the power equipment from the background area, the edge position of the shape of the power equipment needs to be determined first. See Figure 2 , for example, Figure 2 In 201 and 202 in, the edges of the insulator are extracted from an original infrared image to be measured. Through edge detection, the power equipment can be initially distinguished from the background, and the contour of the power equipment can be obtained.
[0077] Specifically, use an edge detection algorithm (such as Canny edge detection) to extract the edge of the equipment. Edge detection calculates the gradient of each pixel. Assume the gradient calculation is:
[0078] Formula 3:
[0079] ;
[0080] Gradient After the calculation, the edge area is retained through non-maximum suppression and double-threshold method.
[0081] Among them, the edge detection algorithm is a technique in image processing that can be used to obtain the contour edges of objects in an image. This algorithm calculates the gradient (i.e., the degree of change in grayscale) of each pixel one by one, and then determines which pixel points belong to the real edges through non-maximum suppression and double-threshold method. Finally, an image that retains the contour edges of the object is obtained. In this embodiment, the edge detection algorithm is used to extract the device edge region of the power equipment in the infrared image to be measured.
[0082] The role of non-maximum suppression is to compare the gradients of each pixel point and only retain the pixel point with the largest value in the gradient direction, and the rest of the points are suppressed. This can make the edge remain as a thin line while removing unnecessary pixels.
[0083] The double-threshold method is to further determine which edges are real edges. By setting two thresholds, one is a high threshold and the other is a low threshold. If the gradient value of a pixel point is higher than the high threshold, it is considered a strong edge; if the value is lower than the low threshold, it is considered a weak edge; if it is between the two thresholds, it is judged according to whether it is connected to the strong edge pixels, and finally the real edges are retained.
[0084] Then, the temperature threshold method is used for the pixel points in the image ) to classify them as device pixel points or background pixel points. Assume that the grayscale value interval corresponding to the normal operating temperature range of the device is , then the classification result is:
[0085] Formula 4:
[0086] ;
[0087] The pixel points whose grayscale values belong to the device grayscale value interval and are within the device edge region are determined as the device pixel points, and the remaining pixel points in the infrared image to be measured except the device pixel points are determined as the background pixel points.
[0088] Through the cooperation of denoising, edge detection algorithm and temperature threshold method, the edges and device regions of the image can be accurately extracted, and noise and unnecessary edges can be effectively removed, so as to obtain a clear edge image.
[0089] In an exemplary embodiment, determining the device pixel connected region in the infrared image to be measured based on the marking of the device pixel points and the marking of the background pixel points includes:
[0090] Mark the device pixel points as a first preset value and mark the background pixel points as a second preset value; based on the first preset value and the second preset value, through the connected component labeling algorithm, determine multiple initial connected regions including device pixel points;
[0091] Calculate the gray value difference between adjacent pixel points in the initial connected region, determine the continuous pixel points in the initial connected region based on the gray value difference, and determine the device pixel connected region based on the continuous pixel points.
[0092] As shown in Formula 4, exemplarily, device pixels can be marked as 1 and background pixels can be marked as 0, so as to obtain a pixel label set of the device area from the infrared image to be measured.
[0093] Exemplarily, the following method can be used to determine whether pixels are connected:
[0094] First, perform the continuity judgment of pixel points. The steps include:
[0095] Based on the 8-neighborhood method, use a connected component labeling algorithm (such as the Flood Fill algorithm) to identify each connected region in the image. Specifically, starting from a starting pixel in the pixel label set of the infrared image to be measured, if the pixel belongs to the device area (i.e., marked as 1), then continue to check its 8-neighborhood pixels. All pixels connected to the starting pixel are marked as the same region until no new pixels can be marked. Finally, a set of connected regions is obtained through this algorithm, and each region contains a set of connected device area pixel points.
[0096] Exemplarily, assume that the label set of a certain part of the device area in the image is shown in the following matrix:
[0097] Formula 5:
[0098] ;
[0099] In the 5x5 matrix of Formula 5, the part with a label value of 1 represents the device area, and 0 represents the background. It is necessary to determine whether these pixel points belong to the same connected region. Starting from the pixel point (1,1), check its adjacent pixel points.
[0100] When applying the Flood Fill algorithm, assuming the starting point is (1,1), the algorithm will traverse the adjacent 1s until the entire device area, including (1,1), (1,2), (2,1), (2,2), etc., is marked as a connected region. In this way, the connected region of the pixel points can be extracted.
[0101] Furthermore, perform gray value difference detection on the pixel point connected region obtained through the continuity judgment: Assume that the pixel point and the gray value of its adjacent pixel point The difference is , if the difference is less than a certain set threshold , then it is considered that these two pixels are connected and belong to the device area. See Formula 6.
[0102] Formula 6:
[0103] ;
[0104] wherein, is any adjacent pixel point in the 8-neighborhood. Thus, a more accurate connected region of device pixels is obtained through connectivity judgment and gray value difference.
[0105] To better match the connected region of device pixels with the actual geometry of the device, topological optimization can be performed. Common methods include morphological operations such as dilation and erosion, etc. Among them, dilation means expanding the device region and removing small noises; erosion means shrinking the device region and removing isolated pixels. Through the above operations, the shape of the finally obtained connected region of device pixels can be optimized.
[0106] In an exemplary embodiment, the identifying the initial defect region in the infrared image to be measured, and correcting the initial defect region based on the connected region of device pixels to obtain a corrected defect region includes:
[0107] Obtaining a defect temperature threshold and a corresponding defect temperature gray threshold, determining the pixel points with gray values greater than the defect temperature gray threshold in the infrared image to be measured as defect pixel points, and determining the set of the defect pixel points as the initial defect region; determining the intersection between the initial defect region and the connected region of device pixels as the corrected defect region.
[0108] After the device region extraction is completed, it is next necessary to identify and locate the defect region. According to the operating temperature range of the device, a defect temperature gray threshold is set. If the temperature of a certain pixel in the infrared image to be measured exceeds this threshold, then this pixel is considered to be part of the defect region. Exemplarily, the normal operating temperature range of the device is 60°C to 80°C. If 90°C is set as the defect temperature threshold, then the pixel points with temperatures higher than this threshold (such as points above 90°C) will be regarded as the defect region. Exemplarily, Table 1 can be referred to:
[0109] Table 1 Pixel Temperature Table
[0110]
[0111] In Table 1, 90°C, 92°C, 95°C, 93°C, 97°C, 94°C, 99°C, 95°C represent the defect regions. After setting the temperature threshold, the pixel points of the defect region can be extracted and marked as defect pixel points, and the set of the defect pixel points is determined as the initial defect region.
[0112] Because during the actual detection process, interference items in the background area may be misdetected as defect areas, it is necessary to correct the initial defect area through the device pixel connected area. Exemplarily, the final corrected defect area can be determined by taking the intersection between the initial defect area and the device pixel connected area. For example, please refer to Figure 3 , when detecting through the temperature threshold, it is detected that there are pixel points with temperatures higher than the defect temperature grayscale threshold in areas 203 and 204 of the background area. However, since they do not belong to the device area, they are excluded after correction.
[0113] In an exemplary embodiment, the method further includes:
[0114] Obtain the geometric model of the device to be tested, and based on the geometric model, determine the device space coordinates; map the pixel coordinates of the corrected defect area to the device space coordinates through geometric transformation to obtain the predicted defect position corresponding to the corrected defect area.
[0115] Combine the geometric features and spatial position information of the device to determine the device space coordinates; accurately calibrate the position of the defect based on geometric mapping. In addition, the connectivity information of the device can also be used to determine whether the defect area belongs to a certain device part and further refine its position.
[0116] The above spatial positioning and error correction can combine the geometric model of the device, match the pixel points of the defect area with the actual spatial coordinates of the device through geometric transformation, and determine the position of the defect. According to the shape and connectivity information of the device, the defect area is corrected to eliminate the misdetected defect area.
[0117] In an exemplary embodiment, the method further includes:
[0118] Evaluate the defect type of the current defect based on the defect temperature data, area size, and operating state of the device to be tested of the corrected defect area; obtain the corresponding maintenance measures and treatment priorities based on the defect type and the predicted defect position.
[0119] Once the defect area is successfully identified and located, a defect assessment report can be generated next. The report includes the following contents: the temperature of the defect area, recording the highest temperature value of the defect area; the defect severity assessment, evaluating the severity of the defect type of the defect according to the temperature value, the size of the defect area, and the operating state of the device; the predicted defect position, accurately marking the specific position where the predicted defect occurs; and the maintenance suggestion, giving the maintenance measures and priorities according to the type and position of the defect.
[0120] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0121] Based on the same inventive concept, an embodiment of the present application also provides a defect detection device for implementing the above-mentioned defect detection method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the defect detection device provided below can refer to the limitations on the defect detection method in the above text, and will not be repeated here.
[0122] In an exemplary embodiment, as Figure 4 shown, a defect detection device is provided, including: a segmentation module 301, a marking module 302, a determination module 303, and a correction module 304, where:
[0123] The segmentation module 301 is configured to obtain a to-be-tested infrared image, segment pixel points of the to-be-tested infrared image, and obtain device pixel points belonging to a device area and background pixel points belonging to a background area;
[0124] The marking module 302 is configured to mark the device pixel points and the background pixel points respectively;
[0125] The determination module 303 is configured to determine a device pixel connected region in the to-be-tested infrared image based on the marks of the device pixel points and the marks of the background pixel points;
[0126] The correction module 304 is configured to identify an initial defect region in the to-be-tested infrared image, and correct the initial defect region based on the device pixel connected region to obtain a corrected defect region.
[0127] The segmentation module 301 is further configured to:
[0128] Perform edge detection on the to-be-tested infrared image to determine a device edge region of the to-be-tested device;
[0129] Determine a device gray value interval based on the operating temperature range of the to-be-tested device;
[0130] Pixels whose gray values belong to the device gray value range and are within the device edge area are determined as the device pixels, and the remaining pixels in the infrared image to be measured except the device pixels are determined as the background pixels.
[0131] The marking module 302 is further configured to:
[0132] Mark the device pixels with a first preset value and mark the background pixels with a second preset value;
[0133] Based on the first preset value and the second preset value, multiple initial connected regions including device pixels are determined through a connected component labeling algorithm;
[0134] Calculate the gray value difference between adjacent pixels in the initial connected region, determine the continuous pixels in the initial connected region based on the gray value difference, and determine the device pixel connected region based on the continuous pixels.
[0135] The correction module 304 is further configured to:
[0136] Obtain a defect temperature threshold and a corresponding defect temperature gray threshold, determine the pixels with gray values greater than the defect temperature gray threshold in the infrared image to be measured as defect pixels, and determine the set of the defect pixels as the initial defect region;
[0137] Determine the intersection between the initial defect region and the device pixel connected region as the corrected defect region.
[0138] The defect detection device further includes:
[0139] A mapping module, configured to obtain a geometric model of the device to be measured, and determine the device space coordinates based on the geometric model;
[0140] Map the pixel coordinates of the corrected defect region to the device space coordinates through geometric transformation to obtain the predicted defect position corresponding to the corrected defect region.
[0141] An evaluation module, configured to evaluate the defect type of the current defect based on the defect temperature data, the region size of the corrected defect region, and the operating state of the device to be measured;
[0142] Obtain corresponding maintenance measures and processing priorities based on the defect type and the predicted defect position.
[0143] Each module in the above defect detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0144] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a defect detection method.
[0145] Those skilled in the art can understand that Figure 5 the structure shown in
[0146] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0147] Obtain the infrared image to be measured, segment the pixel points of the infrared image to be measured, and obtain device pixel points belonging to the device area and background pixel points belonging to the background area;
[0148] Mark the device pixel points and the background pixel points respectively;
[0149] Based on the markings of the device pixel points and the markings of the background pixel points, determine the device pixel connected regions in the infrared image to be measured;
[0150] Identify the initial defect area in the infrared image to be measured, and correct the initial defect area based on the device pixel connected area to obtain the corrected defect area.
[0151] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0152] Obtain the infrared image to be measured, segment the pixel points of the infrared image to be measured, and obtain device pixel points belonging to the device area and background pixel points belonging to the background area;
[0153] Mark the device pixel points and the background pixel points respectively;
[0154] Based on the marks of the device pixel points and the marks of the background pixel points, determine the device pixel connected area in the infrared image to be measured;
[0155] Identify the initial defect area in the infrared image to be measured, and correct the initial defect area based on the device pixel connected area to obtain the corrected defect area.
[0156] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0157] Obtain the infrared image to be measured, segment the pixel points of the infrared image to be measured, and obtain device pixel points belonging to the device area and background pixel points belonging to the background area;
[0158] Mark the device pixel points and the background pixel points respectively;
[0159] Based on the marks of the device pixel points and the marks of the background pixel points, determine the device pixel connected area in the infrared image to be measured;
[0160] Identify the initial defect area in the infrared image to be measured, and correct the initial defect area based on the device pixel connected area to obtain the corrected defect area.
[0161] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0162] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.
[0163] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A defect detection method, characterized in that, The method includes: Obtain the infrared image to be measured, segment the pixel points of the infrared image to be measured, and obtain device pixel points belonging to the device area and background pixel points belonging to the background area; Mark the device pixel points and the background pixel points respectively; Based on the marks of the device pixel points and the marks of the background pixel points, determine the device pixel connected regions in the infrared image to be measured; Identify the initial defect regions in the infrared image to be measured, and correct the initial defect regions based on the device pixel connected regions to obtain corrected defect regions.
2. The method according to claim 1, characterized in that The segmenting of the pixel points of the infrared image to be measured includes: Perform edge detection on the infrared image to be measured to determine the device edge region of the device to be measured; Based on the operating temperature range of the device to be measured, determine the device gray value interval; Determine the pixel points whose gray values belong to the device gray value interval and are within the device edge region as the device pixel points, and determine the remaining pixel points in the infrared image to be measured except the device pixel points as the background pixel points.
3. The method according to claim 1, characterized in that The determining of the device pixel connected regions in the infrared image to be measured based on the marks of the device pixel points and the marks of the background pixel points includes: Mark the device pixel points with a first preset value and mark the background pixel points with a second preset value; Based on the first preset value and the second preset value, use the connected component labeling algorithm to determine multiple initial connected regions including device pixel points; Calculate the gray value differences of adjacent pixel points in the initial connected regions, determine the continuous pixel points in the initial connected regions based on the gray value differences, and determine the device pixel connected regions based on the continuous pixel points.
4. The method according to claim 1, wherein The identifying of the initial defect regions in the infrared image to be measured and correcting the initial defect regions based on the device pixel connected regions to obtain corrected defect regions includes: Obtain the defect temperature threshold and the corresponding defect temperature gray threshold, determine the pixel points with gray values greater than the defect temperature gray threshold in the infrared image to be measured as defect pixel points, and determine the set of the defect pixel points as the initial defect regions; Determine the intersection between the initial defect regions and the device pixel connected regions as the corrected defect regions.
5. The method according to claim 4, wherein The method further includes: Obtain the geometric model of the device to be measured, and determine the device space coordinates based on the geometric model; Map the pixel coordinates of the corrected defect regions to the device space coordinates through geometric transformation to obtain the predicted defect positions corresponding to the corrected defect regions.
6. The method according to claim 5, characterized in that, The method further includes: Evaluate the defect type of the current defect based on the defect temperature data, region size of the corrected defect regions and the operating state of the device to be measured; Obtain the corresponding maintenance measures and treatment priorities based on the defect type and the predicted defect positions.
7. A defect detection device, characterized in that, The device includes: A segmentation module, configured to obtain the infrared image to be measured, segment the pixel points of the infrared image to be measured, and obtain device pixel points belonging to the device area and background pixel points belonging to the background area; A marking module, configured to mark the device pixel points and the background pixel points respectively; A determination module, configured to determine a device pixel connected region in the infrared image to be measured based on the markings of the device pixels and the markings of the background pixels; A correction module, configured to identify an initial defect region in the infrared image to be measured, and correct the initial defect region based on the device pixel connected region to obtain a corrected defect region.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Electrical equipment thermal imaging segmentation dissimilarity finding method based on improved weighted otsu algorithm
CN109993736A
Improved region growing method for infrared image segmentation of power equipment
CN112465852A
Bright spot defect detection method and device, computer equipment and storage medium
CN115330704A
Power equipment abnormal heating detection method and system based on infrared image processing
CN116152315A
Substation electrical equipment thermal defect detection method based on infrared image
CN117934360A