Insulator hardware trimming method and system based on image processing

Through image processing technology, the burr defects in insulator tools are identified and repaired, and the problem of inaccurate identification and repair in the prior art is solved, efficient burr defect detection and repair is achieved, and the stability of power transmission is ensured.

CN114638847BActive Publication Date: 2025-08-19YANGZHOU LONGCHUANG METAL IND & TRADE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210112936.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2025-08-19
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify and repair burr defects in insulator tools, resulting in corona phenomenon and low assembly efficiency.

Method used

Through image processing technology, the side images of the metal tool are obtained, pre-processed and PCA analysis are performed to determine the direction of thread extension, edge detection and clustering algorithms are used to identify the burr defect areas, and intelligent repair is performed through the grinding head.

Benefits of technology

Improve the accuracy and efficiency of burr defect detection, prevent corona phenomenon, and ensure efficient assembly of the metal tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114638847B_ABST
    Figure CN114638847B_ABST
Patent Text Reader

Abstract

The present invention discloses an image processing-based insulator hardware repair method and system, which relates to the field of image recognition. The method mainly includes: obtaining a side image of the hardware and preprocessing it to obtain a grayscale image, and performing PCA on the grayscale image to obtain the thread extension direction; obtaining the vertical deviation value of the vector of each pixel point in the thread extension direction to obtain the smoothness of the pixel point, and taking the pixel points with a smoothness greater than a preset threshold as defective pixels, and forming the defective pixels into a defect area. The method can detect burr defects in hardware during the production process and repair the parts of the hardware with burr defects, while improving the detection efficiency and accuracy of burr defects in the hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition, and in particular to an insulator hardware trimming method and system based on image processing. Background Art

[0002] With the development of the social economy and the advancement of urbanization, the demand for electricity has also increased, resulting in the need for more and more power transmission lines to meet this demand. Insulator hardware, which ensures the safe transmission of electricity, must also be produced with high quality to prevent defects that cause power transmission lines to not operate normally. This also prevents workers working at heights from being unable to efficiently and effectively install insulators on power transmission lines due to component defects. Because the tapping process is required during the production of hardware, the threads in the hardware are prone to sharp corners and burrs. As a critical component of power transmission lines, burrs in the hardware can easily cause corona, which can also affect the assembly efficiency of the insulator and even prevent assembly.

[0003] At the same time, before repairing defects in hardware, it is first necessary to determine the location of the defects, that is, to promptly discover burr defects that may exist in the hardware during the production process, so as to repair the parts of the hardware where burr defects exist. The existing technology for identifying burr defects in hardware mainly uses edge detection and global threshold segmentation methods.

[0004] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following defects in the background technology: the threads in the hardware themselves have certain texture changes, so it is difficult to directly and accurately locate the burr area using edge detection; at the same time, since the structure of the burr defect is irregular and its grayscale value is relatively wide, the accuracy of the segmentation results obtained using the global threshold segmentation method needs to be improved. Summary of the Invention

[0005] In response to the above technical problems, the present invention provides an insulator fitting trimming method and system based on image processing, which can detect burr defects in the fittings during the production process and repair the parts of the fittings with burr defects, while improving the detection efficiency and accuracy of burr defects in the fittings.

[0006] In a first aspect, the embodiments of the present invention provide an insulator hardware trimming method based on image processing, comprising:

[0007] A side image of the hardware is acquired and preprocessed to obtain a grayscale image, and the maximum principal component direction after PCA is performed on the grayscale image is used as the thread extension direction.

[0008] Edge detection is performed on the grayscale image to obtain an edge image, and all independent edge curves in the edge image are obtained.

[0009] The leftmost pixel point of each independent edge curve is connected to each pixel point in the independent edge curve, and the vector of each pixel point in each independent edge curve is obtained.

[0010] The vertical deviation value of the vector of each pixel point in each independent edge curve in the thread extension direction is obtained respectively, and the pixels are clustered using the vertical deviation values to obtain the first category of pixels and the second category of pixels in each independent edge curve. The mean vertical deviation value of all pixels in the first category is greater than the mean vertical deviation value of all pixels in the second category.

[0011] The longitudinal extension length between each pixel point in the first category of pixels and the thread extension direction in each independent edge curve is obtained respectively, and the smoothness of each pixel point in the first category of pixels in the independent edge curve is calculated using the longitudinal extension length between each pixel point in the first category of pixels and the thread extension direction and the vertical deviation value of each pixel point in the first category of pixels.

[0012] Pixels in the first category of pixels in each independent edge curve whose smoothness is greater than a preset threshold are defective pixels in the independent edge curve, and a defective area is obtained based on the defective pixels obtained in all independent edge curves.

[0013] In a feasible embodiment, calculating the smoothness of each pixel in the first category of pixels in the independent edge curve includes:

[0014]

[0015] Where P a is the smoothness of the a-th pixel in the first category, Y is the longitudinal extension length of the a-th pixel in the first category and the thread extension direction, Q is the vertical deviation value of the a-th pixel in the first category, C1 is the mean vertical deviation value of the pixels in the first category, C2 is the mean vertical deviation value of the pixels in the second category, tanh represents the hyperbolic tangent function, represents a hyperparameter.

[0016] In a feasible embodiment, the vertical deviation value of the vector of the pixel point in the thread extension direction is obtained according to the modulus of the cross product between the unit vector of the thread extension direction and the vector of the pixel point.

[0017] In a feasible embodiment, after the defective pixels are grouped into a defective area, the method further includes: repairing defects of the hardware at the defective pixels.

[0018] In a feasible embodiment, repairing the defect of the hardware at the defective pixel point includes:

[0019] A side image of the thread pattern at the defective pixel point is obtained, and the warping angle at the defective pixel point is obtained based on the defective pixel point in the side image and the thread top pressure pixel at the defective pixel point.

[0020] The grinding head angle is determined according to the warping angle at the defective pixel point, where the grinding head angle is the angle between the grinding head and the side edge of the thread tooth.

[0021] The extension length of the grinding head is determined based on the distance between the intersection of the preset grinding direction and the thread side edge line and the defect pixel point.

[0022] The grinding head is controlled according to the grinding head angle and the extension length to repair the defective pixels.

[0023] In a feasible embodiment, obtaining a side image of a hardware fitting includes:

[0024] Surface images of the side of the hardware are collected from multiple directions and spliced together to obtain a side image of the hardware, wherein the side image of the hardware includes the complete side of the hardware.

[0025] In a feasible embodiment, preprocessing the side image of the hardware to obtain a grayscale image includes:

[0026] The side image of the hardware is segmented to obtain a hardware thread image, wherein the pixel value of the background part in the hardware thread image is 0.

[0027] Grayscale the hardware thread image to obtain a grayscale image.

[0028] In a feasible embodiment, performing image segmentation on the side image of the hardware to obtain the hardware thread image is achieved through DNN.

[0029] In a feasible embodiment, the hardware is a hardware with threads.

[0030] In the second aspect, an embodiment of the present invention proposes an insulator hardware trimming system based on image processing, comprising: a memory and a processor, characterized in that the processor executes a computer program stored in the memory to implement the insulator hardware trimming method based on image processing in an embodiment of the present invention.

[0031] The present invention provides an insulator hardware repair method and system based on image processing. Compared with the existing technology, the beneficial effects of the embodiments of the present invention are: it can realize the detection of burr defects in the hardware during the production process, and repair the parts of the hardware with burr defects, while improving the detection efficiency and accuracy of burr defects in the hardware. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0033] Figure 1 The figure is a flow chart of an insulator fitting trimming method based on image processing provided by an embodiment of the present invention.

[0034] Figure 2 Schematic diagram of a burr defect on a thread in a hardware fitting according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0036] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0037] 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 quantity of the technical features being referred to. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of such features; and in the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0038] The embodiment of the present invention provides an insulator hardware trimming method based on image processing, such as Figure 1 As shown, including:

[0039] Step S101: Acquire a side image of the hardware and perform preprocessing to obtain a grayscale image, and use the maximum principal component direction after PCA of the grayscale image as the thread extension direction.

[0040] Step S102: Perform edge detection on the grayscale image to obtain an edge image, and obtain all independent edge curves in the edge image.

[0041] Step S103 : Connect the leftmost pixel point of each independent edge curve to each pixel point in the independent edge curve, and obtain the vector of each pixel point in each independent edge curve.

[0042] Step S104: Obtain the vertical deviation value of the vector of each pixel point in each independent edge curve in the thread extension direction, and cluster the pixels using the vertical deviation values to obtain first-category pixels and second-category pixels in each independent edge curve. The mean vertical deviation value of all pixels in the first category is greater than the mean vertical deviation value of all pixels in the second category.

[0043] Step S105: Obtain the longitudinal extension length between each pixel point in the first category of pixels in each independent edge curve and the thread extension direction, and calculate the smoothness of each pixel point in the first category of pixels in the independent edge curve using the longitudinal extension length between each pixel point in the first category of pixels and the thread extension direction and the vertical deviation value of each pixel point in the first category of pixels.

[0044] Step S106 : Pixels in the first category of pixels in each independent edge curve whose smoothness is greater than a preset threshold are considered defective pixels in the independent edge curve, and a defective area is obtained based on the defective pixels obtained in all independent edge curves.

[0045] The main purpose of this invention is to use computer vision technology to process multi-directional images of insulator hardware, segmenting the areas of the hardware containing burr defects so that the burrs can be removed. This can be used to detect defects in hardware during production or use.

[0046] Figure 2 Schematic diagram showing the burr defect of the thread in the hardware in the embodiment of the present invention, as shown in FIG. Figure 2The burr defect on the threaded portion of the hardware shown is quite sharp. When assembled in high-voltage transmission circuits, hardware with burrs can cause corona. Furthermore, since this defect affects the morphology of the thread teeth, it can make the hardware with burrs impossible to assemble. Therefore, to prevent this defect from affecting assembly efficiency during high-altitude operations, effective means must be employed to remove the burrs without damaging the threads.

[0047] The scenario targeted by the present invention is as follows: first, a circular track is arranged around the mold processing table, and a camera is installed on the circular track. The camera moves on the circular track to collect images of the hardware from multiple directions. The burr area on the thread is segmented by processing the hardware image, and intelligent removal is achieved based on the positional relationship between the burr and the thread tooth.

[0048] Furthermore, step S101 obtains a side image of the hardware and performs preprocessing to obtain a grayscale image, and uses the maximum principal component direction after PCA of the grayscale image as the thread extension direction. Specifically, it includes:

[0049] First, since the embodiment of the present invention aims to remove burrs from insulating hardware, it is necessary to first capture an image of the hardware so that the burr probability of each pixel can be calculated based on the characteristics of the burrs, and then the burrs can be intelligently removed and controlled based on the positional relationship between the burrs and the thread teeth.

[0050] It should be noted that since it is necessary to collect the side image of the hardware from multiple angles, a circular track needs to be set up around the mold and the camera needs to be installed on the bracket. The camera can realize the multi-directional collection of images of the insulator hardware by moving on the circular track, ensuring that the optical axis angle of the camera in each direction is perpendicular to the angle of the axis of the insulator hardware, and the camera's collection field of view is mainly concentrated on the threads of the hardware. At the same time, the camera can collect a complete side image of the hardware by rotating around the hardware once.

[0051] It should be noted that the side image of the hardware collected is an RGB image. RGB is a color standard that obtains various colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue.

[0052] Secondly, the threaded area in the hardware is segmented. Since the camera mainly captures the thread image of the insulator hardware, the thread image will contain some background images. The hardware side image is segmented to obtain the hardware thread image. The pixel value of the background part in the obtained hardware thread image is 0. In this way, the influence of the background part on the subsequent processing process can be avoided.

[0053] It should be noted that image segmentation is the technique and process of dividing an image into several specific regions with unique properties and identifying objects of interest. It is a key step in the transition from image processing to image analysis. Existing image segmentation methods are mainly categorized as follows: threshold-based segmentation, region-based segmentation, edge-based segmentation, and segmentation methods based on specific theories. From a mathematical perspective, image segmentation is the process of dividing a digital image into non-overlapping regions. The image segmentation process is also a labeling process, where pixels belonging to the same region are assigned the same number.

[0054] As an example, in an embodiment of the present invention, a hardware thread image is obtained by performing image segmentation on a side image of the hardware through DNN (Deep Neural Networks).

[0055] Specifically, the DNN network described in this embodiment of the present invention is as follows: The dataset used is a dataset of side-view images of threaded hardware. The pixels to be segmented are divided into two categories, i.e., the training set. The labeling process is as follows: single-channel semantic labeling, with pixels belonging to the background class labeled as 0. Since the network's task is classification, the cross-entropy loss function is used.

[0056] Then, the hardware thread image is grayscaled to obtain a grayscale image. The maximum value of the pixel values of the hardware thread image in the three RGB channels is used as the grayscale value of the pixel in the grayscale image.

[0057] Finally, the maximum principal component direction after PCA of the grayscale image is used as the thread extension direction. The grayscale image of the hardware is processed by PCA to obtain the first principal component direction with the largest eigenvalue. This direction is the main extension direction of the thread. When there are no defects in the thread in the hardware, the edge of the thread will be controlled within a certain angle range along this direction.

[0058] It's important to note that PCA (Principal Component Analysis) is an important dimensionality reduction method. It's widely used in data compression, redundancy elimination, and noise reduction. It uses an orthogonal transformation to transform a set of potentially linearly correlated variables into a set of linearly uncorrelated variables, also known as principal components. These new variables then reveal the characteristics of the data in a smaller dimension.

[0059] Specifically, in space, PCA can be understood as projecting the original data onto a new coordinate system. The first principal component is the first coordinate axis, representing the range of variation of the new variable obtained by transforming multiple variables in the original data. The second principal component is the second coordinate axis, representing the range of variation of the second new variable obtained by transforming multiple variables in the original data. In this way, we shift from using the original data to explain sample differences to using new variables to explain sample differences.

[0060] It should be noted that there are many ways to project this data. To maximize the interpretation of the original data, the maximum variance theory or minimum loss theory is generally used, so that the first principal component has the largest variance or variance. In this embodiment, the direction of the largest principal component is the direction of the first principal component, which is used as the extension direction of the weld.

[0061] Furthermore, step S102 performs edge detection on the grayscale image to obtain an edge image, and obtains all independent edge curves in the edge image. Specifically, the process includes:

[0062] Image edge detection is a fundamental step in image processing and a fundamental research area within the field. Its main principle is to identify pixels in a digital image that exhibit significant color or brightness changes. Significant changes in these pixels often indicate significant changes in the image's attributes, including discontinuities in depth, orientation, and brightness.

[0063] There are many commonly used edge detection models: first-order operators include Roberts, Prewitt, Sobel, and Canny, and second-order operators include Laplacian. Image edge detection is based on the image gradient, which is obtained by performing convolution operations on the image using various operators.

[0064] As an example, in an embodiment of the present invention, a canny operator is used to process a grayscale image to obtain an edge image.

[0065] Furthermore, step S103 connects the leftmost pixel of each independent edge curve with each pixel in the independent edge curve to obtain the vector of each pixel in each independent edge curve. Specifically, it includes:

[0066] When the threads in the hardware are free of defects, the edge of the thread will extend along the direction of the thread texture. Even if there is a certain deviation, the angle deviation will be controlled within a small range. When there is a defect, the edge of the thread will extend in other directions. At the same time, defects only occur in a few times. Therefore, the abnormal pixels can be segmented according to the vertical deviation value of the thread edge at normal times, and then the edge smoothness can be further calculated based on the vertical extension degree of the raised area where the abnormal edge pixels are located, and the possible defective pixels can be segmented by edge smoothness.

[0067] Obtain an independent edge curve: obtain the left endpoint combination, starting from each endpoint, by calculating the distance between the adjacent pixels and the pixels of each endpoint, the pixel is assigned to the endpoint set closest to the endpoint, and then use the new pixel obtained at each endpoint as the starting point to determine the endpoint set to which each pixel belongs based on the distance to its adjacent pixels, and so on until all edge pixels are assigned to their respective endpoint sets. Each endpoint set is called an independent edge line in this invention.

[0068] The leftmost pixel point of the independent edge curve is connected to each pixel point in the independent edge curve respectively, and the vector of each pixel point in the independent edge curve is obtained respectively.

[0069] Furthermore, step S104 obtains the vertical deviation value of the vector of each pixel point in each independent edge curve in the thread extension direction, and clusters the pixels using the vertical deviation value to obtain the first category of pixels and the second category of pixels in each independent edge curve. The mean vertical deviation value of all pixels in the first category is greater than the mean vertical deviation value of all pixels in the second category. Specifically, the method includes:

[0070] First, the vertical deviation value of the vector of each pixel point in the thread extension direction is obtained. When the thread in the hardware is free of defects, the vertical deviation value will be controlled within a certain range, while when the thread teeth have defects, the vertical deviation value will exceed the normal range. In the embodiment of the present invention, the vertical deviation value of the pixel point is:

[0071] Q i,j =|B×X i,j |, here X i,j represents the vector of the jth pixel in the i-th independent edge curve, B represents the unit vector in the thread extension direction, Q i,j Indicates the vertical deviation value of the jth pixel of the i-th independent edge curve.

[0072] Secondly, the vertical deviation values of the pixels are used to cluster the pixels to obtain a first category and a second category, wherein the mean vertical deviation value of the pixels in the first category is greater than the mean vertical deviation value of the pixels in the second category. In an embodiment of the present invention, the first category includes edge pixels whose vertical deviation exceeds the normal range.

[0073] As an example, the clustering method used in the embodiment of the present invention is K-Mean clustering.

[0074] Furthermore, step S105 obtains the longitudinal extension length between each pixel point in the first category and the thread extension direction in each independent edge curve, and calculates the smoothness of each pixel point in the first category in the independent edge curve using the longitudinal extension length between each pixel point in the first category and the thread extension direction and the vertical deviation value of each pixel point in the first category. Specifically, it includes:

[0075] First, the longitudinal extension length of each pixel point in the first category and the thread extension direction is obtained respectively. The longitudinal extension length is the extension length of each pixel connected to the pixel in the vertical direction perpendicular to the thread extension direction. The obtaining method includes: obtaining the pixel with the maximum vertical length deviation in the set of connected pixels with the pixel points in the first category. The vertical length corresponding to the maximum pixel and the thread extension direction is the longitudinal extension length of the pixel points in the first category, and thereby the longitudinal extension length of each pixel point in the first category is obtained respectively.

[0076] Secondly, the smoothness of each pixel in the first category is obtained, including: Where P a is the smoothness of the a-th pixel in the first category, Y is the longitudinal extension length of the a-th pixel in the first category and the thread extension direction, Q is the vertical deviation value of the a-th pixel in the first category, C1 is the mean vertical deviation value of the pixels in the first category, C2 is the mean vertical deviation value of the pixels in the second category, tanh represents the hyperbolic tangent function, which is mainly used to achieve the purpose of normalization. It should be noted that the larger |C1-C2| is, the greater the probability that the pixels in the first category are defective pixels.

[0077] As an example, the hyperparameters in the embodiment of the present invention are Take 0.2.

[0078] Furthermore, in step S106, pixels in the first category of pixels in each independent edge curve whose smoothness is greater than a preset threshold are considered defective pixels in the independent edge curve, and a defective area is obtained based on the defective pixels obtained in all independent edge curves. Specifically, the step S106 includes:

[0079] When the smoothness of the pixel points in the first category is greater than the preset threshold, in this embodiment, it is regarded as a defective pixel point with a burr defect. In this way, the defective pixel points with a burr defect are obtained, which facilitates the formation of the defective pixel points into a defective area, and also facilitates the repair of the part with the burr defect in the subsequent processing process.

[0080] As an example, the preset threshold in the embodiment of the present invention is 0.8, and the implementer can adjust it in time according to his own needs.

[0081] Optionally, the method in the embodiment of the present invention further includes repairing defects of the hardware at defective pixel points.

[0082] Specifically, the image of the screw thread side of the burr area is collected: the pixel coordinates of the defective pixel points are located by the above method, and according to the spatial relationship between the camera and the insulator hardware, the camera is moved to collect the side image of each defective pixel point.

[0083] Get the average burr lift angle based on the screw thread side image:

[0084] First, the edge of the side image of the defective pixel is obtained, and the screw edge pixels are segmented according to the screw edge similarity of the side image of the non-defective pixel. The remaining edge pixels are burr side pixels.

[0085] Secondly, calculate the average minimum tilting angle of the burr: obtain the nearest point between the burr side pixel and the thread tooth side edge line, obtain the vector formed by the line connecting the pixel and the thread tooth top pixel, and at the same time obtain the thread tooth edge line vector closer to the defective pixel point, calculate the angle between the two vectors, and use this to obtain the minimum tilting angle of all defective pixels and the thread tooth. The average minimum tilting angle of the i-th independent edge curve can be obtained by averaging the minimum values of all defective pixels on the i-th independent edge curve.

[0086] Then, the grinding head angle is determined according to the tilting angle, including: dividing the average minimum tilting angle of the independent edge curve by 2 to obtain the grinding head angle of the burr on the independent edge curve to be ground, which is the angle between the grinding head and the side line of the thread tooth.

[0087] Determining the grinding point includes: obtaining a top pressing position of the thread through an image of a thread tooth side surface without burr defects on an independent edge curve, and the point is the grinding point.

[0088] Determine the grinding head extension length based on the grinding head angle and the thread side edge: Obtain the thread side edge line on the grinding side of the i-th independent edge curve, and obtain the adjacent thread side edge line. Starting from the grinding point, draw a straight line along the grinding direction. This line intersects the thread side edge line at a point. Calculate the distance between this point and the grinding point, and use this to determine the maximum grinding head extension length at all defective pixels.

[0089] Finally, intelligent burr removal control is achieved based on the grinding head angle and extension length, including: the grinding point of each defective pixel point, the grinding head angle, and the extension length of the grinding head can be used to generate a movement curve of the grinding head, thereby achieving intelligent burr removal control.

[0090] Based on the same inventive concept as the above method, this embodiment also provides an insulator hardware trimming system based on image processing. In this embodiment, the insulator hardware trimming system based on image processing includes a memory and a processor. The processor executes the computer program stored in the memory to realize the detection of burr defects in the threads of the hardware as described in the embodiment of the insulator hardware trimming method based on image processing.

[0091] Since the method for detecting burr defects in the threads of the insulator fittings has been described in the embodiment of the method for repairing the insulator fittings based on image processing, it will not be repeated here.

[0092] In summary, the present invention provides an insulator fitting trimming method and system based on image processing, which can detect burr defects in the fittings during the production process and repair the parts of the fittings with burr defects, while improving the detection efficiency and accuracy of burr defects in the fittings.

[0093] The words "including," "comprising," "having," and the like in this disclosure are open-ended words, meaning "including but not limited to," and are used interchangeably therewith. The words "or" and "and" used herein mean the words "and / or" and are used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein means the phrase "such as but not limited to," and is used interchangeably therewith.

[0094] It should also be noted that in the method and system of the present invention, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0095] The above embodiments are merely examples for clarity of description and do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description, and it is not necessary or possible to enumerate all embodiments here. Any designs that are identical or similar to the present invention fall within the scope of protection of the present invention.

Claims

1. A method for trimming insulator fittings based on image processing, characterized in that: include: Obtain a side image of the hardware and perform preprocessing to obtain a grayscale image, and use the maximum principal component direction after PCA of the grayscale image as the thread extension direction; Performing edge detection on the grayscale image to obtain an edge image, and obtaining all independent edge curves in the edge image; Connect the leftmost pixel of each independent edge curve to each pixel in the independent edge curve to obtain the vector of each pixel in each independent edge curve; Obtaining a vertical deviation value of a vector of each pixel point in each independent edge curve in the thread extension direction, and clustering the pixels using the vertical deviation values to obtain first-category pixel points and second-category pixel points in each independent edge curve; and the mean vertical deviation value of all pixel points in the first category is greater than the mean vertical deviation value of all pixel points in the second category; Obtaining a longitudinal extension length between each pixel point in the first category and the thread extension direction in each independent edge curve, and calculating the smoothness of each pixel point in the first category in the independent edge curve using the longitudinal extension length between each pixel point in the first category and the thread extension direction and the vertical deviation value of each pixel point in the first category; Pixels in the first category of pixels in each independent edge curve whose smoothness is greater than a preset threshold are defective pixels in the independent edge curve, and a defective area is obtained based on the defective pixels obtained in all independent edge curves; Calculating the smoothness of each pixel in the first category of pixels in the independent edge curve includes: Where P a is the smoothness of the a-th pixel in the first category, Y is the longitudinal extension length of the a-th pixel in the first category and the thread extension direction, Q is the vertical deviation value of the a-th pixel in the first category, C1 is the mean vertical deviation value of the pixels in the first category, C2 is the mean vertical deviation value of the pixels in the second category, tanh represents the hyperbolic tangent function, and φ represents the hyperparameter; The vertical deviation value of the vector of the pixel point in the direction of thread extension is obtained according to the modulus of the cross product between the unit vector of the thread extension direction and the vector of the pixel point.

2. The insulator fittings trimming method based on image processing according to claim 1, characterized in that: After the defective pixels are grouped into a defective area, the method further includes: repairing the defects of the hardware at the defective pixels.

3. The insulator fittings trimming method based on image processing according to claim 2, characterized in that: Repair defects in hardware at defective pixels, including: Obtain a side image of the thread pattern at the defective pixel point, and obtain a warping angle at the defective pixel point based on the defective pixel point in the side image and the thread top pressing pixel at the defective pixel point; Determine the grinding head angle according to the warping angle at the defect pixel point, where the grinding head angle is the angle between the grinding head and the side edge of the thread tooth; The extension length of the grinding head is determined based on the distance between the intersection of the preset grinding direction and the thread flank edge line and the defect pixel point; The grinding head is controlled according to the grinding head angle and the extension length to repair the defective pixels.

4. The insulator fittings trimming method based on image processing according to claim 1, characterized in that: Obtain side images of hardware, including: Surface images of the side of the hardware are collected from multiple directions and spliced together to obtain a side image of the hardware, wherein the side image of the hardware includes the complete side of the hardware.

5. The insulator fittings trimming method based on image processing according to claim 1, characterized in that: Preprocess the side image of the hardware to obtain a grayscale image, including: Performing image segmentation on the side image of the hardware to obtain a hardware thread image, wherein the pixel value of the background portion of the hardware thread image is 0; Grayscale the hardware thread image to obtain a grayscale image.

6. The insulator fittings trimming method based on image processing according to claim 5, characterized in that: The image segmentation of the side image of the hardware to obtain the hardware thread image is achieved by DNN.

7. The insulator hardware trimming method based on image processing according to claim 1, characterized in that: The hardware is a hardware with threads.

8. An insulator hardware trimming system based on image processing, comprising: A memory and a processor, wherein the processor executes a computer program stored in the memory to implement the insulator hardware trimming method based on image processing according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Defect detection device and method

    CN110286130A

  • Mechanical casting defect detection method and system based on artificial intelligence

    CN113538433A