A method, device and medium for detecting wear of plug-in post of electric meter connector
By preprocessing and clustering analysis of the image information of the meter connector, the problem that the existing technology cannot detect wear in the middle area of the plug-in column is solved, and higher precision wear detection is achieved, which supports more accurate maintenance and replacement, and extends the Equipment service life.
Patent Information
- Application Number
- CN202411156919.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-22
AI Technical Summary
The existing plug-in column wear detection methods cannot effectively detect wear in the middle area of the plug-in column, resulting in defects in the detection results.
By obtaining the image information of the meter connector, the line image is extracted and divided into the shell area and the plug-in column area, laser irradiation and spot image information are extracted, and after preprocessing, it is divided into highlight and non-highlight areas, and the middle is extracted The color characteristics of the region and the wear state is analyzed using the Kmeans clustering algorithm.
It effectively improves detection accuracy, can identify the wear condition of the middle part of the plug-in column surface, supports more accurate maintenance and replacement, and extends the service life of the equipment.
Smart Images

Figure CN118691603B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of power equipment detection, and in particular to a method, equipment and medium for detecting wear of a plug post of an electric meter connector. Background Art
[0002] In the field of power equipment detection technology, the plug-in column of the meter connector is one of the key components, and its quality directly affects the normal operation and service life of the meter. However, the plug-in column will be worn during use, and this wear will cause poor contact, thus affecting the accuracy and reliability of the meter. Therefore, it is very necessary to detect the wear state of the plug-in column.
[0003] The conventional brightness detection of the existing plug-in column only determines the wear condition of the highlight area and the non-highlight area, and does not detect the middle area between the two, and the detection result has certain defects. Summary of the invention
[0004] The object of the present invention is to provide a method, device and medium for detecting wear of a plug post of an electric meter connector, so as to solve the problems raised in the above-mentioned background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions: a method for detecting wear of a plug post of an electric meter connector, obtaining image information of the electric meter connector, extracting the image information, and obtaining a line extraction image of the electric meter connector;
[0006] The electric meter connector is divided into a housing area and a plug-in column area by extracting a line image;
[0007] Perform laser irradiation on the plug-in column area to extract the light spot image information on the plug-in column surface;
[0008] Preprocess the spot image information to obtain the brightness characteristics of the spot image;
[0009] The brightness features of the obtained spot image are segmented by a threshold value to obtain a highlight area and a non-highlight area;
[0010] Extract the boundary line between the highlight area and the non-highlight area, construct the middle area according to the boundary line and pixel value, and extract the color features of the middle area;
[0011] The color features extracted from the middle area are analyzed by a clustering algorithm to obtain the corresponding clustering result, which is then verified with a pre-set label image with a wear status to obtain the wear status result of the middle area of the plug post.
[0012] Preferably, the meter connector is grayed to obtain a gray image, and the edges in the image are refined to obtain an edge image; different edges are merged into a line extraction image of the meter connector and the noise in the image is removed by a median filter, and the pixel values of the image after noise removal are recombined by histogram equalization to obtain a contrast-enhanced image, and the brightness offset is added to the recombined pixel values of the contrast-enhanced image through OpenCV to obtain the brightness characteristics of the spot image.
[0013] Preferably, the spot image with brightness characteristics is converted from the RGB color space to the HSV color space, a threshold range corresponding to the brightness V is set and the spot image is segmented, wherein the threshold range of the brightness V is {80,140}, that is, when the brightness V is higher than the threshold, the part of the image is a highlight area, and when the brightness V is lower than the threshold, the part of the image is a non-highlight area, the boundary line between the highlight area and the non-highlight area and the preset boundary pixel value are used to expand the boundary line, extract it to the middle area, and smooth the edges of the middle area by corrosion processing.
[0014] Preferably, the color space of the middle area is quantized into several small color intervals, and each interval becomes a handle of the color histogram. By counting the number of pixels whose colors fall within each small interval, the color feature extracted from the middle area is recorded as N, and the standard Kmeans clustering algorithm is used to perform center clustering calculation on the color feature N.
[0015] Preferably, the number of cluster centers is set to 3, and a cluster analysis is performed on the color feature N. Through iterative optimization, three cluster centers are obtained, among which the ones with large values are the category centers with large plug-in post wear, the ones with small values are the category centers with normal plug-in post wear, and the ones with middle values are the category centers with small plug-in post wear.
[0016] Preferably, the three obtained category centers are respectively verified with pre-set label images with wear status to obtain the wear status result of the middle area of the plug post.
[0017] In a second aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for detecting wear of a plug post of an electric meter connector when executing the computer program.
[0018] In a third aspect of the present invention, a storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of the above-mentioned method for detecting wear of a plug post of an electric meter connector are implemented.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The detected plug-in post surface image is divided into highlight area, non-highlight area and middle area, and the color features of the middle area are extracted. The extracted color features are subjected to center clustering calculation by Kmeans clustering algorithm to obtain the corresponding wear conditions, effectively improving the detection accuracy, thereby identifying the wear condition of the middle part of the plug-in post surface, which is convenient for inspection or replacement. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for detecting wear of a plug post of an electric meter connector according to an embodiment of the present invention;
[0022] Figure 2 Schematic diagram of the plug-in column image information of the electric meter connector according to the embodiment of the present invention Figure 1 ;
[0023] Figure 3 Schematic diagram of the plug-in column image information of the electric meter connector according to the embodiment of the present invention Figure 2 ;
[0024] Figure 4 Schematic diagram of the plug-in column image information of the electric meter connector according to the embodiment of the present invention Figure 3 ;
[0025] Figure 5 Schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Example 1
[0028] Please see attached Figure 1 , a method for detecting wear of a plug post of an electric meter connector, comprising:
[0029] S100, acquiring image information of an electric meter connector, extracting the image information, and obtaining a line extraction image of the electric meter connector;
[0030] S200, dividing the electric meter connector into a housing area and a plug-in post area by extracting a line image;
[0031] S300, irradiating the plug-in column area with laser to extract light spot image information on the plug-in column surface;
[0032] S400, preprocessing the light spot image information to obtain brightness characteristics of the light spot image;
[0033] S500, segmenting the brightness feature of the obtained spot image by using a threshold value to obtain a highlight area and a non-highlight area;
[0034] S600, extracting the boundary line between the highlight area and the non-highlight area, constructing the middle area according to the boundary line and the pixel value, and performing color feature extraction on the middle area;
[0035] S700, analyzing the color features extracted from the middle area by a clustering algorithm to obtain a corresponding clustering result, verifying the clustering result with a preset label image with a wear status, and obtaining a wear status result of the middle area of the plug post.
[0036] It should be noted that the meter connector is captured by a high-definition industrial camera, as shown in the attached Figure 2 As shown, the meter connector is placed on a monochrome board and photographed.
[0037] In this embodiment, the meter connector is grayed to obtain a gray image, and the edges in the image are refined to obtain an edge image; different edges are merged into a line extraction image of the meter connector, as shown in the attached figure. Figure 3 As shown, the noise in the image is removed by a median filter, and the pixel values of the image after noise removal are recombined by histogram equalization to obtain a contrast-enhanced image. The brightness offset is added to the recombined pixel values of the contrast-enhanced image through OpenCV to obtain the brightness characteristics of the spot image.
[0038] It should be noted that the original plug-in column surface image containing the spot image information is read and the image is converted from the RGB color space to the grayscale space, which can usually be achieved through the cv2.cvtColor() function of OpenCV. The image is converted from BGR to grayscale, and a median filter is used to smooth the image and eliminate salt and pepper noise. The pixel intensity distribution of the image after noise elimination is stretched through histogram equalization to enhance the contrast of the image, and the pixel value is offset adjusted. It should be noted that the valid range of the pixel value must be within (0-255). After the above steps are performed, an image with contrast enhancement and brightness adjustment is obtained.
[0039] In this embodiment, a spot image with brightness characteristics is converted from the RGB color space to the HSV color space, a threshold range corresponding to the brightness V is set and the spot image is segmented, wherein the threshold range of the brightness V is {80, 140}, that is, when the brightness V is higher than the threshold, the part of the image is a highlight area, and when the brightness V is lower than the threshold, the part of the image is a non-highlight area. The boundary line between the highlight area and the non-highlight area and the preset boundary pixel value are used to expand the boundary line, extract it to the middle area, and smooth the edges of the middle area by corrosion processing.
[0040] It should be noted that two thresholds are established to perform threshold processing on the V channel of the HSV-transformed spot image to obtain a binary image of the highlight area and the non-highlight area, and the boundary line between the highlight area and the non-highlight area and the preset boundary pixel value are used to expand the boundary line and extract it to the middle area, as shown in the attached figure. Figure 4 As shown, the preset boundary pixel value is determined according to the resolution and shooting distance of the industrial camera, and the edge of the middle area is processed by corrosion processing to smooth the edge and reduce noise to facilitate subsequent processing of the spot image.
[0041] In this embodiment, the color space of the middle area is quantized into several small color intervals, and each interval becomes a handle of the color histogram. The number of pixels whose colors fall within each small interval is counted, and the color feature extracted from the middle area is recorded as N. The standard Kmeans clustering algorithm is used to perform center clustering calculation on the color feature N.
[0042] It should be noted that the color space of the middle area is quantized into several small color intervals, and each interval becomes a handle (bin) of the histogram. The color histogram can be obtained by counting the number of pixels whose colors fall within each small interval. Among them, the horizontal axis of the color histogram represents the normalized value of the color, and the vertical axis h(xi) represents the number of image pixels corresponding to each interval. The color histogram is normalized, and the color features extracted by the above processing are selected and recorded as N wear samples, and the center clustering calculation is performed on the wear samples.
[0043] In this embodiment, the number of cluster centers is set to 3, and cluster analysis is performed on the color feature N. Through iterative optimization, three cluster centers are obtained, among which the ones with large values are the category centers with large plug-in post wear, the ones with small values are the category centers with normal plug-in post wear, and the ones with middle values are the category centers with small plug-in post wear.
[0044] It should be noted that the images of large wear, normal wear, and small wear are arranged in a ratio of approximately 1:1:1, and the color features corresponding to each spot image are recorded respectively by the laser speckle method, and the Kmeans method is used to cluster all color features, and the number of class centers is set to 3. Through iterative optimization, the three cluster centers finally obtained are the category centers corresponding to large wear, normal wear, and small wear. By judging which cluster center is closer, any spot image can be classified into one of large wear, normal wear, and small wear, thereby realizing the wear detection of the plug post.
[0045] In this example, the three obtained category centers are verified with pre-set label images with wear status to obtain the wear status results of the middle area of the plug post.
[0046] It should be noted that the above steps are used to operate a new plug-in post to obtain the corresponding wear status of the new plug-in post, and wear label images are made for different areas. The used plug-in post is inspected and the corresponding images are obtained. After category comparison, the wear status corresponding to each area is determined, which is conducive to the maintenance and replacement of the plug-in post and increases the service life of the equipment.
[0047] Example 2
[0048] Combined with Figure 5 As shown, the technical solution of the present invention is an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for detecting wear of the plug post of the electric meter connector described in Example 1 are implemented.
[0049] Example 3
[0050] The technical solution of the present invention is a storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the method for detecting wear of the plug post of an electric meter connector described in Example 1 are implemented.
[0051] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A method for detecting wear of a plug post of an electric meter connector, characterized in that: Acquire image information of an electric meter connector, extract the image information, and obtain a line extraction image of the electric meter connector; The electric meter connector is divided into a housing area and a plug-in column area by extracting a line image; Perform laser irradiation on the plug-in column area to extract the light spot image information on the plug-in column surface; Preprocess the spot image information to obtain the brightness characteristics of the spot image; The brightness features of the obtained spot image are segmented by a threshold value to obtain a highlight area and a non-highlight area; Extract the boundary line between the highlight area and the non-highlight area, construct the middle area according to the boundary line and pixel value, and extract the color features of the middle area; The color features extracted from the middle area are analyzed by a clustering algorithm to obtain the corresponding clustering result, and the clustering result is verified with a preset label image with a wear status to obtain the wear status result of the middle area of the plug column, wherein the spot image with brightness characteristics is converted from the RGB color space to the HSV color space, and a threshold range corresponding to the brightness V is set and the spot image is segmented, wherein the threshold range of the brightness V is {80,140}, the part of the image with brightness V higher than the threshold is the highlight area, and the part of the image with brightness V lower than the threshold is the non-highlight area, the boundary line of the highlight area and the non-highlight area and the preset boundary pixel value are used to expand the boundary line, extract it to the middle area, and smooth the edges of the middle area by corrosion processing.
2. The method for detecting wear of the plug-in post of an electric meter connector according to claim 1, characterized in that: The noise in the image is removed by a median filter, and the pixel values of the image after noise removal are recombined using histogram equalization to obtain a contrast-enhanced image. The brightness offset is added to the recombined pixel values of the contrast-enhanced image through OpenCV to obtain the brightness characteristics of the spot image.
3. The method for detecting wear of the plug-in post of an electric meter connector according to claim 1, characterized in that: The color space of the middle area is quantized into several small color intervals, and each interval becomes a handle of the color histogram. By counting the number of pixels whose colors fall in each small interval, the color feature extracted from the middle area is recorded as N. The standard Kmeans clustering algorithm is used to perform center clustering calculation on the color feature N.
4. The method for detecting wear of the plug-in post of an electric meter connector according to claim 3, characterized in that: The number of cluster centers is set to 3, and cluster analysis is performed on the color feature N. Through iterative optimization, three cluster centers are obtained. The ones with large values are the category centers with large wear of the plug-in column, the ones with small values are the category centers with normal wear of the plug-in column, and the ones with middle values are the category centers with small wear of the plug-in column.
5. The method for detecting wear of the plug-in post of an electric meter connector according to claim 4, characterized in that: The three obtained category centers are verified with the pre-set label images with wear status to obtain the wear status results of the middle area of the plug post.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for detecting wear of the plug post of an electric meter connector according to any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium, characterized in that: The storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the method for detecting wear of a plug post of an electric meter connector as claimed in any one of claims 1 to 5.
