Method and System for Detecting Surface Defects of Steel Wire Ropes Based on Machine Vision

By employing edge detection and region segmentation techniques on steel wire ropes, the method addresses the unreliability of grayscale analysis, improving defect detection accuracy and reliability.

CN120070433BActive Publication Date: 2025-07-15SUZHOU NEW BEST WIRE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510538584.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-15
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

The existing wire rope surface defect detection technology has insufficient reliability through grayscale change analysis, resulting in frequent misjudgment problems.

Method used

By collecting the surface of the wire rope, the edge profile diagram is extracted using the OpenCV edge detection algorithm, the boundary lines are patched, and the linear features of the single-strand steel wire area are extracted. The normal range is detected based on the linear features of the defect-free wire rope.

Benefits of technology

It improves the accuracy and effectiveness of wire rope surface defect detection, reduces the impact of color differences on detection, and enhances the accuracy and rationality of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070433B_ABST
    Figure CN120070433B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting surface defects of wire ropes based on machine vision, which relates to the technical field of surface defect detection of wire ropes, and includes the following steps: collecting an image of the surface of the wire rope to obtain a wire rope image; extracting edges from the wire rope image to obtain an edge contour map of the wire rope image, and performing region segmentation on the wire rope based on the edge contour map to obtain a single-strand wire region therein; extracting the linear features of the single-strand wire region; analyzing the normal range of the linear features based on the linear features of different single-strand wire regions of the defect-free wire rope and detecting the surface defects of the wire rope; the present invention is used to solve the problem that the existing surface defect detection technology of wire ropes still has an unreliable analysis method, resulting in easy misjudgment during the detection of surface defects of wire ropes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of steel wire rope surface defect detection, and in particular to a steel wire rope surface defect detection method and system based on machine vision. Background Art

[0002] The steel wire rope surface defect detection technology refers to a technology for detecting surface defects and damages of steel wire ropes, aiming to ensure the safety, reliability and service life of steel wire ropes. Steel wire ropes are widely used in hoisting, transportation and other industrial fields, and surface defects may affect the structural integrity and performance of steel wire ropes.

[0003] Existing steel wire rope surface defect detection technologies usually detect whether there are defects on the surface of the steel wire rope by analyzing the gray-scale changes on the surface of the steel wire rope. Since the steel wire rope is composed of many steel wires twisted together, the color changes on its surface are irregular, and the surface color of the steel wire rope is not uniform. The color of the steel wires inside the steel wire rope will change to a certain extent during the deformation process, but there is no rule. Therefore, the reliability of detecting whether there are defects on the surface of the steel wire rope by analyzing the gray-scale changes is insufficient. For example, in the patent application with the publication number CN112270658A, a steel wire rope detection method for elevators based on machine vision is disclosed. This solution detects whether there are defects on the surface of the steel wire rope by analyzing the gray-scale values of the pixel points in the steel wire rope image. Since the color changes on the surface of the steel wire rope are irregular, the reliability of the analysis method based on gray-scale changes is insufficient. Existing steel wire rope surface defect detection technologies also have the problem that the analysis method is not reliable enough, resulting in easy misjudgment when detecting the surface defects of steel wire ropes. Summary of the Invention

[0004] The present invention aims to at least solve one of the technical problems in the prior art. By collecting images of the steel wire rope surface to obtain steel wire rope images, then using the OpenCV edge detection algorithm to extract the edges of the steel wire rope images to obtain an edge contour map, then repairing the boundary lines in the steel wire rope based on the edge contour map to obtain a repaired contour map, then performing region segmentation on the steel wire rope based on the repaired contour map to obtain the single-strand steel wire regions therein, extracting the linear features of the single-strand steel wire regions, selecting a steel wire rope without defects as a sample to analyze the normal range of the linear features, and finally detecting the surface defects of the steel wire rope based on the normal range of the linear features, so as to solve the problem that the existing steel wire rope surface defect detection technology has an unreliable analysis method, resulting in easy misjudgment when detecting the surface defects of steel wire ropes.

[0005] To achieve the above object, in a first aspect, the present application provides a steel wire rope surface defect detection method based on machine vision, including the following steps:

[0006] Collect images of the surface of the wire rope to obtain wire rope images;

[0007] Extract the edges of the wire rope images to obtain the edge contour maps of the wire rope images. Based on the edge contour maps, segment the wire rope to obtain the single-strand wire regions therein;

[0008] Extract the linear features of the single-strand wire regions;

[0009] Analyze the normal range of the linear features based on the linear features of different single-strand wire regions of the defect-free wire rope and detect the surface defects of the wire rope.

[0010] Furthermore, collecting images of the surface of the wire rope to obtain wire rope images includes the following sub-steps:

[0011] Use a pure white background board as the shooting background and place the wire rope in front of the pure white background board for shooting;

[0012] Shoot the wire rope inside the pure white background board through a high-definition camera. At the same time, rotate the wire rope and shoot the same section of the wire rope for the first number of times. Each time it rotates 360° / N1, where N1 is the first number, to obtain wire rope images.

[0013] Furthermore, extracting the edges of the wire rope images to obtain the edge contour maps of the wire rope images. Based on the edge contour maps, segment the wire rope to obtain the single-strand wire regions therein includes the following sub-steps:

[0014] Extract the edges of the wire rope images through the OpenCV edge detection algorithm to obtain the edge contour maps;

[0015] Repair the boundary lines in the wire rope based on the edge contour maps to obtain the repaired contour maps;

[0016] Segment the wire rope based on the repaired contour maps to obtain the single-strand wire regions therein.

[0017] Furthermore, repairing the boundary lines in the wire rope based on the edge contour maps to obtain the repaired contour maps includes the following sub-steps:

[0018] Perform a rectangular selection on the edge contour maps to obtain the selected contour. The selected contour is rectangular, which includes the long sides and the short sides. Connect the midpoints of the two short sides, and mark the connected straight line as the contour central axis;

[0019] The pixel points in the selected outline are numbered in the order from the lower left to the upper right, named pixel numbers, and represented by the symbol P(n,m), where both n and m are non-zero natural numbers and (n,m) is the serial number of P. P(n,m) represents the pixel point that is the nth pixel point in the horizontal direction and the mth pixel point in the vertical direction within the selected outline;

[0020] The width of the central axis of the outline is the width of one pixel point. The pure black pixel points in the selected outline are marked as outline points, and the outline points on the central axis of the outline are obtained and marked as direction pending points;

[0021] For any direction pending point, the outline points within the eight-neighborhood of the direction pending point are obtained and marked as direction extension points, and then the direction extension points are taken as direction pending points again to extract direction extension points until the first quantity of direction extension points is extracted;

[0022] Obtain the pixel numbers of the direction extension points, extract the m among them, mark it as the vertical position, obtain the maximum and minimum values of the vertical position, and mark them as the vertical highest position and the vertical lowest position respectively. Calculate the absolute value of the difference between the vertical lowest position and the vertical highest position, and mark it as the vertical span;

[0023] Compare the vertical span with the first span threshold. If the vertical span is greater than or equal to the first span threshold, output a boundary signal; otherwise, output a non-boundary signal;

[0024] If a boundary signal is output, the line formed by the direction extension points is marked as a boundary line, and the direction extension points on the boundary line are marked as boundary points;

[0025] Establish a plane rectangular coordinate system with n as the X-axis and m as the Y-axis, named the boundary trend map. For any boundary line, input the n and m of the pixel numbers of the boundary points among them into the boundary trend map;

[0026] Conduct a linear regression analysis on the boundary trend map to obtain a boundary regression line. Place the boundary regression line into the selected outline according to its relative position with the boundary points, and mark all the pixel points passed by the boundary regression line as boundary points. After analyzing each boundary line, a repaired outline map is obtained.

[0027] Furthermore, based on the repaired outline map, the steel wire rope is regionally segmented, and the steps to obtain the single-strand steel wire region are as follows:

[0028] Regionally divide the selected outline with the boundary regression line as the boundary, and mark the region between two boundary regression lines as the single-strand steel wire region;

[0029] The single-strand steel wire region does not include the boundary points passed by the boundary regression line;

[0030] Obtain the number of contour points within the single-strand wire region, mark it as the effective pixel number, compare the effective pixel number with the second number. If the effective pixel number is less than the second number, output a signal indicating insufficient effective pixels; otherwise, output a signal indicating sufficient effective pixels.

[0031] Determine whether both of the two boundary regression lines of the single-strand wire region have intersections with the two long sides of the framed contour. If so, output a signal indicating a complete region; otherwise, output a signal indicating an incomplete region.

[0032] If a signal indicating insufficient effective pixels or an incomplete region is output, remove the single-strand wire region, and only retain the single-strand wire regions that simultaneously output a signal indicating sufficient effective pixels and a signal indicating a complete region.

[0033] Furthermore, extracting the linear features of the single-strand wire region includes the following sub-steps:

[0034] For any single-strand wire region, rename the contour points therein as region points.

[0035] For any region point, mark it as a target point, search for the region points adjacent to the target point, mark them as neighborhood points, and then take the neighborhood points as target points to search for neighborhood points in turn until there are no neighborhood points. At this time, the target points and neighborhood points obtained form a continuous line composed of pixel points, which is marked as a feature line. Then, analyze with any region point as the target point, and the region points that have been included in the feature line do not participate in the analysis. Repeat the execution until all region points within the single-strand wire region are included in different feature lines.

[0036] For any feature line, uniformly name the target points and neighborhood points therein as line points, obtain the pixel numbers of the line points, obtain the difference between the minimum and maximum values of n among them and add 1, which is marked as the horizontal span, and obtain the difference between the minimum and maximum values of m among them and add 1, which is marked as the vertical span.

[0037] Number the feature lines in the order from top to bottom, represented by the symbol S i where i is a non-zero natural number and i is the serial number of S.

[0038] Taking i as the horizontal axis, and the horizontal span and vertical span as the vertical axes respectively, establish a plane rectangular coordinate system, named the horizontal feature map and the vertical feature map. Enter the horizontal span of S i into the horizontal feature map, and enter the vertical span into the vertical feature map. Mark the coordinate points in the horizontal feature map as horizontal feature points, and mark the coordinate points in the vertical feature map as vertical feature points.

[0039] Connect adjacent horizontal feature points with a smooth curve to obtain a horizontal linear feature, and connect adjacent vertical feature points with a smooth curve to obtain a vertical linear feature. The horizontal linear feature and the vertical linear feature are collectively referred to as the linear feature.

[0040] Further, analyzing the normal range of the linear feature based on the linear features of different single-strand wire areas of a defect-free wire rope and detecting the surface defects of the wire rope include the following sub-steps:

[0041] Select a defect-free wire rope as a sample to analyze the normal range of the linear feature;

[0042] Detect the surface defects of the wire rope based on the normal range of the linear feature.

[0043] Further, selecting a defect-free wire rope as a sample to analyze the normal range of the linear feature includes the following sub-steps:

[0044] Select a defect-free wire rope as a sample, mark it as the sample wire, and mark the linear feature extracted from the sample wire as the sample feature;

[0045] Summarize the sample features analyzed from the wire rope images taken at different angles in the same area as the same-area features, and place the sample features within the same-area features in the same horizontal feature map and vertical feature map, and mark them as the horizontal analysis map and the vertical analysis map respectively;

[0046] Mark the horizontal linear feature in the horizontal analysis map as the horizontal analysis line, and mark the vertical linear feature in the vertical analysis map as the vertical analysis line;

[0047] For any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the horizontal analysis line, and mark it as the horizontal difference feature; for any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the vertical analysis line, and mark it as the vertical difference feature;

[0048] For different same-area features, find the maximum values of the horizontal difference feature and the vertical difference feature, and mark them as the horizontal maximum difference and the vertical maximum difference respectively. The normal range includes a horizontal range and a vertical range. The horizontal range is [0, horizontal maximum difference], and the vertical range is [0, vertical maximum difference].

[0049] Further, detecting the surface defects of the wire rope based on the normal range of the linear feature includes the following sub-steps:

[0050] Mark the wire rope to be subjected to surface defect detection as the wire to be inspected;

[0051] Extract the lateral difference feature and the longitudinal difference feature of the same - area feature of the wire to be inspected, and mark them as the lateral feature to be inspected and the longitudinal feature to be inspected respectively;

[0052] If the lateral feature to be inspected is within the lateral range, output a lateral normal signal; otherwise, output a lateral defect signal. If the longitudinal feature to be inspected is within the longitudinal range, output a longitudinal normal signal; otherwise, output a longitudinal defect signal;

[0053] If both the lateral normal signal and the longitudinal normal signal are output simultaneously, mark that there is no defect on the surface corresponding to the same - area feature of the wire to be inspected; otherwise, mark that there is a defect on the surface corresponding to the same - area feature of the wire to be inspected.

[0054] In a second aspect, the present application provides a wire rope surface defect detection system based on machine vision, including an image acquisition module, a region division module, a feature extraction module, and a defect detection module; the image acquisition module, the region division module, and the defect detection module are respectively connected to the feature extraction module for data connection;

[0055] The image acquisition module is used to collect an image of the wire rope surface to obtain a wire rope image;

[0056] The region division module is used to extract the edges of the wire rope image to obtain an edge contour map of the wire rope image, and based on the edge contour map, perform region segmentation on the wire rope to obtain the single - strand wire regions therein;

[0057] The feature extraction module is used to extract the linear features of the single - strand wire regions;

[0058] The defect detection module is used to analyze the normal range of the linear features based on the linear features of different single - strand wire regions of a defect - free wire rope and detect the surface defects of the wire rope.

[0059] The beneficial effects of the present invention: The present invention collects an image of the wire rope surface to obtain a wire rope image, then uses the OpenCV edge detection algorithm to extract the edges of the wire rope image to obtain an edge contour map, then repairs the boundary lines in the wire rope based on the edge contour map to obtain a repaired contour map, and then performs region segmentation on the wire rope based on the repaired contour map to obtain the single - strand wire regions therein. The advantage is that there are several wires in the same wire rope. When analyzing the whole, the amount of data is large. If there are small defects, the impact on the overall features is small and it is not easy to perform precise detection, especially for thicker wire ropes. And thicker wire ropes are composed of multiple thinner wire ropes. By dividing the regions of the thinner wire ropes and disassembling the wire rope, it can effectively improve the impact of surface defects on the linear features, and improve the accuracy and effectiveness of the analysis of wire rope surface defects;

[0060] The present invention detects surface defects of steel wire ropes by extracting the linear features of a single-strand steel wire area, selecting defect-free steel wire ropes as samples to analyze the normal range of linear features, and finally detecting surface defects of steel wire ropes based on the normal range of linear features. The advantages are as follows: the linear features reflect the features of each steel wire in the single-strand steel wire area. If there are surface defects such as fractures and cracks, there will definitely be significant differences in their linear features. Moreover, by analyzing steel wire rope images at different angles of the same cross-section of the same steel wire rope, the influence of color differences on the surface of the steel wire rope on defect detection can be reduced, because the steel wires in the same cross-section of the same steel wire rope have the same manufacturing process and the same stress when twisted into a steel wire rope, and the color differences on their surfaces are minimized, improving the accuracy and rationality of surface defect detection of steel wire ropes. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 is the principle block diagram of the system of the present invention;

[0062] Figure 2 is the steel wire rope image of the system of the present invention;

[0063] Figure 3 is the edge contour diagram of the system of the present invention;

[0064] Figure 4 is the boxed contour and the central axis of the contour of the system of the present invention;

[0065] Figure 5 is the direction pending point of the system of the present invention;

[0066] Figure 6 is the direction extension point of the system of the present invention;

[0067] Figure 7 is the boundary trend diagram of the system of the present invention;

[0068] Figure 8 is the repair contour diagram of the system of the present invention;

[0069] Figure 9 is the schematic diagram of the remaining single-strand steel wire area of the system of the present invention;

[0070] Figure 10 is a characteristic line in the single-strand steel wire area of the system of the present invention;

[0071] Figure 11 is the horizontal characteristic diagram of the system of the present invention;

[0072] Figure 12 is the horizontal analysis diagram of the system of the present invention;

[0073] Figure 13 is the step flow chart of the method of the present invention. Detailed implementation mode

[0074] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0075] Example 1, please refer to Figure 1 As shown, the present application provides a wire rope surface defect detection system based on machine vision, including an image acquisition module, a region division module, a feature extraction module, and a defect detection module; the image acquisition module, the region division module, and the defect detection module are respectively connected to the feature extraction module for data connection;

[0076] The image acquisition module is used to acquire an image of the wire rope surface to obtain a wire rope image;

[0077] The image acquisition module is configured with an image acquisition strategy, and the image acquisition strategy includes:

[0078] Using a pure white background board as the shooting background, placing the wire rope in front of the pure white background board for shooting;

[0079] Please refer to Figure 2 As shown, the wire rope inside the pure white background board is photographed by a high-definition camera. At the same time, by rotating the wire rope, the wire rope is photographed for the first number of times, and each time it rotates 360° / N1, where N1 is the first number, to obtain a wire rope image;

[0080] In practical applications, the first number N1 is set to 3, that is, each time it rotates 120°, the same cross-section of the wire rope is photographed comprehensively to obtain 3 wire rope images. Then move the wire rope to photograph the next area to obtain images of all surfaces of the wire rope. The wire rope images in this embodiment are as Figure 2 shown.

[0081] The region division module is used to extract the edges of the wire rope image to obtain an edge contour map of the wire rope image, and based on the edge contour map, the wire rope is regionally segmented to obtain the single-strand wire region; the region division module includes an edge detection unit, a contour repair unit, and a region division unit;

[0082] Please refer to Figure 3 As shown, the edge detection unit is used to extract the edges of the wire rope image through the OpenCV edge detection algorithm to obtain an edge contour map;

[0083] In practical applications, the contour of the wire rope image is extracted through the existing OpenCV edge detection algorithm, and the edge contour map is obtained as shown in Figure 3 shown;

[0084] The contour repair unit is used to repair the boundary lines in the wire rope based on the edge contour map to obtain a repaired contour map;

[0085] The contour repair unit is configured with a contour repair strategy, and the contour repair strategy includes:

[0086] Please refer to Figure 4 shown in the figure. The edge contour map is rectangularly framed to obtain a framed contour. The framed contour is rectangular, including a long side and a wide side. The midpoints of the two wide sides are connected, and the connected straight line is marked as the contour central axis;

[0087] In practical applications, the existing rectangular framing technology is used to frame the rectangular area where the wire rope is located, and the framed contour is obtained as shown in Figure 4 shown, Figure 4 The contour central axis is also shown. For easy observation, Figure 4 the fade-in degree is adjusted to highlight the contour central axis; since the wire rope as a whole can be roughly regarded as a cylinder and its surface is uneven, the boundaries of each thin wire rope are not easy to define on the upper and lower sides and cannot be shown in the edge contour map. Therefore, it needs to be repaired. The boundary at the contour central axis is the clearest and must exist. Therefore, the pixel points on the contour central axis are used as the starting point for analysis to find the pixel points belonging to the boundary line;

[0088] The pixel points in the framed contour are numbered in the order from the lower left to the upper right, named pixel numbers, and represented by the symbol P(n,m). Among them, both n and m are non-zero natural numbers and (n,m) is the serial number of P. P(n,m) represents the pixel point in the framed contour that is the nth pixel point in the horizontal direction and the mth pixel point in the vertical direction;

[0089] Please refer to Figure 5 shown in the figure. The width of the contour central axis is the width of one pixel point. The pure black pixel points in the framed contour are marked as contour points, and the contour points on the contour central axis are obtained and marked as direction pending points;

[0090] Please refer to Figure 6 shown in the figure. For any direction pending point, the contour points in the eight-neighborhood of the direction pending point are obtained and marked as direction extension points, and then the direction extension points are used as direction pending points to extract direction extension points again until the first quantity of direction extension points is extracted;

[0091] In practical applications, in this embodiment, Figure 5Taking the undetermined point of direction in [[]] as an example, the process of repairing the boundary line is illustrated, and the analysis process of the remaining undetermined points of direction will not be specifically explained in this embodiment; the eight-neighborhood refers to the contour points adjacent to the undetermined point of direction in the upper left, directly above, upper right, directly left, directly right, lower left, directly below, and lower right directions of the undetermined point of direction, and the contour point is the Figure 5 pure black pixel point in [[]], taking Figure 5 the gray undetermined point of direction in [[]] as an example, where there are contour points in both the upper left and lower right in the eight-neighborhood, and they are marked as direction extension points. Then, taking the direction extension point as the undetermined point of direction, taking the direction extension point in the upper left as an example, taking it as the undetermined point of direction, and searching for the eight-neighborhood again. Among them, there are contour points in both the directly left and directly right directions, and the undetermined point of direction and the direction extension point do not participate in the analysis. Therefore, only the direction extension point in the directly left direction is retained, and so on, continuously expanding the direction extension points; in this embodiment, the first quantity is set to 20, and the significance of setting the first quantity is to find a certain number of contour points and judge whether the contour points belong to the boundary according to their distribution characteristics. From Figure 2 it can be seen that the boundary of each thin steel wire rope is oblique, so the span in its longitudinal direction is relatively large, and the boundary points can be accurately found by this judgment; for Figure 5 the undetermined point of direction, the direction extension points obtained by analysis are as Figure 6 shown, Figure 6 the gray contour points in [[]] are the direction extension points;

[0092] Obtain the pixel numbers of the direction extension points, extract the m among them, mark it as the vertical point position, obtain the maximum value and the minimum value of the vertical point position, and mark them as the vertical highest point position and the vertical lowest point position respectively. Calculate the absolute value of the difference between the vertical lowest point position and the vertical highest point position, and mark it as the vertical span;

[0093] Compare the vertical span with the first span threshold. If the vertical span is greater than or equal to the first span threshold, output a boundary signal; otherwise, output a non-boundary signal;

[0094] If a boundary signal is output, mark the line composed of the direction extension points as the boundary line, and mark the direction extension points on the boundary line as boundary points;

[0095] Please refer to Figure 7 shown. Establish a plane rectangular coordinate system with n as the X-axis and m as the Y-axis, named the boundary trend map. For any boundary line, enter the n and m of the pixel numbers of the boundary points therein into the boundary trend map;

[0096] Please refer to Figure 8As shown, a linear regression analysis is performed on the boundary trend map to obtain a boundary regression line, which is placed in the frame selection contour according to its relative position to the boundary point, and all the pixel points passed by the boundary regression line are marked as boundary points. After analyzing each boundary line, a repair contour map is obtained;

[0097] In actual applications, the first span threshold is set to 4, the highest vertical point is 57, the lowest vertical point is 51, and the vertical span is calculated to be 6. By comparison, the vertical span is greater than the first span threshold, and the boundary signal is output, that is, Figure 6 The points in the direction of the digit are extended to form a boundary line, and the boundary trend diagram is constructed as follows: Figure 7 As shown, Figure 7 The boundary regression lines are also shown in the figure. Then all boundary regression lines are placed in the box selection outline as shown in Figure 8 As shown, when placing the frame selection outline, extend the boundary regression line until both ends intersect with the long side or wide side;

[0098] The area division unit is used to segment the steel wire rope based on the repair contour map to obtain the single-strand steel wire area therein;

[0099] The area division unit is configured with an area division strategy, which includes:

[0100] The selected outline is divided into regions using the boundary regression line as the boundary, and the region between the two boundary regression lines is marked as a single-strand steel wire region;

[0101] The single-strand steel wire area does not include the boundary points through which the boundary regression line passes;

[0102] Obtain the number of contour points in the single-strand steel wire area, mark it as the effective number of pixels, compare the effective number of pixels with the second number, and if the effective number of pixels is less than the second number, output an effective pixel deficiency signal, otherwise output an effective pixel sufficient signal;

[0103] Determine whether the two boundary regression lines of the single-strand steel wire area have intersections with the two long sides of the frame selection contour. If so, output a complete area signal, otherwise output an incomplete area signal;

[0104] See also Figure 9 As shown, if the output is insufficient effective pixel signal or incomplete area signal, the single-strand steel wire area is removed, and only the single-strand steel wire area that outputs sufficient effective pixel signal and complete area signal is retained;

[0105] In practical applications, the second quantity is set to 100. Generally, the number of contour points in the thin steel wire rope is much larger than the second quantity, while the number of contour points in the interval between two thin steel wire ropes is much less than 100. And only when the two boundary regression lines in the single-strand steel wire area intersect with the two long sides of the framed contour but do not intersect with the wide sides, can its complete linear feature be extracted. After elimination, the remaining single-strand steel wire area is as Figure 9 shown, Figure 9 The shaded part in

[0106] is the remaining single-strand steel wire area; in this embodiment, for the convenience of showing the analysis process through images, only a part of the steel wire rope image is selected for display. Therefore, only one single-strand steel wire area can be extracted. In actual use, the long side of the framed contour map is relatively long, and more single-strand steel wire areas can be extracted.

[0107] The feature extraction module is used to extract the linear features of the single-strand steel wire area;

[0108] For any single-strand steel wire area, rename the contour points therein as area points;

[0109] Please refer to Figure 10 shown. For any area point, mark it as the target point, find the area points adjacent to the target point, mark them as neighborhood points, and then take the neighborhood points as the target points to find neighborhood points in turn until there are no neighborhood points. At this time, the target points and neighborhood points obtained form a continuous line composed of pixel points, which is marked as the feature line. Then, analyze with any area point as the target point. The area points that have been included in the feature line do not participate in the analysis. Repeat the execution until all area points in the single-strand steel wire area are included in different feature lines;

[0110] For any feature line, uniformly name the target points and neighborhood points therein as line points, obtain the pixel numbers of the line points, obtain the difference between the minimum value and the maximum value of n therein and add 1, mark it as the horizontal span, and obtain the difference between the minimum value and the maximum value of m therein and add 1, mark it as the vertical span;

[0111] In practical applications, finding neighborhood points is to combine adjacent area points into a feature line. In this embodiment, no specific elaboration is made. A feature line in the single-strand steel wire area in this embodiment is as Figure 10 shown, and the line composed of the gray pixel points therein is the feature line. It can be easily known from Figure 10 that the horizontal span is 68 and the vertical span is 4. In actual use, the feature lines with both the horizontal span and the vertical span less than or equal to 20 need to be eliminated. This step is to eliminate the shorter feature lines. The shorter feature lines usually do not have reference value, so they need to be eliminated;

[0112] Number the feature lines in the order from top to bottom, denoted by the symbol S i where i is a non-zero natural number and i is the serial number of S;

[0113] Please refer to Figure 11 as shown. Establish a plane rectangular coordinate system with i as the horizontal axis and the horizontal span and the vertical span as the vertical axes respectively, named the horizontal feature map and the vertical feature map. Enter the horizontal span of S i into the horizontal feature map and the vertical span into the vertical feature map. Mark the coordinate points in the horizontal feature map as horizontal feature points and the coordinate points in the vertical feature map as vertical feature points;

[0114] Connect adjacent horizontal feature points with a smooth curve to obtain a horizontal linear feature, and connect adjacent vertical feature points with a smooth curve to obtain a vertical linear feature. The horizontal linear feature and the vertical linear feature are collectively called linear features;

[0115] In practical applications, since the analysis processes of the horizontal feature map and the vertical feature map are the same and only represent features in different directions, this embodiment only takes the horizontal feature map as an example for illustration. The constructed horizontal feature map is as Figure 11 shown. Since the coordinate points are too dense to be specifically displayed, therefore Figure 11 only the horizontal linear feature is shown in

[0116] The defect detection module is used to analyze the normal range of the linear features based on the linear features of different single-strand wire areas of the defect-free wire rope and detect the surface defects of the wire rope; the defect detection module includes a normal range analysis unit and a surface defect detection unit;

[0117] The normal range analysis unit is used to select defect-free wire ropes as samples to analyze the normal range of the linear features;

[0118] The normal range analysis unit is configured with a normal range analysis strategy, and the normal range analysis strategy includes:

[0119] Select defect-free wire ropes as samples, mark them as sample wires, and mark the linear features extracted from the sample wires as sample features;

[0120] Please refer to Figure 12 as shown. Summarize the sample features analyzed from the wire rope images taken at different angles in the same area as the same-area features, place the sample features within the same-area features in the same horizontal feature map and vertical feature map, and mark them as the horizontal analysis map and the vertical analysis map respectively;

[0121] Mark the horizontal linear features in the horizontal analysis diagram as horizontal analysis lines, and mark the vertical linear features in the vertical analysis diagram as vertical analysis lines;

[0122] For any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the horizontal analysis line, and mark it as the horizontal difference feature; for any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the vertical analysis line, and mark it as the vertical difference feature;

[0123] For different same-region features, find the maximum values of the horizontal difference feature and the vertical difference feature, and mark them as the horizontal maximum difference and the vertical maximum difference respectively. The normal range includes the horizontal range and the vertical range. The horizontal range is [0, horizontal maximum difference], and the vertical range is [0, vertical maximum difference];

[0124] In practical applications, there are wire rope images at three angles for the same section of wire rope. Integrate their sample features into the same-region features. Taking the horizontal analysis diagram as an example, the integrated horizontal analysis diagram is as Figure 12 shown. The obtained horizontal difference feature is 19. Then, based on the analysis of all the same-region features of all the sample wires, find the maximum value of the horizontal difference feature among them, and the obtained horizontal maximum difference is 21, and the obtained horizontal range is [0, 21]. Similarly, the vertical maximum difference is [0, 2];

[0125] The surface defect detection unit is used to detect the surface defects of the wire rope based on the normal range of the linear features;

[0126] The surface defect detection unit is configured with a surface defect detection strategy, and the surface defect detection strategy includes:

[0127] Mark the wire rope that needs to be detected for surface defects as the wire to be detected;

[0128] Extract the horizontal difference feature and the vertical difference feature of the same-region features of the wire to be detected, and mark them as the horizontal to-be-detected feature and the vertical to-be-detected feature respectively;

[0129] If the horizontal to-be-detected feature is within the horizontal range, output a horizontal normal signal, otherwise output a horizontal defect signal; if the vertical to-be-detected feature is within the vertical range, output a vertical normal signal, otherwise output a vertical defect signal;

[0130] If both the horizontal normal signal and the vertical normal signal are output at the same time, mark that there are no defects on the surface of the wire to be detected corresponding to the same-region features, otherwise mark that there are defects on the surface of the wire to be detected corresponding to the same-region features;

[0131] In practical applications, the detection process of the surface defects of the wire rope in the surface defect detection unit is clear enough, and no further explanation is given in this embodiment.

[0132] Example 2. Refer to Figure 13 As shown, the present application provides a method for detecting surface defects of wire ropes based on machine vision, including the following steps:

[0133] Step S1: Collect images of the surface of the wire rope to obtain wire rope images. Step S1 includes the following sub-steps:

[0134] Step S101: Use a pure white background board as the shooting background, and place the wire rope in front of the pure white background board for shooting.

[0135] Step S102: Shoot the wire rope inside the pure white background board through a high-definition camera. At the same time, rotate the wire rope and shoot the same section of the wire rope for the first number of times, rotating 360° / N1 each time, where N1 is the first number, to obtain the wire rope image.

[0136] Step S2: Extract the edges of the wire rope image to obtain the edge contour map of the wire rope image. Based on the edge contour map, perform region segmentation on the wire rope to obtain the single-strand wire region. Step S2 includes the following sub-steps:

[0137] Step S201: Use the OpenCV edge detection algorithm to extract the edges of the wire rope image to obtain the edge contour map.

[0138] Step S202: Repair the boundary lines in the wire rope based on the edge contour map to obtain the repaired contour map.

[0139] Step S202 includes the following sub-steps:

[0140] Step S2021: Select a rectangular frame for the edge contour map to obtain the framed contour. The framed contour is rectangular, including the long side and the wide side. Connect the midpoints of the two wide sides, and mark the connected straight line as the contour central axis.

[0141] Step S2022: Number the pixel points in the framed contour in the order from the lower left to the upper right, named pixel number, represented by the symbol P(n,m), where both n and m are non-zero natural numbers and (n,m) is the serial number of P. P(n,m) represents the pixel point that is the nth pixel point in the horizontal direction and the mth pixel point in the vertical direction within the framed contour.

[0142] Step S2023: The width of the contour central axis is the width of one pixel point. Mark the pure black pixel points in the framed contour as contour points, and obtain the contour points on the contour central axis, marked as direction pending points.

[0143] In step S2024, for any direction of the point to be determined, obtain the contour points within the eight-neighborhood of the point to be determined in the direction, mark them as direction extension points, and then use the direction extension points as the points to be determined in the direction to extract direction extension points again until the first quantity of direction extension points is extracted;

[0144] In step S2025, obtain the pixel numbers of the direction extension points, extract m among them, mark it as the vertical point position, obtain the maximum value and the minimum value of the vertical point position, and mark them as the vertical highest point position and the vertical lowest point position respectively. Calculate the absolute value of the difference between the vertical lowest point position and the vertical highest point position, and mark it as the vertical span;

[0145] In step S2026, compare the vertical span with the first span threshold. If the vertical span is greater than or equal to the first span threshold, output a boundary signal; otherwise, output a non-boundary signal;

[0146] In step S2027, if a boundary signal is output, mark the line formed by the direction extension points as a boundary line, and mark the direction extension points on the boundary line as boundary points;

[0147] In step S2028, establish a plane rectangular coordinate system with n as the X-axis and m as the Y-axis, name it the boundary trend map, and for any boundary line, record the n and m of the pixel numbers of the boundary points among them into the boundary trend map;

[0148] In step S2029, perform a linear regression analysis on the boundary trend map to obtain a boundary regression line. Place the boundary regression line into the selected contour according to its relative position with the boundary points, mark all the pixel points passed by the boundary regression line as boundary points. After analyzing each boundary line, obtain a repaired contour map;

[0149] In step S203, perform regional segmentation on the steel wire rope based on the repaired contour map to obtain the single-strand steel wire region;

[0150] Step S203 includes the following sub-steps:

[0151] In step S2031, perform regional division on the selected contour with the boundary regression line as the boundary, and mark the region between two boundary regression lines as the single-strand steel wire region;

[0152] In step S2032, the single-strand steel wire region does not include the boundary points passed by the boundary regression line;

[0153] In step S2033, obtain the number of contour points within the single-strand steel wire region, mark it as the pixel valid quantity, compare the pixel valid quantity with the second quantity. If the pixel valid quantity is less than the second quantity, output a signal of insufficient valid pixels; otherwise, output a signal of sufficient valid pixels;

[0154] Step S2034: Determine whether both of the two boundary regression lines of the single-strand steel wire region intersect with the two long sides of the framed contour. If so, output a region complete signal; otherwise, output a region incomplete signal.

[0155] Step S2035: If an insufficient effective pixel signal or a region incomplete signal is output, eliminate the single-strand steel wire region and only retain the single-strand steel wire regions that simultaneously output a sufficient effective pixel signal and a region complete signal.

[0156] Step S3: Extract the linear features of the single-strand steel wire region. Step S3 includes the following sub-steps:

[0157] Step S301: For any single-strand steel wire region, rename the contour points therein as region points.

[0158] Step S302: For any region point, mark it as a target point, search for the adjacent region points, mark them as neighborhood points, and then sequentially search for neighborhood points with the neighborhood points as the target points until there are no neighborhood points. At this time, the obtained target points and neighborhood points form a continuous line composed of pixel points, which is marked as a feature line. Then, analyze with any region point as the target point. The region points that have been included in the feature line do not participate in the analysis. Repeat the execution until all region points within the single-strand steel wire region are included in different feature lines.

[0159] Step S303: For any feature line, uniformly name the target points and neighborhood points therein as line points, obtain the pixel numbers of the line points, obtain the difference between the minimum and maximum values of n among them and add 1, which is marked as the horizontal span, obtain the difference between the minimum and maximum values of m among them and add 1, which is marked as the vertical span.

[0160] Step S304: Number the feature lines in the order from top to bottom, represented by the symbol S i where i is a non-zero natural number and i is the serial number of S.

[0161] Step S305: Establish a plane rectangular coordinate system with i as the horizontal axis and the horizontal span and vertical span as the vertical axes respectively, named the horizontal feature map and the vertical feature map. Enter the horizontal span of S i into the horizontal feature map and the vertical span into the vertical feature map. Mark the coordinate points in the horizontal feature map as horizontal feature points and the coordinate points in the vertical feature map as vertical feature points.

[0162] Step S306: Connect adjacent horizontal feature points with a smooth curve to obtain the horizontal linear feature, and connect adjacent vertical feature points with a smooth curve to obtain the vertical linear feature. The horizontal linear feature and the vertical linear feature are collectively referred to as the linear feature.

[0163] Step S4: Analyze the normal range of the linear features based on the linear features of different single-strand wire areas of the defect-free wire rope and detect the surface defects of the wire rope. Step S4 includes the following sub-steps:

[0164] Step S401: Select a defect-free wire rope as a sample to analyze the normal range of the linear features;

[0165] Step S401 includes the following sub-steps:

[0166] Step S4011: Select a defect-free wire rope as a sample, mark it as the sample wire, and mark the linear features extracted from the sample wire as the sample features;

[0167] Step S4012: Summarize the sample features analyzed from the wire rope images taken at different angles in the same area as the same-area features, place the sample features within the same-area features in the same horizontal feature map and vertical feature map, and mark them as the horizontal analysis map and vertical analysis map respectively;

[0168] Step S4013: Mark the horizontal linear features in the horizontal analysis map as the horizontal analysis lines, and mark the vertical linear features in the vertical analysis map as the vertical analysis lines;

[0169] Step S4014: For any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the horizontal analysis line, and mark it as the horizontal difference feature; for any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the vertical analysis line, and mark it as the vertical difference feature;

[0170] Step S4015: For different same-area features, find the maximum values of the horizontal difference feature and the vertical difference feature, and mark them as the horizontal maximum difference and the vertical maximum difference respectively. The normal range includes the horizontal range and the vertical range. The horizontal range is [0, horizontal maximum difference], and the vertical range is [0, vertical maximum difference];

[0171] Step S402: Detect the surface defects of the wire rope based on the normal range of the linear features;

[0172] Step S402 includes the following sub-steps:

[0173] Step S4021: Mark the wire rope that needs to be detected for surface defects as the wire to be inspected;

[0174] Step S4022: Extract the horizontal difference feature and the vertical difference feature of the same-area features of the wire to be inspected, and mark them as the horizontal feature to be inspected and the vertical feature to be inspected respectively;

[0175] Step S4023: If the horizontal feature to be inspected is within the horizontal range, output a horizontal normal signal; otherwise, output a horizontal defect signal. If the vertical feature to be inspected is within the vertical range, output a vertical normal signal; otherwise, output a vertical defect signal.

[0176] Step S4024: If both a horizontal normal signal and a vertical normal signal are output simultaneously, mark that there are no defects on the surface corresponding to the same-region features of the wire rope to be inspected; otherwise, mark that there are defects on the surface corresponding to the same-region features of the wire rope to be inspected.

[0177] Embodiment 3: The present application provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the wire rope surface defect detection method based on machine vision are run to implement the following functions: perform image acquisition on the surface of the wire rope to obtain a wire rope image; perform edge extraction on the wire rope image to obtain an edge contour map of the wire rope image, and based on the edge contour map, perform region segmentation on the wire rope to obtain the single-strand wire regions therein; extract the linear features of the single-strand wire regions; analyze the normal range of the linear features based on the linear features of different single-strand wire regions of the defect-free wire rope and detect the surface defects of the wire rope.

[0178] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0179] Example 4. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-described wire rope surface defect detection method based on machine vision are run to achieve the following functions: perform image acquisition on the surface of the wire rope to obtain a wire rope image; perform edge extraction on the wire rope image to obtain an edge contour map of the wire rope image, perform region segmentation on the wire rope based on the edge contour map to obtain a single-strand wire region therein; extract the linear features of the single-strand wire region; analyze the normal range of the linear features based on the linear features of different single-strand wire regions of a defect-free wire rope and detect the surface defects of the wire rope.

[0180] Through the description of the above embodiments, the embodiments of the present invention can be provided as a method, a system or a computer program product. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0181] In the embodiments provided by the present application, it should be understood that the disclosed system or method can be implemented in other ways. The above-described embodiments are merely illustrative. For example, the division of modules or units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some communication interfaces. The indirect coupling or communication connection of systems, modules and units can be in an electrical, mechanical or other form.

[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements 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 the present application.

Claims

1. A method for detecting surface defects of wire ropes based on machine vision, characterized in that, It includes the following steps: Collect images of the steel wire rope surface to obtain steel wire rope images; Extract the edges of the steel wire rope images to obtain the edge contour maps of the steel wire rope images. Based on the edge contour maps, segment the steel wire rope to obtain the single-strand steel wire regions therein; Extract the linear features of the single-strand steel wire regions; Analyze the normal range of the linear features based on the linear features of different single-strand steel wire regions of the defect-free steel wire rope and detect the surface defects of the steel wire rope; Extracting the linear features of the single-strand steel wire regions includes the following sub-steps: For any single-strand steel wire region, rename the contour points therein as region points; For any region point, mark it as a target point, find the region points adjacent to the target point, mark them as neighborhood points, and then take the neighborhood points as target points to sequentially find neighborhood points until there are no neighborhood points. At this time, the target points and neighborhood points obtained form a continuous line composed of pixel points, which is marked as a feature line. Then analyze with any region point as the target point, and the region points that have been included in the feature line do not participate in the analysis. Repeat the execution until all region points in the single-strand steel wire region are included in different feature lines; For any feature line, uniformly name the target points and neighborhood points therein as line points, obtain the pixel numbers of the line points, obtain the difference between the minimum value and the maximum value of n therein and add 1, which is marked as the horizontal span, and obtain the difference between the minimum value and the maximum value of m therein and add 1, which is marked as the vertical span; Number the feature lines in the order from top to bottom, indicated by the symbol S i where i is a non-zero natural number and i is the serial number of S; Taking the i as the horizontal axis and the horizontal span and the vertical span as the vertical axes respectively, a plane rectangular coordinate system is established and named as the horizontal feature map and the vertical feature map. The S i 's horizontal span is input into the horizontal feature map, and the vertical span is input into the vertical feature map. The coordinate points in the horizontal feature map are marked as horizontal feature points, and the coordinate points in the vertical feature map are marked as vertical feature points; Connect adjacent horizontal feature points with a smooth curve to obtain the horizontal linear feature, and connect adjacent vertical feature points with a smooth curve to obtain the vertical linear feature. The horizontal linear feature and the vertical linear feature are collectively referred to as the linear feature.

2. The method for detecting surface defects of steel wire ropes based on machine vision according to claim 1, characterized in that, Collecting images of the steel wire rope surface to obtain steel wire rope images includes the following sub-steps: Use a pure white background board as the shooting background, and place the steel wire rope in front of the pure white background board for shooting; Shoot the steel wire rope in the pure white background board through a high-definition camera. At the same time, rotate the steel wire rope and shoot the same section of the steel wire rope for the first number of times, each time rotating 360° / N1, where N1 is the first number, to obtain the steel wire rope images.

3. The method for detecting surface defects of wire ropes based on machine vision according to claim 2, characterized in that, Extract the edges of the steel wire rope images to obtain the edge contour maps of the steel wire rope images. Based on the edge contour maps, segment the steel wire rope to obtain the single-strand steel wire regions therein includes the following sub-steps: Extract the edges of the steel wire rope images through the OpenCV edge detection algorithm to obtain the edge contour maps; Repair the boundary lines in the steel wire rope based on the edge contour maps to obtain the repaired contour maps; Segment the steel wire rope based on the repaired contour maps to obtain the single-strand steel wire regions therein.

4. The method for detecting surface defects of wire ropes based on machine vision according to claim 3, wherein, Repair the boundary lines in the steel wire rope based on the edge contour maps to obtain the repaired contour maps includes the following sub-steps: Perform a rectangular selection on the edge contour map to obtain the selected contour. The selected contour is rectangular, which includes a long side and a wide side. Connect the midpoints of the two wide sides, and mark the connected straight line as the contour central axis; The pixels in the frame selection outline are numbered from the lower left to the upper right, named as pixel numbers, and represented by the symbol P(n,m), where n and m are both non-zero natural numbers and (n,m) is the sequence number of P, and P(n,m) represents the pixel that is the nth pixel in the horizontal direction and the mth pixel in the vertical direction in the frame selection outline; The width of the central axis of the contour is the width of a pixel, the pure black pixel points in the framed contour are marked as contour points, and the contour points on the central axis of the contour are obtained and marked as points to be determined in terms of direction; For any undetermined direction point, contour points in the eight neighborhoods of the undetermined direction point are obtained and marked as direction extension points, and then the direction extension points are extracted again using the direction extension points as the undetermined direction points until the first number of direction extension points are extracted; Get the pixel number of the direction extension point, extract m from it, mark it as the vertical point, get the maximum and minimum values of the vertical point, mark them as the vertical highest point and the vertical lowest point respectively, calculate the absolute value of the difference between the vertical lowest point and the vertical highest point, and mark it as the vertical span; Compare the vertical span with the first span threshold, if the vertical span is greater than or equal to the first span threshold, output a boundary signal, otherwise output a non-boundary signal; If a boundary signal is output, the line formed by the direction extension points is marked as a boundary line, and the direction extension points on the boundary line are marked as boundary points; A plane rectangular coordinate system is established with n as the X-axis and m as the Y-axis, which is named a boundary trend map. For any boundary line, the pixel numbers n and m of the boundary points therein are entered into the boundary trend map; A linear regression analysis is performed on the boundary trend map to obtain a boundary regression line, which is placed in the frame selection contour according to its relative position to the boundary point. All pixel points passed by the boundary regression line are marked as boundary points. After analyzing each boundary line, a repair contour map is obtained.

5. The method for detecting surface defects of wire ropes based on machine vision according to claim 4, wherein, The steel wire rope is segmented based on the repair contour map to obtain the single-strand steel wire region, including the following sub-steps: The selected outline is divided into regions using the boundary regression line as the boundary, and the region between the two boundary regression lines is marked as a single-strand steel wire region; The single-strand steel wire region does not include the boundary points through which the boundary regression line passes; Obtain the number of contour points in the single-strand steel wire area, mark it as the effective number of pixels, compare the effective number of pixels with the second number, and if the effective number of pixels is less than the second number, output an effective pixel deficiency signal, otherwise output an effective pixel sufficient signal; Determine whether the two boundary regression lines of the single-strand steel wire area have intersections with the two long sides of the frame selection contour. If so, output a complete area signal, otherwise output an incomplete area signal; If the output signal is insufficient for effective pixels or an incomplete area signal, the single-strand steel wire area is removed, and only the single-strand steel wire area that outputs both sufficient effective pixel signals and complete area signals is retained.

6. The method for detecting surface defects of wire ropes based on machine vision according to claim 5, characterized in that Analyzing the normal range of linear features based on the linear features of different single-strand steel wire regions of a defect-free steel wire rope and detecting surface defects of the steel wire rope includes the following sub-steps: Select a defect-free wire rope as a sample to analyze the normal range of linear characteristics; Detect the surface defects of the wire rope based on the normal range of linear characteristics.

7. The method for detecting surface defects of wire ropes based on machine vision according to claim 6, wherein, Selecting a defect-free wire rope as a sample to analyze the normal range of linear characteristics includes the following sub-steps: Select a defect-free wire rope as a sample, mark it as the sample wire, and mark the linear characteristics extracted from the sample wire as sample characteristics; Summarize the sample characteristics obtained by analyzing the wire rope images taken at different angles in the same area into the same area characteristics, place the sample characteristics within the same area characteristics in the same horizontal characteristic map and vertical characteristic map, and mark them as the horizontal analysis map and vertical analysis map respectively; Mark the horizontal linear characteristics in the horizontal analysis map as horizontal analysis lines, and mark the vertical linear characteristics in the vertical analysis map as vertical analysis lines; For any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the horizontal analysis line, and mark it as the horizontal difference characteristic; For any value of the horizontal axis, obtain the maximum value of the difference in the vertical axis values in the vertical analysis line, and mark it as the vertical difference characteristic; For different same area characteristics, find the maximum values of the horizontal difference characteristic and the vertical difference characteristic, and mark them as the horizontal maximum difference and the vertical maximum difference respectively. The normal range includes the horizontal range and the vertical range. The horizontal range is [0, horizontal maximum difference], and the vertical range is [0, vertical maximum difference].

8. The method for detecting surface defects of wire ropes based on machine vision according to claim 7, characterized in that, Detecting the surface defects of the wire rope based on the normal range of linear characteristics includes the following sub-steps: Mark the wire rope that needs to be detected for surface defects as the wire to be inspected; Extract the horizontal difference characteristic and the vertical difference characteristic of the same area characteristics of the wire to be inspected, and mark them as the horizontal to-be-inspected characteristic and the vertical to-be-inspected characteristic respectively; If the horizontal to-be-inspected characteristic is within the horizontal range, output a horizontal normal signal, otherwise output a horizontal defect signal; if the vertical to-be-inspected characteristic is within the vertical range, output a vertical normal signal, otherwise output a vertical defect signal; If both a horizontal normal signal and a vertical normal signal are output at the same time, mark that there are no defects on the surface corresponding to the same area characteristics of the wire to be inspected, otherwise mark that there are defects on the surface corresponding to the same area characteristics of the wire to be inspected.

9. A wire rope surface defect detection system based on machine vision, which is used to implement the wire rope surface defect detection method based on machine vision according to any one of claims 1-8, characterized in that, It includes an image acquisition module, a region division module, a feature extraction module, and a defect detection module; the image acquisition module, the region division module, and the defect detection module are respectively connected to the feature extraction module for data; The image acquisition module is used to collect images of the wire rope surface to obtain wire rope images; The region division module is used to extract the edges of the wire rope image to obtain the edge contour map of the wire rope image, and based on the edge contour map, perform region segmentation on the wire rope to obtain the single-strand wire regions therein; The feature extraction module is used to extract the linear characteristics of the single-strand wire regions; The defect detection module is used to analyze the normal range of linear characteristics based on the linear characteristics of different single-strand wire regions of the defect-free wire rope and detect the surface defects of the wire rope.

Citation Information

Patent Citations

  • Elevator steel wire rope detection method based on machine vision

    CN112270658A