Insulator defect detection method and system
By preprocessing, distortion correction, illumination adjustment, and edge enhancement of insulator images, combined with a recognition model, the problem of uneven clarity and brightness caused by environmental factors in insulator image detection is solved, thereby improving the accuracy of defect identification and the ability to preserve details.
Patent Information
- Application Number
- CN202511124376.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-12-30
AI Technical Summary
In existing technologies, insulator image detection is affected by external environmental factors, resulting in low image clarity and uneven brightness, which affects the accuracy of defect identification.
By preprocessing, distortion correction, illumination adjustment, edge enhancement and brightness mapping of insulator images, combined with manually labeled training images, defect identification is performed, and a preset identification model is used for defect identification.
It enhances the image enhancement effect, making the transition areas between light and dark and brightness in the image smoother, effectively preserving details, avoiding dullness and unclearness, and improving the accuracy of defect identification.
Smart Images

Figure CN121235985A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of defect detection, and specifically relates to a method and system for detecting defects in insulators. Background Technology
[0002] An insulator is a special type of insulating component that plays a crucial role in overhead power transmission lines. Insulators are primarily used on utility poles, and their development has led to the widespread use of suspended insulators at one end of high-voltage power transmission towers. These insulators are designed to increase creepage distance and are typically made of silicone or ceramic. Insulators serve two fundamental functions in overhead power transmission lines: supporting the conductors and preventing current from returning to the ground.
[0003] For insulation, if there are defects on its surface, the insulation performance of the insulator will continue to deteriorate, affecting its performance. The existing technology for insulator detection usually involves taking pictures of the insulators in the transmission line and then performing defect detection on the images containing the insulators. However, due to the influence of external environmental factors, such as lighting conditions and weather conditions, the images may have low clarity and uneven brightness, which in turn affects the accuracy of defect identification. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides an insulator defect detection method and system, which solves the technical problems in the prior art.
[0005] On one hand, the present invention provides the following technical solution: a method for detecting defects in insulators, comprising: Acquire a target insulator image and preprocess the target insulator image to obtain a processed insulator image; The processed insulator image is subjected to two distortion corrections to obtain a corrected insulator image; The illumination of the corrected insulator image is adjusted to obtain the adjusted insulator image; The image of the insulator is divided into several image blocks of equal size. The image blocks are then subjected to edge enhancement and brightness mapping processing in sequence to obtain processed image blocks. The processed image blocks are then combined to obtain a combined insulator image. The manual-annotated training insulator defect images are obtained, and the training insulator defect images are input into a preset recognition model for training. The combined insulator images are input into the trained preset recognition model for defect recognition, and the defect recognition results are output.
[0006] Compared with existing technologies, the beneficial effects of this invention are as follows: First, this invention acquires a target insulator image and preprocesses it to obtain a processed insulator image. Then, it performs two distortion corrections on the processed insulator image to obtain a corrected insulator image. Next, it adjusts the illumination of the corrected insulator image to obtain an adjusted insulator image. Then, it divides the adjusted insulator image into several image blocks of equal size, sequentially performs edge enhancement and brightness mapping processing on these blocks to obtain processed image blocks. These processed image blocks are then combined to obtain a combined insulator image. Next, it acquires manually annotated training insulator defect images, inputs these images into a preset recognition model for training, and inputs the combined insulator image into the trained preset recognition model for defect recognition, outputting the defect recognition result. This invention improves the image enhancement effect through a series of image processing steps, making the transition areas between light and dark areas and brightness smoother, effectively preserving the details in the image, and effectively avoiding dimness, halos, and unclear images.
[0007] Preferably, the step of preprocessing the target insulator image to obtain a processed insulator image includes: The target insulator image is sequentially cropped, rotated, filtered by median, and the target region is extracted to obtain the processed insulator image.
[0008] Preferably, the step of performing two distortion corrections on the processed insulator image to obtain a corrected insulator image includes: Identify the location of the distortion center in the processed insulator image. and distortion radius ; The distortion factor in the X direction is calculated based on the location of the distortion center and the distortion radius. : ; In the formula, Indicates the first stretch factor. This represents the Y-axis coordinate of a single pixel in the insulator image. The distortion factor in the Y direction is calculated based on the location of the distortion center and the distortion radius. : ; In the formula, Indicates the first stretch factor. This represents the Y-axis coordinate of a single pixel in the insulator image. The processed insulator image is subjected to two distortion corrections based on the X-direction distortion factor and the Y-direction distortion factor to obtain a corrected insulator image.
[0009] Preferably, the step of performing two distortion corrections on the processed insulator image based on the X-direction distortion factor and the Y-direction distortion factor to obtain a corrected insulator image includes: Based on the X-direction distortion factor The processed insulator image undergoes a first distortion correction to obtain a first corrected image: ; ; In the formula, Indicates the coordinates of a pixel in the first corrected image; Based on the Y-direction distortion factor A second distortion correction is performed on the first corrected image to obtain the corrected insulator image: ; ; In the formula, This indicates the coordinates of pixels in the corrected insulator image.
[0010] Preferably, the step of adjusting the illumination of the corrected insulator image to obtain the adjusted insulator image includes: In the corrected insulator image, an arbitrary pixel is selected as the reference pixel, and the set of neighboring pixels of the reference pixel is determined. Calculate the distance difference between the reference pixel and the pixels in the neighboring pixel set. Difference between brightness and light : ; ; In the formula, , These represent the reference pixel and the pixels in the neighboring pixel set, respectively. These represent the distance parameter and the brightness parameter, respectively. , They represent , Brightness at that location; Based on distance difference Difference between brightness and light Calculate the brightness component : ; Based on brightness component Determine the insulator image to adjust : ; In the formula, To correct the reflection component of the insulator image, This is the illumination adjustment factor.
[0011] Preferably, the step of sequentially performing edge enhancement and brightness mapping processing on a plurality of image blocks to obtain processed image blocks includes: A reference image block is selected from the plurality of image blocks, edge pixels in the reference image block are identified, and edge enhancement is performed on the edge pixels to obtain an enhanced image block: ; In the formula, Represents edge pixels, This represents the horizontal and vertical distances between edge pixels and the center pixel of the top-left image block of the reference image block. These represent the center pixels of the top left, top right, bottom left, and bottom right image blocks of the reference image block, respectively. Histogram equalization is performed on each enhanced image patch to obtain equalized image patches; The equalized image block is subjected to brightness equalization and mapping processing to obtain the processed image block.
[0012] Preferably, the step of performing brightness equalization and mapping processing on the equalized image block to obtain a processed image block includes: The equalized image block is subjected to brightness equalization processing to obtain a brightness-processed image block: ; In the formula, Luminosity processing is used to adjust the brightness of pixels within an image block. As the first equilibrium factor, To equalize the pixel values of pixels in an image patch, To achieve a balanced range, To equalize the brightness of pixels in an image block, This represents the second equilibrium factor. This represents the maximum slope of the histogram corresponding to the equalized image patch; The brightness-processed image block is mapped to obtain a processed image block: ; In the formula, To process the brightness of pixels in an image patch, This indicates the maximum brightness value in the brightness processing image block. Gamma correction factor This represents the standard deviation of pixel brightness in the processed image block.
[0013] Secondly, the present invention provides the following technical solution: an insulator defect detection system, the system comprising: The preprocessing module is used to acquire the target insulator image and preprocess the target insulator image to obtain the processed insulator image; The correction module is used to perform two distortion corrections on the processed insulator image to obtain a corrected insulator image; An adjustment module is used to adjust the illumination of the corrected insulator image to obtain an adjusted insulator image; The mapping module is used to divide the adjusted insulator image into several image blocks of equal size, perform edge enhancement and brightness mapping processing on the several image blocks in sequence to obtain processed image blocks, and combine the several processed image blocks to obtain a combined insulator image. The identification module is used to acquire manually annotated training insulator defect images, input the training insulator defect images into a preset identification model for training, input the combined insulator images into the trained preset identification model for defect identification, and output defect identification results.
[0014] Thirdly, the present invention provides the following technical solution: a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the insulator defect detection method as described above.
[0015] Fourthly, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the insulator defect detection method as described above. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of the insulator defect detection method provided in Embodiment 1 of the present invention; Figure 2 This is a structural block diagram of the insulator defect detection system provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the hardware structure of a computer provided for another embodiment of the present invention.
[0018] The embodiments of the present invention will be further described below with reference to the accompanying drawings. Detailed Implementation
[0019] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain embodiments of the present invention, and should not be construed as limiting the present invention.
[0020] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.
[0021] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0022] In the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention according to the specific circumstances.
[0023] Example 1 In Embodiment 1 of the present invention, as Figure 1 As shown, an insulator defect detection method includes: S1. Obtain the target insulator image and preprocess the target insulator image to obtain a processed insulator image; Specifically, the target insulator image is an image containing the target insulator, and by preprocessing the target insulator image, the image can be resized and denoised accordingly.
[0024] Step S1 includes: The target insulator image is sequentially cropped, rotated, filtered by median, and the target region is extracted to obtain the processed insulator image. Specifically, the methods used in the above preprocessing process are commonly used algorithms in the existing technology, so they will not be elaborated here.
[0025] S2. Perform two distortion corrections on the processed insulator image to obtain a corrected insulator image; Specifically, when acquiring the initial target insulator image, the image may be distorted due to differences in the shooting equipment, shooting position, and shooting angle. Therefore, the image edge information is effectively preserved by performing correction processing.
[0026] Step S2 includes: S21. Identify the location of the distortion center in the processed insulator image. and distortion radius .
[0027] S22. Calculate the X-direction distortion factor based on the distortion center position and the distortion radius. : ; In the formula, Indicates the first stretch factor. This represents the Y-axis coordinate of a single pixel in the insulator image.
[0028] S23. Calculate the Y-direction distortion factor based on the distortion center position and the distortion radius. : ; In the formula, Indicates the first stretch factor. This represents the Y-axis coordinate of a single pixel in the insulator image. Specifically, the first stretch factor and the second stretch factor can be determined according to the actual situation, such as the shooting equipment. In this embodiment, the first stretch factor and the second stretch factor are tentatively set to 1.2.
[0029] S24. Based on the X-direction distortion factor and the Y-direction distortion factor, the processed insulator image is subjected to two distortion corrections to obtain a corrected insulator image; Step S24 includes: S241, Based on the X-direction distortion factor The processed insulator image undergoes a first distortion correction to obtain a first corrected image: ; ; In the formula, Indicates the coordinates of a pixel in the first corrected image; S242, Based on the Y-direction distortion factor A second distortion correction is performed on the first corrected image to obtain the corrected insulator image: ; ; In the formula, This indicates the coordinates of pixels in the corrected insulator image; Specifically, the two correction processes correct the image in both the horizontal and vertical directions, improving the correction speed while fully preserving image details, all while ensuring the overall effect.
[0030] S3. Adjust the illumination of the corrected insulator image to obtain the adjusted insulator image; Step S3 includes: S31. Randomly select a pixel in the corrected insulator image as a reference pixel, and determine the neighborhood pixel set of the reference pixel. Specifically, for correcting an insulator image, each pixel needs to undergo a reference pixel selection process.
[0031] S32. Calculate the distance difference between the reference pixel and the pixels in the neighborhood pixel set. Difference between brightness and light : ; ; In the formula, , These represent the reference pixel and the pixels in the neighboring pixel set, respectively. These represent the distance parameter and the brightness parameter, respectively. , They represent , Brightness at that location; Specifically, step S32 can be viewed as a two-dimensional convolution operation filtering process, with the distance parameter and brightness parameter being the corresponding filter parameters.
[0032] S33, Based on distance difference Difference between brightness and light Calculate the brightness component : .
[0033] S34, Based on brightness component Determine the insulator image to adjust : ; In the formula, To correct the reflection component of the insulator image, Light adjustment factor; Specifically, in this embodiment, if the illumination adjustment factor is too large, the image will be too bright, and details may be lost and halos may appear in the brightness transition area. If the illumination adjustment factor is too small, the brightness enhancement effect will be poor. Therefore, in this application, the illumination adjustment factor is in the range of 0.2-0.4.
[0034] S4. Divide the adjusted insulator image into several image blocks of equal size, perform edge enhancement and brightness mapping processing on several image blocks in sequence to obtain processed image blocks, and combine several processed image blocks to obtain a combined insulator image. Step S4 includes: S41. Select a reference image block from among the plurality of image blocks, identify the edge pixels in the reference image block, and perform edge enhancement on the edge pixels to obtain an enhanced image block: ; In the formula, Represents edge pixels, This represents the horizontal and vertical distances between edge pixels and the center pixel of the top-left image block of the reference image block. These represent the center pixels of the top left, top right, bottom left, and bottom right image blocks of the reference image block, respectively. Specifically, a reference image block selection process is required for each image block.
[0035] S42. Perform histogram equalization on each enhanced image block to obtain an equalized image block; Specifically, histogram equalization is a commonly used algorithm in existing technology, so it will not be described in detail here.
[0036] S43. Perform brightness equalization and mapping processing on the equalized image block to obtain the processed image block; Step S43 includes: S431. Perform brightness equalization processing on the equalized image block to obtain a brightness-processed image block: ; In the formula, Luminosity processing is used to adjust the brightness of pixels within an image block. As the first equilibrium factor, To equalize the pixel values of pixels in an image patch, To achieve a balanced range, To equalize the brightness of pixels in an image block, This represents the second equilibrium factor. This represents the maximum slope of the histogram corresponding to the equalized image patch; Specifically, the smaller the first and second equalization factors are, the lower the image contrast, and the more details in the original image can be preserved. The larger the first and second equalization factors are, the higher the image contrast, and the more effectively image noise can be reduced. Therefore, the values of the first and second equalization factors can be adjusted according to actual needs.
[0037] S432. The brightness-processed image block is mapped to obtain a processed image block: ; In the formula, To process the brightness of pixels in an image patch, This indicates the maximum brightness value in the brightness processing image block. Gamma correction factor This represents the standard deviation of pixel brightness in the processed image block.
[0038] Specifically, the above processing can improve image quality, enhance image contrast, expand the dynamic adjustment range, and effectively reduce image noise.
[0039] S5. Obtain manually annotated training insulator defect images, input the training insulator defect images into a preset recognition model for training, input the combined insulator images into the trained preset recognition model for defect recognition, and output defect recognition results. Specifically, the training insulator defect images include manually labeled defect insulator images, which are then fed into the model for training. After training, the combined insulator images are input into the trained model for defect recognition, which outputs the defect location and defect type. The preset recognition model is the YOLOv5 model.
[0040] The insulator defect detection method provided in Embodiment 1 of this invention first acquires a target insulator image, preprocesses the target insulator image to obtain a processed insulator image, then performs two distortion corrections on the processed insulator image to obtain a corrected insulator image, then adjusts the illumination of the corrected insulator image to obtain an adjusted insulator image, then divides the adjusted insulator image into several image blocks of equal size, performs edge enhancement and brightness mapping processing on the several image blocks in sequence to obtain processed image blocks, and combines the several processed image blocks to obtain a combined insulator image; then, it acquires manually annotated training insulator defect images, inputs the training insulator defect images into a preset recognition model for training, and inputs the combined insulator images into the trained preset recognition model for defect recognition to output defect recognition results. This invention improves the image enhancement effect by performing a series of image processing steps, making the transition areas between light and dark and brightness in the image smoother, effectively preserving the details in the image, and effectively avoiding the appearance of dark, haloed, or unclear images.
[0041] Example 2 like Figure 2 As shown, in Embodiment 2 of the present invention, an insulator defect detection system is provided, the system comprising: Preprocessing module 1 is used to acquire a target insulator image and preprocess the target insulator image to obtain a processed insulator image; Correction module 2 is used to perform two distortion corrections on the processed insulator image to obtain a corrected insulator image; Adjustment module 3 is used to adjust the illumination of the corrected insulator image to obtain the adjusted insulator image; The mapping module 4 is used to divide the adjusted insulator image into several image blocks of equal size, perform edge enhancement and brightness mapping processing on the several image blocks in sequence to obtain processed image blocks, and combine the several processed image blocks to obtain a combined insulator image. The identification module 5 is used to acquire manually annotated training insulator defect images, input the training insulator defect images into a preset identification model for training, input the combined insulator images into the trained preset identification model for defect identification, and output defect identification results. The preprocessing module 1 is specifically used for: The target insulator image is sequentially cropped, rotated, filtered by median, and the target region is extracted to obtain the processed insulator image.
[0042] The correction module 2 includes: The identification submodule is used to identify the location of the distortion center in the processed insulator image. and distortion radius ; The first factor calculation submodule is used to calculate the X-direction distortion factor based on the distortion center position and the distortion radius. : ; In the formula, Indicates the first stretch factor. This represents the Y-axis coordinate of a single pixel in the insulator image. The second factor calculation submodule is used to calculate the Y-direction distortion factor based on the distortion center position and the distortion radius. : ; In the formula, Indicates the first stretch factor. This represents the Y-axis coordinate of a single pixel in the insulator image. The correction submodule is used to perform two distortion corrections on the processed insulator image based on the X-direction distortion factor and the Y-direction distortion factor to obtain a corrected insulator image.
[0043] The correction submodule includes: The first correction unit is used to correct the X-direction distortion factor. The processed insulator image undergoes a first distortion correction to obtain a first corrected image: ; ; In the formula, Indicates the coordinates of a pixel in the first corrected image; The second correction unit is used to correct the distortion factor in the Y direction. A second distortion correction is performed on the first corrected image to obtain the corrected insulator image: ; ; In the formula, This indicates the coordinates of pixels in the corrected insulator image.
[0044] The adjustment module 3 includes: The reference pixel submodule is used to arbitrarily select a pixel in the corrected insulator image as a reference pixel and determine the neighborhood pixel set of the reference pixel. The difference submodule is used to calculate the distance difference between the reference pixel and the pixels in the neighboring pixel set. Difference between brightness and light : ; ; In the formula, , These represent the reference pixel and the pixels in the neighboring pixel set, respectively. These represent the distance parameter and the brightness parameter, respectively. , They represent , Brightness at that location; Component calculation submodule, used for calculation based on distance difference Difference between brightness and light Calculate the brightness component : ; Adjustment submodule, used for brightness component-based adjustments Determine the insulator image to adjust : ; In the formula, To correct the reflection component of the insulator image, This is the illumination adjustment factor.
[0045] The mapping module 4 includes: The enhancement submodule is used to select a reference image block from the plurality of image blocks, identify edge pixels in the reference image block, and perform edge enhancement on the edge pixels to obtain an enhanced image block: ; In the formula, Represents edge pixels, This represents the horizontal and vertical distances between edge pixels and the center pixel of the top-left image block of the reference image block. These represent the center pixels of the top left, top right, bottom left, and bottom right image blocks of the reference image block, respectively. The equalization submodule is used to perform histogram equalization on each enhanced image block to obtain an equalized image block; The mapping submodule is used to perform brightness equalization and mapping processing on the equalized image block to obtain the processed image block.
[0046] The mapping submodule includes: A brightness equalization unit is used to perform brightness equalization processing on the equalized image block to obtain a brightness-processed image block: ; In the formula, Luminosity processing is used to adjust the brightness of pixels within an image block. As the first equilibrium factor, To equalize the pixel values of pixels in an image patch, To achieve a balanced range, To equalize the brightness of pixels in an image block, This represents the second equilibrium factor. This represents the maximum slope of the histogram corresponding to the equalized image patch; A mapping unit is used to perform mapping processing on the brightness-processed image block to obtain a processed image block: ; In the formula, To process the brightness of pixels in an image patch, This indicates the maximum brightness value in the brightness processing image block. Gamma correction factor This represents the standard deviation of pixel brightness in the processed image block.
[0047] In other embodiments of the present invention, the present invention provides the following technical solution: a computer, including a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101, wherein the processor 101 executes the computer program to implement the insulator defect detection method as described above.
[0048] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0049] The memory 102 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include removable or non-removable (or fixed) media. Where appropriate, the memory 102 may be internal or external to a data processing device. In a particular embodiment, the memory 102 is non-volatile memory. In a particular embodiment, the memory 102 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0050] The memory 102 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101.
[0051] The processor 101 implements the above-mentioned insulator defect detection method by reading and executing computer program instructions stored in the memory 102.
[0052] In some embodiments, the computer may further include a communication interface 103 and a bus 100. For example, Figure 3 As shown, the processor 101, memory 102, and communication interface 103 are connected through bus 100 and complete communication with each other.
[0053] The communication interface 103 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of the present invention. The communication interface 103 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0054] Bus 100 includes hardware, software, or both, that couples components of a computer device together. Bus 100 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although specific buses are described and illustrated in the embodiments of the present invention, the present invention is contemplated by any suitable bus or interconnect.
[0055] The computer can execute the insulator defect detection method of the present invention based on the acquired insulator defect detection system, thereby realizing insulator defect detection.
[0056] In some further embodiments of the present invention, in conjunction with the above-described insulator defect detection method, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-described insulator defect detection method.
[0057] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0058] More specific examples of readable media (a non-exhaustive list) include: electrical connections (electronic devices) with one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0059] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0060] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this specification.
[0061] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method of detecting defects in an insulator, characterized by, The method comprises the following steps: obtaining a target insulator image, preprocessing the target insulator image to obtain a processed insulator image; twice distortion correction is performed on the processed insulator image to obtain a corrected insulator image; light adjustment is performed on the corrected insulator image to obtain an adjusted insulator image; the adjusted insulator image is equally divided into a plurality of image blocks, edge enhancement and brightness mapping processing are sequentially performed on the plurality of image blocks to obtain processed image blocks, and the plurality of processed image blocks are combined to obtain a combined insulator image; obtaining a training insulator defect image labeled by artificial labeling, inputting the training insulator defect image into a preset recognition model for training, inputting the combined insulator image into the trained preset recognition model for defect recognition, and outputting a defect recognition result.
2. The insulator defect detection method according to claim 1, characterized by, The preprocessing step of the target insulator image to obtain a processed insulator image comprises: sequentially performing cropping, rotation transformation, median filtering processing and target region extraction on the target insulator image to obtain a processed insulator image.
3. The insulator defect detection method according to claim 1, characterized by, The twice distortion correction step of the processed insulator image to obtain a corrected insulator image comprises: identifying a distortion center position in the processed insulator image and a distortion radius ; calculating an X-direction distortion factor based on the distortion center position and the distortion radius : ; In the formula, represents the first stretch factor, represents the Y-axis coordinate of a pixel point in the processed insulating sub-image; calculating a Y direction distortion factor based on the distortion center position and the distortion radius : ; In the formula, represents the first stretch factor, represents the Y-axis coordinate of a pixel point in the processed insulating sub-image; twice distortion correction is performed on the processed insulator image based on the X-direction distortion factor and the Y-direction distortion factor to obtain a corrected insulator image.
4. The insulator defect detection method according to claim 3, characterized by, The twice distortion correction step of the processed insulator image based on the X-direction distortion factor and the Y-direction distortion factor to obtain a corrected insulator image comprises: based on the x-direction distortion factor performing a first distortion correction on the processed insulator image to obtain a first corrected image: ; ; In the formula, represents the coordinates of a pixel point in the first corrected image; based on the y-direction distortion factor performing a second distortion correction on the first corrected image to obtain a corrected insulator image: ; ; In the formula, represents the coordinates of the pixel points in the corrected insulator image.
5. The insulator defect detection method according to claim 1, characterized by, The light adjustment step of the corrected insulator image to obtain an adjusted insulator image comprises: arbitrarily selecting a pixel point in the corrected insulator image as a reference pixel point and determining a neighborhood pixel point set of the reference pixel point; calculating a distance difference value between the reference pixel point and a pixel point in the set of neighborhood pixel points and a luminance difference value : ; ; In the formula, , respectively represent a reference pixel point, a pixel point in a neighborhood pixel point set, respectively represent a distance parameter, a brightness parameter, , respectively represent , brightness at the positions. Based on the distance difference value With the brightness difference value Calculate the light component : ; Based on bright component Determining adjusted insulator image : ; wherein to correct the reflection component of the insulator image, is the lighting adjustment factor.
6. The insulator defect detection method according to claim 1, characterized by, The step of sequentially performing edge enhancement and brightness mapping processing on the plurality of image blocks to obtain processed image blocks comprises: selecting a reference image block from the plurality of image blocks, identifying edge pixel points in the reference image block, and performing edge enhancement on the edge pixel points to obtain an enhanced image block; ; In the formula, denotes an edge pixel point, denotes the horizontal and vertical distances between the edge pixel point and the center pixel point of the top-left image block of the reference image block, denote the center pixel points of the top-left, top-right, bottom-left, and bottom-right image blocks of the reference image block, respectively. performing histogram equalization processing on each enhanced image block to obtain an equalized image block; performing brightness equalization and mapping processing on the equalized image block to obtain a processed image block.
7. The insulator defect detection method according to claim 6, characterized by, The step of performing brightness equalization and mapping processing on the equalized image block to obtain a processed image block comprises: performing brightness equalization processing on the equalized image block to obtain a brightness-processed image block; ; In the formula, is the luminance of the pixel in the image block, is the first equalization factor, is the pixel value of the pixel in the equalization image block, is the equalization range, is the luminance of the pixel in the equalization image block, represents the second equalization factor, represents the maximum slope of the histogram corresponding to the equalization image block; performing mapping processing on the brightness-processed image block to obtain a processed image block. ; wherein is the luminance of the pixel in the image block, represents the maximum luminance in the image block, is the gamma correction coefficient, represents the standard deviation of the luminance of the pixels in the image block.
8. An insulator defect detection system characterized by, The system comprises: a preprocessing module configured to obtain a target insulator image, and preprocess the target insulator image to obtain a processed insulator image; a correction module configured to perform twice distortion correction on the processed insulator image to obtain a corrected insulator image; an adjustment module configured to perform light adjustment on the corrected insulator image to obtain an adjusted insulator image; The mapping module is configured to divide the adjusted insulator image of the same size into a plurality of image blocks, sequentially perform edge enhancement and brightness mapping processing on the plurality of image blocks to obtain processed image blocks, and combine the plurality of processed image blocks to obtain a combined insulator image. The recognition module is configured to obtain a training insulator defect image labeled by a person, input the training insulator defect image into a preset recognition model for training, input the combined insulator image into the trained preset recognition model for defect recognition, and output a defect recognition result.
9. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the insulator defect detection method in any one of claims 1 to 7.
10. A storage medium, characterized by The storage medium has a computer program stored thereon, and the computer program is executed by the processor to implement the insulator defect detection method in any one of claims 1 to 7.