A wire rope image feature segmentation method, system and device

By preprocessing and grayscale conversion of the surface image of the metal wire rope, extracting the contour and analyzing the edge threshold and intersection, and calibrating the boundary line, the problems of insufficient image features and inaccurate region division in the existing technology are solved, and higher accuracy and effectiveness of defect segmentation are achieved.

CN121685558BActive Publication Date: 2026-07-14SUZHOU NEW BEST WIRE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU NEW BEST WIRE TECH CO LTD
Filing Date
2025-12-12
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing metal wire rope defect segmentation techniques are not detailed and accurate enough in image feature extraction and region division, resulting in insufficient effectiveness and accuracy of defect segmentation.

Method used

By acquiring surface images of metal wire ropes, preprocessing and converting them to grayscale, extracting the wire rope contours, analyzing edge thresholds and contour intersections, calibrating initial boundary lines, dividing the strand areas, and segmenting defect areas based on regional feature similarity analysis.

Benefits of technology

It improves the accuracy and effectiveness of defect segmentation in metal wire ropes, enabling more precise identification and segmentation of defect areas, and enhancing the detail of image features and the accuracy of region division.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685558B_ABST
    Figure CN121685558B_ABST
Patent Text Reader

Abstract

The application discloses a metal wire rope image feature segmentation method, system and device, relates to the technical field of metal wire rope defect segmentation, and comprises the following steps: collecting a wire rope image; analyzing an edge threshold between two wire ropes based on a wire rope contour; analyzing and extracting a contour edge intersection point based on the wire rope contour; analyzing an initial contour line of the wire rope image, analyzing an initial boundary line between the two wire ropes based on the initial contour line; calibrating the initial boundary line to obtain a final boundary line, and dividing the wire rope image into different strand regions based on the final boundary line; extracting region features of the strand regions, analyzing defect regions, and simultaneously segmenting specific defect points in the defect regions; and the application is used for solving the problems that the existing metal wire rope defect segmentation technology is not detailed enough in the description of image features, the division of regions is not accurate enough, and the defect segmentation cannot be ensured to be effective and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metal wire rope defect segmentation technology, specifically to a method, system, and device for metal wire rope image feature segmentation. Background Technology

[0002] Metal wire rope defect segmentation technology is an image analysis technology that combines computer vision and artificial intelligence. Its core objective is to automatically and accurately identify the pixel-level boundary between the "defect area" and the "normal area" from digital images of metal wire ropes (such as steel wire ropes and cables), thereby separating and marking the defects separately.

[0003] Existing wire rope defect segmentation technologies typically employ image recognition for defect identification. Image recognition requires extracting image features from the wire rope to distinguish between normal and defective surfaces. However, current wire rope defect segmentation technologies lack detailed feature extraction and have unclear feature definitions, failing to ensure accurate identification of defective and normal surfaces. Furthermore, existing techniques often divide the wire rope into regions because wire ropes are composed of multiple strands, each with similar image features, which is intended to improve the accuracy of surface defect identification. The existing metal wire rope defect segmentation technology is not accurate in dividing the metal wires and cannot accurately extract the region of each metal wire. For example, in the patent application with publication number CN111855678A, a "device and identification method for identifying surface defects of metal wires" is disclosed. This solution does not provide a specific process for judging the defective image, nor does it explain what feature differences exist between the defect-free image and the defective image. Its feasibility needs to be verified. The existing metal wire rope defect segmentation technology also has the problems of insufficient description of image features and inaccurate division of regions, which makes it impossible to ensure whether the defect segmentation is effective and accurate. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in the prior art. It acquires a surface image of a metal wire rope, performs image preprocessing and grayscale conversion to obtain a wire rope image, then extracts the wire rope contour. Based on the wire rope contour, it analyzes the grayscale values ​​in the wire rope image to obtain the edge threshold between two strands of wire rope. It then analyzes and extracts the intersection points of the contour edges between the two strands of wire rope in the wire rope image based on the wire rope contour. Simultaneously, it analyzes the initial contour line of the wire rope image based on the edge threshold, analyzes the initial boundary line between the two strands of wire rope based on the initial contour line and the intersection points of the contour edges, and then calibrates the initial boundary line based on the wire rope contour to obtain the final boundary line. Based on the final boundary line, it divides the wire rope image into different strand regions. Finally, it extracts the regional features of the strand regions, analyzes the defect regions based on the similarity between different regional features, and segments specific defect points within the defect regions. This addresses the problem that existing metal wire rope defect segmentation techniques lack detailed descriptions of image features and accurate region division, leading to difficulties in ensuring the effectiveness and accuracy of defect segmentation.

[0005] To achieve the above objectives, in a first aspect, this application provides a method for feature segmentation of a metal wire rope image, comprising the following steps:

[0006] The surface image of the metal wire rope is acquired, and the surface image is preprocessed and grayscaled to obtain the wire rope image.

[0007] Contour extraction is performed on the silk rope image to obtain the silk rope contour. Based on the silk rope contour, the gray values ​​in the silk rope image are analyzed to obtain the edge threshold between the two strands of silk rope.

[0008] Based on the silk rope contour analysis, the intersection points of the contour edges between two strands of silk rope in the silk rope image are extracted;

[0009] The initial contour line of the silk rope image is analyzed based on the edge threshold, and the initial boundary line between the two silk ropes is analyzed based on the initial contour line and the intersection of the contour edges.

[0010] The initial boundary line is calibrated based on the wire outline to obtain the final boundary line. The wire image is then divided into different strand regions based on the final boundary line.

[0011] The regional features of the strand area are extracted, and the defect area is analyzed based on the similarity between different regional features. At the same time, the specific defect points in the defect area are segmented.

[0012] Further, acquiring a surface image of the metal wire rope, performing image preprocessing and grayscale conversion on the surface image to obtain the wire rope image includes the following sub-steps:

[0013] When acquiring surface images of the metal wire rope, it is necessary to ensure that the surface of the metal wire rope is uniformly illuminated and that the metal wire rope is placed horizontally in the surface image.

[0014] The acquired surface image is enhanced and then converted to grayscale to obtain the rope image.

[0015] Further, contour extraction is performed on the silk rope image to obtain the silk rope contour. Based on the silk rope contour, the gray values ​​in the silk rope image are analyzed to obtain the edge threshold between the two strands of silk rope, including the following sub-steps:

[0016] Edge extraction of the wire rope image is performed using the OpenCV edge extraction algorithm to obtain the wire rope outline;

[0017] Get the black pixels in the outline of the silk rope and name them as outline points. Get the grayscale values ​​of the outline points in the silk rope image and name them as outline grayscale.

[0018] Taking any contour point as the center point, all contour points within the eight neighborhoods of the center point are considered to be adjacent to the center point, and consecutive adjacent contour points are integrated into a contour line group.

[0019] Mark the row and column number of the contour point in the silk rope image as n and m respectively. Establish a two-dimensional coordinate system with n as the X-axis and m as the Y-axis, and name it the contour direction analysis diagram. Enter the contour points in the contour line group into the contour direction analysis diagram according to n and m. Name the coordinate points in the contour direction analysis diagram as contour direction points.

[0020] Linear regression is performed on the contour direction points to obtain the absolute value of the slope of the regression function, which is named the contour direction parameter. The contour direction parameters of each contour line group are analyzed, and cluster analysis is performed on the contour direction parameters to obtain different direction clusters.

[0021] Calculate the average value of the contour direction parameters in the direction cluster and name it the cluster direction mean. Obtain the direction cluster with the largest cluster direction mean and name it the inter-section contour class. Obtain the gray value of the contour points corresponding to the contour direction parameters in the inter-section contour class and name it the inter-section contour gray value. Mark the largest value in the inter-section contour gray value as the edge threshold.

[0022] Furthermore, the extraction of the intersection points of the contour edges between two strands of silk rope in the silk rope image based on silk rope contour analysis includes the following sub-steps:

[0023] Establish a two-dimensional coordinate system again with n as the X-axis and m as the Y-axis, named the edge calibration analysis diagram, and enter all contour points into the edge calibration analysis diagram according to their positions n and m in the silk rope image.

[0024] Find the minimum and maximum values ​​of m for each value of n, and mark them as the lower boundary point and the upper boundary point respectively. Connect all the lower boundary points with a smooth curve to obtain the lower boundary curve, and connect all the upper boundary points with a smooth curve to obtain the upper boundary curve.

[0025] Obtain the peaks of the lower boundary curve and the troughs of the upper boundary curve, and name them the intersection points of the lower and upper contour edges, respectively.

[0026] Furthermore, the initial contour line of the silk rope image is analyzed based on the edge threshold, and the initial boundary line between the two silk ropes is analyzed based on the initial contour line and the intersection of the contour edges, including the following sub-steps:

[0027] The regression function of the contour line group is entered into the edge calibration analysis diagram to obtain the contour direction line. The contour direction line is extended to obtain the intersection point of the lower contour edge and the intersection point of the upper contour edge that are closest to the contour direction line. These are named the lower boundary vertex and the upper boundary vertex, respectively.

[0028] The initial boundary line is obtained by connecting the upper and lower boundary vertices with straight lines.

[0029] Furthermore, the initial boundary line is calibrated based on the wire rope contour to obtain the final boundary line. The wire rope image is then divided into different strand regions based on the final boundary line, including the following sub-steps:

[0030] Obtain the contour line group that intersects with the initial boundary line, name it the calibration contour group, and name the contour points in the calibration contour group the calibration points.

[0031] Connect adjacent calibration points with straight lines to obtain a calibration polyline. Obtain the intersection of the calibration polyline and the initial boundary line, and name it the partition point.

[0032] Name the calibration polyline between any two partition points as the calibration partition, and obtain the calibration point in the calibration partition that is farthest from the initial boundary line, and name it the valid calibration point.

[0033] The calibration valid points, boundary points, upper boundary vertices and lower boundary vertices are analyzed by multinomial regression algorithm, and the resulting curve is the final boundary line.

[0034] Analyze the final boundary line corresponding to each upper boundary vertex, number the final boundary lines in order from left to right, and use the symbol P. h This indicates that h is a positive integer and h is the index of P;

[0035] P h With P h+1 The area between them is named the strand region, resulting in different strand regions.

[0036] Furthermore, the regional features of the strand region are extracted, and the defect region is analyzed based on the similarity between different regional features. At the same time, the specific defect points in the defect region are segmented, including the following sub-steps:

[0037] Name the grayscale value of the pixel within the strand area as the region point grayscale, and count the number of times different region point grayscale values ​​appear within the strand area, naming it grayscale frequency.

[0038] Establish a two-dimensional coordinate system with the gray level of the region points as the horizontal axis and the gray level frequency as the vertical axis. Name the feature analysis map. Enter the gray level frequency into the feature analysis map according to the gray level of the region points. Name the coordinate points in the feature analysis map as feature analysis points.

[0039] By connecting adjacent feature analysis points with straight lines, feature analysis lines are obtained. Based on the smallest and largest feature analysis points, perpendicular lines are drawn to the horizontal axis to obtain auxiliary perpendicular lines. The closed area formed by the feature analysis lines, auxiliary perpendicular lines, and the horizontal axis is named the gray-scale distribution characterization area, which is the regional feature.

[0040] The strand areas are numbered from left to right using the symbol R. t Let R be a positive integer, where t is the index of R. t The grayscale distribution characterization region is labeled Q. t ;

[0041] With any Q t As a baseline representation region, Q is analyzed using a similarity analysis model. t The similarity with the baseline representation region is named representation similarity. The sum of the representation similarities is calculated and named representation similarity sum, with each Q... t The benchmark region is used as the benchmark region and the corresponding characterization similarity is analyzed. The benchmark region with the largest characterization similarity is named the effective benchmark region.

[0042] Obtain the representation similarity when the effective reference area is used as the reference representation area, perform cluster analysis on the representation similarity to obtain different similarity clusters, count the number of representation similarities in the similarity clusters and name them as the number of representations in the cluster, name the gray-scale distribution representation area corresponding to the representation similarity in the similarity cluster with the largest number of representations in the cluster and the effective reference area as the normal representation area, and name the remaining gray-scale distribution representation area as the defect suspected area.

[0043] Based on the analysis of the normal characterization area and the suspected defect area, the defect area in the strand region is analyzed, and the specific defect points in the defect area are segmented.

[0044] Furthermore, based on the normal characterization area and the suspected defect area, the defect area in the strand region is analyzed, and the specific defect points in the defect area are segmented, including the following sub-steps:

[0045] The feature analysis points in the effective reference area are numbered from left to right, using the symbol FA. g This indicates that, where g is a positive integer and g is the index of FA, FA is... g The corresponding value on the horizontal axis is labeled XA. g , will F g The corresponding value on the vertical axis is labeled YA g ;

[0046] When analyzing any normal characterization area or suspected defect area, it is named the area to be analyzed. The feature analysis points in the area to be analyzed are numbered in order from left to right, and denoted by the symbol FB. e This indicates that, where e is a positive integer and e is the index of FB, FB is... e The corresponding value on the horizontal axis is labeled XB. e , will FB e The corresponding value on the vertical axis is labeled YB. e ;

[0047] Search and FB e The nearest FA g Marked as D e At the same time, D e Corresponding XA g and YA g They are labeled KX e and KY e Calculate YB e With KY e The absolute value of the difference is used to denot the calculation result as YW. e Calculate XB e With KX e The absolute value of the difference is used to denot the calculation result as XW. e ;

[0048] XW of the statistical normal characterization region e The maximum value and YW e The maximum values ​​are named color value fluctuation threshold and frequency fluctuation threshold, respectively.

[0049] If all XW in the suspected defect area e All are less than or equal to the color value fluctuation threshold, and all YW e If all values ​​are less than or equal to the frequency fluctuation threshold, the suspected defect area will be calibrated as a normal characterization area; otherwise, the suspected defect area will be named the defect confirmation area.

[0050] Obtain XW values ​​greater than the color value fluctuation threshold in the defect confirmation area. e The corresponding feature analysis point or YW is greater than the frequency fluctuation threshold. eThe corresponding feature analysis points are uniformly named as outliers, and the grayscale values ​​of the outlier regions are obtained and named as outlier grayscale values.

[0051] All pixels in the defect confirmation area with abnormal gray levels are segmented and highlighted.

[0052] Secondly, this application provides a metal wire rope image feature segmentation system, including an image acquisition module, an edge threshold analysis module, a contour intersection analysis module, an initial boundary analysis module, a strand region division module, and a defect region analysis module; the image acquisition module, the edge threshold analysis module, the contour intersection analysis module, the initial boundary analysis module, and the defect region analysis module are respectively data connected to the strand region division module;

[0053] The image acquisition module is used to acquire surface images of the metal wire rope, perform image preprocessing and grayscale processing on the surface images to obtain wire rope images;

[0054] The edge threshold analysis module is used to extract the contour of the silk rope image to obtain the silk rope contour, and analyze the gray value in the silk rope image based on the silk rope contour to obtain the edge threshold between the two strands of silk rope.

[0055] The contour intersection analysis module is used to extract the contour edge intersection points between two strands of silk rope in the silk rope image based on silk rope contour analysis.

[0056] The initial boundary analysis module is used to analyze the initial contour line of the rope image based on the edge threshold, and to analyze the initial boundary line between the two ropes based on the initial contour line and the intersection of the contour edges.

[0057] The strand region segmentation module is used to calibrate the initial dividing line based on the silk rope contour to obtain the final dividing line, and to divide the silk rope image into different strand regions based on the final dividing line.

[0058] The defect region analysis module is used to extract the regional features of the strand region, analyze the defect region based on the similarity between different regional features, and segment the specific defect points in the defect region.

[0059] Thirdly, this application provides an electronic device including a processor and a memory, the memory storing computer-readable instructions, which, when executed by the processor, perform the steps of the method described above.

[0060] The beneficial effects of this invention are as follows: This invention acquires a surface image of a metal wire rope, performs image preprocessing and grayscale processing on the surface image to obtain a wire rope image, then extracts the contour of the wire rope image to obtain the wire rope contour, analyzes the grayscale values ​​in the wire rope image based on the wire rope contour to obtain the edge threshold between the two strands of wire rope, and then analyzes and extracts the contour edge intersection points between the two strands of wire rope in the wire rope image based on the wire rope contour. At the same time, it analyzes the initial contour line of the wire rope image based on the edge threshold, analyzes the initial boundary line between the two strands of wire rope based on the initial contour line and the contour edge intersection points, and then calibrates the initial boundary line based on the wire rope contour to obtain the final boundary line. Based on the final boundary line, the wire rope image is divided into different strand regions. The advantage is that, unlike the original regular graphic division, it considers the curvature of the boundary between the metal wires, accurately extracts the region where each metal wire in the wire rope image is located, and the region features extracted based on this can more accurately represent the image features of the metal wire rope surface, improving the accuracy and effectiveness of metal wire rope defect segmentation.

[0061] This invention extracts the regional features of the strand region and analyzes the defect region based on the similarity between different regional features. At the same time, it segments the specific defect points in the defect region. The advantage is that, under uniform lighting conditions, the surfaces of the strand regions in the metal wire rope are usually highly similar, representing that their regional features are similar. Based on this, the defect region can be identified. Moreover, the definition and analysis process of the regional features are very detailed, which further improves the accuracy and effectiveness of metal wire rope defect segmentation. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of the system of the present invention;

[0063] Figure 2 This is a schematic diagram of the silk rope image of the present invention;

[0064] Figure 3 This is a schematic diagram of the wire rope outline of the present invention;

[0065] Figure 4 This is a schematic diagram of the outline assembly of the present invention;

[0066] Figure 5 This is a schematic diagram of the contour path analysis of the present invention;

[0067] Figure 6 This is a schematic diagram of the edge calibration analysis diagram of the present invention;

[0068] Figure 7 This is a schematic diagram of the lower boundary curve and the upper boundary curve of the present invention;

[0069] Figure 8 This is a schematic diagram of the outline of the present invention;

[0070] Figure 9 This is a schematic diagram of the initial boundary line of the present invention;

[0071] Figure 10 This is a schematic diagram of the calibration profile group of the present invention;

[0072] Figure 11 This is a schematic diagram of the final dividing line of the present invention;

[0073] Figure 12 This is a schematic diagram of the strand area of ​​the present invention;

[0074] Figure 13 This is a schematic diagram of the feature analysis diagram of the present invention;

[0075] Figure 14 This is a schematic diagram illustrating the numbering of feature analysis points in the effective reference area according to the present invention;

[0076] Figure 15 This is a schematic diagram illustrating the acquisition and marking of a region to be analyzed according to the present invention;

[0077] Figure 16 This is a schematic diagram illustrating the overlap of the effective reference area and the grayscale distribution characterization area of ​​the area to be analyzed in this invention.

[0078] Figure 17 This is a flowchart of the steps of the method of the present invention. Detailed Implementation

[0079] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0080] Example 1, please refer to Figure 1 As shown, this application provides a metal wire rope image feature segmentation system, including an image acquisition module, an edge threshold analysis module, a contour intersection analysis module, an initial boundary analysis module, a strand region division module, and a defect region analysis module; the image acquisition module, the edge threshold analysis module, the contour intersection analysis module, the initial boundary analysis module, and the defect region analysis module are respectively connected to the strand region division module for data transmission.

[0081] The image acquisition module is used to acquire surface images of the metal wire rope, perform image preprocessing and grayscale processing on the surface images to obtain wire rope images;

[0082] The image acquisition module is configured with an image acquisition strategy, which includes:

[0083] When acquiring surface images of the metal wire rope, it is necessary to ensure that the surface of the metal wire rope is uniformly illuminated, and that the metal wire rope is placed horizontally and taut in the surface image. Tautness means that the metal wire rope is fully stretched axially.

[0084] Please see Figure 2 As shown, the acquired surface image is enhanced and then converted to grayscale to obtain the rope image;

[0085] In practical applications, uniform lighting is ensured to prevent excessive color value differences among pixels caused by uneven lighting. Ensuring the metal wire rope is taut and horizontally positioned conforms to the area division rules in this embodiment, preventing deviations when dividing the strand areas. Image enhancement is a conventional image preprocessing method, which will not be specifically described in this embodiment. The wire rope image obtained after acquisition and processing is as follows: Figure 2 As shown, Figure 2 It is a metal wire rope composed of multiple strands of thin steel wire rope.

[0086] The edge threshold analysis module is used to extract the contour of the silk rope image, obtain the silk rope contour, and analyze the gray value in the silk rope image based on the silk rope contour to obtain the edge threshold between the two strands of silk rope.

[0087] The edge threshold analysis module is configured with edge threshold analysis strategies, which include:

[0088] Please see Figure 3 As shown, the edge extraction algorithm of OpenCV is used to extract the edge of the wire rope image to obtain the wire rope outline;

[0089] Get the black pixels in the outline of the silk rope and name them as outline points. Get the grayscale values ​​of the outline points in the silk rope image and name them as outline grayscale.

[0090] Please see Figure 4 As shown, with any contour point as the center point, all contour points within the eight neighborhoods of the center point are considered to be adjacent to the center point, and consecutive adjacent contour points are integrated into a contour line group.

[0091] Please see Figure 5 As shown, the row and column numbers of the contour points in the silk rope image are marked as n and m, respectively. A two-dimensional coordinate system is established with n as the X-axis and m as the Y-axis, named the contour direction analysis diagram. The contour points in the contour line group are entered into the contour direction analysis diagram according to n and m. The coordinate points in the contour direction analysis diagram are named contour direction points.

[0092] Linear regression is performed on the contour direction points to obtain the absolute value of the slope of the regression function, which is named the contour direction parameter. The contour direction parameters of each contour line group are analyzed, and cluster analysis is performed on the contour direction parameters to obtain different direction clusters.

[0093] Calculate the average value of the contour direction parameters in the direction cluster and name it the cluster direction mean. Obtain the direction cluster with the largest cluster direction mean and name it the inter-section contour class. Obtain the gray value of the contour points corresponding to the contour direction parameters in the inter-section contour class and name it the inter-section contour gray value. Mark the largest value in the inter-section contour gray value as the edge threshold.

[0094] In practical applications, the outline of the silk rope is obtained through edge extraction, such as... Figure 3 As shown, Figure 3 The black pixels in the diagram are the contour points. The eight neighbors are the eight pixels that intersect the center point in the directions of top left, top right, top right, left, right, bottom left, bottom right, and bottom right. Assuming there are contour points α1, α2, and α3, where α1 is adjacent to α2 and α2 is adjacent to α3, then α1 and α3 are also considered adjacent, i.e., consecutively adjacent. Consecutive adjacent contour points are integrated into a contour line group. For example, a contour line group can be obtained as follows: Figure 4 As shown, a certain contour point is located in the 12th row and 64th column of the silk rope image. Therefore, n is 12 and m is 64. The resulting contour path analysis diagram is shown below. Figure 5 As shown, due to the excessively dense coordinate points, in Figure 5 The image presents a visual effect similar to lines. By analyzing the absolute value of the slope of the regression function using linear regression, the contour direction parameter is obtained. This parameter reveals the direction trend of the contour line group. The boundary between two adjacent thinner wire ropes exhibits a larger inclination, while the inclination of the wires within the same thinner wire rope tends to be horizontal, making them easily distinguishable. Cluster analysis integrates similar contour direction parameters into a single direction cluster. The direction cluster with the largest mean is composed of contour points at the boundary between two adjacent thinner wire ropes, thus obtaining the inter-strand contour class. Simultaneously, the maximum grayscale value of the inter-strand contour is extracted and marked as the edge threshold, resulting in an edge threshold of 51. Figure 2 It can be clearly seen that the gray value at the boundary between two adjacent thinner steel wires is significantly lower than the gray value of other pixels. Therefore, the maximum gray value of the outline between the wires is extracted as the edge threshold.

[0095] The contour intersection analysis module is used to analyze the contour of a silk rope and extract the intersection points of the contour edges between two strands of silk rope in a silk rope image.

[0096] The contour intersection analysis module is configured with contour intersection analysis strategies, which include:

[0097] Please see Figure 6 As shown, a two-dimensional coordinate system is established again with n as the X-axis and m as the Y-axis, named the edge calibration analysis diagram. All contour points are entered into the edge calibration analysis diagram according to their positions n and m in the silk rope image.

[0098] Please see Figure 7 As shown, the minimum and maximum values ​​of m are obtained for each value of n, and marked as the lower boundary point and the upper boundary point, respectively. All the lower boundary points are connected by a smooth curve to obtain the lower boundary curve, and all the upper boundary points are connected by a smooth curve to obtain the upper boundary curve.

[0099] Obtain the peak of the lower boundary curve and the trough of the upper boundary curve, and name them the intersection of the lower contour edge and the intersection of the upper contour edge, respectively.

[0100] In practical applications, the edge calibration analysis map is constructed as follows: Figure 6 As shown, the lower boundary curve and the upper boundary curve are actually... Figure 6 The lower and upper boundary curves are extracted from the bottommost and topmost left-right oriented curves, as shown below. Figure 7 As shown, Figure 7 The intersection points of the lower contour edges and the upper contour edges have been marked.

[0101] The initial boundary analysis module is used to analyze the initial contour line of the rope image based on the edge threshold, and to analyze the initial boundary line between the two ropes based on the initial contour line and the intersection of the contour edges.

[0102] The initial boundary analysis module is configured with an initial boundary analysis strategy, which includes:

[0103] Please see Figure 8 As shown, the regression function of the contour line group is entered into the edge calibration analysis diagram to obtain the contour direction line. The contour direction line is extended to obtain the intersection point of the lower contour edge and the intersection point of the upper contour edge that are closest to the contour direction line. These are named the lower boundary vertex and the upper boundary vertex, respectively.

[0104] The initial boundary line is obtained by connecting the upper boundary vertex and the lower boundary vertex with a straight line;

[0105] In practical applications, for example, a certain contour line such as Figure 8 As shown, after extension, the nearest intersection points of the lower and upper contour edges can be found, yielding the lower and upper boundary vertices. Corresponding the intersection points of the lower and upper contour edges, the two ends of the boundary where this contour line is located should be the lower and upper boundary vertices. Connecting these points yields the initial boundary line as shown. Figure 9 As shown.

[0106] The strand region segmentation module is used to calibrate the initial dividing line based on the silk rope contour to obtain the final dividing line, and to divide the silk rope image into different strand regions based on the final dividing line.

[0107] The strand region division module is configured with strand region division strategies, which include:

[0108] Please see Figure 10 As shown, obtain the contour line group that intersects with the initial boundary line, name it the calibration contour group, and name the contour points in the calibration contour group the calibration points.

[0109] Connect adjacent calibration points with straight lines to obtain a calibration polyline. Obtain the intersection of the calibration polyline and the initial boundary line, and name it the partition point.

[0110] Name the calibration polyline between any two partition points as the calibration partition, and obtain the calibration point in the calibration partition that is farthest from the initial boundary line, and name it the valid calibration point.

[0111] Please see Figure 11 As shown, the calibration effective points, boundary points, upper boundary vertices and lower boundary vertices are analyzed by the multinomial regression algorithm, and the resulting curve is the final boundary line.

[0112] Analyze the final boundary line corresponding to each upper boundary vertex, number the final boundary lines in order from left to right, and use the symbol P. h This indicates that h is a positive integer and h is the index of P;

[0113] Please see Figure 12 As shown, P h With P h+1 The area between them is named the strand region, resulting in different strand regions;

[0114] In practical applications, the calibration profile set is obtained as follows: Figure 10 As shown, at the same time, Figure 10 The black dots in the diagram represent partition points. The topmost and bottommost calibration points in each calibration profile group are also considered partition points, thus obtaining calibration partitions. Finally, all valid calibration points are extracted, and the final boundary lines are obtained through analysis. Figure 11 As shown, the final dividing line at this point has a certain curvature, perfectly matching the trend of the boundary between the two thinner steel wires. Analyzing the final dividing line corresponding to each upper boundary vertex, the final strand area is obtained as follows: Figure 12 As shown, Figure 12 The closed area between the white curve and the black curve is the strand area. Analyze all strand areas on the surface of the metal wire rope.

[0115] The defect region analysis module is used to extract the regional features of the strand region, analyze the defect region based on the similarity between different regional features, and segment specific defect points in the defect region. The defect region analysis module includes a characterization region analysis unit and a defect identification and segmentation unit.

[0116] The characterization region analysis unit is configured with a characterization region analysis strategy, which includes:

[0117] Name the grayscale value of the pixel within the strand area as the region point grayscale, and count the number of times different region point grayscale values ​​appear within the strand area, naming it grayscale frequency.

[0118] Please see Figure 13 As shown, a two-dimensional coordinate system is established with the gray level of the region points as the horizontal axis and the gray level frequency as the vertical axis. The system is named the feature analysis map. The gray level frequency is entered into the feature analysis map according to the gray level of the region points. The coordinate points in the feature analysis map are named the feature analysis points.

[0119] By connecting adjacent feature analysis points with straight lines, we obtain feature analysis lines. Based on the smallest and largest feature analysis points, we draw perpendicular lines to the horizontal axis to obtain auxiliary perpendicular lines. The closed area formed by the feature analysis lines, auxiliary perpendicular lines, and the horizontal axis is named the gray-scale distribution characterization area, which is the regional feature.

[0120] The strand areas are numbered from left to right using the symbol R. t Let R be a positive integer, where t is the index of R. t The grayscale distribution characterization region is labeled Q. t ;

[0121] With any Q t As a baseline representation region, Q is analyzed using a similarity analysis model. t The similarity with the baseline representation region is named representation similarity. The sum of the representation similarities is calculated and named representation similarity sum, with each Q... t The benchmark region is used as the benchmark region and the corresponding characterization similarity is analyzed. The benchmark region with the largest characterization similarity is named the effective benchmark region.

[0122] Obtain the representation similarity when the effective reference area is used as the reference representation area, perform cluster analysis on the representation similarity to obtain different similarity clusters, count the number of representation similarities in the similarity clusters and name them as the number of representations in the cluster, name the gray-scale distribution representation area corresponding to the representation similarity in the similarity cluster with the largest number of representations in the cluster and the effective reference area as the normal representation area, and name the remaining gray-scale distribution representation area as the defect suspected area.

[0123] In practical applications, for example, if the gray level of a region point 164 appears 562 times, the gray level frequency of the region point 164 can be obtained as 562, and the feature analysis map can be constructed as follows. Figure 13 As shown, Figure 13 The feature analysis lines and gray-scale distribution representation areas have been connected. The gray-scale distribution representation areas of each strand region are analyzed; for example, five strand regions are numbered, R1 to R5, and Q1 to Q5 are also obtained. Assuming Q1 is used as the baseline representation area, the representation similarity between Q2 to Q5 and Q1 is analyzed using existing similarity analysis models. Then, the representation similarity sum is calculated. The representation similarity sum reveals the comprehensive similarity between the baseline representation area and all other gray-scale distribution representation areas. If the representation similarity sum is the largest, it means that the comprehensive similarity between the baseline representation area and all other gray-scale distribution representation areas is the largest, making it the most suitable basis for judgment. Thus, the effective baseline area is obtained. The representation similarity when using the effective baseline area as the baseline representation area is obtained. Cluster analysis is performed on the representation similarity to obtain different similarity clusters. Typically, gold... The normal surface of the wire rope is much larger than the defective surface, meaning the normal strand area is much larger than the defective strand area. Therefore, the gray-scale distribution representation area and the effective reference area corresponding to the representation similarity in the similarity cluster with the highest representation number in the class are named the normal representation area. The representation similarity between normal strand areas is usually quite close, while the representation similarity between defective strand areas and normal strand areas is usually low, showing a significant difference. For example, there are two similarity clusters. The representation similarity in the first similarity cluster includes 97%, 96.5%, and 97.2%, while the representation similarity in the other similarity cluster includes 88.4%, meaning the representation numbers in the classes are 3 and 1, respectively. The Q value corresponding to the representation similarity in the first similarity cluster is... t The effective reference area is named the normal characterization area, and the remaining gray-scale distribution characterization area is named the suspected defect area.

[0124] The defect identification and segmentation unit is used to analyze the defect area in the strand area based on the normal characterization area and the defect suspected area, and to segment the specific defect points in the defect area;

[0125] The defect identification and segmentation unit is configured with a defect identification and segmentation strategy, which includes:

[0126] Please see Figure 14 As shown, the feature analysis points in the effective reference area are numbered from left to right, using the symbol FA. g This indicates that, where g is a positive integer and g is the index of FA, FA is... g The corresponding value on the horizontal axis is labeled XA. g , will F g The corresponding value on the vertical axis is labeled YA g ;

[0127] Please see Figure 15 As shown, when analyzing any normal characterization area or suspected defect area, it is named the area to be analyzed. The feature analysis points in the area to be analyzed are numbered in order from left to right, and are represented by the symbol FB. e This indicates that, where e is a positive integer and e is the index of FB, FB is... e The corresponding value on the horizontal axis is labeled XB. e , will FB e The corresponding value on the vertical axis is labeled YB. e ;

[0128] Please see Figure 16 As shown, search for FB e The nearest FA g Marked as D e At the same time, D e Corresponding XA g and YA g They are labeled KX e and KY e Calculate YB e With KY e The absolute value of the difference is used to denot the calculation result as YW. e Calculate XB e With KX e The absolute value of the difference is used to denot the calculation result as XW. e ;

[0129] XW of the statistical normal characterization region e The maximum value and YW e The maximum values ​​are named color value fluctuation threshold and frequency fluctuation threshold, respectively.

[0130] In practical applications, it is assumed Figure 13 This is the effective reference area. The feature analysis points within the effective reference area are numbered as follows: Figure 14 As shown, a region to be analyzed is obtained and marked as follows. Figure 15 As shown, for ease of observation Figure 14 and Figure 15 The difference is determined by overlapping the effective reference area with the gray-scale distribution characterization area of ​​the area to be analyzed, resulting in... Figure 16 , Figure 16The black coordinate points in the diagram represent the feature analysis points of the region to be analyzed, while the gray coordinate points represent the feature analysis points of the effective reference region. Taking FA2 and FB2 as examples, FA2 is the closest to YB2, therefore FA2 is D2. XA2 and YA2 are extracted to be 70 and 598 respectively, meaning KX2 and KY2 are 70 and 598 respectively, and XB2 and YB2 are 68 and 528 respectively. YW2 and XW2 are calculated to be 70 and 2 respectively. The FB coordinates of all normal characterization regions are then analyzed. e The corresponding YW e and XW e Finally, the FB of all normal characterization regions was statistically analyzed. e The corresponding YW e The maximum value and YW e The maximum value is obtained, and the color value fluctuation threshold is 4 and the frequency fluctuation threshold is 70. The color value fluctuation threshold means that the difference between the distribution of gray values ​​in the normal characterization area and the effective reference area does not exceed 4, while the frequency fluctuation threshold means that the difference between the frequency of gray values ​​in the normal characterization area and the effective reference area does not exceed 70.

[0131] If all XW in the suspected defect area e All are less than or equal to the color value fluctuation threshold, and all YW e If all values ​​are less than or equal to the frequency fluctuation threshold, the suspected defect area will be calibrated as a normal characterization area; otherwise, the suspected defect area will be named the defect confirmation area.

[0132] Obtain XW values ​​greater than the color value fluctuation threshold in the defect confirmation area. e The corresponding feature analysis point or YW is greater than the frequency fluctuation threshold. e The corresponding feature analysis points are uniformly named as outliers, and the grayscale values ​​of the outlier regions are obtained and named as outlier grayscale values.

[0133] All pixels in the defect confirmation area with abnormal gray levels are segmented and highlighted.

[0134] In practical applications, if all XW in the suspected defect area e All are less than or equal to the color value fluctuation threshold, and all YW eIf all values ​​are less than or equal to the frequency fluctuation threshold, it means that the distribution and frequency of grayscale values ​​in the suspected defect area do not deviate significantly from the effective reference area. This misjudgment is caused by the fact that the frequencies of all feature analysis points are close to the frequency fluctuation threshold. Conversely, if the values ​​are greater than or equal to the frequency fluctuation threshold, it means that there are feature analysis points in the suspected defect area that deviate significantly from the effective reference area. The pixels corresponding to these feature analysis points are defective. For example, if XW4 in a certain defect confirmation area is greater than the color value fluctuation threshold, and the grayscale value corresponding to XW4 is 168, then all pixels in the defect confirmation area with a grayscale value of 168 will be highlighted. After highlighting, they will be different from the other pixels, thus achieving the purpose of segmentation. At the same time, these pixels can also be sprayed to mark them on the actual metal wire rope. The specific marking method can use existing technology, and this embodiment does not make specific requirements.

[0135] Example 2, please refer to Figure 17 As shown, this application provides a method for feature segmentation of a metal wire rope image, including the following steps:

[0136] Step S1 involves acquiring a surface image of the metal wire rope, performing image preprocessing and grayscale conversion on the surface image to obtain the wire rope image; Step S1 includes the following sub-steps:

[0137] Step S101: Acquire a surface image of the metal wire rope. During the acquisition process, it is necessary to ensure that the surface of the metal wire rope is uniformly illuminated, and that the metal wire rope is placed horizontally and taut in the surface image.

[0138] Step S102: The acquired surface image is enhanced and then converted to grayscale to obtain the rope image;

[0139] Step S2 involves extracting the contour of the silk rope image to obtain the silk rope contour, and then analyzing the gray values ​​in the silk rope image based on the silk rope contour to obtain the edge threshold between the two strands of silk rope. Step S2 includes the following sub-steps:

[0140] Step S201: The edge of the wire rope image is extracted using the OpenCV edge extraction algorithm to obtain the wire rope outline.

[0141] Step S202: Obtain the black pixels in the outline of the silk rope and name them as outline points; obtain the gray values ​​of the outline points in the silk rope image and name them as outline gray values.

[0142] Step S203: Using any contour point as the center point, all contour points within the eight neighborhoods of the center point are considered to be adjacent to the center point, and consecutive adjacent contour points are integrated into a contour line group.

[0143] Step S204: Mark the row number and column number of the contour point in the silk rope image as n and m respectively. Establish a two-dimensional coordinate system with n as the X-axis and m as the Y-axis, and name it the contour direction analysis diagram. Enter the contour points in the contour line group into the contour direction analysis diagram according to n and m, and name the coordinate points in the contour direction analysis diagram as contour direction points.

[0144] Step S205: Perform linear regression on the contour direction points, obtain the absolute value of the slope of the regression function, name it the contour direction parameter, analyze the contour direction parameter of each contour line group, perform cluster analysis on the contour direction parameter, and obtain different direction clusters.

[0145] Step S206: Calculate the average value of the contour direction parameters in the direction cluster and name it as the cluster direction mean. Obtain the direction cluster with the largest cluster direction mean and name it as the inter-section contour class. Obtain the gray value of the contour points corresponding to the contour direction parameters in the inter-section contour class and name it as the inter-section contour gray value. Mark the largest value in the inter-section contour gray value as the edge threshold.

[0146] Step S3 involves analyzing the wire rope contour and extracting the intersection points of the contour edges between two strands of wire rope in the wire rope image. Step S3 includes the following sub-steps:

[0147] Step S301: Establish a two-dimensional coordinate system again with n as the X-axis and m as the Y-axis, and name it the edge calibration analysis diagram. Record all contour points into the edge calibration analysis diagram according to their positions n and m in the silk rope image.

[0148] Step S302: Obtain the minimum and maximum values ​​of m for each value of n, and mark them as the lower boundary point and the upper boundary point respectively. Connect all the lower boundary points with a smooth curve to obtain the lower boundary curve, and connect all the upper boundary points with a smooth curve to obtain the upper boundary curve.

[0149] Step S303: Obtain the peak of the lower boundary curve and the trough of the upper boundary curve, and name them as the intersection of the lower contour edge and the intersection of the upper contour edge, respectively.

[0150] Step S4 involves analyzing the initial contour line of the rope image based on edge thresholding, and then analyzing the initial boundary line between the two rope strands based on the initial contour line and the intersection points of the contour edges. Step S4 includes the following sub-steps:

[0151] Step S401: Input the regression function of the contour line group into the edge calibration analysis diagram to obtain the contour direction line. Extend the contour direction line and obtain the intersection point of the lower contour edge and the intersection point of the upper contour edge that are closest to the contour direction line. Name them as the lower boundary vertex and the upper boundary vertex, respectively.

[0152] Step S402: Connect the upper boundary vertex and the lower boundary vertex with a straight line to obtain the initial boundary line;

[0153] Step S5 involves calibrating the initial boundary line based on the wire rope profile to obtain the final boundary line, and then dividing the wire rope image into different strand regions based on the final boundary line. Step S5 includes the following sub-steps:

[0154] Step S501: Obtain the contour line group that intersects with the initial boundary line, name it the calibration contour group, and name the contour points in the calibration contour group as calibration points.

[0155] Step S502: Connect adjacent calibration points with straight lines to obtain a calibration polyline. Obtain the intersection of the calibration polyline and the initial boundary line and name it as the partition point.

[0156] Step S503: Name the calibration polyline between any two partition points as the calibration partition, and obtain the calibration point in the calibration partition that is farthest from the initial boundary line, and name it as the calibration valid point;

[0157] Step S504: The calibration effective points, boundary points, upper boundary vertices and lower boundary vertices are analyzed by a multinomial regression algorithm. The curve obtained from the analysis is the final boundary line.

[0158] Step S505: Analyze the final boundary line corresponding to each upper boundary vertex, number the final boundary lines in order from left to right, and use the symbol P. h This indicates that h is a positive integer and h is the index of P;

[0159] Step S506, P h With P h+1 The area between them is named the strand region, resulting in different strand regions;

[0160] Step S6 involves extracting the regional features of the strand area, analyzing the defect area based on the similarity between different regional features, and segmenting specific defect points within the defect area. Step S6 includes the following sub-steps:

[0161] Step S601: Name the grayscale value of the pixel in the strand area as the region point grayscale, and count the number of times different region point grayscales appear in the strand area, and name it as grayscale frequency.

[0162] Step S602: Establish a two-dimensional coordinate system with the gray level of the region points as the horizontal axis and the gray level frequency as the vertical axis, name the feature analysis map, enter the gray level frequency into the feature analysis map according to the gray level of the region points, and name the coordinate points in the feature analysis map as feature analysis points.

[0163] Step S603: Connect adjacent feature analysis points with straight lines to obtain feature analysis lines. Draw perpendicular lines to the horizontal axis based on the smallest and largest feature analysis points to obtain auxiliary perpendicular lines. Name the closed area formed by the feature analysis lines, auxiliary perpendicular lines, and the horizontal axis as the gray-scale distribution characterization area. The gray-scale distribution characterization area is the regional feature.

[0164] Step S604: Number the strand areas from left to right using the symbol R. t Let R be a positive integer, where t is the index of R. t The grayscale distribution characterization region is labeled Q. t ;

[0165] Step S605, with any Q t As a baseline representation region, Q is analyzed using a similarity analysis model. t The similarity with the baseline representation region is named representation similarity. The sum of the representation similarities is calculated and named representation similarity sum, with each Q... t The benchmark region is used as the benchmark region and the corresponding characterization similarity is analyzed. The benchmark region with the largest characterization similarity is named the effective benchmark region.

[0166] Step S606: Obtain the representation similarity when the effective reference area is used as the reference representation area, perform cluster analysis on the representation similarity to obtain different similarity clusters, count the number of representation similarities in the similarity clusters and name them as the number of representations in the cluster, name the gray-scale distribution representation area corresponding to the representation similarity in the similarity cluster with the largest number of representations in the cluster and the effective reference area as the normal representation area, and name the remaining gray-scale distribution representation areas as the defect suspected area.

[0167] Step S607: Analyze the defect area in the strand area based on the normal characterization area and the suspected defect area, and segment the specific defect points in the defect area.

[0168] Step S607 includes the following sub-steps:

[0169] Step S6071: Number the feature analysis points in the effective reference area from left to right, using the symbol FA. g This indicates that, where g is a positive integer and g is the index of FA, FA is... g The corresponding value on the horizontal axis is labeled XA. g , will F g The corresponding value on the vertical axis is labeled YA g ;

[0170] Step S6072: When analyzing any normal characterization area or suspected defect area, name it the area to be analyzed, and number the feature analysis points in the area to be analyzed in order from left to right, using the symbol FB.e This indicates that, where e is a positive integer and e is the index of FB, FB is... e The corresponding value on the horizontal axis is labeled XB. e , will FB e The corresponding value on the vertical axis is labeled YB. e ;

[0171] Step S6073, search for FB e The nearest FA g Marked as D e At the same time, D e Corresponding XA g and YA g They are labeled KX e and KY e Calculate YB e With KY e The absolute value of the difference is used to denot the calculation result as YW. e Calculate XB e With KX e The absolute value of the difference is used to denot the calculation result as XW. e ;

[0172] Step S6074, calculate the XW of the normal characterization region. e The maximum value and YW e The maximum values ​​are named color value fluctuation threshold and frequency fluctuation threshold, respectively.

[0173] Step S6075, if all XW in the suspected defect area e All are less than or equal to the color value fluctuation threshold, and all YW e If all values ​​are less than or equal to the frequency fluctuation threshold, the suspected defect area will be calibrated as a normal characterization area; otherwise, the suspected defect area will be named the defect confirmation area.

[0174] Step S6076: Obtain the XW values ​​in the defect confirmation area that are greater than the color value fluctuation threshold. e The corresponding feature analysis point or YW is greater than the frequency fluctuation threshold. e The corresponding feature analysis points are uniformly named as outliers, and the grayscale values ​​of the outlier regions are obtained and named as outlier grayscale values.

[0175] Step S6077: Perform region segmentation and highlight all pixels in the defect confirmation area whose grayscale is abnormal.

[0176] Example 3: This application provides an electronic device, which may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The memory stores computer-readable instructions. The processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, steps such as those in a metal wire rope image feature segmentation method are performed to achieve the following functions: acquiring a wire rope image; analyzing the edge threshold between two strands of wire rope based on the wire rope contour; analyzing and extracting the intersection points of the contour edges based on the wire rope contour; analyzing the initial contour line of the wire rope image, and analyzing the initial boundary line between the two strands of wire rope based on the initial contour line; calibrating the initial boundary line to obtain the final boundary line, and dividing the wire rope image into different strand regions based on the final boundary line; extracting the regional features of the strand regions, analyzing defect regions, and segmenting specific defect points within the defect regions.

[0177] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0178] Example 4: This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the above-described metal wire rope image feature segmentation method to achieve the following functions: acquiring a wire rope image; analyzing the edge threshold between two strands of wire rope based on the wire rope contour; analyzing and extracting the intersection points of the contour edges based on the wire rope contour; analyzing the initial contour line of the wire rope image and analyzing the initial boundary line between the two strands of wire rope based on the initial contour line; calibrating the initial boundary line to obtain the final boundary line; dividing the wire rope image into different strand regions based on the final boundary line; extracting the regional features of the strand regions, analyzing the defect regions, and segmenting specific defect points in the defect regions.

[0179] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0180] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for segmenting image features of a metal wire rope, characterized in that, Includes the following steps: The surface image of the metal wire rope is acquired, and the surface image is preprocessed and grayscaled to obtain the wire rope image. Contour extraction is performed on the silk rope image to obtain the silk rope contour. Based on the silk rope contour, the gray values ​​in the silk rope image are analyzed to obtain the edge threshold between the two strands of silk rope. Based on the silk rope contour analysis, the intersection points of the contour edges between two strands of silk rope in the silk rope image are extracted; The initial contour line of the silk rope image is analyzed based on the edge threshold, and the initial boundary line between the two silk ropes is analyzed based on the initial contour line and the intersection of the contour edges. The initial boundary line is calibrated based on the wire outline to obtain the final boundary line. The wire image is then divided into different strand regions based on the final boundary line. Extract the regional features of the strand area, analyze the defect area based on the similarity between different regional features, and segment the specific defect points in the defect area. Extracting regional features of the strand region, analyzing defect regions based on the similarity between different regional features, and segmenting specific defect points within the defect regions includes the following sub-steps: Name the grayscale value of the pixel within the strand area as the region point grayscale, and count the number of times different region point grayscale values ​​appear within the strand area, naming it grayscale frequency. Establish a two-dimensional coordinate system with the gray level of the region points as the horizontal axis and the gray level frequency as the vertical axis. Name the feature analysis map. Enter the gray level frequency into the feature analysis map according to the gray level of the region points. Name the coordinate points in the feature analysis map as feature analysis points. By connecting adjacent feature analysis points with straight lines, feature analysis lines are obtained. Based on the smallest and largest feature analysis points, perpendicular lines are drawn to the horizontal axis to obtain auxiliary perpendicular lines. The closed area formed by the feature analysis lines, auxiliary perpendicular lines, and the horizontal axis is named the gray-scale distribution characterization area, which is the regional feature. The strand areas are numbered from left to right using the symbol R. t Let R be a positive integer, where t is the index of R. t The grayscale distribution characterization region is labeled Q. t ; With any Q t As a baseline representation region, Q is analyzed using a similarity analysis model. t The similarity with the baseline representation region is named representation similarity. The sum of the representation similarities is calculated and named representation similarity sum, with each Q... t The benchmark region is used as the benchmark region and the corresponding characterization similarity is analyzed. The benchmark region with the largest characterization similarity is named the effective benchmark region. Obtain the representation similarity when the effective reference area is used as the reference representation area, perform cluster analysis on the representation similarity to obtain different similarity clusters, count the number of representation similarities in the similarity clusters and name them as the number of representations in the cluster, name the gray-scale distribution representation area corresponding to the similarity cluster with the largest number of representations in the cluster and the effective reference area as the normal representation area, and name the remaining gray-scale distribution representation areas as the defect suspected area. Based on the analysis of the normal characterization area and the suspected defect area, the defect area in the strand region is analyzed, and the specific defect points in the defect area are segmented.

2. The method for segmenting image features of a metal wire rope according to claim 1, characterized in that, Acquiring a surface image of the metal wire rope, performing image preprocessing and grayscale conversion on the surface image to obtain the wire rope image includes the following sub-steps: When acquiring surface images of the metal wire rope, it is necessary to ensure that the surface of the metal wire rope is uniformly illuminated and that the metal wire rope is placed horizontally in the surface image. The acquired surface image is enhanced and then converted to grayscale to obtain the rope image.

3. The method for segmenting image features of a metal wire rope according to claim 2, characterized in that, Contour extraction is performed on the silk rope image to obtain the silk rope contour. Based on the silk rope contour, the gray values ​​in the silk rope image are analyzed to obtain the edge threshold between the two strands of silk rope. This includes the following sub-steps: Edge extraction of the wire rope image is performed using the OpenCV edge extraction algorithm to obtain the wire rope outline; Get the black pixels in the outline of the silk rope and name them as outline points. Get the grayscale values ​​of the outline points in the silk rope image and name them as outline grayscale. Taking any contour point as the center point, all contour points within the eight neighborhoods of the center point are considered to be adjacent to the center point, and consecutive adjacent contour points are integrated into a contour line group. Mark the row and column number of the contour point in the silk rope image as n and m respectively. Establish a two-dimensional coordinate system with n as the X-axis and m as the Y-axis, and name it the contour direction analysis diagram. Enter the contour points in the contour line group into the contour direction analysis diagram according to n and m. Name the coordinate points in the contour direction analysis diagram as contour direction points. Linear regression is performed on the contour direction points to obtain the absolute value of the slope of the regression function, which is named the contour direction parameter. The contour direction parameters of each contour line group are analyzed, and cluster analysis is performed on the contour direction parameters to obtain different direction clusters. Calculate the average value of the contour direction parameters in the direction cluster and name it the cluster direction mean. Obtain the direction cluster with the largest cluster direction mean and name it the inter-section contour class. Obtain the gray value of the contour points corresponding to the contour direction parameters in the inter-section contour class and name it the inter-section contour gray value. Mark the largest value in the inter-section contour gray value as the edge threshold.

4. The method for segmenting image features of a metal wire rope according to claim 3, characterized in that, Extracting the intersection points of the contour edges between two strands of silk rope from a silk rope image based on silk rope contour analysis includes the following sub-steps: Establish a two-dimensional coordinate system again with n as the X-axis and m as the Y-axis, named the edge calibration analysis diagram, and enter all contour points into the edge calibration analysis diagram according to their positions n and m in the silk rope image. Find the minimum and maximum values ​​of m for each value of n, and mark them as the lower boundary point and the upper boundary point respectively. Connect all the lower boundary points with a smooth curve to obtain the lower boundary curve, and connect all the upper boundary points with a smooth curve to obtain the upper boundary curve. Obtain the peaks of the lower boundary curve and the troughs of the upper boundary curve, and name them the intersection points of the lower and upper contour edges, respectively.

5. The method for segmenting image features of a metal wire rope according to claim 4, characterized in that, The initial contour line of the silk rope image is analyzed based on the edge threshold. The initial boundary line between the two silk ropes is analyzed based on the initial contour line and the intersection of the contour edges, including the following sub-steps: The regression function of the contour line group is entered into the edge calibration analysis diagram to obtain the contour direction line. The contour direction line is extended to obtain the intersection point of the lower contour edge and the intersection point of the upper contour edge that are closest to the contour direction line. These are named the lower boundary vertex and the upper boundary vertex, respectively. The initial boundary line is obtained by connecting the upper and lower boundary vertices with straight lines.

6. The method for segmenting image features of a metal wire rope according to claim 5, characterized in that, The initial boundary line is calibrated based on the wire contour to obtain the final boundary line. The wire image is then divided into different strand regions based on the final boundary line, including the following sub-steps: Obtain the contour line group that intersects with the initial boundary line, name it the calibration contour group, and name the contour points in the calibration contour group the calibration points. Connect adjacent calibration points with straight lines to obtain a calibration polyline. The intersection of the calibration polyline and the initial boundary line is then named the partition point. Name the calibration polyline between any two partition points as the calibration partition, and obtain the calibration point in the calibration partition that is farthest from the initial boundary line, and name it the valid calibration point. The calibration valid points, boundary points, upper boundary vertices and lower boundary vertices are analyzed by multinomial regression algorithm, and the resulting curve is the final boundary line. Analyze the final boundary line corresponding to each upper boundary vertex, number the final boundary lines in order from left to right, and use the symbol P. h This indicates that h is a positive integer and h is the index of P; P h With P h+1 The area between them is named the strand region, resulting in different strand regions.

7. The method for segmenting image features of a metal wire rope according to claim 6, characterized in that, Based on the analysis of the normal characterization area and the suspected defect area, the defect area in the strand region is analyzed, and the specific defect points in the defect area are segmented, including the following sub-steps: The feature analysis points in the effective reference area are numbered from left to right, using the symbol FA. g This indicates that, where g is a positive integer and g is the index of FA, FA is... g The corresponding value on the horizontal axis is labeled XA. g , will F g The corresponding value on the vertical axis is labeled YA g ; When analyzing any normal characterization area or suspected defect area, it is named the area to be analyzed. The feature analysis points in the area to be analyzed are numbered in order from left to right, and denoted by the symbol FB. e This indicates that, where e is a positive integer and e is the index of FB, FB is... e The corresponding value on the horizontal axis is labeled XB. e , will FB e The corresponding value on the vertical axis is labeled YB. e ; Search and FB e The nearest FA g Marked as D e At the same time, D e Corresponding XA g and YA g They are labeled KX e and KY e Calculate YB e With KY e The absolute value of the difference is used to denot the calculation result as YW. e Calculate XB e With KX e The absolute value of the difference is used to denot the calculation result as XW. e ; XW of the statistical normal characterization region e The maximum value and YW e The maximum values ​​are named color value fluctuation threshold and frequency fluctuation threshold, respectively. If all XW in the suspected defect area e All are less than or equal to the color value fluctuation threshold, and all YW e If all values ​​are less than or equal to the frequency fluctuation threshold, the suspected defect area will be calibrated as a normal characterization area; otherwise, the suspected defect area will be named the defect confirmation area. Obtain XW values ​​greater than the color value fluctuation threshold in the defect confirmation area. e The corresponding feature analysis point or YW is greater than the frequency fluctuation threshold. e The corresponding feature analysis points are uniformly named as outliers, and the grayscale values ​​of the outlier regions are obtained and named as outlier grayscale values. All pixels in the defect confirmation area with abnormal gray levels are segmented and highlighted.

8. A metal wire rope image feature segmentation system, used to implement the metal wire rope image feature segmentation method according to any one of claims 1-7, characterized in that, It includes an image acquisition module, an edge threshold analysis module, a contour intersection analysis module, an initial boundary analysis module, a strand region division module, and a defect region analysis module; the image acquisition module, the edge threshold analysis module, the contour intersection analysis module, the initial boundary analysis module, and the defect region analysis module are respectively connected to the strand region division module for data transmission. The image acquisition module is used to acquire surface images of the metal wire rope, perform image preprocessing and grayscale processing on the surface images to obtain wire rope images; The edge threshold analysis module is used to extract the contour of the silk rope image to obtain the silk rope contour, and analyze the gray value in the silk rope image based on the silk rope contour to obtain the edge threshold between the two strands of silk rope. The contour intersection analysis module is used to extract the contour edge intersection points between two strands of silk rope in the silk rope image based on silk rope contour analysis. The initial boundary analysis module is used to analyze the initial contour line of the rope image based on the edge threshold, and to analyze the initial boundary line between the two ropes based on the initial contour line and the intersection of the contour edges. The strand region segmentation module is used to calibrate the initial dividing line based on the silk rope contour to obtain the final dividing line, and to divide the silk rope image into different strand regions based on the final dividing line. The defect region analysis module is used to extract the regional features of the strand region, analyze the defect region based on the similarity between different regional features, and segment the specific defect points in the defect region.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Device and method for identifying surface defects of metal wire

    CN111855678A

  • Steel wire rope defect detection method

    CN115330783A

  • Hoisting wire rope tension measurement method based on visual vibration frequency identification

    WO2023231262A1