A R angle measurement method based on surface structured light

Through the point cloud segmentation and fitting method based on surface structured light, the problems of low efficiency and inaccurate R angle detection in the existing technology are solved, and efficient and accurate detection of multiple R angles is achieved, which is suitable for precision machined parts.

CN115661227BActive Publication Date: 2025-09-16EASY THINKING HANGZHOU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211375763.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-04
Publication Date
2025-09-16
Estimated Expiration
2042-11-04

AI Technical Summary

Technical Problem

The existing technology has the problem of low efficiency and accuracy when detecting multiple R angles, which is easily affected by human subjectivity. This is especially true for precision machined parts, where high detection accuracy is required and the number of R angles is large. Existing methods such as R gauge measurement and line structured light detection are inefficient and complex to operate.

Method used

A method based on surface structured light is adopted to achieve simultaneous detection of multiple R corners through precise segmentation and fitting of point cloud data. The point cloud is obtained using surface structured light, and the segmented surface is calculated to obtain the accurate R corner size.

Benefits of technology

It realizes efficient and accurate detection of the actual dimensions of multiple R angles, is suitable for precision machining parts, improves detection efficiency and accuracy, and reduces operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115661227B_ABST
    Figure CN115661227B_ABST
Patent Text Reader

Abstract

The present invention discloses an R angle measurement method based on surface structured light. The method comprises the following steps: screening a contour point cloud of the R angle to be measured; obtaining an indicator line in the contour point cloud; searching for a predicted vertex based on the indicator line: using the direction of the indicator line as the normal vector and the centroid of the contour point cloud as a point on the plane to derive a spatial plane equation, which is recorded as a segmentation plane; segmenting the contour point cloud using the segmentation plane as a boundary, and recording the portion of the point cloud containing the predicted vertex as an arc point cloud; projecting each point in the arc point cloud onto the segmentation plane, and calculating the maximum distance between each projected point, which is recorded as the predicted chord length; recording the distance from the predicted vertex to the segmentation plane as the predicted bow height; and translating the segmentation plane by determining the ratio between the predicted chord length and the predicted bow height until a circular arc segment point cloud of the R angle is obtained, which is then used to determine the R angle radius value. The method can simultaneously detect multiple R angles with high efficiency; accurately segmenting point cloud data, resulting in highly accurate detection results, is suitable for R angle detection of precision machined parts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual detection, and in particular to an R angle measurement method based on surface structured light. Background Art

[0002] Radius (R) corners are rounded corners created during the casting process of parts. They are a very common machining process in machining processes such as hemming, edging, waisting, and filleting. The current mainstream method for testing R corner machining accuracy is to use an R gauge. This method is suitable for small parts and a small number of R corners to be tested. However, when the number of R corners to be tested is large and the detection accuracy requirements are high, the R gauge measurement method exposes the shortcomings of being easily affected by human subjectivity and low efficiency.

[0003] In the precision manufacturing industry, such as automobile manufacturing, strict requirements are placed on the various dimensions of sheet metal parts. Radius (R) corners can be seen everywhere on the side panels, edges, and waistlines of the vehicle body. The accuracy of R corner processing directly affects the effectiveness of vehicle assembly and the aesthetics of the vehicle's appearance. Therefore, it is necessary to promptly detect the actual processing dimensions of R corners and evaluate their processing accuracy. For such precision-machined parts, R corner detection mainly has the following problems:

[0004] 1) There are many R angles to be tested. Taking the R angle test of a whole car as an example, there are dozens of R angle test points on the waistline of the car body alone, and the number of R angle test locations on the whole car is even more numerous.

[0005] 2) Compared with ordinary processed parts, its detection accuracy requirements are higher.

[0006] Therefore, how to effectively measure the R angle of precision machined parts is a technical problem that needs to be solved urgently. At present, the existing solution is to use a three-dimensional coordinate measuring machine to measure points, but the detection process requires the use of a fixture for positioning, the operation is complicated, and the fitting accuracy deviation is large; the existing solution is the patent document CN114004981, which proposes a vehicle body R angle visual detection method and system under incomplete point cloud conditions. It uses line structured light to obtain R angle information, and the detection accuracy is improved. However, line structured light can only detect one R angle to be measured at a time. For multiple R angles to be measured, they need to be measured one by one. During the operation, it is necessary to ensure that the laser bar is perpendicular to the area where the R angle is located. Otherwise, the detection accuracy will be poor, the detection speed will be slow, and the operation will be complicated. Summary of the Invention

[0007] To address these issues, the present invention proposes a method for measuring the rounded corners of a vehicle body based on surface structured light point clouds. This method, employing surface structured light detection, enables simultaneous detection of multiple rounded corners with high efficiency. It also precisely segments the point cloud data to derive point clouds of rounded corner segments, allowing for accurate fitting of the actual rounded corner dimensions. This method is suitable for measuring the rounded corners of precision machined parts, such as measuring the rounded corner profiles of hemming, curling, and waistlines on automobile bodies.

[0008] The technical solution is as follows:

[0009] A method for measuring an R angle based on surface structured light, in which a straight line connecting the R angle arc segment in the cross section of the R angle is recorded as an edge line, and there are two edge lines;

[0010] The section line of the R angle is the contour line of the section;

[0011] Use the following steps to measure the R angle:

[0012] 1) Filtering the contour point cloud of the R angle to be measured from the surface point cloud of the object to be measured; the contour point cloud is the point cloud intercepted by the cross section of the R angle to be measured, which includes the arc segment point cloud of the R angle and the straight line segment point cloud connected to the arc segment;

[0013] 2) In the contour point cloud, fit the longest and second longest lines, calculate the angle between the two lines, and determine whether the angle value is within the preset angle range:

[0014] If yes, calculate the middle line between the two lines, where the distances from each point on the middle line to the longest line and the second longest line are equal, mark the middle line as the indicator line, and proceed to step 3);

[0015] If not, obtain the surface point cloud of the object to be measured again, merge it with the previously obtained point cloud as a new surface point cloud of the object to be measured, and jump to step 1) until the indicator line can be marked;

[0016] 3) Based on the indicator line, use method 1 or method 2 to find the predicted vertex:

[0017] Method 1: Find the point closest to the indicator line in the contour point cloud and record it as the predicted vertex;

[0018] Method 2: Find all points in the contour point cloud whose distance to the indicator line is less than the preset distance threshold, take the average of the coordinates of each point, and record it as the predicted vertex;

[0019] The direction of the indicator line is used as the normal vector and the centroid of the contour point cloud is used as a point on the plane to derive the equation of the space plane, which is recorded as the splitting surface.

[0020] 4) Split the contour point cloud into two parts based on the segmentation surface, and record the part of the point cloud containing the predicted vertex as an arc point cloud;

[0021] Project each point in the arc point cloud onto the split surface, and then calculate the maximum distance between the projected points, which is recorded as the predicted chord length;

[0022] The distance from the predicted vertex to the split plane is recorded as the predicted bow height;

[0023] 5) Determine whether the ratio between the predicted chord length and the predicted bow height is within a preset ratio range. If so, record the current arc point cloud as an R-angle arc segment point cloud and execute step 6);

[0024] If not, the split surface is translated in the direction close to or away from the predicted vertex with a preset step size step;

[0025] Using the translated split plane, jump to step 4);

[0026] 6) Use the obtained R angle arc segment point cloud to fit a circle, obtain the R angle radius value, and complete the measurement of the R angle.

[0027] Furthermore, in step 2), the preset angle interval is set according to the theoretical angle α between the two edge lines and the angle tolerance;

[0028] In step 5), the preset proportional interval is set according to the ratio of the theoretical chord length to the theoretical bow height and the ratio tolerance;

[0029] The theoretical bow height and the theoretical chord length are calculated based on the theoretical included angle α and at least one of the theoretical radius, theoretical arc length, and theoretical center angle of the R angle to be measured.

[0030] The present invention also relates to an R angle measurement method based on surface structured light, wherein the central angle corresponding to the R angle arc portion is 180°, and the straight line connecting with the R angle arc segment in the cross section of the R angle is recorded as an edge line, and there are one or two edge lines; when there are two edge lines, they are parallel to each other;

[0031] Use the following steps to measure the R angle:

[0032] 1) Filtering the contour point cloud of the R angle to be measured from the surface point cloud of the object to be measured. The contour point cloud is the point cloud intercepted by the cross section of the R angle to be measured, which includes the arc segment point cloud of the R angle and the straight line segment point cloud connected to the arc segment;

[0033] 2) If there is only one edge line, fit the longest straight line in the contour point cloud; draw a line parallel to the longest straight line through the theoretical vertex of the R angle to be measured, record it as the indicator line, and proceed to step 3);

[0034] When there are two edge lines, fit the longest and second longest lines in the contour point cloud, calculate the angle between the two lines, and determine whether the angle value is within the preset angle range:

[0035] If yes, calculate the middle line between the two lines, where the distances from each point on the middle line to the longest line and the second longest line are equal, mark the middle line as the indicator line, and proceed to step 3);

[0036] If not, proceed to step A or step a;

[0037] Step A: Let the longest straight line be line L; calculate the centroid of the contour point cloud;

[0038] Draw a line parallel to the straight line L through the centroid, record it as the indicator line, and proceed to step 3);

[0039] Step a: Obtain the surface point cloud of the object to be measured again, and merge it with the previously obtained point cloud as a new surface point cloud of the object to be measured, and jump to step 1) until the indicator line can be marked;

[0040] 3) Based on the indicator line, use method 1 or method 2 to find the predicted vertex:

[0041] Method 1: Find the point closest to the indicator line in the contour point cloud and record it as the predicted vertex;

[0042] Method 2: Find all points in the contour point cloud whose distance to the indicator line is less than the preset distance threshold, take the average of the coordinates of each point, and record it as the predicted vertex;

[0043] The direction of the indicator line is used as the normal vector and the centroid of the contour point cloud is used as a point on the plane to derive the equation of the space plane, which is recorded as the splitting surface.

[0044] 4) Split the contour point cloud into two parts based on the segmentation surface, and record the part of the point cloud containing the predicted vertex as an arc point cloud;

[0045] Project each point in the arc point cloud onto the split surface, and then calculate the maximum distance between the projected points, which is recorded as the predicted chord length;

[0046] The distance from the predicted vertex to the split plane is recorded as the predicted bow height;

[0047] 5) Determine whether the ratio between the predicted chord length and the predicted bow height is within a preset ratio range. If so, record the current arc point cloud as an R-angle arc segment point cloud and execute step 6);

[0048] If not, the split surface is translated in the direction close to or away from the predicted vertex with a preset step size step;

[0049] Using the translated split plane, jump to step 4);

[0050] 6) Use the obtained R angle arc segment point cloud to fit a circle, obtain the R angle radius value, and complete the measurement of the R angle.

[0051] Furthermore, the preset angle interval in step 2) ranges from [0°, 25°];

[0052] In step 5), the preset ratio interval is [2 ratio tolerance, 2 ratio tolerance];

[0053] Furthermore, in step 1), the cross-section and contour point cloud of the R angle to be measured are obtained as follows:

[0054] I. Search for points within an area with the theoretical vertex of the R angle to be measured as the center and a preset value A as the radius, and record them as the point cloud to be processed; the preset value A is 2 to 5 times the theoretical radius of the R angle to be measured; calculate the main direction vector of the point cloud to be processed, and draw a spatial plane through the theoretical vertex of the R angle to be measured and with the main direction vector as the normal vector, and record them as the cross section of the R angle to be measured;

[0055] II. Calculate the distance from each point in the point cloud to be processed to the cross section, record the points whose distance value is less than the preset value B as the point cloud intercepted by the cross section, and store them in the contour point cloud;

[0056] The preset value B is an empirical value or 1 to 3 times the point cloud density.

[0057] Furthermore, in step I, the main direction vector of the contour point cloud is calculated as follows:

[0058] The covariance matrix of the contour point cloud is calculated using the PCA principal component analysis method, and the matrix decomposition is performed to obtain the maximum eigenvector of the covariance matrix, which is the principal direction vector;

[0059] In step II, the point cloud density is calculated as follows: establish a kd tree for the contour point cloud; calculate the average Euclidean distance between each point and its corresponding k neighboring points; and take the average of the Euclidean distances corresponding to all points as the point cloud density.

[0060] Preferably, the preset step size is 1 to 1.5 times the point cloud density or step size f takes values ​​from 1 to 3;

[0061] The point cloud density is calculated as follows: establish a kd tree for the contour point cloud; calculate the average Euclidean distance between each point and its corresponding k neighboring points; and take the average of the Euclidean distances corresponding to all points as the point cloud density.

[0062] Furthermore, in step 2), the longest and second longest lines are fitted in the contour point cloud as follows:

[0063] Use the contour point cloud to perform straight line fitting to obtain the longest straight line;

[0064] Eliminate the point cloud on the longest line, and use the remaining point cloud to fit the line again to obtain the second longest line;

[0065] The linear fitting method is Ransac method or least square method;

[0066] Step 2) The method for determining the middle line is:

[0067] The longest straight line is in the direction of (a1, b1, c1), passing through the point (x1, y1, z1), and the second longest straight line is in the direction of (a2, b2, c2), passing through the point (x2, y2, z2);

[0068] The direction of the middle line is passing point

[0069] Furthermore, in step 5), when the ratio between the predicted chord length and the predicted bow height is greater than the right end point of the preset ratio interval, the segmentation plane is translated in a direction close to the predicted vertex with a preset step length step;

[0070] When the ratio of the predicted chord length to the predicted bow height is less than the left end point of the preset ratio interval, the split surface is translated in a direction away from the predicted vertex at a preset step size.

[0071] Preferably, in step 1), when obtaining the point cloud of the surface of the object to be measured, the posture relationship between the surface structured light sensor and the surface of the object to be measured is changed multiple times to make the point cloud data complete;

[0072] Step 4) Split the contour point cloud into two parts using the segmentation surface as the boundary, and record the part of the point cloud containing the predicted vertex as an arc point cloud; the method is as follows:

[0073] Calculate the signed distance from each point in the contour point cloud to the segmentation plane, and record the points with the same sign as the signed distance calculated from the predicted vertex as points in the arc point cloud.

[0074] This method has the following characteristics:

[0075] The use of surface structured light detection can obtain a large number of point clouds on the surface of the object being measured at one time, covering a wide detection area. By accurately positioning the area to be measured for a single R corner, it can achieve simultaneous detection of multiple R corners, parallel processing of point cloud data, and fast detection speed.

[0076] When processing the point cloud of the R angle test area, this method calculates the segmentation surface and gradually translates the segmentation surface until it approaches the dividing point of the R angle arc segment and the straight line segment, thereby obtaining the accurate point cloud of the R angle arc segment, and then fitting the accurate actual size of the R angle, providing a strong guarantee for the subsequent evaluation of the R angle processing accuracy.

[0077] At the same time, this method also proposes a contour point cloud solution method, which retains the point cloud near the section and eliminates other points to reduce the solution error. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 This is a schematic diagram of the 90°R angle section line in Example 1;

[0079] Figure 2 Schematic diagram of the bow height and chord length of the 90°R angle in Example 1;

[0080] Figure 3 Schematic diagram of the bow height and chord length of the 60°R angle in Example 1;

[0081] Figure 4 This is a schematic diagram of a single edge line with an R angle of 180° in Example 2;

[0082] Figure 5 Schematic diagram showing the distribution of R-angle points to be measured at the curled edge of the rear cover of a car in Example 2 and a partial enlarged view of the R-angle;

[0083] Figure 6 The figure shows the point cloud and cross-sectional diagram of the area around a single R corner to be measured in Example 2;

[0084] Figure 7 (a) is a schematic diagram of the indicator line of a single R angle to be measured in Example 2;

[0085] Figure 7 (b) is a schematic diagram of the split surface in a single R angle to be measured in Example 2;

[0086] Figure 7 (c) is a schematic diagram of the translation of the splitting plane in a single R angle to be measured in Example 2. DETAILED DESCRIPTION

[0087] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0088] Example 1

[0089] A method for measuring R angle based on surface structured light, in which the straight line connecting the arc segment of the R angle is recorded as the edge line, and there are two edge lines; the section line of the R angle is the contour line intercepted by the section, such as Figure 1 It is a 90°R angle section line;

[0090] In this embodiment, there is no restriction on the central angle of the circle corresponding to the R-angle arc segment, such as 45°, 60°, 90°, and 180° R angles can all be detected;

[0091] Specifically, use the following steps to measure the R angle:

[0092] 1) Filter out the contour point cloud of the R angle to be measured from the surface point cloud of the object to be measured; the contour point cloud is the point cloud intercepted by the cross section of the R angle to be measured, which includes the arc segment point cloud of the R angle and the straight line segment point cloud connected to the arc segment;

[0093] 2) In the contour point cloud, fit the longest and second longest lines, calculate the angle between the two lines, and determine whether the angle value is within the preset angle range:

[0094] If so, calculate the middle line between the two lines. The distances from each point on the middle line to the longest line and the second longest line are equal. Mark the middle line as the indicator line and proceed to step 3).

[0095] If not, obtain the surface point cloud of the object to be measured again, merge it with the previously obtained point cloud as a new surface point cloud of the object to be measured, and jump to step 1) until the indicator line can be marked;

[0096] Specifically, the preset angle interval is set according to the theoretical angle α between the two edge lines and the angle tolerance;

[0097] like Figure 1 The 90°R angle corresponds to a theoretical angle α=90° between the two edge lines.

[0098] The angle tolerance ranges from 3° to 10°. When the value is 5°, the preset angle range is [85°, 95°].

[0099] like Figure 3 The 60° R angle in the figure corresponds to a theoretical angle α between the two edge lines = 180° - 60° = 120°. The angle tolerance is 8°, so the preset angle range is [112°, 128°].

[0100] 3) Based on the indicator line, use method 1 or method 2 to find the predicted vertex:

[0101] Method 1: Find the point closest to the indicator line in the contour point cloud and record it as the predicted vertex;

[0102] Method 2: Find all points in the contour point cloud whose distance to the indicator line is less than the preset distance threshold, take the average of the coordinates of each point, and record it as the predicted vertex;

[0103] The direction of the indicator line is used as the normal vector and the centroid of the contour point cloud is used as a point on the plane to derive the equation of the space plane, which is recorded as the splitting surface.

[0104] 4) Split the contour point cloud into two parts based on the segmentation surface, and record the part of the point cloud containing the predicted vertex as an arc point cloud;

[0105] Project each point in the arc point cloud onto the split surface, and then calculate the maximum distance between the projected points, which is recorded as the predicted chord length;

[0106] The distance from the predicted vertex to the split plane is recorded as the predicted bow height;

[0107] 5) Determine whether the ratio between the predicted chord length and the predicted bow height is within a preset ratio range. If so, record the current arc point cloud as an R-angle arc segment point cloud and execute step 6);

[0108] If not, the splitting surface is translated in a direction closer to or away from the predicted vertex at a preset step size step; specifically, when the ratio between the predicted chord length and the predicted bow height is greater than the right end point of the preset ratio interval, the splitting surface is translated in a direction closer to the predicted vertex at a preset step size step;

[0109] When the ratio between the predicted chord length and the predicted bow height is less than the left endpoint of the preset ratio interval, the split surface is translated away from the predicted vertex at a preset step size.

[0110] Using the translated split plane, jump to step 4);

[0111] Among them, the preset ratio interval is set according to the ratio of theoretical chord length to theoretical bow height and the ratio tolerance;

[0112] The theoretical bow height and the theoretical chord length are calculated based on the theoretical included angle α and at least one of the theoretical radius, theoretical arc length, and theoretical center angle of the R angle to be measured.

[0113] like Figure 2 、 3 As shown, the solution formula is as follows: the theoretical radius r of the R angle to be measured, the central angle θ=180-α, the chord length Bow height

[0114] 6) Use the obtained R angle arc segment point cloud to fit a circle, obtain the R angle radius value, and complete the measurement of the R angle.

[0115] More specifically, in order to obtain an accurate profile, in step 1), the profile and contour point cloud of the R angle to be measured are obtained as follows:

[0116] I. Search for points within an area with the theoretical vertex of the R angle to be measured as the center and a preset value A as the radius, and record this as the point cloud to be processed; the preset value A is 2 to 5 times the theoretical radius of the R angle to be measured; calculate the main direction vector of the point cloud to be processed, and draw a spatial plane through the theoretical vertex of the R angle to be measured and with the main direction vector as the normal vector, and record this as the cross section of the R angle to be measured;

[0117] II. Calculate the distance from each point in the point cloud to be processed to the cross section, record the points whose distance value is less than the preset value B as the point cloud intercepted by the cross section, and store them in the contour point cloud;

[0118] The preset value B is an empirical value or 1 to 3 times the point cloud density.

[0119] In step I, the main direction vector of the contour point cloud is calculated as follows:

[0120] The covariance matrix of the contour point cloud is calculated using the PCA principal component analysis method, and the matrix decomposition is performed to obtain the maximum eigenvector of the covariance matrix, which is the principal direction vector;

[0121] As a preferred embodiment, in step 5), the preset step size step is 1 to 1.5 times the point cloud density or step size f takes values ​​from 1 to 3;

[0122] In this embodiment, the point cloud density is calculated as follows: a kd-tree is constructed for the contour point cloud; the average Euclidean distance between each point and its k neighboring points is calculated; and the average of the average Euclidean distances for all points is taken as the point cloud density. The value of k is preferably 10 to 30; in this embodiment, it is 20.

[0123] In order to make the calculation results more accurate, the following preferred exemplary processing methods are provided, as follows:

[0124] Step 2) Fit the longest and second longest lines in the contour point cloud using the following method:

[0125] Use the contour point cloud to perform straight line fitting to obtain the longest straight line;

[0126] Eliminate the point cloud on the longest line, and use the remaining point cloud to fit the line again to obtain the second longest line;

[0127] The linear fitting method is Ransac method or least square method;

[0128] Step 2) The method for determining the middle line is:

[0129] The longest straight line is in the direction of (a1, b1, c1), passing through the point (x1, y1, z1), and the second longest straight line is in the direction of (a2, b2, c2), passing through the point (x2, y2, z2);

[0130] The direction of the middle line is passing point

[0131] Preferably, in step 1), when obtaining the point cloud of the surface of the object to be measured, the posture relationship between the surface structured light sensor and the surface of the object to be measured is changed multiple times to make the point cloud data complete;

[0132] Step 4) Split the contour point cloud into two parts using the segmentation surface as the boundary, and record the part of the point cloud containing the predicted vertex as an arc point cloud; the method is as follows:

[0133] Calculate the signed distance from each point in the contour point cloud to the segmentation plane, and record the points with the same sign as the signed distance calculated from the predicted vertex as points in the arc point cloud.

[0134] Example 2

[0135] A method for measuring R angle based on surface structured light. This embodiment is aimed at the 180° R angle in hemming / edge wrapping, that is, the central angle of the arc portion of the R angle is 180°.

[0136] In the cross section of the R angle, the straight line connecting the arc segment of the R angle is recorded as the edge line. The edge line has one (such as Figure 4 ) or two; when there are two, they are parallel to each other; the section line of the R angle is the contour line of the section;

[0137] Use the following steps to measure the R angle:

[0138] 1) Filter out the contour point cloud of the R angle to be measured from the surface point cloud of the object to be measured, such as Figure 6 As shown in the figure, the contour point cloud is the point cloud intercepted by the R-angle section to be measured, which includes the arc segment point cloud of the R-angle and the straight line segment point cloud connected to the arc segment;

[0139] 2) If there is only one edge line, fit the longest straight line in the contour point cloud; draw a line parallel to the longest straight line through the theoretical vertex of the R angle to be measured, record it as the indicator line, and proceed to step 3);

[0140] When there are two edge lines, fit the longest and second longest lines in the contour point cloud, calculate the angle between the two lines, and determine whether the angle value is within the preset angle range:

[0141] If so, calculate the middle line between the two lines (such as Figure 7 (a) The distances from each point on the middle line to the longest and second longest lines are equal. Mark the middle line as the indicator line and proceed to step 3).

[0142] If not, proceed to step A or step a;

[0143] Step A: Let the longest straight line be line L; calculate the centroid of the contour point cloud;

[0144] Draw a line parallel to the straight line L through the centroid, record it as the indicator line, and proceed to step 3);

[0145] Step a: Obtain the surface point cloud of the object to be measured again, and merge it with the previously obtained point cloud as a new surface point cloud of the object to be measured, and jump to step 1) until the indicator line can be marked;

[0146] The preset angle interval range is [0°, 25°]; in this embodiment, the preset angle interval is [0°, 20°];

[0147] 3) Based on the indicator line, use method 1 or method 2 to find the predicted vertex:

[0148] Method 1: Find the point closest to the indicator line in the contour point cloud and record it as the predicted vertex;

[0149] Method 2: Find all points in the contour point cloud whose distance to the indicator line is less than the preset distance threshold, take the average of the coordinates of each point, and record it as the predicted vertex;

[0150] The direction of the indicator line is used as the normal vector and the center of mass of the contour point cloud is used as a point on the plane to derive the spatial plane equation, which is recorded as the segmentation surface (e.g. Figure 7 (b));

[0151] 4) Split the contour point cloud into two parts based on the segmentation surface, and record the part of the point cloud containing the predicted vertex as an arc point cloud;

[0152] Project each point in the arc point cloud onto the split surface, and then calculate the maximum distance between the projected points, which is recorded as the predicted chord length;

[0153] The distance from the predicted vertex to the split plane is recorded as the predicted bow height;

[0154] 5) Determine whether the ratio between the predicted chord length and the predicted bow height is within a preset ratio range. If so, record the current arc point cloud as an R-angle arc segment point cloud and execute step 6);

[0155] If not, the split surface is translated in the direction close to or away from the predicted vertex with a preset step size (e.g. Figure 7 (c));

[0156] Using the translated split plane, jump to step 4);

[0157] The preset ratio interval is [2 ratio tolerance, 2 ratio tolerance]; in this embodiment, the ratio tolerance is 0.2, and the preset ratio interval is [1.8, 2.2].

[0158] 6) Use the obtained R angle arc segment point cloud to fit a circle, obtain the R angle radius value, and complete the measurement of the R angle.

[0159] The following takes the R angle detection at the curling edge of the rear cover of a car as an example to illustrate this embodiment:

[0160] like Figure 5 As shown, the curled edge of the car's rear cover contains multiple R angles to be measured; the surface structured light sensor obtains a point cloud of the car's rear cover surface, sorts each R angle to be measured according to the theoretical vertex position of the R angle to be measured, processes each R angle to be measured according to the order, and performs steps 1) to 6) for each R angle to be measured;

[0161] In order to make the point cloud data complete, the posture relationship between the surface structured light sensor and the surface of the object being measured is changed multiple times during the acquisition process;

[0162] In more detail, in order to make the test results more accurate, the following processing is also performed:

[0163] In step 1), the cross-section and contour point cloud of the R angle to be measured are obtained as follows:

[0164] I. Search for points within an area with the theoretical vertex of the R angle to be measured as the center and a preset value A as the radius, and record this as the point cloud to be processed; the preset value A is set to 3 times the theoretical radius of the R angle to be measured; calculate the main direction vector of the point cloud to be processed, and draw a spatial plane through the theoretical vertex of the R angle to be measured and with the main direction vector as the normal vector, and record this as the cross section of the R angle to be measured;

[0165] II. Calculate the distance from each point in the point cloud to be processed to the cross section, record the points whose distance value is less than the preset value B as the point cloud intercepted by the cross section, and store them in the contour point cloud;

[0166] The default value B is an empirical value or twice the point cloud density.

[0167] In step I, the main direction vector of the contour point cloud is calculated as follows:

[0168] The covariance matrix of the contour point cloud is calculated using the PCA principal component analysis method, and the matrix decomposition is performed to obtain the maximum eigenvector of the covariance matrix, which is the principal direction vector;

[0169] In step II, the point cloud density is calculated as follows: a kd-tree is built for the contour point cloud; the average Euclidean distance between each point and its k neighboring points is calculated; the average of the Euclidean distances corresponding to all points is taken as the point cloud density. k = 15;

[0170] In step 2), the longest and second longest lines are fitted as follows:

[0171] Use the contour point cloud to perform straight line fitting to obtain the longest straight line;

[0172] Eliminate the point cloud on the longest line, and use the remaining point cloud to fit the line again to obtain the second longest line;

[0173] The linear fitting method is Ransac method or least square method;

[0174] The method to determine the middle line is:

[0175] The longest straight line is in the direction of (a1, b1, c1), passing through the point (x1, y1, z1), and the second longest straight line is in the direction of (a2, b2, c2), passing through the point (x2, y2, z2);

[0176] The direction of the middle line is passing point

[0177] In step 3), the predicted vertex is searched using the second method according to the indicator line: the preset distance threshold is 0.05-1 mm; in this embodiment, the value is 1 mm.

[0178] In step 4), the contour point cloud is divided into two parts with the segmentation surface as the boundary, and the part of the point cloud containing the predicted vertex is recorded as an arc point cloud; the method is as follows:

[0179] Calculate the signed distance from each point in the contour point cloud to the segmentation plane, and record the points with the same sign as the signed distance calculated from the predicted vertex as points in the arc point cloud.

[0180] In step 5), the preset step size f = 1;

[0181] When the ratio between the predicted chord length and the predicted bow height is greater than the right end point of the preset ratio interval, the split surface is translated toward the predicted vertex with a preset step length;

[0182] When the ratio of the predicted chord length to the predicted bow height is less than the left end point of the preset ratio interval, the split surface is translated in a direction away from the predicted vertex at a preset step size.

[0183] This method uses surface structured light detection to obtain a large number of point clouds on the surface of the object being measured at one time. It covers a wide detection area, can realize synchronous detection of multiple R angles, parallelizes point cloud data processing, and has a fast detection speed.

[0184] For the convenience of explanation and accurate definition of the appended claims, the terms “upper”, “lower”, “left” and “right” are descriptions of exemplary embodiments of feature positions.

[0185] The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. The foregoing descriptions are not intended to be exhaustive or to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been chosen and described in order to explain the specific principles of the invention and their practical application, thereby enabling others skilled in the art to make and utilize the various exemplary embodiments of the invention and various alternatives and modifications thereof. The scope of the invention is intended to be defined by the appended claims and their equivalents.

Claims

1. A method for measuring R angle based on surface structured light, characterized in that: In the cross-section line of the R angle, the straight line connecting with the R angle arc segment is recorded as the edge line, and there are two edge lines; Use the following steps to measure the R angle: 1) Filtering the contour point cloud of the R angle to be measured from the surface point cloud of the object to be measured; the contour point cloud is the point cloud intercepted by the cross section of the R angle to be measured, which includes the arc segment point cloud of the R angle and the straight line segment point cloud connected to the arc segment; 2) In the contour point cloud, fit the longest and second longest lines, calculate the angle between the two lines, and determine whether the angle value is within the preset angle range: If yes, calculate the middle line between the two lines, where the distances from each point on the middle line to the longest line and the second longest line are equal, mark the middle line as the indicator line, and proceed to step 3); If not, obtain the surface point cloud of the object to be measured again, merge it with the previously obtained point cloud as a new surface point cloud of the object to be measured, and jump to step 1) until the indicator line can be marked; 3) Based on the indicator line, use method 1 or method 2 to find the predicted vertex: Method 1: Find the point closest to the indicator line in the contour point cloud and record it as the predicted vertex; Method 2: Find all points in the contour point cloud whose distance to the indicator line is less than the preset distance threshold, take the average of the coordinates of each point, and record it as the predicted vertex; The direction of the indicator line is used as the normal vector and the centroid of the contour point cloud is used as a point on the plane to derive the equation of the space plane, which is recorded as the splitting surface. 4) Split the contour point cloud into two parts based on the segmentation surface, and record the part of the point cloud containing the predicted vertex as an arc point cloud; Project each point in the arc point cloud onto the split surface, and then calculate the maximum distance between the projected points, which is recorded as the predicted chord length; The distance from the predicted vertex to the split plane is recorded as the predicted bow height; 5) Determine whether the ratio between the predicted chord length and the predicted bow height is within a preset ratio range. If so, record the current arc point cloud as an R-angle arc segment point cloud and execute step 6); If not, the split surface is translated in the direction close to or away from the predicted vertex with a preset step size step; Using the translated split plane, jump to step 4); 6) Use the obtained R angle arc segment point cloud to fit a circle, obtain the R angle radius value, and complete the measurement of the R angle.

2. The R angle measurement method based on surface structured light according to claim 1, characterized in that: In step 2), the preset angle interval is set according to the theoretical angle α between the two edge lines and the angle tolerance; In step 5), the preset proportional interval is set according to the ratio of the theoretical chord length to the theoretical bow height and the ratio tolerance; The theoretical bow height and the theoretical chord length are calculated based on the theoretical included angle α and at least one of the theoretical radius, theoretical arc length, and theoretical center angle of the R angle to be measured.

3. A method for measuring R angle based on surface structured light, characterized in that: The central angle of the R-angle arc portion is 180°, and the straight line connecting the R-angle arc portion in the cross-section of the R-angle is recorded as an edge line. There are one or two edge lines; when there are two, they are parallel to each other; Use the following steps to measure the R angle: 1) Filtering the contour point cloud of the R angle to be measured from the surface point cloud of the object to be measured. The contour point cloud is the point cloud intercepted by the cross section of the R angle to be measured, which includes the arc segment point cloud of the R angle and the straight line segment point cloud connected to the arc segment; 2) If there is only one edge line, fit the longest straight line in the contour point cloud; draw a line parallel to the longest straight line through the theoretical vertex of the R angle to be measured, record it as the indicator line, and proceed to step 3); When there are two edge lines, fit the longest and second longest lines in the contour point cloud, calculate the angle between the two lines, and determine whether the angle value is within the preset angle range: If yes, calculate the middle line between the two lines, where the distances from each point on the middle line to the longest line and the second longest line are equal, mark the middle line as the indicator line, and proceed to step 3); If not, proceed to step A or step a; Step A: Let the longest straight line be line L; calculate the centroid of the contour point cloud; Draw a line parallel to the straight line L through the centroid, record it as the indicator line, and proceed to step 3); Step a: Obtain the surface point cloud of the object to be measured again, and merge it with the previously obtained point cloud as a new surface point cloud of the object to be measured, and jump to step 1) until the indicator line can be marked; 3) Based on the indicator line, use method 1 or method 2 to find the predicted vertex: Method 1: Find the point closest to the indicator line in the contour point cloud and record it as the predicted vertex; Method 2: Find all points in the contour point cloud whose distance to the indicator line is less than the preset distance threshold, take the average of the coordinates of each point, and record it as the predicted vertex; The direction of the indicator line is used as the normal vector and the centroid of the contour point cloud is used as a point on the plane to derive the equation of the space plane, which is recorded as the splitting surface. 4) Split the contour point cloud into two parts based on the segmentation surface, and record the part of the point cloud containing the predicted vertex as an arc point cloud; Project each point in the arc point cloud onto the split surface, and then calculate the maximum distance between the projected points, which is recorded as the predicted chord length; The distance from the predicted vertex to the split plane is recorded as the predicted bow height; 5) Determine whether the ratio between the predicted chord length and the predicted bow height is within a preset ratio range. If so, record the current arc point cloud as an R-angle arc segment point cloud and execute step 6); If not, the split surface is translated in the direction close to or away from the predicted vertex with a preset step size step; Using the translated split plane, jump to step 4); 6) Use the obtained R angle arc segment point cloud to fit a circle, obtain the R angle radius value, and complete the measurement of the R angle.

4. The R angle measurement method based on surface structured light according to claim 3, characterized in that: The preset angle interval in step 2) ranges from [0°, 25°]; In step 5), the preset ratio interval is [2 ratio tolerance, 2 ratio tolerance].

5. The R angle measurement method based on surface structured light according to claim 1 or 3, characterized in that: Step 1) The cross-section and contour point cloud of the R angle to be measured are obtained as follows: I. Search for points within an area with the theoretical vertex of the R angle to be measured as the center and a preset value A as the radius, and record them as the point cloud to be processed; the preset value A is 2 to 5 times the theoretical radius of the R angle to be measured; calculate the main direction vector of the point cloud to be processed, and draw a spatial plane through the theoretical vertex of the R angle to be measured and with the main direction vector as the normal vector, and record them as the cross section of the R angle to be measured; II. Calculate the distance from each point in the point cloud to be processed to the cross section, record the points whose distance value is less than the preset value B as the point cloud intercepted by the cross section, and store them in the contour point cloud; The preset value B is an empirical value or 1 to 3 times the point cloud density.

6. The R angle measurement method based on surface structured light according to claim 5, characterized in that: Step I: Calculate the main direction vector of the contour point cloud as follows: The covariance matrix of the contour point cloud is calculated using the PCA principal component analysis method, and the matrix decomposition is performed to obtain the maximum eigenvector of the covariance matrix, which is the principal direction vector; In step II, the point cloud density is calculated as follows: establish a kd tree for the contour point cloud; calculate the average Euclidean distance between each point and its corresponding k neighboring points; and take the average of the Euclidean distances corresponding to all points as the point cloud density.

7. The R angle measurement method based on surface structured light according to claim 1 or 3, characterized in that: The default step size is 1 to 1.5 times the point cloud density or step size. f takes values ​​from 1 to 3; The point cloud density is calculated as follows: establish a kd tree for the contour point cloud; calculate the average Euclidean distance between each point and its corresponding k neighboring points; and take the average of the Euclidean distances corresponding to all points as the point cloud density.

8. The R angle measurement method based on surface structured light according to claim 1 or 3, characterized in that: Step 2) Fit the longest and second longest lines in the contour point cloud using the following method: Use the contour point cloud to perform straight line fitting to obtain the longest straight line; Eliminate the point cloud on the longest line, and use the remaining point cloud to fit the line again to obtain the second longest line; The linear fitting method is Ransac method or least square method; Step 2) The method for determining the middle line is: The longest straight line is in the direction of (a1, b1, c1), passing through the point (x1, y1, z1), and the second longest straight line is in the direction of (a2, b2, c2), passing through the point (x2, y2, z2); The direction of the middle line is passing point 9. The R angle measurement method based on surface structured light according to claim 1 or 3, characterized in that: Step 5), when the ratio between the predicted chord length and the predicted bow height is greater than the right end point of the preset ratio interval, the splitting surface is translated in a direction close to the predicted vertex with a preset step length step; When the ratio of the predicted chord length to the predicted bow height is less than the left end point of the preset ratio interval, the split surface is translated in a direction away from the predicted vertex at a preset step size.

10. The R angle measurement method based on surface structured light according to claim 1 or 3, characterized in that: Step 1) When obtaining the point cloud of the surface of the object being measured, the posture relationship between the surface structured light sensor and the surface of the object being measured is changed multiple times to make the point cloud data complete; Step 4) Split the contour point cloud into two parts using the segmentation surface as the boundary, and record the part of the point cloud containing the predicted vertex as an arc point cloud; the method is as follows: Calculate the signed distance from each point in the contour point cloud to the segmentation plane, and record the points with the same sign as the signed distance calculated from the predicted vertex as points in the arc point cloud.

Citation Information

Patent Citations

  • Vehicle body R angle visual detection method and system under incomplete point cloud condition

    CN114004981A

  • Method, device and equipment for extracting R-angle protruding point cloud and storage medium

    CN115239648A