A laser scanning-based automobile steel wire surface defect detection system
By converting line laser stripe images into one-dimensional grayscale distribution sequences and correcting the center coordinates, and combining the calculation of longitudinal height abrupt change and lateral curvature, defects on the surface of automotive steel wires are identified. This solves the problems of low measurement accuracy and high false judgment rate in existing technologies, and achieves high-precision defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN MINGYU METAL PARTS CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
AI Technical Summary
Existing laser scanning inspection technology suffers from low measurement accuracy and high false positive rate in automotive steel wire inspection, especially in the context of high reflectivity and drawing texture, where it is difficult to accurately identify defects.
The image acquisition and preprocessing module converts the line laser stripe image into a one-dimensional grayscale distribution sequence. The grayscale skewness is used to correct the center coordinates. The vertical height change and horizontal curvature are calculated by the surface undulation feature extraction module. The defect identification and alarm module performs connected component analysis to identify defect areas and output alarm signals.
It improves the accuracy and stability of surface defect detection for automotive steel wires, reduces false alarms and missed alarms, and enhances the reliability of the detection system and its ability to adapt to complex industrial environments.
Smart Images

Figure CN122156201A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical inspection technology. More specifically, this invention relates to a laser scanning-based system for detecting surface defects in automotive steel wires. Background Technology
[0002] Automotive steel wire is a key basic material in the automotive industry. Its surface quality is related to driving safety and component lifespan. During production, defects such as cracks and dents need to be detected. Currently, line laser scanning technology is commonly used. A high-speed camera captures images of light stripes projected onto the surface of the steel wire. Image processing algorithms are then used to extract the center coordinates of the light stripes, thereby reconstructing the three-dimensional contour to identify defects.
[0003] Existing laser scanning detection technologies typically employ algorithms such as the gray-scale centroid method or the extreme value method to extract the center of the light stripe. These algorithms presuppose that the gray-scale is an ideal Gaussian distribution. In the defect identification stage, isotropic linear filters such as Gaussian filtering or the Sobel operator are often used to process the three-dimensional shape data, with abrupt changes as the basis for defect judgment.
[0004] However, the above-mentioned technologies have limitations when applied to the inspection of automotive steel wires. On the one hand, automotive steel wires have a high surface finish and a small radius of curvature, which easily produces asymmetric specular reflection when projected by line laser, resulting in a skewed grayscale distribution. The calculated centroid coordinates will systematically drift towards the bright areas, reducing measurement accuracy. On the other hand, the drawing texture on the surface of the steel wires appears as high-frequency background noise in the three-dimensional morphology. Its grayscale variation amplitude is comparable to that of small defects such as shallow pits. Traditional linear filters cannot distinguish between transverse textures and longitudinal defects based on the anisotropic differences in geometric features, resulting in the defect signal being submerged. In addition, system noise or reflective fluctuations in industrial environments often introduce discrete noise points. Traditional judgment methods based on a single threshold lack consideration of the spatial morphology of defects and are prone to misjudging isolated noise points as defects. Summary of the Invention
[0005] To address the aforementioned technical problems of low detection accuracy and high false positive rate, this invention provides a laser scanning-based system for detecting surface defects in automotive steel wires, the system comprising the following modules: The image acquisition and preprocessing module converts the line laser stripe image into a grayscale image, performs threshold segmentation, extracts the Region of Interest (ROI) containing the laser stripe, and divides the ROI into several one-dimensional grayscale distribution sequences along the image column direction. The center coordinate calculation and correction module calculates the grayscale skewness based on the gradient energy distribution of the grayscale distribution sequence, and corrects the original center coordinates calculated based on the grayscale centroid method using the grayscale skewness to obtain the true center coordinates of the grayscale distribution sequence. The surface undulation feature extraction module continuously acquires preset frame images and calculates the vertical height abrupt change and horizontal curvature of the grayscale distribution sequence based on the true center coordinates of all frame images. The defect identification and alarm module calculates the defect feature value of the true center coordinates based on the vertical height abrupt change and horizontal curvature, determines the defect area based on the defect feature value, and obtains an alarm signal.
[0006] This invention addresses the high reflectivity and pull-out textures of automotive steel wire surfaces. An image acquisition and preprocessing module converts line laser stripe images into a one-dimensional grayscale distribution sequence, reducing data processing dimensionality while preserving cross-sectional grayscale distribution characteristics. A center coordinate calculation and correction module introduces the gradient energy distribution of the grayscale distribution sequence to assess the severity of grayscale changes. The resulting grayscale skewness is used to correct the original center coordinates calculated using the traditional grayscale centroid method, thereby reducing the center positioning error of the stripe caused by asymmetric specular reflection. A surface undulation feature extraction module uses continuously acquired multi-frame images to calculate the longitudinal height abrupt change and lateral curvature of the true center coordinates, capturing the geometric change characteristics of the steel wire surface from orthogonal directions. A defect identification and alarm module calculates defect feature values based on these features and combines them with connected component analysis. This suppresses interference from the inherent pull-out textures on the steel wire surface while identifying the true defect area, thus improving the detection accuracy and stability of the automotive steel wire surface defect detection system in complex industrial environments and reducing false alarms and missed alarms.
[0007] Preferably, obtaining the ROI includes: Images of line laser stripes projected onto the surface of automotive steel wires are continuously acquired using a high-speed industrial camera and then converted to grayscale to obtain grayscale images of the line laser stripes. The grayscale images of the laser stripes are then thresholded using the Otsu's method to obtain the ROIs containing the laser stripes.
[0008] Preferably, obtaining the grayscale skewness includes: A gradient sequence is obtained by performing a first-order difference calculation on the gray-level distribution sequence; the coordinates of the starting pixel and the ending pixel of the gray-level distribution sequence are obtained, and the peak coordinates of the pixel with the largest gray value are obtained by searching the maximum value index; the gray-level skewness of the gray-level distribution sequence is obtained by subtracting the sum of the squares of the gradient values of the pixels in the gray-level peak coordinate interval from the starting pixel coordinate to the ending pixel coordinate interval from the gray-level peak coordinate to the ending pixel coordinate interval.
[0009] This invention reflects the steepness of the light stripe edge by calculating the gradient energy distribution of the gray-level distribution sequence. It uses the difference between the sum of the squares of the gradients of pixels in the interval from the starting pixel coordinates to the gray-level peak coordinates and the interval from the gray-level peak coordinates to the ending pixel coordinates to evaluate the asymmetry of the gray-level distribution. Since the specular reflection of the automotive steel wire surface will cause the gray-level attenuation rate on the specular reflection side to be faster, thereby increasing the gradient energy distribution on that side, it can reflect the direction and degree of optical distortion, reduce the interference of single-point noise, and thus help improve the system's adaptability to steel wires with different reflectivity.
[0010] Preferably, obtaining the true center coordinates includes: Obtain the effective half span of the grayscale distribution sequence; obtain the original center coordinates of the grayscale distribution sequence using the grayscale centroid method; subtract the product of the effective half span and the grayscale skewness from the original center coordinates to obtain the true center coordinates of the grayscale distribution sequence.
[0011] In the process of obtaining the true center coordinates, this invention introduces grayscale skewness and effective half-span as correction factors. The original center coordinates are subtracted from the product of the effective half-span and grayscale skewness. The effective half-span, as a physical scale factor, ensures that the correction amount is compatible with the thickness of the light stripe, thereby limiting the upper limit of the correction amount and preventing uncontrollable overcorrection due to excessive grayscale skewness. This makes the obtained true center coordinates closer to the actual geometric position of the steel wire surface, thereby improving the accuracy of subsequent extraction of the surface undulation features of automotive steel wires.
[0012] Preferably, obtaining the effective half-span includes: Obtain the coordinates of the starting and ending pixels of the grayscale distribution sequence, and calculate half of the difference between the coordinates of the ending pixel and the coordinates of the starting pixel as the effective half span of the grayscale distribution sequence.
[0013] Preferably, the vertical height abrupt change satisfies the following relationship: ; In the formula, It is the first The first frame of the image The vertical height mutation amount of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence It is an integer greater than 1.
[0014] Preferably, the lateral curvature satisfies the following relationship: ; In the formula, It is the first The first frame of the image The lateral curvature of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence It is an integer greater than 1.
[0015] Preferably, the acquisition of the defect feature values includes: Obtain the effective half span of the grayscale distribution sequence; truncate the product of the absolute value of the ratio of the longitudinal height mutation to the effective half span and the absolute value of the ratio of the transverse curvature to the effective half span using a truncation function, limiting the value to between 0 and the preset maximum defect feature value, to obtain the defect feature value of the true center coordinates.
[0016] When acquiring defect feature values, this invention calculates the absolute value of the ratio of longitudinal height abrupt change to the effective half-span, and the inverse cotangent function value of the absolute value of the ratio of transverse curvature to the effective half-span. Utilizing the monotonically decreasing characteristic of the inverse cotangent function, the signal is suppressed based on the degree of transverse texture curvature. While identifying longitudinal defect signals such as cracks or pits, it attenuates transverse texture noise generated by the wire drawing process. By using a truncation function, the results are limited to a preset range, preventing numerical overflow, thereby improving the signal-to-noise ratio of defect signals against a complex surface texture background.
[0017] Preferably, obtaining the defective region includes: By performing connectivity analysis on spatially adjacent defect coordinates using a region growing algorithm, the defect coordinates are merged into independent defect regions.
[0018] Preferably, the acquisition of the alarm signal includes: Set a judgment threshold, and record the true center coordinates of the defect whose defect feature value is greater than the judgment threshold as the defect coordinates; Based on the location distribution of defect coordinates, the defect area is obtained, and a defect threshold is set. If the number of true center coordinate points within the defect area exceeds the defect threshold, an alarm signal is output for that defect area.
[0019] This invention filters potential defect coordinates by setting a judgment threshold and obtains defect areas based on the location distribution of defect coordinates. It further sets a defect threshold to statistically filter the number of real center coordinate points within the defect area. Since real physical defects have continuous characteristics in space, while system noise or instantaneous reflection fluctuations usually appear as discrete isolated points, by eliminating those tiny areas containing fewer coordinate points than the defect threshold, the impact of random noise without physical scale on the detection results can be reduced, retaining only defect areas with practical significance. This reduces the false alarm rate of the system while ensuring the detection rate, and improves the reliability of the detection results.
[0020] The beneficial effects of this invention are as follows: It addresses complex surface conditions through a multi-level data analysis strategy, utilizes the gradient energy distribution characteristics of the grayscale distribution sequence to assess the spatial asymmetry of grayscale changes, and adaptively corrects the original center coordinates affected by reflection, thereby restoring the true geometric shape of the steel wire surface and reducing measurement errors caused by optical distortion. Simultaneously, based on the spatial differences between physical defects and process textures, it extracts the longitudinal height abrupt change and the transverse curvature, achieving defect signal characterization through amplitude extraction, and combining nonlinear operations to suppress background textures, improving the problem of small defects being easily obscured by textures. Furthermore, this invention introduces a spatial filtering mechanism based on connected component analysis, eliminating random noise by statistically analyzing the physical scale of the defect region, thereby reducing the false alarm rate while maintaining detection sensitivity and improving the reliability and stability of the automated detection process. Attached Figure Description
[0021] Figure 1 This is a schematic diagram illustrating a system block diagram of an automotive steel wire surface defect detection system based on laser scanning according to the present invention; Figure 2 This is a schematic diagram illustrating the comparison between the original center coordinates and the corrected true center coordinates. Detailed Implementation
[0022] This invention provides a laser scanning-based system for detecting surface defects in automotive steel wires. For example... Figure 1 As shown, a laser scanning-based automotive steel wire surface defect detection system includes an image acquisition and preprocessing module 100, a center coordinate calculation and correction module 200, a surface undulation feature extraction module 300, and a defect identification and alarm module 400. The details are as follows: The image acquisition and preprocessing module 100 is used to acquire images of line laser stripes projected onto the surface of automotive steel wires using a high-speed industrial camera, perform grayscale conversion and threshold segmentation processing, extract ROIs containing laser stripes, and divide the ROIs into several one-dimensional grayscale distribution sequences along the image column direction.
[0023] It should be noted that in industrial settings, when a line laser beam is projected onto the surface of a steel wire, the captured image typically contains a large amount of background noise and invalid information. To improve the efficiency and accuracy of subsequent processing, this invention first performs grayscale processing on the image, converting color information into brightness information to eliminate color interference. Next, it extracts the region of interest (ROI) containing the laser beam through threshold segmentation, removing irrelevant background. Finally, it divides the ROI along the image column direction into several one-dimensional grayscale distribution sequences containing a column of pixel data, thereby performing point-to-point precise calculation and compensation for the different reflection states at different locations on the steel wire surface.
[0024] Specifically, images of line laser stripes projected onto the surface of automotive steel wires are continuously acquired using a high-speed industrial camera and then converted to grayscale to obtain grayscale images of the line laser stripes. Threshold segmentation is performed on these grayscale images to obtain Regions of Interest (ROIs) containing the laser stripes. The ROIs are then divided along the image column direction into several one-dimensional grayscale distribution sequences, each with a width of one pixel. For example, the threshold segmentation is performed using the Otsu's method, which is existing technology and will not be elaborated upon here.
[0025] Thus, the ROI and grayscale distribution sequence were obtained.
[0026] The center coordinate calculation and correction module 200 is used to calculate the gray-level skewness based on the gradient energy distribution of the gray-level distribution sequence, and use the gray-level skewness to correct the original center coordinates calculated based on the gray-level centroid method to obtain the true center coordinates after removing optical distortion.
[0027] It should be noted that, due to the high reflectivity of automotive steel wires, the grayscale distribution of the laser beam projected onto its surface often exhibits asymmetric skewness, leading to deviations in the center coordinates of the grayscale distribution sequence calculated using the traditional grayscale centroid method. Therefore, this invention introduces the gradient energy distribution of the grayscale distribution sequence to characterize the drastic degree of spatial variation in grayscale values. By calculating and comparing the difference in cumulative gradient energy between the left and right sides of the grayscale peak in the grayscale distribution sequence, the grayscale skewness of the sequence is determined. This grayscale skewness is then used to characterize the direction and extent of optical distortion of the laser beam cross-section corresponding to the grayscale distribution sequence.
[0028] Specifically, based on the gradient energy distribution of the gray-level distribution sequence within the ROI, the gray-level skewness of all gray-level distribution sequences is calculated, including: The gradient sequence is obtained by performing a first-order difference on the gray-level distribution sequence; the coordinates of the gray-level peak are obtained by searching the maximum value index.
[0029] No. The gray-level skewness of a gray-level distribution sequence satisfies the following relationship: ; In the formula, It is the first Gray-level skewness of a gray-level distribution sequence; It is the first The coordinates of the pixel with the highest gray value in a gray-level distribution sequence are the gray-level peak values. It is the first The coordinates of the starting pixel of a grayscale distribution sequence; It is the first The coordinates of the terminal pixel corresponding to a grayscale distribution sequence; It is the first Pixel coordinates on a grayscale distribution sequence The gradient value at that point; It is the first Pixel coordinates on a grayscale distribution sequence The gradient energy distribution at a given location is used to characterize the pixel coordinates. The degree of drastic change in grayscale value; It is a preset microvalue used to prevent the denominator from being 0, and can be set to 0.001.
[0030] In this relation, It is the first The cumulative gradient energy to the left of the gray value peak in a gray-scale distribution sequence indicates that the larger the cumulative gradient energy to the left, the more drastic the change in gray value on the left side of the gray-scale distribution sequence, and the sharper the corresponding left edge of the light stripe. It is the first The cumulative gradient energy to the right of the gray value peak in a gray-level distribution sequence indicates that the larger the cumulative gradient energy to the right, the more drastic the change in gray value to the right in the gray-level distribution sequence. It is the first The gray-level skewness of a gray-level distribution sequence characterizes the degree of asymmetry in the gray-level distribution of the laser stripe cross section corresponding to the gray-level distribution sequence. The positive or negative value of the gray-level skewness reflects the direction of the centroid shift of the stripe. A positive gray-level skewness with a larger value indicates that the optical distortion caused by reflection on the left side of the stripe is more severe. A negative gray-level skewness with a larger negative value indicates that the optical distortion caused by reflection on the right side of the stripe is more severe. Conversely, the closer the gray-level skewness value is to 0, the more symmetrical the left and right sides of the stripe are, and the closer it is to an ideal Gaussian distribution.
[0031] At this point, the gray-level skewness of all gray-level distribution sequences has been obtained.
[0032] It should be noted that the original center coordinates of the grayscale distribution sequence include systematic errors caused by asymmetric specular reflection. These systematic errors are not random noise, but are correlated with the span and degree of optical distortion of the grayscale distribution sequence; that is, the larger the span and the more severe the skewness of the grayscale distribution sequence, the greater the offset of the centroid relative to the geometric center. Therefore, this invention uses grayscale skewness as a correction coefficient to reduce uncontrollable overcorrection caused by excessive skewness under extremely high reflectivity conditions. Furthermore, by subtracting the centroid offset calculated based on the effective half-span and grayscale skewness from the original center coordinates, optical distortion can be eliminated, restoring the true center coordinates of the grayscale distribution sequence.
[0033] Preferably, based on the geometric scale and distribution morphology characteristics of the grayscale distribution sequence, the true center coordinates of all grayscale distribution sequences are calculated, including: Get the The starting and ending pixel coordinates of the first gray-level distribution sequence are determined; half of the difference between the two is used as the first... The effective half span of a gray-scale distribution sequence.
[0034] The first value was calculated using the gray-scale centroid method. The original center coordinates of a gray-scale distribution sequence. It should be noted that the gray-scale centroid method is an existing technology and will not be elaborated here.
[0035] No. The true center coordinates of a gray-level distribution sequence satisfy the following relationship: ; In the formula, It is the first The true center coordinates of a gray-level distribution sequence; It is the first The original center coordinates of a gray-level distribution sequence; It is the first The effective half span of a gray-level distribution sequence; It is the first Gray-level skewness of a gray-level distribution sequence.
[0036] In this relation, It is the first The centroid offset of a grayscale distribution sequence represents the deviation distance of the original center coordinates relative to the true geometric center due to specular reflection; the larger the deviation distance, the stronger the centroid offset. The further the centroid of the gray-level distribution sequence shifts to the right of the image coordinates, the more severe the reflection on the right side; a negative deviation distance and a larger negative value indicate that the... The further the centroid of a grayscale distribution sequence shifts to the left of the image coordinates, the more severe the reflection on the left side; conversely, the closer the deviation distance is to 0, the smaller the deviation caused by reflection. It is the first The corrected true center coordinates of the nth gray-level distribution sequence represent the true center coordinates after eliminating optical distortion errors. The actual geometric center of each grayscale distribution sequence reflects the true spatial position on the surface of the steel wire.
[0037] It should be noted that, as Figure 2 This is a schematic diagram comparing the original center coordinates with the corrected true center coordinates. The dashed curve with hollow dots represents the original center coordinates, and the dashed curve with solid dots represents the corrected true center coordinates.
[0038] At this point, the true center coordinates of all grayscale distribution sequences have been obtained.
[0039] The surface undulation feature extraction module 300 is used to continuously acquire multiple frames of images and calculate the vertical height abrupt change and horizontal curvature of the grayscale distribution sequence based on the true center coordinates.
[0040] It should be noted that a single true center coordinate can only reflect a discrete geometric position, while defect detection aims to identify abnormal surface deformation. Considering the spatial anisotropy of steel wire surface features—abrupt changes along the wire axis typically correspond to defects such as pits or cracks, while bending along the circumferential direction of the wire cross-section typically corresponds to texture grooves produced by the drawing process—this invention extracts the geometric variation features of the true center coordinate in orthogonal directions through differential operations. The longitudinal component captures axial undulations, and the transverse component captures cross-sectional curvature, providing a foundation for subsequently distinguishing defect signals from texture noise.
[0041] Specifically, data is collected continuously according to the chronological order of collection time. The image captures the line laser bar pattern of each frame and calculates the true center coordinates of the grayscale distribution sequence corresponding to each frame. For example, the number of consecutively acquired frames... It can be set to 1000.
[0042] The surface undulation features at the true center coordinates satisfy the following relationship: ; In the formula, It is the first The first frame of the image The vertical height mutation amount of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The lateral curvature of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of the grayscale distribution sequence. It should be noted that the acquisition sequence of the line laser bar image is calculated starting from the second frame.
[0043] In this relation, This indicates the instantaneous height change of the wire surface at the same transverse position between adjacent time frames. The larger the value of the instantaneous height change, whether positive or negative, the more severe the undulation of the wire surface in the axial direction, and the greater the possibility of defects such as pits or protrusions. Conversely, the closer the instantaneous height change is to 0, the smoother the transition of the wire surface in the axial direction. It is a local reference height when calculating the lateral curvature. It should be noted that the coefficient is 2 because the lateral curvature is compared with the relative position of the midpoint and the two adjacent points on the left and right. In order to make the weight of the midpoint completely offset the sum of the heights of the two adjacent points when the surface is flat, the height of the midpoint needs to be magnified by two times. This indicates the degree to which the true center coordinates are concave or convex relative to the left and right adjacent points; a positive and larger value indicates that the true center coordinates are concave relative to the left and right adjacent points; a negative value and a larger negative value indicate that the true center coordinates are convex relative to the left and right adjacent points.
[0044] At this point, the surface undulation features of all the true center coordinates have been obtained.
[0045] The defect identification and alarm module 400 is used to calculate the defect feature value of the true center coordinate based on the longitudinal height change and the transverse curvature, and to determine the defect area and output an alarm signal by combining the connected component analysis algorithm.
[0046] It should be noted that, since the signals from the drawing texture on the steel wire surface and minute defects are often superimposed, this invention utilizes the relative amplitude of the longitudinal height abrupt change to characterize minute depth changes, thereby improving the system's sensitivity to minute depth variations. Simultaneously, it leverages the monotonically decreasing characteristic of the inverse cotangent function to dynamically decrease the weight of the feature value based on the lateral curvature. Only when the detection position exhibits a sharp longitudinal abrupt change and a relatively flat lateral profile will a higher defect feature value be output, thus achieving high signal-to-noise ratio defect extraction while suppressing strong background texture interference.
[0047] Specifically, based on the surface undulation characteristics of the true center coordinates, the defect feature values of the true center coordinates are obtained, and these defect feature values satisfy the following relationship: ; In the formula, It is the first The first frame of the image Defect feature values of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The vertical height mutation amount of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The lateral curvature of the true center coordinates of a grayscale distribution sequence; It is the first The first frame of the image The effective half span of each gray-level distribution sequence is used for normalization. It is the inverse cotangent function; It is a truncation function; It is the preset maximum defect feature value, which can be set according to the data storage bit width of the image processing system.
[0048] In this relation, This indicates the degree of undulation of the longitudinal height change along the axial direction of the automotive steel wire surface relative to the effective half span. The larger the value, the more drastic the height change of the true center coordinates along the axial direction of the car wire, and the higher the probability of pits or cracks on the surface of the car wire; conversely, the more gradual the height transition of the true center coordinates along the axial direction of the car wire, reflecting a smoother surface of the car wire along the axial direction. This represents the weights used to gate and suppress the signal based on the degree of bending along the cross-sectional direction of the wire, the weights being... The increase and decrease of [value] indicate lateral bending, such as more pronounced drawing texture grooves, which reduces the defect characteristic value and thus eliminates texture interference; conversely, when [value] decreases, [value] decreases. When the value is close to 0, it indicates that the horizontal plane is flat and there is no texture. The larger the weight, the more likely the vertical height abrupt change can be preserved in the calculation.
[0049] Thus, the defect feature values for all true center coordinates have been obtained.
[0050] It should be noted that, in order to eliminate discrete false alarms caused by system noise or reflection fluctuations, this invention uses a connected component analysis algorithm based on the spatial continuity characteristics of real defects to merge adjacent defect coordinates into independent regions, and performs statistical filtering through a quantity threshold to remove isolated noise points that do not have physical scale, thereby improving the confidence of the detection results.
[0051] Preferably, a judgment threshold is set, and all defect feature values of the true center coordinates are traversed. If a defect feature value is greater than the judgment threshold, the true center coordinates corresponding to that defect feature value are determined to be defect coordinates. It should be noted that the judgment threshold can be obtained by testing samples containing standard defects.
[0052] Furthermore, connected component analysis is performed on spatially adjacent defect coordinates to merge them into independent defect regions. A defect threshold is set; if the number of true center coordinates within a defect region exceeds the defect threshold, an alarm signal is output for that defect region. For example, the connected component analysis algorithm is a region growing algorithm, and the defect threshold can be set to 5. The region growing algorithm is existing technology and will not be elaborated upon here.
[0053] This completes the identification and automatic alarm for surface defects in automotive steel wires.
[0054] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A laser scanning-based system for detecting surface defects in automotive steel wires, characterized in that, include: The image acquisition and preprocessing module is used to convert the line laser light stripe image into a grayscale image, perform threshold segmentation processing, extract the ROI containing the laser light stripe, and divide the ROI into several one-dimensional grayscale distribution sequences along the image column direction. The center coordinate calculation and correction module is used to calculate the gray-level skewness based on the gradient energy distribution of the gray-level distribution sequence, and use the gray-level skewness to correct the original center coordinates calculated based on the gray-level centroid method to obtain the true center coordinates of the gray-level distribution sequence. The surface undulation feature extraction module is used to continuously acquire preset frame images and calculate the vertical height abrupt change and horizontal curvature of the grayscale distribution sequence based on the true center coordinates of all frame images. The defect identification and alarm module is used to calculate the defect feature value of the true center coordinate based on the longitudinal height change and the transverse curvature, determine the defect area based on the defect feature value, and obtain an alarm signal.
2. The laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The acquisition of the ROI includes: Images of line laser stripes projected onto the surface of automotive steel wires are continuously acquired using a high-speed industrial camera and then converted to grayscale to obtain grayscale images of the line laser stripes. The grayscale images of the laser stripes are then thresholded using the Otsu's method to obtain the ROIs containing the laser stripes.
3. The laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The acquisition of the grayscale skewness includes: A gradient sequence is obtained by performing a first-order difference calculation on the gray-level distribution sequence; the coordinates of the starting pixel and the ending pixel of the gray-level distribution sequence are obtained, and the peak coordinates of the pixel with the largest gray value are obtained by searching the maximum value index; the gray-level skewness of the gray-level distribution sequence is obtained by subtracting the sum of the squares of the gradient values of the pixels in the gray-level peak coordinate interval from the starting pixel coordinate to the ending pixel coordinate interval from the gray-level peak coordinate to the ending pixel coordinate interval.
4. The laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, Obtaining the true center coordinates includes: Obtain the effective half span of the grayscale distribution sequence; obtain the original center coordinates of the grayscale distribution sequence using the grayscale centroid method; subtract the product of the effective half span and the grayscale skewness from the original center coordinates to obtain the true center coordinates of the grayscale distribution sequence.
5. The laser scanning-based automotive steel wire surface defect detection system according to claim 4, characterized in that, The acquisition of the effective half-span includes: Obtain the coordinates of the starting and ending pixels of the grayscale distribution sequence, and calculate half of the difference between the coordinates of the ending pixel and the coordinates of the starting pixel as the effective half span of the grayscale distribution sequence.
6. The laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The vertical height mutation amount satisfies the following relationship: ; In the formula, It is the first The first frame of the image The vertical height mutation amount of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence It is an integer greater than 1.
7. The laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The lateral curvature satisfies the following relationship: ; In the formula, It is the first The first frame of the image The lateral curvature of the true center coordinates of a gray-scale distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence; It is the first The first frame of the image The true center coordinates of a gray-level distribution sequence It is an integer greater than 1.
8. The laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The acquisition of the defect feature values includes: Obtain the effective half span of the grayscale distribution sequence; truncate the product of the absolute value of the ratio of the longitudinal height mutation to the effective half span and the absolute value of the ratio of the transverse curvature to the effective half span using a truncation function, limiting the value to between 0 and the preset maximum defect feature value, to obtain the defect feature value of the true center coordinates.
9. A laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The acquisition of the defective region includes: By performing connectivity analysis on spatially adjacent defect coordinates using a region growing algorithm, the defect coordinates are merged into independent defect regions.
10. A laser scanning-based automotive steel wire surface defect detection system according to claim 1, characterized in that, The acquisition of the alarm signal includes: Set a judgment threshold, and record the true center coordinates of the defect whose defect feature value is greater than the judgment threshold as the defect coordinates; Based on the location distribution of defect coordinates, the defect area is obtained, and a defect threshold is set. If the number of true center coordinate points within the defect area exceeds the defect threshold, an alarm signal is output for that defect area.