Electrical equipment crack labeling method and device, electronic equipment and storage medium
Through the combination of machine vision detection and manual correction, the problem of time-consuming and error-prone labeling of electrical equipment cracks is solved, and an efficient and accurate labeling process is achieved.
Patent Information
- Application Number
- CN202510403404.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the labeling of electrical equipment cracks depends on all manual participation, which is time-consuming and error-prone, making it difficult to build an efficient and accurate data set.
The crack profile of the electrical equipment is obtained through image binarization, histogram equalization and edge detection, and the initial labeled image is generated, and the staff corrects it.
It improves the efficiency and accuracy of crack marking of electrical equipment, reduces the time and cost of manual marking, and ensures the quality of marking results.
Smart Images

Figure CN120259264A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data annotation, and in particular, to a method, device, electronic device, and storage medium for annotating cracks in electrical equipment. Background Art
[0002] Due to factors such as thermal stress, mechanical stress, structural deformation, and material fatigue, cracks inevitably appear in power equipment, including cracking of porcelain insulators, cracks in metal components, cracks in transformers, and cracks in the foundation of GIS equipment. To avoid the impact of power equipment cracking on the safe operation of the power system, the identification of power equipment cracks is an essential and important part of power inspection. Traditional manual inspection has some obvious drawbacks, such as low efficiency, possible human errors, and high working risks in harsh environments. Therefore, researching and developing crack detection technology based on artificial intelligence to improve the automation level, accuracy, and efficiency of detection has become an important research hotspot.
[0003] Currently, deep learning models are mostly used for crack detection and identification. The accuracy of such deep learning models depends to a large extent on large-scale training datasets. To obtain these training datasets, data annotation is required first. However, the current main annotation method is still traditional manual annotation. This traditional manual method relies on full human participation and requires humans to trace and mark each crack in the electrical equipment in the image to form a dataset, which is a time-consuming, expensive, and error-prone process. Summary of the Invention
[0004] The present invention provides a method, device, electronic device, and storage medium for annotating cracks in electrical equipment, which can solve the technical problem that in the prior art, traditional manual annotation is used, relying on full human participation, and humans need to trace and mark each crack in the electrical equipment in the image to form a dataset, which is a time-consuming, expensive, and error-prone process.
[0005] To solve the above technical problem, an embodiment of the present invention provides a method for annotating cracks in electrical equipment, including:
[0006] Obtain an image of a crack in an electrical equipment, and perform binarization processing on the image to convert the image into a corresponding binary image;
[0007] Perform histogram equalization processing on the binary image to obtain an enhanced image after histogram equalization processing;
[0008] Perform edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image, and perform crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image;
[0009] Send the initial labeled image to the corresponding staff member so that the staff member can determine whether the crack label in the initial labeled image is qualified. If it is qualified, use the initial labeled image as the labeled image of the electrical equipment crack; if it is unqualified, correct the crack label in the initial labeled image and obtain the labeled image of the electrical equipment crack based on the corrected crack label.
[0010] As a preferred solution, the edge detection process on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image includes:
[0011] Perform Gaussian filtering on the enhanced image;
[0012] Calculate the gradient values of each pixel point in four directions in the enhanced image after Gaussian filtering, and take the direction corresponding to the maximum gradient value as the edge direction of the enhanced image;
[0013] Compare each gradient value with a preset threshold range, remove the pixel points corresponding to the gradient values exceeding the preset threshold, and then obtain the crack contour of the electrical equipment in the enhanced image according to the remaining pixel points and the edge direction.
[0014] As a preferred solution, the correction of the crack label in the initial labeled image includes:
[0015] When there are independent noise points in the initial labeled image, remove the independent noise points to correct the crack label in the initial labeled image;
[0016] When there are missing secondary cracks in the electrical equipment crack in the initial labeled image, label the missing secondary cracks in the initial labeled image to correct the crack label in the initial labeled image.
[0017] As a preferred solution, perform histogram equalization on the binary image according to the following formula:
[0018]
[0019] Where, H(j) is the original statistical histogram of the binary image; H′(i) is the original cumulative histogram of the binary image, dst(x, y) is the image coordinate of the binary image, src(x, y) is the pixel point coordinate of the image, and the value of maxV is 225.
[0020] Based on the above embodiments, another embodiment of the present invention provides an electrical equipment crack labeling device, including: an image binarization module, an image contrast enhancement module, an image crack labeling module, and an image crack labeling correction module;
[0021] The image binarization module is used to obtain an image of the crack of the electrical equipment, perform binarization processing on the image, and convert the image into a corresponding binarized image;
[0022] The image contrast enhancement module is used to perform histogram equalization processing on the binarized image to obtain an enhanced image after histogram equalization processing;
[0023] The image crack annotation module is used to perform edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image, and perform crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image;
[0024] The image crack annotation correction module is used to send the initial annotation image to the corresponding staff member to enable the staff member to determine whether the crack annotation in the initial annotation image is qualified. If it is qualified, the initial annotation image is used as the annotation image of the crack of the electrical equipment; if it is not qualified, the crack annotation in the initial annotation image is corrected, and the annotation image of the crack of the electrical equipment is obtained according to the corrected crack annotation.
[0025] As a preferred solution, the performing edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image includes:
[0026] Performing Gaussian filtering processing on the enhanced image;
[0027] Calculating the gradient values of each pixel point in four directions in the enhanced image after Gaussian filtering processing, and taking the direction corresponding to the maximum gradient value as the edge direction of the enhanced image;
[0028] Comparing each of the gradient values with a preset threshold range, removing the pixel points corresponding to the gradient values exceeding the preset threshold, and then obtaining the crack contour of the electrical equipment in the enhanced image according to the retained pixel points and the edge direction.
[0029] As a preferred solution, the correcting the crack annotation in the initial annotation image includes:
[0030] When there are independent noise points in the initial annotation image, removing the independent noise points to correct the crack annotation in the initial annotation image;
[0031] When there are missing secondary cracks in the crack of the electrical equipment in the initial annotation image, annotating the missing secondary cracks in the initial annotation image to correct the crack annotation in the initial annotation image.
[0032] As a preferred solution, the binarized image is subjected to histogram equalization processing according to the following formula:
[0033]
[0034] where H(j) is the original statistical histogram of the binarized image; H′(i) is the original cumulative histogram of the binarized image, dst(x, y) is the image coordinate of the binarized image, src(x, y) is the pixel point coordinate of the image, and the value of maxV is 225.
[0035] Based on the above embodiments, another embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the electrical device crack annotation method described in the above embodiments of the present invention is implemented.
[0036] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program. When the computer program runs, the device where the storage medium is located is controlled to execute the electrical device crack annotation method described in the above embodiments of the present invention.
[0037] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0038] The present invention provides an electrical device crack annotation method, which acquires an image of an electrical device crack, performs binarization processing on the image, and converts the image into a corresponding binarized image; performs histogram equalization processing on the binarized image to obtain an enhanced image after histogram equalization processing; performs edge detection processing on the enhanced image to obtain the crack contour of the electrical device in the enhanced image, and performs crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image. The initial annotation image is sent to the corresponding staff to enable the staff to determine whether the crack annotation in the initial annotation image is qualified. If it is qualified, the initial annotation image is used as the annotation image of the electrical device crack; if it is not qualified, the crack annotation in the initial annotation image is corrected, and the annotation image of the electrical device crack is obtained according to the corrected crack annotation.
[0039] The present invention first performs machine vision detection on the image of the crack of the electrical equipment, performs binarization processing, histogram equalization processing and edge detection processing on the image, and then performs crack annotation on the image according to the crack contour to obtain the corresponding initial annotation image. Then, the process of manual judgment and correction is incorporated into the machine vision detection, and the initial annotation image obtained by the machine vision detection is corrected manually. The present invention combines machine vision and manual judgment. First, it performs initial automatic annotation on the power equipment image, and then corrects the initial annotation result manually. Compared with the previous purely manual annotation method, the initial automatic annotation method of the present invention improves the annotation efficiency, and further improves the accuracy of the annotation result through the manual correction method. Description of the Drawings
[0040] Figure 1 is a schematic flowchart of a method for annotating cracks in electrical equipment provided by an embodiment of the present invention;
[0041] Figure 2 is a flowchart of the annotation process of the combination of machine vision and manual judgment;
[0042] Figure 3 is a schematic structural diagram of a device for annotating cracks in electrical equipment provided by an embodiment of the present invention. Detailed Embodiments
[0043] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above description of the drawings are intended to cover non-exclusive inclusion.
[0045] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of the present application, "a plurality of" means two or more unless otherwise specifically defined.
[0046] Reference to "embodiment" in this text means that the specific features, structures, or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment each time, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0047] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this text generally represents an "or" relationship between the associated objects before and after.
[0048] In the description of the embodiments of the present application, the term "plurality" refers to two or more (including two). Similarly, "multiple groups" refers to two or more groups (including two groups), and "multiple pieces" refers to two or more pieces (including two pieces).
[0049] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installation", "connection", "connection", "fixation", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can also be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and can be the communication inside two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific situations.
[0050] Embodiment 1
[0051] Please refer to Figure 1 , to solve the problem in the prior art that manual annotation of cracks in electrical equipment is time-consuming and error-prone, the flowchart of a method for annotating cracks in electrical equipment provided by an embodiment of the present invention includes the following specific steps:
[0052] S1. Obtain an image of the crack in the electrical equipment, perform binarization processing on the image, and convert the image into a corresponding binary image;
[0053] Specifically, most of the existing technologies for identifying crack defects in power equipment are based on ideal states, are not suitable for complex power equipment scenarios and environments, are difficult to apply to actual projects, and a large amount of manual processes are used, and the dataset construction process is cumbersome and expensive. Therefore, the present invention innovates the annotation process of the power equipment crack identification dataset, precisely integrates the manual annotation process into the machine recognition annotation, and achieves the purpose of low-supervision and fast annotation. Please refer to Figure 2, is a flowchart of the annotation process for the fusion of machine vision and manual judgment. The annotation method of the present invention is as follows:
[0054] Utilize the characteristics of the power equipment crack image for image preprocessing. After the image preprocessing information goes through the processes of contrast enhancement and crack boundary extraction, machine vision automatic data annotation is achieved. The preprocessing process (binary processing) of the power equipment crack image is as follows:
[0055] Since both the cracks and the background in the power equipment crack image appear in three colors: gray, white, and black, for easy recognition, it can be converted into a binary image. The formula for binary conversion is:
[0056]
[0057] In the formula: dst(x,y) is the output image coordinate, src(x,y) is the input pixel point coordinate, and maxV is generally taken as 225.
[0058] S2. Perform histogram equalization processing on the binary image to obtain an enhanced image after histogram equalization processing;
[0059] Preferably, perform histogram equalization processing on the binary image according to the following formula:
[0060]
[0061] Among them, H(j) is the original statistical histogram of the binary image; H′(i) is the original cumulative histogram of the binary image, dst(x,y) is the image coordinate of the binary image, src(x,y) is the pixel point coordinate of the image, and maxV takes the value of 225.
[0062] Specifically, the contrast enhancement process of the power equipment crack image is as follows:
[0063] After converting the image of the power equipment crack into the corresponding binary image, in order to improve the visibility of the details in the binary image, the histogram equalization technology is implemented to enhance the contrast in the image. Since the power equipment crack image is darker than the environmental background, which is a characteristic of the crack image, after the contrast is enhanced, the background and crack information can be clearly distinguished, but there are noise points, which can be corrected later. The formula for histogram equalization is:
[0064]
[0065] In the formula: H(j) is the original statistical histogram; H′(i) is the original cumulative histogram.
[0066] S3. Perform edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image, and perform crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image;
[0067] Preferably, the performing edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image includes: performing Gaussian filtering processing on the enhanced image; calculating the gradient values of each pixel point in four directions in the enhanced image after Gaussian filtering processing, and taking the direction corresponding to the maximum gradient value as the edge direction of the enhanced image; comparing each of the gradient values with a preset threshold range, removing the pixel points corresponding to the gradient values exceeding the preset threshold, and then obtaining the crack contour of the electrical equipment in the enhanced image according to the remaining pixel points and the edge direction.
[0068] Specifically, the process of extracting the crack boundary of the power equipment crack image is as follows:
[0069] After enhancing the contrast of the electrical equipment crack image, the Canny algorithm is used to perform edge detection on the power equipment crack image to accurately outline the crack contour. The crack detection algorithm is extracted by the Canny edge detection operator. The specific steps are as follows: After removing the noise from the image through Gaussian filtering, calculate the gradients of the pixel points in four directions respectively, and take the maximum gradient direction as the edge direction. Subsequently, compare the gradient values with the preset high and low thresholds, and retain the gradient values between the two. The finally obtained binary image is the boundary contour of the crack.
[0070] S4. Send the initial annotation image to the corresponding staff member to enable the staff member to judge whether the crack annotation in the initial annotation image is qualified. If it is qualified, use the initial annotation image as the annotation image of the electrical equipment crack; if it is unqualified, correct the crack annotation in the initial annotation image, and obtain the annotation image of the electrical equipment crack according to the corrected crack annotation.
[0071] Preferably, the correcting the crack annotation in the initial annotation image includes: when there are independent noise points in the initial annotation image, removing the independent noise points to correct the crack annotation in the initial annotation image; when there are secondary cracks missing in the electrical equipment crack in the initial annotation image, annotating the missing secondary cracks in the initial annotation image to correct the crack annotation in the initial annotation image.
[0072] Specifically, to reduce the errors and mistakes of machine vision, the manual annotation and manual judgment processes are incorporated into the machine vision process.
[0073] To enhance the stability and adaptability of the annotation process and reduce the possible biases in the computer vision detection process, an appropriate manual review link is introduced on the basis of automated annotation. This can ensure the accuracy of the annotation results and improve the generalization ability of the model to different situations. The main steps of fusing machine vision and manual judgment for annotation are as follows:
[0074] 1. Automated machine annotation process:
[0075] Input the crack images of power equipment to be annotated into the process, and use the process in Step 1 above to automatically perform preliminary annotation according to the characteristics of the cracks in the image. This is the key step of automated machine annotation.
[0076] 2. Manual judgment and review process:
[0077] After the machine completes the preliminary annotation and obtains the corresponding initial annotation image, send the initial annotation image to the corresponding staff, and the manual operator intervenes for detailed review. If the manual judgment shows that the annotation result is qualified, the annotation process will end smoothly. However, if the annotation result is unqualified, the operator needs to further analyze the reasons for the unqualified, which may include the interference of independent noise points or the insufficiency of the overall annotation effect.
[0078] 3. Annotation error correction process:
[0079] For unqualified annotations, the manual will take corresponding correction measures. If the problem is caused by independent noise points, the operator will retain the correct crack annotation and delete or correct the noise points. For the situation where the overall annotation effect is not good, the manual operator will retain the annotation of the main cracks and re-annotate the secondary cracks to improve the annotation quality. After completing these corrections, the annotation process finally reaches the "end" node. This process not only ensures the accuracy of the annotation but also makes full use of the important judgment and correction process of the manual in the annotation process.
[0080] Embodiment 2
[0081] Please refer to Figure 3 , which is a schematic structural diagram of an electrical equipment crack annotation device provided by an embodiment of the present invention. The device includes: an image binarization module, an image contrast enhancement module, an image crack annotation module, and an image crack annotation correction module;
[0082] The image binarization module is used to obtain the image of the electrical equipment crack and perform binarization processing on the image to convert the image into a corresponding binarized image;
[0083] The image contrast enhancement module is used to perform histogram equalization processing on the binarized image to obtain an enhanced image after histogram equalization processing;
[0084] The image crack annotation module is used to perform edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image, and perform crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image;
[0085] The image crack annotation correction module is used to send the initial annotation image to the corresponding staff member to enable the staff member to judge whether the crack annotation in the initial annotation image is qualified. If it is qualified, the initial annotation image is used as the annotation image of the electrical equipment crack; if it is unqualified, the crack annotation in the initial annotation image is corrected, and the annotation image of the electrical equipment crack is obtained according to the corrected crack annotation.
[0086] Preferably, the performing edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image includes:
[0087] Performing Gaussian filtering processing on the enhanced image;
[0088] Calculating the gradient values of each pixel point in four directions in the enhanced image after Gaussian filtering processing, and taking the direction corresponding to the maximum gradient value as the edge direction of the enhanced image;
[0089] Comparing each of the gradient values with a preset threshold range, removing the pixel points corresponding to the gradient values exceeding the preset threshold, and then obtaining the crack contour of the electrical equipment in the enhanced image according to the remaining pixel points and the edge direction.
[0090] Preferably, the correcting the crack annotation in the initial annotation image includes:
[0091] When there are independent noise points in the initial annotation image, removing the independent noise points to correct the crack annotation in the initial annotation image;
[0092] When there are secondary cracks missing from the electrical equipment cracks in the initial annotation image, annotating the missing secondary cracks in the initial annotation image to correct the crack annotation in the initial annotation image.
[0093] Preferably, the histogram equalization processing is performed on the binary image according to the following formula:
[0094]
[0095] Among them, H(j) is the original statistical histogram of the binarized image; H′(i) is the original cumulative histogram of the binarized image, dst(x, y) is the image coordinate of the binarized image, src(x, y) is the pixel point coordinate of the image, and the value of maxV is 225.
[0096] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement without creative efforts.
[0097] Those skilled in the art can clearly understand that for the sake of convenience and conciseness, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiment, and will not be elaborated herein.
[0098] Embodiment III
[0099] Correspondingly, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the electrical device crack marking method described in the foregoing embodiment of the present invention.
[0100] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The device may include, but is not limited to, a processor and a memory.
[0101] The so-called processor may be a Central Processing Unit (CPU), or may also be 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 may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the device and connects various parts of the entire device through various interfaces and circuits.
[0102] Embodiment 4
[0103] Correspondingly, an embodiment of the present invention provides a storage medium. The storage medium includes a stored computer program. When the computer program runs, it controls the device where the storage medium is located to execute the electrical equipment crack annotation method described in the above-mentioned embodiment of the invention.
[0104] The memory can be used to store the computer program. The processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.
[0105] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0106] The above is the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art of the present technology, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications are also regarded as the protection scope of the present invention.
Claims
1. A method for labeling cracks in an electrical device, characterized in that, Including: Obtain an image of the crack of the electrical equipment, perform binarization processing on the image, and convert the image into a corresponding binary image; Perform histogram equalization processing on the binary image to obtain an enhanced image after histogram equalization processing; Perform edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image, and perform crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image; Send the initial annotation image to the corresponding staff member to enable the staff member to judge whether the crack annotation in the initial annotation image is qualified. If it is qualified, use the initial annotation image as the annotation image of the crack of the electrical equipment; if it is not qualified, correct the crack annotation in the initial annotation image, and obtain the annotation image of the crack of the electrical equipment according to the corrected crack annotation.
2. The method for marking cracks of an electrical device according to claim 1, characterized in that, The performing edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image includes: Perform Gaussian filtering processing on the enhanced image; Calculate the gradient values of each pixel point in four directions in the enhanced image after Gaussian filtering processing, and use the direction corresponding to the maximum gradient value as the edge direction of the enhanced image; Compare each gradient value with a preset threshold range, eliminate the pixel points corresponding to the gradient values exceeding the preset threshold, and then obtain the crack contour of the electrical equipment in the enhanced image according to the remaining pixel points and the edge direction.
3. The method for marking cracks of the electrical equipment according to claim 1, wherein, The correcting the crack annotation in the initial annotation image includes: When there are independent noise points in the initial annotation image, eliminate the independent noise points to correct the crack annotation in the initial annotation image; When there are missing secondary cracks in the crack of the electrical equipment in the initial annotation image, annotate the missing secondary cracks in the initial annotation image to correct the crack annotation in the initial annotation image.
4. The method for marking cracks of an electrical device according to claim 1, wherein, Perform histogram equalization processing on the binary image according to the following formula: where H(j) is the original statistical histogram of the binary image; H′(i) is the original cumulative histogram of the binary image, dst(x, y) is the image coordinate of the binary image, src(x, y) is the pixel point coordinate of the image, and maxV takes a value of 225.
5. An electrical equipment crack marking device, characterized in that Including: An image binarization module, an image contrast enhancement module, an image crack annotation module, and an image crack annotation correction module; The image binarization module is used to obtain an image of the crack of the electrical equipment, perform binarization processing on the image, and convert the image into a corresponding binary image; The image contrast enhancement module is used to perform histogram equalization processing on the binary image to obtain an enhanced image after histogram equalization processing; The image crack annotation module is used to perform edge detection processing on the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image, and perform crack annotation on the enhanced image according to the crack contour to obtain a corresponding initial annotation image; The image crack annotation correction module is used to send the initial annotated image to the corresponding staff member so that the staff member can determine whether the crack annotation in the initial annotated image is qualified. If it is qualified, the initial annotated image is used as the annotated image of the electrical equipment crack; if it is not qualified, the crack annotation in the initial annotated image is corrected, and the annotated image of the electrical equipment crack is obtained according to the corrected crack annotation.
6. The electrical equipment crack marking device according to claim 5, characterized in that, The edge detection process of the enhanced image to obtain the crack contour of the electrical equipment in the enhanced image includes: Performing Gaussian filtering on the enhanced image; Calculating the gradient values of each pixel point in four directions in the enhanced image after Gaussian filtering, and taking the direction corresponding to the maximum gradient value as the edge direction of the enhanced image; Comparing each gradient value with a preset threshold range, removing the pixel points corresponding to the gradient values exceeding the preset threshold, and then obtaining the crack contour of the electrical equipment in the enhanced image according to the remaining pixel points and the edge direction.
7. The electrical equipment crack marking device according to claim 5, characterized in that, The correction of the crack annotation in the initial annotated image includes: When there are independent noise points in the initial annotated image, the independent noise points are removed to correct the crack annotation in the initial annotated image; When there are missing secondary cracks in the electrical equipment crack in the initial annotated image, the missing secondary cracks are annotated in the initial annotated image to correct the crack annotation in the initial annotated image.
8. The electrical equipment crack marking device according to claim 5, characterized in that, Performing histogram equalization processing on the binary image according to the following formula: where H(j) is the original statistical histogram of the binary image; H′(i) is the original cumulative histogram of the binary image, dst(x,y) is the image coordinate of the binary image, src(x,y) is the pixel point coordinate of the image, and the value of maxV is 225.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the electrical equipment crack annotation method according to any one of claims 1 to 4.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the storage medium is located to execute the electrical equipment crack annotation method according to any one of claims 1 to 4.