Shock absorber defect detection system and method based on linear laser three-dimensional reconstruction

Through the three-dimensional linear laser reconstruction technology, combined with the calibration plate, iterative weighted PCA method and the improved grayscale center of gravity method, the high-precision and real-time defect detection of the ship engine shock absorber is achieved, solving the detection problems in small and harsh environments.

CN120446127APending Publication Date: 2025-08-08HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510470094.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing ship engine shock absorber detection methods have poor accuracy, low efficiency, poor measurement accuracy, and are not suitable for real-time detection requirements in small and harsh environments.

Method used

The shock absorber defect detection system based on three-dimensional reconstruction of line lasers is adopted, including upper computers, guides, servo motors, drivers and three-dimensional scanning probes. The light plane calibration is performed through calibration plates and iterative weighted PCA method. Combined with the improved grayscale center of gravity method and multi-scale adaptive statistical filtering method, laser stripe centerline extraction and three-dimensional coordinate conversion are realized, and depth images are generated for defect detection.

Benefits of technology

It improves the light plane fitting accuracy, enhances the centerline extraction accuracy and detection speed, and ensures real-time high-precision defect detection in harsh environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120446127A_ABST
    Figure CN120446127A_ABST
Patent Text Reader

Abstract

The invention discloses a shock absorber defect detection system and method based on line laser three-dimensional reconstruction, and relates to the technical field of industrial nondestructive testing, the shock absorber defect detection system comprises an upper computer (1), a guide rail (2), a servo motor (3), a driver (4), a three-dimensional scanning probe (5) and a tested shock absorber (6), and the three-dimensional scanning probe (5) is composed of a camera and a laser. According to the invention, by adopting the light plane calibration method based on the calibration plate and the iterative weighted PCA method, the fitting precision of the light plane is improved; laser stripe center line extraction is achieved by improving a traditional gray gravity center method, and the center line extraction precision is improved; and the three-dimensional coordinate set is converted into a depth image for subsequent processing, so that the detection precision and speed are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial non-destructive testing, and in particular to a shock absorber defect detection system and method based on line laser three-dimensional reconstruction. Background Art

[0002] Large ships, as giants of maritime navigation, rely on their engines as their irreplaceable heart. The engines are a core element in ensuring navigational safety, efficiency, and reliability. Shock absorbers, in particular, play a crucial role in engine safety maintenance. They absorb and disperse vibration energy generated by the engine, ensuring smooth and efficient power transmission while protecting surrounding components from damage. Maintaining the integrity of shock absorbers is therefore crucial to the safe operation of large ships. Currently, the most commonly used inspection methods for ship engine shock absorbers rely on visual observation or direct measurement. This not only consumes a significant amount of manpower but is also often associated with poor visual accuracy, inefficiency, poor measurement precision, and loss of critical information.

[0003] In recent years, 3D reconstruction has gained acclaim for detecting object defects and morphologies, thanks to its high precision, non-contact measurement, and intuitive visualization capabilities. In industry, CT scanning is used to 3D reconstruct the internal structure of automotive castings or aircraft blades, accurately identifying micron-level pores and cracks. In the wind power sector, drones equipped with LiDAR reconstruct the surface morphology of turbine blades and automatically analyze salt spray corrosion and mechanical damage. In construction, laser scanning of bridges generates 3D point cloud models, which are then combined with AI algorithms to quantify crack propagation and deformation trends. In the medical field, optical scanning of 3D-printed orthopedic implants is used to detect dimensional deviations and porosity. The electronics industry uses structured light to scan the 3D morphology of PCB solder joints, combined with deep learning to identify cold solder joint defects. Cultural relic restoration uses multi-view photogrammetry to reconstruct the surface of bronze artifacts, quantify corroded areas, and develop repair plans.

[0004] Ship engine shock absorbers are installed in a confined space, often dark, damp, and subject to harsh environmental conditions. During inspection, the shock absorbers cannot be disassembled, requiring a testing device that can directly reach into the confined space for inspection. Currently available large, high-precision testing equipment is no longer suitable. Furthermore, while overcoming the harsh environment surrounding the shock absorbers, defect detection must be both timely and accurate. Currently, no device on the market meets these requirements. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a shock absorber defect detection system and method based on line laser three-dimensional reconstruction, which can not only overcome the interference of the shock absorber's surrounding environment, but also take into account the real-time and accurate defect detection requirements.

[0006] The technical problem to be solved by the present invention is achieved by adopting the following technical solutions:

[0007] One of the purposes of the present invention is to provide a shock absorber defect detection system, comprising a host computer (1), a guide rail (2), a servo motor (3), a driver (4), a three-dimensional scanning probe (5) and a shock absorber to be tested (6), wherein the three-dimensional scanning probe (5) is composed of a camera and a laser.

[0008] Furthermore, the guide rail is a high-precision guide rail.

[0009] A second object of the present invention is to provide a method for detecting defects in a shock absorber, comprising the following steps:

[0010] S1. Use the light plane calibration method based on the calibration plate to obtain the three-dimensional coordinates P of the laser line on the calibration plate in the camera coordinate system. n , together forming a three-dimensional coordinate set P; the iterative weighted PCA method is used to fit the three-dimensional coordinate set P into the light plane equation, and the Huber function is introduced as the weight.

[0011] Furthermore, the fitting steps of the light plane equation are as follows:

[0012] (1) Perform an initial PCA fit on the three-dimensional coordinate set P and calculate the initial mean according to formulas (1) and (2): and the covariance matrix C (0) , extract C (0) The eigenvector corresponding to the maximum eigenvalue of is taken as the normal vector n of the light plane (0) .

[0013]

[0014] (2) In order to obtain a higher precision normal vector of the light plane, the initial direction vector n (0) Based on iterative weighted PCA processing, for the kth iteration, the residual of each 3D point to the current fitting light plane is calculated according to formula (3):

[0015]

[0016] (3) In order to improve the ability to resist outlier interference, the Huber function is introduced as the weight through formulas (4) and (5)

[0017]

[0018] σ=1.345·median(|r i (k) |) (5)

[0019] Among them, median(|r i (k) |) is |r i (k) The median of |. Selecting σ as 1.345 times the median is more in line with the characteristics of normal distribution.

[0020] (4) Perform iterative weighted PCA processing on the three-dimensional coordinate set using formulas (6) and (7).

[0021]

[0022] Take C (k+1) The eigenvector corresponding to the maximum eigenvalue is n (k+1) When the direction vector changes ||n (k+1) -n k When || is less than the convergence condition, the iteration stops and the final direction vector n=n is output. (k+1) .

[0023]

[0024] The light plane equation is obtained from formula (8): T x+d=0. c ,y c , z c ) T Substitute into the light plane equation to transform the light plane equation into a c x c +b c y c +c c z c +d c =0 form, (x c ,y c , z c ) is the three-dimensional coordinate in the camera coordinate system.

[0025] S2. Direct the laser toward the shock absorber, use the host computer to drive the servo motor, and drive the three-dimensional scanning probe through the guide rail to perform time-series synchronous image acquisition of the shock absorber surface morphology to obtain a serialized image data set.

[0026] S3. A row-by-row grayscale centroid method is used to coarsely extract the laser streak centerlines from the preprocessed image. A fixed-size window is then used to traverse the roughly extracted laser streak centerlines. Curve fitting is used to obtain the normal equation corresponding to each coordinate point within the window. Finally, the normal-weighted grayscale centroid method is used to extract the laser streak centerlines from the serialized image dataset. The grayscale centroid method is used to coarsely extract the laser streak centerlines from the image to improve subsequent processing accuracy. It also simplifies the processing data for determining the normal direction and reduces the computational complexity of the normal direction.

[0027] Furthermore, the image preprocessing includes: using an adaptive histogram equalization algorithm to process the image to enhance the laser stripes in the dark area; filtering out the noise in the laser stripe grayscale image through a Gaussian filter to make the laser stripe grayscale distribution more uniform; and using a Sobel operator to extract the laser stripe edge features after filtering to distinguish the laser stripes from the background and reduce the influence of noise on the laser stripe edge.

[0028] Furthermore, the fitting steps of the normal equation are as follows:

[0029] For the coordinate points in the window, use the quadratic equation y=a0+a1x+a2x 2 Perform curve fitting. i ,y i )'s horizontal coordinate x i Substitute the fitting curve equation to obtain the coordinate point (x i ,y i ) on the fitting curve. i ',y i '). The fitting curve equation is calculated by formula (9) and (10) in (x i ',y i ').

[0030] K=a1+2a2x i ' (9)

[0031] x+Ky-(x i '+Ky i ')=0 (10)

[0032] Perform the above calculations on the n coordinate points within the window to obtain the normal equation corresponding to each coordinate point in the window. By traversing all the coordinate points in the window, the normal equation corresponding to each coordinate point in the entire line structured light image can be obtained. Since each pixel row where the light is located corresponds to a coordinate point after the grayscale centroid method is used for row-by-row processing, each pixel row in the image has a unique normal equation.

[0033] Furthermore, the normal weighted grayscale centroid method includes: assuming that the set of pixels within the pixel row range is S, calculating the grayscale value I(x,y) of each pixel point (x,y) and its distance d(x,y) to the normal corresponding to the row. Using w(d(x,y)) as the weight function of the normal information contained in the pixel point (x,y), the horizontal coordinate x of the center point is obtained by formulas (11) and (12). -c .

[0034]

[0035] S4. According to the fitted light plane equation, the center lines of the laser stripes of the obtained serialized image data set are converted into a three-dimensional coordinate set in the camera coordinate system, and then the three-dimensional coordinate set in the camera coordinate system is converted into a three-dimensional coordinate set in the world coordinate system.

[0036] The center line of the laser stripe is converted into a three-dimensional coordinate set in the camera coordinate system using formulas (13) and (14).

[0037]

[0038] Where (u, v) is the physical coordinate of a point on the laser centerline; (x, y) is the pixel coordinate of the point; u0, v0 are obtained through the internal parameters of the camera, (x c ,y c ,z c ) is the three-dimensional coordinate of the point in the camera coordinate system.

[0039] The three-dimensional coordinate set in the camera coordinate system is converted into the three-dimensional coordinate set in the world coordinate system through formulas (15)-(17).

[0040]

[0041] Where f is the frame rate of the camera, θ is the angle between the camera and the laser, v is the moving speed of the guide rail, △s is the distance the camera moves, △P is the coordinate compensation value caused by the movement of the camera, P i is the three-dimensional coordinate (x ci ,y ci ,z ci ), P i ′ is P i Converted to three-dimensional coordinates in the world coordinate system (x w ,y w ,z w ).

[0042] S5. Use a multi-scale adaptive statistical filtering method to process the three-dimensional coordinate set in the world coordinate system obtained in step S4.

[0043] Furthermore, the multi-scale adaptive statistical filtering method includes: estimating the local density of each coordinate point in the three-dimensional coordinate set, calculating the average distance d from each coordinate point to n surrounding points, and using the d value as the local density ρ of each coordinate point. Using ρ as a parameter, a K-means algorithm is used to obtain high-density and low-density regions, and dynamic filtering is performed on the high-density and low-density regions respectively.

[0044] S6. Convert the three-dimensional coordinate set processed in step S5 into a depth image, perform differential comparison and adaptive Otsu threshold segmentation on the test depth image and the standard depth image, accurately extract the defect area, map the image coordinates of the defect area to the world coordinate system, and output the three-dimensional coordinates and size information of the defect area.

[0045] Furthermore, the three-dimensional coordinate set is converted into a depth image by the following method:

[0046] Set the width of the depth image to W and the height to H, and calculate the x in the three-dimensional coordinate set w ,y w , z w The maximum difference in coordinates △x w , △y w , △z w . Use formulas (18)-(20) to convert the x of each coordinate point into w ,y w The coordinates are converted to pixel coordinates (x, y) of the depth image, and the depth information d of the corresponding position is filled in according to the z value.

[0047]

[0048] Among them, round means taking an integer.

[0049] The beneficial effects of the present invention are:

[0050] 1. The present invention adopts a light plane calibration method based on a calibration plate and an iterative weighted PCA method to improve the light plane fitting accuracy.

[0051] 2. The present invention improves the traditional grayscale centroid method to realize laser stripe centerline extraction, thereby improving the centerline extraction accuracy.

[0052] 3. The present invention improves the accuracy and speed of detection by converting a three-dimensional coordinate set into a depth image for subsequent processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is the structural diagram of the shock absorber defect detection system; where 1 is the host computer, 2 is the guide rail, 3 is the servo motor, 4 is the driver, 5 is the 3D scanning probe, and 6 is the shock absorber under test;

[0054] Figure 2 is a flow chart of a shock absorber defect detection method;

[0055] Figure 3 The original image captured by the camera;

[0056] Figure 4 is the preprocessed image;

[0057] Figure 5 is the roughly extracted centerline image of the laser stripe;

[0058] Figure 6 The centerline image of the laser stripe is extracted by the normal-weighted grayscale centroid method;

[0059] Figure 7 is a visualization diagram of the initial three-dimensional coordinate set;

[0060] Figure 8 A visual display diagram of the final three-dimensional coordinate set;

[0061] Figure 9 It is composed of various parts of the shock absorber;

[0062] Figure 10 is a standard depth image;

[0063] Figure 11 To test the depth image;

[0064] Figure 12 Defect area diagram. DETAILED DESCRIPTION

[0065] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below with reference to specific embodiments and illustrations.

[0066] Example 1

[0067] like Figure 1 As shown, the shock absorber defect detection system of this embodiment includes a host computer (1), a high-precision guide rail (2), a servo motor (3), a driver (4), a three-dimensional scanning probe (5), and a shock absorber to be tested (6). The three-dimensional scanning probe (5) is composed of a camera and a laser. The camera model is MER2-302-56U3M / C, and the laser model is D650NX-T1685.

[0068] like Figure 2 As shown, this embodiment performs shock absorber defect detection based on the above shock absorber defect detection system, specifically including the following steps:

[0069] S1. Use a camera to capture N sets of calibration plate images at different positions. Each set of images contains calibration plates with and without laser irradiation. The positions of the calibration plates in the same set relative to the camera are fixed. The images of the calibration plates with laser irradiation are used as test images.

[0070] The three-dimensional coordinates P of the laser line on the calibration plate in the camera coordinate system are obtained by using the light plane calibration method based on the calibration plate. n , together constitute the three-dimensional coordinate set P. Perform initial PCA fitting on the three-dimensional coordinate set P and calculate the initial mean according to formulas (1) and (2): and the covariance matrix C (0) , extract C (0) The eigenvector corresponding to the maximum eigenvalue of is taken as the normal vector n of the light plane (0) .

[0071]

[0072]

[0073] In order to obtain a higher precision normal vector of the light plane, the initial direction vector n (0) Based on iterative weighted PCA processing, for the kth iteration, the residual of each 3D point to the current fitting light plane is calculated according to formula (3):

[0074]

[0075] In order to improve the ability to resist outlier interference, the Huber function is introduced as the weight through formulas (4) and (5)

[0076]

[0077] σ=1.345·median(|r i (k) |) (5)

[0078] Among them, median(|r i (k) |) is |r i (k) The median of |. Selecting σ as 1.345 times the median is more in line with the characteristics of normal distribution.

[0079] The three-dimensional coordinate set is iteratively weighted PCA processed using formulas (6) and (7).

[0080]

[0081] Take C (k+1) The eigenvector corresponding to the maximum eigenvalue is n (k+1) When the direction vector changes ||n (k+1) -n k When || is less than the convergence condition, the iteration stops and the final direction vector n=n is output. (k+1) .

[0082]

[0083] The light plane equation is obtained from formula (8): T x+d=0.c ,y c , z c ) T Substitute into the light plane equation to transform the light plane equation into a c x c +b c y c +c c z c +d c =0 form, (x c ,y c , z c ) is the three-dimensional coordinate in the camera coordinate system.

[0084] The light plane calibration method of the present invention is compared with the light plane calibration method based on cross-ratio invariance and the traditional light plane calibration method based on a calibration plate. The results are shown in Table 1.

[0085] Table 1

[0086] Light plane calibration method Based on cross-ratio invariance Traditional calibration plate-based Method of the present invention <![CDATA[a c ]]> 1.5826 1.6827 1.6804 <![CDATA[b c ]]> 0.0428 0.0321 0.0314 <![CDATA[c c ]]> 0.9127 0.9256 0.9068 <![CDATA[d c ]]> -324.2628 -324.6258 -324.4832 RMSE 0.4201 0.2320 0.1426

[0087] It can be seen from Table 1 that the light plane calibration method of the present invention has the best accuracy.

[0088] S2. Direct the line laser toward the shock absorber, use the host computer to drive the servo motor, and drive the three-dimensional scanning probe through the guide rail to perform time-series synchronous image acquisition of the shock absorber surface morphology to obtain a serialized image data set.

[0089] S3, the original image captured by the camera is as follows Figure 3 As shown in the figure, the adaptive histogram equalization algorithm is used to process the image to enhance the laser stripes in the dark area; the noise in the laser stripe grayscale image is filtered out by a Gaussian filter to make the laser stripe grayscale distribution more uniform; after filtering, the Sobel operator is used to extract the edge features of the laser stripe to distinguish the laser stripe from the background and reduce the influence of noise on the laser stripe edge. The obtained image is shown in the figure. Figure 4 Then the center line of the laser stripe is roughly extracted by the grayscale centroid method of row processing. The center line diagram of the roughly extracted center line is shown in Figure 5 shown.

[0090] Use a fixed-size window to traverse the roughly extracted laser stripe center line, and obtain the normal equation corresponding to each coordinate point in the window through curve fitting. For the coordinate points in the window, use the quadratic equation y=a0+a1x+a2x 2 Perform curve fitting. i ,y i )'s horizontal coordinate x i Substitute the fitting curve equation to obtain the coordinate point (x i ,yi ) on the fitting curve. i ',y i '). The fitting curve equation is calculated by formula (9) and (10) in (x i ',y i ').

[0091] K=a1+2a2x i ' (9)

[0092] x+Ky-(x i '+Ky i ')=0 (10)

[0093] Perform the above calculations on the n coordinate points within the window to obtain the normal equation corresponding to each coordinate point in the window. By traversing all the coordinate points in the window, the normal equation corresponding to each coordinate point in the entire line structured light image can be obtained. Since each pixel row where the light is located corresponds to a coordinate point after the grayscale centroid method is used for row-by-row processing, each pixel row in the image has a unique normal equation.

[0094] The center line of the laser stripe of the serialized image dataset is extracted by the normal weighted grayscale centroid method. Let the set of pixels within the pixel row be S, and calculate the grayscale value I(x,y) of each pixel (x,y) and its distance d(x,y) to the normal corresponding to the row. Using w(d(x,y)) as the weight function of the normal information contained in the pixel point (x,y), the horizontal coordinate x of the center point is obtained by formulas (11) and (12). -c .

[0095]

[0096] Since it is traversed by row, the vertical coordinate y of the center point of each row -c The same as the y-coordinate of the current row. Traverse all pixel rows to obtain a series of center points, and finally extract the center line of the laser stripe, such as Figure 6 shown.

[0097] The laser stripe centerline extraction method of the present invention is compared with the traditional grayscale centroid method, extreme value method and Steger method. Multiple groups of laser stripes on the surface of the shock absorber are selected, and the straight line parts are intercepted as test images. The results are shown in Table 2.

[0098] Table 2

[0099] Centerline extraction method Standard deviation Average processing speed / s Traditional grayscale centroid method 0.7802 0.015 Extreme Value Method 1.5728 0.005 Steger method 0.6789 0.245 Method of the present invention 0.5828 0.035

[0100] As can be seen from Table 2, the laser stripe centerline extraction method adopted in the present invention has the highest centerline extraction accuracy, and the processing speed is much faster than that of the Steger method.

[0101] S4. According to the fitted light plane equation, the center line of the laser stripe of the obtained serialized image data set is converted into a three-dimensional coordinate set in the camera coordinate system through formulas (13) and (14).

[0102]

[0103]

[0104] Where (u, v) is the physical coordinate of a point on the laser centerline; (x, y) is the pixel coordinate of the point; u0, v0 are obtained through the internal parameters of the camera, (x c ,y c ,z c ) is the three-dimensional coordinate of the point in the camera coordinate system.

[0105] The three-dimensional coordinate set in the camera coordinate system is converted into the three-dimensional coordinate set in the world coordinate system through formulas (15)-(17).

[0106]

[0107] Where f is the frame rate of the camera, θ is the angle between the camera and the laser, v is the moving speed of the guide rail, △s is the distance the camera moves, △P is the coordinate compensation value caused by the movement of the camera, P i is the three-dimensional coordinate (x ci ,y ci ,z ci ), P i ′ is P i Converted to three-dimensional coordinates in the world coordinate system (x w ,y w ,z w ).

[0108] The three-dimensional coordinate set is visualized by the pcl library, such as Figure 7 shown.

[0109] S5. Use the multi-scale adaptive statistical filtering method to process the three-dimensional coordinate set in the world coordinate system obtained in step S4. Perform local density estimation on each coordinate point in the three-dimensional coordinate set, calculate the average distance d from each coordinate point to the surrounding n points, and use the d value as the local density ρ of each coordinate point. Using ρ as a parameter, the high-density area and low-density area are obtained by K-means algorithm, and dynamic filtering is performed on the high-density area and low-density area respectively. The final three-dimensional coordinate set is visualized by the pcl library, as shown in Figure 8 As shown. The components of the shock absorber are as follows Figure 9 The comparison between the visualization results and the actual size is shown in Table 3.

[0110] Table 3

[0111] Components of shock absorbers Average measurement size / mm Actual size / mm 1 15.14 15.20 2 36.90 37.00 3 68.86 68.80 4 7.54 7.40 5 40.06 40.10

[0112] It can be seen from Table 3 that the measurement errors of all parts are within 0.2 mm.

[0113] S6: Convert the three-dimensional coordinate set processed in step S5 into a depth image, set the width of the depth image to W, the height to H, and calculate the x w ,y w , z w The maximum difference in coordinates △x w , △y w , △z w . Use formulas (18)-(20) to convert the x of each coordinate point into w ,y w The coordinates are converted to pixel coordinates (x, y) of the depth image, and the depth information d of the corresponding position is filled in according to the z value.

[0114]

[0115] Among them, round means taking an integer.

[0116] First, the shock absorber without defects is processed through the above steps to obtain a standard depth image, such as Figure 10 As shown, when inspection is required, the shock absorber is processed in the same scanning position, at the same scanning speed and scanning time to obtain a test depth image. Plasticine is pasted on the shock absorber to simulate defects. The test depth image is as shown in FIG. Figure 11 The standard depth image and the test depth image are differentially compared and segmented using the adaptive Otsu threshold to accurately extract the defect area. The final defect area is shown in Figure 12 shown.

[0117] Based on the pixel coordinates (x, y) of the defect area and the depth information d, the inverse operation of the depth image conversion is performed. The depth image of the defect area is converted into the three-dimensional coordinates of the defect area in the world coordinate system, and the position and depth of the defect area are obtained. The comparison between the final defect detection results and the actual defect is shown in Table 4.

[0118] Table 4

[0119] Defect Name Defect depth / mm Actual depth dimension / mm Protrusion detection 2.45 2.40 Sag detection 1.94 1.80

[0120] Subsequently, multiple sets of experiments were conducted to verify that the errors of all defect detections were within 0.2 mm.

[0121] In the present invention, since the defect detection results are obtained through two-dimensional depth images, the complex three-dimensional image processing process is avoided, and the detection speed is greatly improved; at the same time, it is easy to directly process the three-dimensional image, and the detection results are easily affected by interfering light spots. The use of the method of the present invention can reduce external interference and improve detection accuracy.

[0122] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A shock absorber defect detection system, characterized by: The system comprises a host computer (1), a guide rail (2), a servo motor (3), a driver (4), a three-dimensional scanning probe (5) and a shock absorber to be measured (6), wherein the three-dimensional scanning probe (5) is composed of a camera and a laser.

2. The shock absorber defect detection system according to claim 1, characterized in that: The guide rail is a high-precision guide rail.

3. A shock absorber defect detection method, characterized in that: The following steps are involved: S1. Use the light plane calibration method based on the calibration plate to obtain the three-dimensional coordinates P of the laser line on the calibration plate in the camera coordinate system. n , together forming a three-dimensional coordinate set P; using the iterative weighted PCA method to fit the three-dimensional coordinate set P into the light plane equation, and introducing the Huber function as the weight; S2. Direct the laser toward the shock absorber, use the host computer to drive the servo motor, and drive the three-dimensional scanning probe through the guide rail to perform time-series synchronous image acquisition of the shock absorber surface morphology to obtain a serialized image data set; S3. Perform a rough extraction of the laser stripe centerline from the preprocessed image using the grayscale centroid method for row-by-row processing. Then, use a fixed-size window to traverse the roughly extracted laser stripe centerline, and obtain the normal equation corresponding to each coordinate point in the window through curve fitting. Finally, extract the laser stripe centerline of the serialized image dataset using the normal weighted grayscale centroid method. S4. According to the fitted light plane equation, the center lines of the laser stripes of the obtained serialized image data set are converted into a three-dimensional coordinate set in the camera coordinate system, and then the three-dimensional coordinate set in the camera coordinate system is converted into a three-dimensional coordinate set in the world coordinate system; S5, using a multi-scale adaptive statistical filtering method to process the three-dimensional coordinate set in the world coordinate system obtained in step S4; S6. Convert the three-dimensional coordinate set processed in step S5 into a depth image, perform differential comparison and adaptive Otsu threshold segmentation on the test depth image and the standard depth image, accurately extract the defect area, map the image coordinates of the defect area to the world coordinate system, and output the three-dimensional coordinates and size information of the defect area.

4. The shock absorber defect detection method according to claim 3, characterized in that: In step S1, the light plane equation is fitted as follows: (1) Perform an initial PCA fit on the three-dimensional coordinate set P and calculate the initial mean according to formulas (1) and (2): and the covariance matrix C (0) , extract C (0) The eigenvector corresponding to the maximum eigenvalue of is taken as the normal vector n of the light plane (0) ; (2) In order to obtain a higher precision normal vector of the light plane, the initial direction vector n (0) Based on iterative weighted PCA processing, for the kth iteration, the residual of each 3D point to the current fitting light plane is calculated according to formula (3): (3) In order to improve the ability to resist outlier interference, the Huber function is introduced as the weight through formulas (4) and (5) in, for The median of ; σ is 1.345 times the median, which is more in line with the characteristics of normal distribution; (4) Perform iterative weighted PCA processing on the three-dimensional coordinate set using formulas (6) and (7); Take C (k+1) The eigenvector corresponding to the maximum eigenvalue is n (k+1) ; When the direction vector changes || n (k+1) -n k When || is less than the convergence condition, the iteration stops and the final direction vector n=n is output. (k+1) ; The light plane equation is obtained from formula (8): T x+d=0;x=(x c ,y c , z c ) T Substitute into the light plane equation to transform the light plane equation into a c x c +b c y c +c c z c +d c =0 form, (x c ,y c , z c ) is the three-dimensional coordinate in the camera coordinate system.

5. The shock absorber defect detection method according to claim 3, characterized in that: In step S3, the image preprocessing includes: using an adaptive histogram equalization algorithm to process the image and enhance the laser stripes in the dark area; filtering out the noise in the laser stripe grayscale image through a Gaussian filter to make the laser stripe grayscale distribution more uniform; and using a Sobel operator to extract the laser stripe edge features after filtering to distinguish the laser stripes from the background and reduce the influence of noise on the laser stripe edge.

6. The shock absorber defect detection method according to claim 3, characterized in that: In step S3, the fitting steps of the normal equation are as follows: For the coordinate points within the window, use the quadratic equation y=a0+a1x+a2x 2 Perform curve fitting; the coordinate points (x i ,y i )'s horizontal coordinate x i Substitute the fitting curve equation to obtain the coordinate point (x i ,y i ) on the fitting curve. i ',y i '); K=a1+2a2x i ' (9) x+Ky-(x′ i +Ky′ i )=0 (10) The fitting curve equation is calculated by formula (9) and (10) at (x i ',y i ').

7. The shock absorber defect detection method according to claim 3, characterized in that: In step S3, the normal weighted grayscale centroid method includes: assuming that the set of pixels within the pixel row range is S, calculating the grayscale value I(x,y) of each pixel point (x,y) and its distance d(x,y) to the normal corresponding to the row; using w(d(x,y)) as the weight function of the normal information contained in the pixel point (x,y); The horizontal coordinate x of the center point is obtained from formulas (11) and (12): -c .

8. The shock absorber defect detection method according to claim 3, characterized in that: The step S4 specifically includes the following steps: The center line of the laser stripe is converted into a three-dimensional coordinate set in the camera coordinate system using formulas (13) and (14); Where (u, v) is the physical coordinate of a point on the laser centerline; (x, y) is the pixel coordinate of the point; u0, v0 are obtained through the internal parameters of the camera, (x c ,y c ,z c ) is the three-dimensional coordinate of the point in the camera coordinate system; The three-dimensional coordinate set in the camera coordinate system is converted into the three-dimensional coordinate set in the world coordinate system through formulas (15)-(17); Where f is the frame rate of the camera, θ is the angle between the camera and the laser, v is the moving speed of the guide rail, △s is the distance the camera moves, △P is the coordinate compensation value caused by the movement of the camera, P i is the three-dimensional coordinate (x ci ,y ci ,z ci ), P i ′ is P i Converted to three-dimensional coordinates in the world coordinate system (x w ,y w ,z w ).

9. The shock absorber defect detection method according to claim 3, characterized in that: In step S5, the multi-scale adaptive statistical filtering method includes: performing local density estimation on each coordinate point in the three-dimensional coordinate set, calculating the average distance d from each coordinate point to the surrounding n points, and using the d value as the local density ρ of each coordinate point; using ρ as a parameter, obtaining high-density areas and low-density areas through K-means algorithm, and dynamically filtering the high-density areas and low-density areas respectively.

10. The shock absorber defect detection method according to claim 3, characterized in that: In step S6, the three-dimensional coordinate set is converted into a depth image by the following method: Set the width of the depth image to W and the height to H, and calculate the x in the three-dimensional coordinate set w ,y w , z w The maximum difference in coordinates △x w , △y w , △z w ; Use formulas (18)-(20) to convert the x of each coordinate point into w ,y w The coordinates are converted into pixel coordinates (x, y) of the depth image, and the depth information d of the corresponding position is filled according to the z value; Among them, round means taking an integer.