Power equipment infrared image segmentation method and device and terminal equipment
Patent Information
- Application Number
- CN202211288299.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-10-20
AI Technical Summary
[0003]传统图像分割方法,将红外图像中温度高与温度低的部分分割为多个区域,并不能准确反映故障区域
[0023] This application calculates the variance between regions to obtain the dispersion of the mean grayscale values between faulty and non-faulty regions, and selects a segmentation scheme based on this dispersion. Compared with the traditional method of manually setting threshold parameters, this application can automatically adapt to appropriate threshold parameters, improving the applicability of the segmentation method. Compared with traditional methods, it can also reduce undersegmentation and oversegmentation, thus improving accuracy.
Smart Images

Figure CN115908259B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image segmentation technology, and in particular relates to infrared image segmentation methods, apparatus and terminal equipment for power equipment. Background Technology
[0002] Power equipment malfunctions cause localized temperature increases. Infrared images clearly show differences in the faulty area. Segmenting and identifying the faulty and non-faulty areas within the infrared image is a crucial step for subsequent fault assessment and automated maintenance. Traditional image segmentation methods primarily use fixed thresholds, which are ineffective in handling changes in foreground and background, or unclear boundaries. Different thresholds need to be set for segmentation based on the specific infrared image conditions.
[0003] Traditional image segmentation methods divide high-temperature and low-temperature regions in infrared images into multiple areas, which cannot accurately reflect fault areas. Since manually set thresholds significantly affect segmentation results, undersegmentation and oversegmentation can occur under different thresholds, ultimately leading to low accuracy. Summary of the Invention
[0004] This application provides a method, apparatus, and terminal device for infrared image segmentation of power equipment, thereby improving the adaptability and accuracy of the segmentation scheme.
[0005] This application is achieved through the following technical solution:
[0006] In a first aspect, embodiments of this application provide a method for infrared image segmentation of power equipment, including:
[0007] Acquire infrared images of power equipment, and then perform grayscale processing on the infrared images of power equipment to obtain grayscale images.
[0008] The center point of the fault area is determined based on the grayscale image.
[0009] Based on the center point of the fault region and the threshold parameter, the variance between regions is obtained. The threshold parameter represents the parameter that affects the size of the segmented region, and the variance between regions characterizes the degree of dispersion of gray values between the fault region and the non-fault region.
[0010] Based on the center point of the fault area, the variance between areas, and the threshold parameters, a segmentation scheme for infrared images of power equipment is obtained.
[0011] In conjunction with the first aspect, in some possible implementations, the variance between regions is obtained based on the center point of the fault region and the threshold parameter, including: obtaining a temporary segmentation scheme for the infrared image of the power equipment based on the center point of the fault region and the threshold parameter; and obtaining the variance between regions based on the temporary segmentation scheme and the infrared image of the power equipment.
[0012] In conjunction with the first aspect, in some possible implementations, a segmentation scheme for the infrared image of power equipment is obtained based on the center point of the fault area, the variance between areas, and a threshold parameter. This includes: gradually increasing or decreasing the threshold parameter to obtain the maximum value of the variance between areas; and obtaining a segmentation scheme for the infrared image of power equipment based on the threshold parameter corresponding to the center point of the fault area and the maximum value of the variance between areas.
[0013] In conjunction with the first aspect, in some possible implementations, the center point of the fault area is the point with the highest gray value in the grayscale image or the area with the highest gray value in the grayscale image, and the area with the highest gray value is at most 3*3 pixels.
[0014] In conjunction with the first aspect, in some possible implementations, the inter-regional variance is calculated using the following formula: σ 2 =w0(μ0-μ s ) 2 +w1(μ1-μ s ) 2 The fault region is obtained based on the center point of the fault region and the threshold parameter. The fault region segmented in the grayscale image is the foreground, and the remaining part is the background. 2 Let μ0 be the average gray value of the foreground, μ1 be the average gray value of the background, and μ1 be the average gray value of the background. S w0 represents the average grayscale value of the entire image, w1 represents the percentage of the foreground area to the total area, and w1 represents the percentage of the background area to the total area.
[0015] In conjunction with the first aspect, in some possible implementations, the percentage of the foreground area to the total area is calculated using the following formula: Where A is the number of foreground pixels in the grayscale image, and the grayscale image has a total of M×N pixels; the percentage of the background area to the total area is calculated by the following formula: Where B is the number of background pixels in the grayscale image; the average grayscale value of the foreground is calculated using the following formula: in, S0 represents the sum of foreground grayscale values, C0 represents the foreground in the image, and G(i,j) represents the grayscale value of the point with coordinates (i,j) in the grayscale image; the average background grayscale value is calculated using the following formula: in, S1 represents the total grayscale value of the background, and C1 represents the background in the image; the average grayscale value of the entire image is calculated using the following formula:
[0016] In conjunction with the first aspect, in some possible implementations, when the grayscale image is an 8-bit image, the threshold parameter ranges from 0 to 255.
[0017] Secondly, embodiments of this application provide an infrared image segmentation device for power equipment, comprising: an acquisition module for acquiring an infrared image of the power equipment and performing grayscale processing on the infrared image of the power equipment to obtain a grayscale image; a positioning module for determining the center point of a fault region based on the grayscale image; a variance module for obtaining the inter-region variance based on the center point of the fault region and a threshold parameter, wherein the threshold parameter represents a parameter affecting the size of the segmented region, and the inter-region variance characterizes the degree of grayscale value dispersion between the fault region and the non-fault region; and a result module for obtaining a segmentation scheme for the infrared image of the power equipment based on the center point of the fault region, the inter-region variance, and the threshold parameter.
[0018] Thirdly, embodiments of this application provide a terminal device, including: a processor and a memory, the memory being used to store a computer program, wherein the processor executes the computer program to implement the power equipment infrared image segmentation method as described in any of the first aspects.
[0019] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the infrared image segmentation method for power equipment as described in any of the first aspects.
[0020] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the power equipment infrared image segmentation method described in any of the first aspects above.
[0021] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0022] The beneficial effects of the embodiments in this application compared with the prior art are:
[0023] This application calculates the variance between regions to obtain the dispersion of the mean grayscale values between faulty and non-faulty regions, and selects a segmentation scheme based on this dispersion. Compared with the traditional method of manually setting threshold parameters, this application can automatically adapt to appropriate threshold parameters, improving the applicability of the segmentation method. Compared with traditional methods, it can also reduce undersegmentation and oversegmentation, thus improving accuracy.
[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram illustrating an application scenario of the infrared image segmentation method for power equipment provided in an embodiment of this application;
[0027] Figure 2 This is a schematic flowchart of an embodiment of the infrared image segmentation method for power equipment provided in this application;
[0028] Figure 3 This is a comparison image of an electric equipment before and after infrared image segmentation provided in an embodiment of this application;
[0029] Figure 4 This is a schematic diagram of the structure of an infrared image segmentation device for power equipment provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0031] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0032] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0033] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0034] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0035] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0036] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0037] For example, embodiments of this application can be applied to, for example... Figure 1 In the exemplary scenario shown, the infrared image acquisition device 10 acquires infrared images of the power equipment and transmits these images to the power equipment infrared image segmentation device 20. The power equipment infrared image segmentation device 20 uses the infrared images to calculate the optimal segmentation scheme for the power equipment infrared images. This provides accurate fault area information for subsequent personnel to determine the degree of fault and for automated maintenance.
[0038] Figure 2 This is a schematic flowchart of an embodiment of the infrared image segmentation method for power equipment provided in this application, with reference to... Figure 2 The infrared image segmentation method for this power equipment is described in detail below:
[0039] Step 101: Acquire an infrared image of the power equipment, and perform grayscale processing on the infrared image of the power equipment to obtain a grayscale image.
[0040] Step 102: Determine the center point of the fault area based on the grayscale image.
[0041] For example, the center point of the fault area is the point with the highest gray value in the grayscale image or the area with the highest gray value in the grayscale image, and the area with the highest gray value is at most 3*3 pixels.
[0042] Specifically, the center point of the fault area can also be the point where the sum of one or several pixel values is the largest.
[0043] Step 103: Based on the center point of the fault region and the threshold parameter, obtain the variance between regions. The threshold parameter represents the parameter that affects the size of the segmented region, and the variance between regions characterizes the degree of dispersion of gray values between the fault region and the non-fault region.
[0044] For example, the variance between regions is obtained based on the center point of the fault region and a threshold parameter, including: obtaining a temporary segmentation scheme for the infrared image of the power equipment based on the center point of the fault region and the threshold parameter; and obtaining the variance between regions based on the temporary segmentation scheme and the infrared image of the power equipment.
[0045] Specifically, based on the center point of the fault region and a threshold parameter, a temporary segmentation scheme for infrared images of power equipment can be obtained using region growing or edge detection algorithms. This temporary segmentation scheme separates the fault region from the grayscale image into fault and non-fault regions. The fault region is determined based on its center point and a threshold parameter, which can be the maximum number of pixels that can be expanded in each direction from the center point of the fault region. The fault region is obtained by expanding in each direction from the center point of the fault region according to the threshold parameter.
[0046] Region growing refers to a method that selects the center point of a faulty region, makes selections based on the difference in pixel values between the center point and its adjacent pixels, and then determines a temporary segmentation scheme.
[0047] For example, in a certain direction, the gray value difference between the center point of the fault region and its adjacent pixels is calculated. If the gray value difference is less than or equal to the gray value threshold, the adjacent pixel is taken as a pixel of the fault region and is the current edge pixel of the fault region. Then, the gray value difference between the current edge pixel of the fault region and the next adjacent pixel is calculated until the gray value difference between the fault region and all adjacent pixels is greater than the gray value threshold.
[0048] Edge detection algorithms refer to methods that determine a temporary segmentation scheme by multiplying the grayscale image matrix by operator matrices such as Sobel, Prewitt, and Roberts, and then based on the gradient changes of the grayscale image.
[0049] For example, the variance between regions is calculated using the following formula: σ 2 =w0(μ0-μ s ) 2 +w1(μ1-μs ) 2 The fault region can be obtained based on its center point and a threshold parameter. The segmented fault region is the foreground, and the remaining part is the background. σ 2 Let μ0 be the average gray value of the foreground, μ1 be the average gray value of the background, and μ1 be the average gray value of the background. S w0 represents the average grayscale value of the entire image, w1 represents the percentage of the foreground area to the total area, and w1 represents the percentage of the background area to the total area.
[0050] For example, the percentage of the foreground area to the total area is calculated using the following formula: Where A represents the number of foreground pixels in the grayscale image, and the grayscale image has a total of M×N pixels. The fault region can be obtained based on its center point and threshold parameters, thus determining the number of pixels within the fault region, which is the number of foreground pixels in the grayscale image. The percentage of the background area to the total area is calculated using the following formula: Where B is the number of background pixels in the grayscale image; the average grayscale value of the foreground is calculated using the following formula: in, S0 represents the sum of foreground grayscale values, C0 represents the foreground in the image, and G(i,j) represents the grayscale value of the point with coordinates (i,j) in the grayscale image; the average background grayscale value is calculated using the following formula: in, S1 represents the total grayscale value of the background, and C1 represents the background in the image; the average grayscale value of the entire image is calculated using the following formula:
[0051] Step 104: Based on the center point of the fault area, the variance between areas, and the threshold parameters, a segmentation scheme for the infrared image of the power equipment is obtained.
[0052] For example, a segmentation scheme for the infrared image of power equipment is obtained based on the center point of the fault area, the variance between areas, and a threshold parameter, including: gradually increasing or decreasing the threshold parameter to obtain the maximum value of the variance between areas; and obtaining a segmentation scheme for the infrared image of power equipment based on the threshold parameter corresponding to the center point of the fault area and the maximum value of the variance between areas.
[0053] For example, when the grayscale image is an 8-bit image, the threshold parameter ranges from 0 to 255.
[0054] Specifically, when selecting the threshold parameter for the first calculation of the inter-region variance, the inter-region variance can be any positive integer between 0 and 255. Subsequently, as the threshold parameter is gradually increased or decreased, each positive integer between 0 and 255 needs to be used as a threshold parameter for calculation. Then, the maximum value of the inter-region variance is selected, and the threshold parameter corresponding to the maximum value of the inter-region variance is found. Based on the corresponding threshold parameter and the center point of the fault area, a segmentation scheme for the infrared image of the power equipment is obtained.
[0055] Specifically, when the grayscale image is an 8-bit image, the first time the region growing method is used to segment the fault area and the non-fault area, the threshold parameter for calculating the variance between regions is 255. After that, it is only necessary to decrease the threshold parameter one by one to calculate the corresponding variance between regions. Then, the maximum value of the variance between regions is selected, and the threshold parameter corresponding to the maximum value of the variance between regions is found. Based on the corresponding threshold parameter and the center point of the fault area, the segmentation scheme of the infrared image of the power equipment is obtained.
[0056] Specifically, Figure 3 Comparison images of power equipment before and after infrared image segmentation. Figure 3 (1) Figure 3 (3) Figure 3 (5) The acquired infrared image. Figure 3 (2) Figure 3 (4) Figure 3 (6) The fault area of the segmented infrared image of the power equipment obtained by the infrared image segmentation method of the power equipment according to this application clearly segments out the fault area, and the segmentation effect is good, which facilitates the staff to carry out subsequent inspection and maintenance work.
[0057] The aforementioned infrared image segmentation method for power equipment calculates the variance between regions to obtain the mean dispersion of grayscale values between faulty and non-faulty regions. Based on this mean dispersion, a segmentation scheme is selected, specifically the one corresponding to the maximum variance between regions. Compared to traditional methods that manually set threshold parameters, this method automatically adapts to suitable threshold parameters, improving its applicability. Furthermore, it reduces undersegmentation and oversegmentation, thus increasing accuracy.
[0058] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0059] Corresponding to the infrared image segmentation method for power equipment described in the above embodiments, Figure 4The diagram shows a structural block diagram of an infrared image segmentation device for power equipment provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.
[0060] See Figure 4 The infrared image segmentation device for power equipment in this embodiment may include: an acquisition module 301, a positioning module 302, a variance module 303, and a result module 304.
[0061] Optionally, the acquisition module 301 is used to acquire infrared images of power equipment and perform grayscale processing on the infrared images of power equipment to obtain grayscale images.
[0062] Optionally, the positioning module 302 is used to determine the center point of the fault area based on the grayscale image.
[0063] For example, the center point of the fault area is the point with the highest gray value in the grayscale image or the area with the highest gray value in the grayscale image, and the area with the highest gray value is at most 3*3 pixels.
[0064] Optionally, the variance module 303 is used to obtain the inter-region variance based on the center point of the fault region and the threshold parameter. The threshold parameter represents the parameter that affects the size of the segmented region, and the inter-region variance characterizes the degree of gray value dispersion between the fault region and the non-fault region.
[0065] For example, the variance module 303 is also used to obtain a temporary segmentation scheme for the infrared image of the power equipment based on the center point of the fault region and the threshold parameter; and to obtain the inter-region variance based on the temporary segmentation scheme and the infrared image of the power equipment.
[0066] For example, the variance between regions is calculated using the following formula: σ 2 =w0(μ0-μ s ) 2 +w1(μ1-μ s ) 2 The fault region can be obtained based on its center point and a threshold parameter. The segmented fault region is the foreground, and the remaining part is the background. σ 2 Let μ0 be the average gray value of the foreground, μ1 be the average gray value of the background, and μ1 be the average gray value of the background. S w0 represents the average grayscale value of the entire image, w1 represents the percentage of the foreground area to the total area, and w1 represents the percentage of the background area to the total area.
[0067] For example, the percentage of the foreground area to the total area is calculated using the following formula: Where A is the number of foreground pixels in the grayscale image, and the grayscale image has a total of M×N pixels; the percentage of the background area to the total area is calculated by the following formula: Where B is the number of background pixels in the grayscale image; the average grayscale value of the foreground is calculated using the following formula: in, S0 represents the sum of foreground grayscale values, C0 represents the foreground in the image, and G(i,j) represents the grayscale value of the point with coordinates (i,j) in the grayscale image; the average background grayscale value is calculated using the following formula: in, S1 represents the total grayscale value of the background, and C1 represents the background in the image; the average grayscale value of the entire image is calculated using the following formula:
[0068] Optionally, the results module 304 is used to obtain a segmentation scheme for the infrared image of the power equipment based on the center point of the fault area, the variance between areas, and the threshold parameters.
[0069] For example, the result module 304 is also used to gradually increase or decrease the threshold parameter to obtain the maximum value of the variance between regions; based on the threshold parameter corresponding to the center point of the fault region and the maximum value of the variance between regions, a segmentation scheme for the infrared image of the power equipment is obtained.
[0070] For example, when the grayscale image is an 8-bit image, the threshold parameter ranges from 0 to 255.
[0071] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0072] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0073] This application also provides a terminal device, see [link to relevant documentation] Figure 5The terminal device 500 may include at least one processor 510 and a memory 520, the memory 520 being used to store a computer program 521. The processor 510 is used to call and run the computer program 521 stored in the memory 520 to implement the steps in any of the above method embodiments, for example... Figure 2 Steps 101 to 104 in the illustrated embodiment. Alternatively, when the processor 510 executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 4 The functions of modules 301 to 304 are shown.
[0074] For example, computer program 521 may be divided into one or more modules / units, one or more of which are stored in memory 520 and executed by processor 510 to complete this application. The one or more modules / units may be a series of computer program segments capable of performing specific functions, which describe the execution process of the computer program in terminal device 500.
[0075] Those skilled in the art will understand that Figure 5 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.
[0076] The processor 510 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0077] The memory 520 can be an internal storage unit of the terminal device or an external storage device, such as a plug-in hard drive, a smart media card (SMC), a secure digital card (SD), or a flash card. The memory 520 is used to store the computer program and other programs and data required by the terminal device. The memory 520 can also be used to temporarily store data that has been output or will be output.
[0078] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0079] The infrared image segmentation method for power equipment provided in this application can be applied to terminal devices such as computers, wearable devices, vehicle-mounted devices, tablet computers, laptops, and netbooks. This application does not impose any restrictions on the specific type of terminal device.
[0080] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various embodiments of the above-described infrared image segmentation method for power equipment.
[0081] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the various embodiments of the infrared image segmentation method for power equipment.
[0082] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0083] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0084] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0085] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for infrared image segmentation of power equipment, characterized in that, include: Acquire an infrared image of the power equipment, and perform grayscale processing on the infrared image of the power equipment to obtain a grayscale image; The center point of the fault area is determined based on the grayscale image; The center point of the fault area is either the point with the highest grayscale value in the grayscale image or the region with the highest grayscale value in the grayscale image, and the region with the highest grayscale value has a maximum value of 3. 3 pixels; the center point of the fault area can also be the point where the sum of one or several pixel values is the largest; Based on the center point of the fault region and the threshold parameter, the variance between regions is obtained. The threshold parameter represents the parameter that affects the size of the segmented region, and the variance between regions characterizes the degree of gray value dispersion between the fault region and the non-fault region. Based on the center point of the fault area, the variance between the areas, and the threshold parameter, a segmentation scheme for the infrared image of the power equipment is obtained. The process of obtaining the inter-regional variance based on the center point of the fault region and the threshold parameter includes: Based on the center point of the fault area and the threshold parameter, with the center point of the fault area as the center, the region growing method or edge detection algorithm is used to expand the center in all directions according to the threshold parameter to obtain a temporary segmentation scheme for the infrared image of the power equipment. Based on the temporary segmentation scheme and the infrared image of the power equipment, the variance between regions is obtained; The segmentation scheme for the infrared image of the power equipment based on the center point of the fault region, the variance between regions, and the threshold parameter includes: By gradually increasing or decreasing the threshold parameter, the maximum value of the variance between regions can be obtained; Based on the threshold parameter corresponding to the maximum value of the center point of the fault area and the variance between the areas, a segmentation scheme for the infrared image of the power equipment is obtained.
2. The infrared image segmentation method for power equipment as described in claim 1, characterized in that, The variance between regions is calculated using the following formula: The fault region is obtained based on its center point and the threshold parameter. The fault region segmented from the grayscale image is the foreground, and the remaining portion is the background. For the variance between regions, The average gray value of the foreground. The average gray value of the background. This represents the average grayscale value of the entire image. The percentage of the foreground area to the total area. This represents the percentage of the total area that the background area occupies.
3. The infrared image segmentation method for power equipment as described in claim 2, characterized in that, The percentage of the foreground area to the total area is calculated using the following formula: in, Let be the number of foreground pixels in the grayscale image, and let be the total number of pixels in the grayscale image. 1 pixel; The percentage of the background area to the total area is calculated using the following formula: in, This represents the number of background pixels in the grayscale image. The average gray value of the foreground is calculated using the following formula: in, , The sum of the foreground grayscale values. Foreground in the image, The coordinates in the grayscale image are The grayscale value of the point; The average grayscale value of the background is calculated using the following formula: in, , This represents the sum of the background grayscale values. The background in the image; The average grayscale value of the entire image is calculated using the following formula: .
4. The infrared image segmentation method for power equipment as described in claim 1, characterized in that, When the grayscale image is an 8-bit image, the value range of the threshold parameter is 0 to 255.
5. An infrared image segmentation device for power equipment, characterized in that, include: The acquisition module is used to acquire infrared images of power equipment and perform grayscale processing on the infrared images of power equipment to obtain grayscale images. The positioning module is used to determine the center point of the fault area based on the grayscale image; The center point of the fault area is either the point with the highest grayscale value in the grayscale image or the region with the highest grayscale value in the grayscale image, and the region with the highest grayscale value has a maximum value of 3. 3 pixels; the center point of the fault area can also be the point where the sum of one or several pixel values is the largest; The variance module is used to obtain the inter-region variance based on the center point of the fault region and the threshold parameter. The threshold parameter represents the parameter that affects the size of the segmented region, and the inter-region variance characterizes the degree of gray value dispersion between the fault region and the non-fault region. The result module is used to obtain a segmentation scheme for the infrared image of the power equipment based on the center point of the fault area, the variance between the areas, and the threshold parameter. The variance module is specifically used for: Based on the center point of the fault area and the threshold parameter, with the center point of the fault area as the center, the region growing method or edge detection algorithm is used to expand the center in all directions according to the threshold parameter to obtain a temporary segmentation scheme for the infrared image of the power equipment. Based on the temporary segmentation scheme and the infrared image of the power equipment, the variance between regions is obtained; The result module is specifically used for: By gradually increasing or decreasing the threshold parameter, the maximum value of the variance between regions can be obtained; Based on the threshold parameter corresponding to the maximum value of the center point of the fault area and the variance between the areas, a segmentation scheme for the infrared image of the power equipment is obtained.
6. A terminal device, comprising: A processor and a memory, wherein the memory stores a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the infrared image segmentation method for power equipment as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the infrared image segmentation method for power equipment as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Infrared image enhancement method for electrical equipment based on non-downsampling shear wave transform
CN109035166A