A high-precision point cloud data reconstruction method
Through the online structured light detection module fixing and the object to be measured moves on the moving mechanism, combined with the data fusion model of the linear structured light camera and the moving mechanism and the distortion compensation technology, the problem of low point cloud data reconstruction accuracy in the existing technology is solved, and the reconstruction and robustness of high-precision point cloud data is achieved.
Patent Information
- Application Number
- CN202110944202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-08-17
AI Technical Summary
When existing linear structured optical cameras acquire and fuse point cloud data, there is a problem that sampling frequency and sampling spacing are not corresponding to each other, resulting in the inability to realize high-precision point cloud data reconstruction. In addition, the traditional scanning method requires moving the camera, which leads to ranging errors and system errors, affecting the accuracy of point cloud data.
The linear array structured light detection module is used to fix the object to be measured and move on the moving mechanism, and a mathematical model of the fusion of the linear structured light camera and the moving mechanism data is established, the corresponding relationship between the sampling frequency and the sampling spacing is derived, and high-precision point cloud data reconstruction is completed. At the same time, a linear structure light local coordinate system and a three-dimensional world coordinate system are established to compensate for the angle error, and improve the robustness of point cloud data.
The reconstruction of high-precision point cloud data is realized, which eliminates data errors that do not correspond to sampling frequency and sampling spacing, reduces ranging errors and system errors, improves the accuracy and robustness of point cloud data, and meets the needs of part detection in three-dimensional scenarios.
Smart Images

Figure CN113888693B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional measurement, and in particular to a high-precision point cloud data reconstruction method. Background Art
[0002] In recent years, with the development of sensor and computer technology, progress in the field of 3D vision has promoted the progress of object quality detection technology in the field of industrial products. Object quality detection is the most important part of the industrial production process, which determines the quality of the overall product. With the continuous improvement of object precision and processing automation, higher requirements are put forward for object detection technology.
[0003] The acquisition of surface shape information is the key to quality inspection. Traditional manual inspection methods mainly use contact engineering measurement methods, including stylus-type three-dimensional coordinate measuring instruments, micrometers, vernier calipers, etc., which are suitable for obtaining data information of parts with relatively regular dimensions and fewer characteristic surfaces. They are characterized by accurate measurement repetition accuracy and high reliability; but they have high requirements for the use environment and positioning and posture determination. During the measurement process, manual operation is required to select measurement points, and the measurement efficiency is low; and contact measurement requires a certain contact force, which will cause deformation of the surface of the object and affect the accuracy of precision measurement of soft surfaces. Modern industrial inspection methods mainly use non-contact engineering measurement methods, including laser scanning technology, image measurement technology, ultrasonic measurement technology, stereoscopic vision measurement technology, and projection grating measurement technology.
[0004] The non-contact engineering measurement method does not require contact with the surface of the object being measured, thus avoiding damage to the object surface. It is suitable for the detection of soft surfaces and complex surface objects, and can quickly obtain three-dimensional point cloud data information on the surface of the object. It has great flexibility and practicality in the engineering field. Among them, the direct laser triangulation ranging method is often used in non-contact engineering measurement due to its simple structure and easy implementation.
[0005] The acquisition and fusion of point cloud data is the core of non-contact engineering measurement. The detection performance and accuracy of industrial product object detection systems are mainly affected by the hardware modules and measurement principles of the detection system. The precision and accuracy of point cloud data acquisition determine the accuracy of detection and are related to the accuracy of object quality judgment.
[0006] At present, there are several problems in the acquisition and fusion of line structured light cameras:
[0007] (1) The point cloud data obtained is the Z-axis depth information of the object. Due to the deviation between the movement speed of the electric slide and the sampling frequency and sampling spacing of the line laser scanner, it cannot be effectively matched and integrated with the X-axis and Y-axis data, and thus it is impossible to reconstruct high-precision point cloud data.
[0008] (2) Traditional linear array structured light can be divided into two modes: horizontal and rotational. Both modes use the method of fixing the object and moving the linear array structured light camera. Horizontal scanning refers to the movement of the line laser scanner above the object along a fixed X-axis or Y-axis track route to obtain the object's point cloud information; rotational scanning refers to the linear array structured light camera obtaining the object's three-dimensional point cloud information at a certain rotation angle. Since both horizontal scanning and rotational scanning require the movement of the linear array structured light camera, ranging errors will inevitably occur in the process of surface information being fed back to the sensor, affecting the accuracy of the point cloud data.
[0009] (3) In the process of obtaining surface information of an object using line structured light, due to the imaging principle and its own hardware structure, there will inevitably be systematic errors, and the acquired position information will be distorted, affecting the accuracy of the point cloud data. Summary of the invention
[0010] The present invention provides a high-precision point cloud data reconstruction method. According to the principle of laser triangulation, a linear array structured light detection module is fixed, and the object to be measured moves on a motion mechanism, so that the sensor can receive the surface information of the object more stably; a mathematical model of data fusion between a linear structured light camera and a motion mechanism is established, the corresponding relationship between the sampling frequency and sampling spacing of the motion mechanism and the linear structured light camera is derived, the Y-axis information is corresponded to the X-axis and Z-axis information, and the high-precision point cloud data reconstruction is completed, and the data error caused by the mismatch between the motion mechanism and the sampling frequency and sampling spacing is eliminated; a linear structured light local coordinate system and a three-dimensional world coordinate system are established, and distortion compensation is performed on the angle error existing in the data reconstruction model, so as to improve the robustness of point cloud data acquisition, reduce the influence of scanning angle and scanning distance on point cloud data, facilitate the establishment of topological relationship of part point cloud data and subsequent three-dimensional reconstruction, and meet the needs of part detection applications in three-dimensional scenes.
[0011] The present invention can be achieved through the following technical solutions:
[0012] A high-precision point cloud data reconstruction method includes a detection platform, on which a motion mechanism and a bracket are arranged, the motion mechanism is used to drive the object to be detected to move along / around the X-axis and the Y-axis, and the bracket is arranged with a line structured light detection module, the laser beam emitted by the line structured light detection module is vertically directed to the object to be detected, and the point cloud data collection of the object to be detected is completed, taking the sampling period as a unit, according to the principle of similar triangles, combined with the measurement range of the line structured light detection module in the Z-axis direction to obtain the Z-axis coordinate of the point to be detected, and then combined with the measurement range of the line structured light detection module in the X-axis direction, using an arithmetic progression formula to obtain the X-axis coordinate of the point to be detected, and then, according to the physical parameters of the line structured light detection module, combined with the number of sampling periods, the Y-axis coordinate of the point to be detected is obtained to reconstruct the three-dimensional point cloud data, and finally, the reconstructed three-dimensional point cloud data is compensated and adjusted according to the spatial angle between the camera coordinate system of the line structured light detection module and the world geographic coordinates to obtain the final reconstructed data.
[0013] Furthermore, the moving distance limit of the object to be measured driven by the motion mechanism along the Y axis is taken as one scan, and the line structured light detection module performs W samplings during one scan, and a total of R scans are required to complete the data collection of the object to be measured. Then, when the w-th sampling is performed in the first scan, the coordinate information of the i-th point to be measured is:
[0014]
[0015] At the uth scan, the coordinate information of the i-th point at the wth sampling is:
[0016]
[0017] Among them, D3 represents the measurement range of the line structured light detection module in the X-axis direction, n2 represents the number of test points evenly distributed in the measurement range in the X-axis direction, n1 represents the total number of test points, t1 represents the sampling period, v1 represents the movement speed of the motion mechanism along the Y-axis, △h represents the measurement range of the line structured light detection module in the Z-axis direction, h3 represents the measurement range of the line structured light detection module in the Z-axis direction corresponding to the measurement range on the photosensitive element, and h represents the measurement distance of the test points within the measurement range of the line structured light detection module in the Z-axis direction corresponding to the photosensitive element.
[0018] Furthermore, the motion mechanism drives the object to be measured to perform a scan along the Y axis, then moves a distance D3 along the X axis, and then performs a second scan along the Y axis, and so on, performing R scans to complete data collection of the object to be measured.
[0019] further,
[0020] Wherein, h1 represents the object distance of the camera in the line structured light detection module, and f represents the focal length of the camera in the line structured light detection module.
[0021] Furthermore, the camera coordinate system of the line structured light detection module is O-XYZ, the world coordinate system is O1-X1Y1Z1, and the spatial angle between the two is θ xyz , project it to the XOY, XOZ, and YOZ planes in turn, then the X1 axis is projected to the XOY plane at an angle θ z , the projection of the X1 axis and the Z1 axis to the XOZ plane forms an angle θ y , the Z1 axis is projected onto the YOZ plane to form an angle θ x , the following formula is used to compensate and adjust the reconstructed 3D point cloud data:
[0022]
[0023] Furthermore, an object with steps and known size is placed on the motion mechanism, and the line structured light detection module is used to collect point cloud data. Then, according to the result of point cloud data collection and the actual size of the object, the angle θ is calculated. x ,θ y ,θ z .
[0024] The beneficial technical effects of the present invention are:
[0025] (1) Based on the principle of laser triangulation, a mathematical model for the reconstruction of the line structured light detection module and the motion mechanism data is established. According to the correspondence between the motion mechanism parameters and the sampling frequency and sampling interval of the line structured light camera, the Y-axis information is matched with the X-axis and Z-axis information to complete the reconstruction of high-precision point cloud information.
[0026] (2) Distortion compensation is performed on the angle error existing in the data reconstruction model process to reduce distortion interference, improve point cloud accuracy and the robustness of point cloud data acquisition, eliminate the influence of scanning angle and scanning distance on point cloud data, and facilitate the establishment of topological relationship of part point cloud data and subsequent three-dimensional reconstruction, thus meeting the needs of part detection applications in three-dimensional scenes.
[0027] (3) Build an automated inspection platform to perform high-precision three-dimensional inspection of objects without any external positioning assistance. The motion mechanism is installed above the vibration isolation and damping platform to minimize the vibration deviation caused by the motion mechanism during the object scanning process. Use a linear array structured light camera to collect data without moving the object to be tested. The motion mechanism plans the trajectory of the object to be tested, replacing manual inspection, avoiding measurement errors caused by manual operation, avoiding damage to the object surface, and improving the degree of automation and precision of inspection.
[0028] (4) By using a linear array structured light fixed on the moving mechanism, the sensor can receive the surface information of the object more stably, reduce the ranging error, and increase the accuracy of point cloud acquisition. Compared with the existing scanning method, it has more measurement advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the overall process of the present invention;
[0030] Figure 2 It is a structural schematic diagram of the object automatic online detection platform of the present invention, wherein 1-1 is a profile bracket, 1-2 is a line structured light camera, 1-3 is a placed object to be detected, 1-4 is a stepping motor, 1-5 is an electric slide, and 1-6 is a vibration isolation platform;
[0031] Figure 3 Schematic diagram of the triangulation distance measurement principle of the present invention, wherein 3-1 is a line structured light camera, 3-2 is a photosensitive element, and 3-3 is a photosensitive lens;
[0032] Figure 4 It is a principle diagram of the line structured light camera acquisition of the present invention, wherein 4-1 is the line structured light camera, 4-2 is the photosensitive element, 4-3 is the photosensitive lens, and 4-4 is the surface of the part to be measured;
[0033] Figure 5 It is a three-dimensional schematic diagram of data fusion of the present invention;
[0034] Figure 6 It is a two-dimensional schematic diagram of data fusion of the present invention;
[0035] Figure 7 Schematic diagram of target path planning of the present invention, wherein 7-1 is the surface of the object to be measured;
[0036] Figure 8 It is a schematic diagram of the local coordinate system and the compensation coordinate system of the present invention;
[0037] Fig. 9 It is a schematic diagram of the angle projection of the local coordinate system of the present invention.
[0038] Fig.10 A schematic diagram of the change of the object distortion position information of the present invention;
[0039] Fig.11 is the angle θ of the line structured light camera of the present invention x Schematic diagram;
[0040] Fig.12 is the angle θ of the line structured light camera of the present invention y Schematic diagram;
[0041] Fig.13 is the angle θ of the line structured light camera of the present inventionz Schematic diagram;
[0042] Fig.14 is the angle θ of the present invention x Schematic diagram of calculation;
[0043] Fig.15 is the angle θ of the present invention y Schematic diagram of calculation;
[0044] Fig.16 is the angle θ of the present invention z Schematic diagram of calculation;
[0045] Fig.17 The original scanning result of the double-layer hole piece of the present invention;
[0046] Fig.18 is the angle θ of the double-layer hole member of the present invention x Calculation diagram;
[0047] Fig.19 is the angle θ of the double-layer hole member of the present invention y With θ z Calculation diagram;
[0048] Fig. 20 A schematic diagram showing the comparison of the double-layer hole element before and after distortion compensation of the present invention;
[0049] Fig.21 A two-dimensional schematic diagram of data reconstruction of a sample instrument, a double-layer aperture member, and a grid assembly of the present invention;
[0050] Fig. 22 It is a schematic diagram of the point cloud registration result of the sample instrument, double-layer aperture member and grid assembly of the present invention;
[0051] Fig.23 It is a statistical schematic diagram of point-to-point deviation values of instrument components of the present invention;
[0052] Fig.24 It is a statistical schematic diagram of point pair deviation values of the double-layer hole component of the present invention;
[0053] Fig.25 It is a statistical diagram of the point-pair deviation values of the gate components of the present invention. DETAILED DESCRIPTION
[0054] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings and preferred embodiments.
[0055] like Figure 1 As shown, the present invention provides a high-precision point cloud data reconstruction method based on a fixed line structured light camera, such as Figure 2As shown, the line structured light detection module 1-2 is fixed above the motion mechanism 1-5, the object 1-3 to be measured is placed on the surface of the motion mechanism 1-5, the control module drives the motion mechanism 1-5 to move horizontally, and the object 1-3 to be measured moves with the motion of the motion mechanism 1-5, and passes through the scanning range of the line structured light camera 1-2 in turn. According to the principle of laser triangulation, a mathematical model of data fusion between the line structured light camera 1-2 and the high-precision motion mechanism 1-5 is established, and the corresponding relationship between the selected motion mechanism parameters and the sampling frequency and sampling spacing of the line structured light camera is derived. The Y-axis information is corresponded to the X-axis and Z-axis information to complete the high-precision point cloud information fusion, and the data error caused by the mismatch between the motion mechanism and the sampling frequency and sampling spacing is eliminated. The line structured light camera 1-2 and the motion mechanism 1-5 are placed on the surface of the vibration isolation platform 1-6, and the line structured light camera 1-2 is connected to the profile bracket 1-1 by screw installation. The line structured light detection module 1-2 is fixed above the motion mechanism 1-5, and the placed part 1-3 to be measured is placed on the motion mechanism 1-5.
[0056] The camera of the line structured light detection module 1-2 emits a laser beam perpendicular to the surface of the object to be measured, which is converged to the surface of the object to be measured through the photosensitive lens 3-3 to form a light spot. The light spot containing the reflected light is transmitted to the imaging lens through diffuse reflection, and then converges on the photosensitive element 3-2, converting the line structured light camera signal into an electrical signal.
[0057] The laser beam emits a change in reflection angle as the height of the surface of the object to be measured fluctuates. The imaging position of the reflected light beam on the photosensitive element 3-2 moves accordingly through the photosensitive lens 3-3. When the positions of the laser scanner 3-1 and the photosensitive element 3-2 are fixed, the object distance, phase distance and focal length parameters are also determined. The relationship between the imaging positions of the light spots is derived in combination with the spatial geometric position, and the changes on the surface of the object to be measured are obtained. The specific depth information of the Z axis is calculated based on the principle of similar triangles.
[0058] The Z-axis depth information of the object to be measured is obtained based on the principle of triangulation, such as Figure 4 As shown, the line structured light camera emits a laser beam perpendicular to the surface of the object to be measured, which is transmitted to the surface of the object to be measured through the photosensitive lens to form a light spot. The light spot containing the reflected light is transmitted to the imaging lens through diffuse reflection, and then gathered on the photosensitive element, converting the line structured light camera signal into an electrical signal. The plane D1 formed by the line structured light camera emitting laser is the plane D2 formed by the photosensitive element. The planes D1 and D2 intersect at the line segment D3. The line segment D3 is the measurement range of the line structured light detection module in the Z-axis direction.
[0059] Line segments A1A2 and B1B2 intersect at point O. The measurement range of the line structured light camera in the Z-axis direction is:
[0060] A1B1=△h (1)
[0061] The corresponding distance on the photosensitive element is:
[0062] A2B2=h3 (2)
[0063] Draw a perpendicular line through points B1 and B2 to A1A2, and the intersection points are B3 and B4. According to the similar triangle theorem, we can deduce:
[0064]
[0065] Among them
[0066]
[0067] Substituting formula (4) into formula (3) yields:
[0068]
[0069] The relationship between the line structured light camera, the photosensitive element, the photosensitive lens and the measuring range of the line structured light camera can be obtained.
[0070] Assuming the camera object distance is U, the image distance is V, and the focal length is f, we can get the following from the convex lens imaging principle:
[0071]
[0072] When the light spot is on the reference plane where A1 is located, U = h1, V = h2, and substituting into formula (6) we can get:
[0073]
[0074] Substituting formula (7) into formula (5) yields:
[0075]
[0076] When the positions of the linear array structured light camera and the photosensitive element are determined, the object distance U, image distance V, and focal length f are also determined. The value of h3 can be obtained through the photosensitive element. By substituting it into formula (8), the value of Δh can be obtained, which is the range of the laser sensor.
[0077] It is known that the measurement range of the linear array structured light camera is Δh. Assume that a point i on the surface of the object to be measured is at the z position between A1B1. i Point, the corresponding point on A2B2 is z i ' point, then according to the principle of similar triangles:
[0078]
[0079] Taking the plane where B1 is located as the reference plane, it can be made to coincide with the XOY plane, and B2Z i' is the corresponding distance on the photosensitive element, which can be obtained from the parameters of the line structured light camera itself, then B1Z i is the Z-axis depth information of a point i on the surface of the object to be measured, that is, the high-precision Z-axis direction point cloud data required to be obtained.
[0080] The object to be measured is placed on the surface of the moving mechanism, such as Figure 5 , Figure 6 As shown in the figure, the object to be measured moves with the movement of the mechanism. The measurement width range D3 of the line structured light camera in the X-axis direction is calculated according to the hardware equipment parameters, and the number of points within its width range is obtained through the host computer. Since its width and number of points are evenly distributed, the X-axis position information of each corresponding point is derived using the arithmetic progression formula.
[0081] Suppose there are n2 points on line segment D3, any point of which is x i (1≤i≤n2), the distance between each point is d3, then the calculation formula of d3 is:
[0082]
[0083] The x-coordinate of any data point i can be listed by the arithmetic progression formula:
[0084] x i =d3(i-1)(1≤i≤n2) (11)
[0085] Substituting formula (10) into formula (11), we have:
[0086]
[0087] Assume that the sampling frequency of the line structured light camera is f1, the sampling period is t1, the trigger spacing is △S, the distance traveled by the motion mechanism in time t1 is S1, and the speed is set to v1mm / s.
[0088] The sampling period t1 of the line structured light camera is:
[0089]
[0090] At this time, the distance S1 traveled by the motion mechanism in time t1 is:
[0091] S1=v1×t1 (14)
[0092] That is, the distance traveled by the motion mechanism between the current sampling and the next sampling is S1, which is Figure 6 The positive direction of the Y axis is shown.
[0093] Considering the hardware limitations of the line structured light camera, its scanning width may not necessarily cover the overall scanning size of the object to be measured, so it is necessary to plan the scanning path of the object to be measured, such as Figure 7 As shown, assuming that the length and width of the object to be measured are S2 and S3, when S3 is greater than the measurement width range D3 of the line structured light camera, the distance to be scanned in the Y-axis direction is determined according to the length of the part. After each scan, it moves D3mm in the X-axis direction. Assuming the number of scans of the current line structured light camera is u, the point cloud data file generated by each line structured light camera corresponds to the number of times the motion mechanism moves D3, and the scanning path of the line structured light camera is set. The motion path of the motion mechanism is the path indicated by the arrow. Assuming the total number of sampling times is W, the first data point of the point cloud data file saved by the first sampling is used as the starting coordinate origin, and the local coordinate system is established with point O as the origin. The local coordinate system refers to the coordinate system fixed to the line structured light camera, in which the X-axis is vertically upward, the positive direction of the Y-axis is the moving direction of the high-precision motion mechanism, and the Z-axis is perpendicular to the XOY plane.
[0094] Assume that the number of scans of the line structured light camera is R, and the Y-axis direction is the movement direction of the motion mechanism. According to the distance S1 traveled by the motion mechanism in the sampling period t1, that is, the distance traveled by the motion mechanism between the current sampling and the next sampling is S1, then the Y-axis coordinate formula of any data point i at the wth sampling is:
[0095] y i =S1×(w-1)(1≤i≤n1) (15)
[0096] Then the coordinate information of the i-th point at the w-th sampling in the first scan is:
[0097] N i =(x i ,y i ,z i )(1≤i≤n1) (16)
[0098] Substitute into N i The expression is:
[0099]
[0100] At the uth scan, the coordinate information of the i-th point at the wth sampling is:
[0101]
[0102] The point cloud data file format generated by line structured light is csv, the number of columns corresponds to the Z-axis depth information of each sampling data point, and the number of rows corresponds to the total number of sampling times.
[0103] The position information of the X-axis, Y-axis, and Z-axis is combined, that is, a mathematical model for the fusion of the line structured light camera and the movement data of the high-precision motion mechanism is established, so as to reconstruct the three-dimensional point cloud data and complete the reconstruction of the high-precision point cloud data.
[0104] To verify the correctness of the fusion method, the electric slide is selected as the motion mechanism and substituted into the data fusion model for calculation. Based on the corresponding relationship between the number of pulses of the motion mechanism stepper motor and the sampling frequency and sampling interval of the linear array structured light camera, the Y-axis position information of the corresponding point of each sampled point cloud data is obtained.
[0105] Assume that the basic parameters of the motion mechanism are: step angle a, subdivision number b, pulse number c1, screw lead P, ball screw pitch O, pitch head number m, the linear displacement of one pulse of the motor is S4, the stroke is S5, the distance traveled by each pulse is S6, and the distance traveled by the motion mechanism in time t1 is S1. That is, the calculation formula for the number of pulses c1 required for the motor to rotate 360° is:
[0106] The calculation formula of ball screw lead P is: P = O × m (20)
[0107] To travel a lead distance P, c1 pulses need to be received, and the distance S6 traveled in each pulse cycle is:
[0108] The number of pulses c2 required to move a distance of 1 mm is:
[0109] The motion control card used to control the motion mechanism is set to the pulse equivalent programming mode, setting 1mm = c2pulse, and the drive speed is set to v1mm / s. At this time, the number of pulses sent per second c3 is: c3 = d×c2(23)
[0110] The distance S1 traveled by the electric slide within time t1 is the sampling interval, which corresponds to the Y-axis movement distance of one sampling.
[0111] In order to reduce distortion interference, the distortion of the data fusion model is calculated and compensated.
[0112] Establish the line structured light camera coordinate system O-XYZ and the three-dimensional world coordinate system O1-X1Y1Z1, such as Figure 8 As shown in the figure, the former is regarded as a local coordinate system, and the data reconstruction method is derived based on the local coordinate system O-XYZ; the latter is regarded as a compensation coordinate system, and the spatial angle between O1-X1Y1Z1 and O-XYZ is θ xyz , the Y-axis direction is the moving direction of the motion mechanism, and there is no deflection angle error, that is, the Y-axis data of the local coordinate system is the Y-axis data of the compensation coordinate system, and no compensation is required.
[0113] The translation compensation coordinate system is aligned with the center O1 of the camera coordinate system, and the spatial angle θ xyz Project to XOY, XOZ, and YOZ planes in sequence, such as Fig. 9 As shown, the projection of the X1 axis to the XOY plane forms an angle θ z, the projection of the X1 and Z1 axes to the XOZ plane forms an angle θ y , the Z1 axis is projected onto the YOZ plane to form an angle θ x The existence of spatial angles causes deviations in the three-dimensional surface information of the object to be measured, and a distortion compensation model needs to be established to reduce the error.
[0114] Suppose the three-dimensional coordinate information of any point k in the camera coordinate system is (x k ,y k ,z k ), due to the spatial angle θ xyz The existence of point k in the actual three-dimensional coordinates is (x k ',y k ',z k '),like Fig.10 As shown, (a) is the local coordinate system of the camera, and (b) is the compensation coordinate system. The rectangular block in the coordinate system represents the object to be measured, the scanning range of the linear array structured light is d3, and the scanning range in the compensation coordinate system after distortion compensation is d3'. The actual three-dimensional data information of the object is restored through the distortion compensation model.
[0115] The Y-axis direction is the moving direction of the motion mechanism, and the Z-axis direction can be obtained by calculating the depth information based on triangulation. k 'With Z k The corresponding relationship.
[0116] There is installation deflection when the line structured light camera is installed with the profile bracket, which is a system error, such as Fig.11 As shown in the figure, the camera has a certain deflection angle with the horizontal plane, which causes the position information received by the photosensitive element to be distorted, thereby affecting the object measurement accuracy. The Z1 axis is projected onto the YOZ plane to form an angle θ x , X k With Z k is the X-axis and Z-axis position information measured in the camera coordinate system, and is the position information after compensation, based on θ x The distortion compensation formula is:
[0117]
[0118]
[0119] The compensation angle θ can be obtained x The coordinate value of any point k in the post-compensation coordinate system.
[0120] The angle between the X1 and Z1 axis projections and the coordinate axis is θ y , which causes the object depth information to deviate from the spacing d3 between the light sampling points of the linear array mechanism, such as Fig.12 As shown, the blue color indicates the Y-axis movement direction. To compensate θ y The depth information in the Z-axis direction is calculated as follows:
[0121]
[0122] Get compensation θ y The subsequent location information.
[0123] The X1 axis and the XOY plane form an angle θ z ,like Fig.13 As shown, the angle θ z The existence of will also change the sampling point spacing. Let the sampling point spacing after compensation be The calculation formula is:
[0124]
[0125] From formula (18), the data fusion model deduces the coordinate information of the kth point at the uth scan and wth sampling as follows:
[0126]
[0127] Right now:
[0128]
[0129] After the distortion compensation is performed on the k coordinate information of any point, the calculation formula is:
[0130]
[0131] According to formula (30), the three-dimensional position information of any point after distortion compensation is completed can be obtained.
[0132] Before measuring the object to be measured, it is necessary to determine the spatial angle θ for distortion compensation. xyz . Space angle θ xyz The calculation is obtained by measuring and comparing with a standard object with a known certain size and one or more steps. It is observed that the three-dimensional point cloud data generated by the standard object with a certain size through the original data reconstruction model is distorted compared with the original part, and data missing with a length of L2 occurs. It is necessary to calculate the spatial angle to complete the distortion compensation of the point cloud data.
[0133] Assume that the standard object has different surfaces with a height difference of L1, that is, steps. Due to the height difference, the photosensitive element cannot obtain data from the plane of length L2 when the line structured light camera obtains depth information, resulting in data loss. The vertical incident angle of the selected line structured light camera is known, such as Fig.14 Using trigonometric relationships to find θ x The specific value of .
[0134] The standard vertical incident angle of the linear array structured light camera used in the experiment is x, θ x The calculation formula of θ1 is:
[0135] θ x =x-θ1 (31)
[0136]
[0137] Select the linear array structured light to scan the plane data line of the object at any time to ensure that the collected data is theoretically at the same plane height, such as Fig.15 As shown, assuming that the range of the line structure camera is L4, the depth information difference between the start and end of the data line is calculated to be L3, and the deflection angle θ is calculated by the values of L4 and L3. y :
[0138]
[0139] When scanning the standard object in steps, due to the deflection angle θ z There is a deflection phenomenon that the edges of the two scan data are not in the same straight line. Take the standard range L5 for one scan, such as Fig.16 As shown in the figure, the actual length calculated from the point cloud data is L6, which is based on θ z The distortion compensation formula is used to obtain θ z value.
[0140] Distortion compensation is performed on the object point cloud data to improve the robustness of the data, eliminate the influence of scanning angle and scanning distance on the point cloud data, accurately reflect the overall model information of the object to be tested, facilitate the establishment of the topological relationship of the part point cloud data and the subsequent three-dimensional reconstruction, and meet the needs of part detection applications in three-dimensional scenes.
[0141] In order to verify the feasibility of the point cloud data reconstruction method of the present invention, we conduct the following tests:
[0142] 1. Test platform construction
[0143] A high-precision object detection test platform was built to complete the acquisition of point cloud data. The selected hardware equipment includes Keyence LJ-V7060 line laser scanner, Zolix electric slide, stepper motor, motion control module (driver and motion control card). The present invention adopts a method of fixing the line structured light camera, and the object moves at a constant speed on the electric slide driven by the stepper motor. The position relationship between the line laser scanner and the part is adjusted by rotating the lead screw to ensure that the entire object is within the range of the online laser scanner. The sensor can receive the surface information of the object more stably, reduce the ranging error, and increase the accuracy of point cloud acquisition. Compared with the existing scanning method, it has more measurement advantages.
[0144] 2. Experiment
[0145] Collect the depth information of the object to be tested from the online structured light camera, substitute the depth information of the Z axis into the data fusion model to correspond to the information of the X axis and Y axis, and complete the reconstruction of the point cloud data. After the reconstruction is completed, it is necessary to determine the spatial angle of distortion compensation. The spatial angle is obtained by measuring and comparing an object of a certain size. Select a 3D double-layer hole print for the test, such as Fig.17 As shown, (a) is the original double-layer hole print part, (b) is the 3D point cloud data generated by data fusion, the line structured light camera is set to scan 4 times, and the blue, green, yellow and red colors represent the scanning times. It is observed that the 3D point cloud data generated by the original data fusion model of the double-layer hole part is distorted compared to the original part, and data missing of length L2 occurs. It is necessary to calculate the spatial angle to complete the distortion compensation of the point cloud data.
[0146] There is a height difference L1 between the bottom base of the double-layer hole piece and the spherical hole surface. The value of L1 is 5mm. Fig.18 As shown, due to the height difference of the photosensitive element, the line structured light camera cannot obtain data from the plane of length L2 when acquiring depth information, resulting in data missing.
[0147] The standard vertical incident angle of the line structured light camera used in the experiment is 35°, θ x The calculation formula of θ1 is:
[0148]
[0149] Vertically project any point m1 on the edge of the base to the upper plane of the hole piece to obtain point m2. Draw a perpendicular line from m2 and intersect the hole piece plane at point m3. Calculate the distance from m2 to m3 to obtain the upper and lower boundary difference L2 of the point cloud data. The value of L2 is 3.01mm, which is substituted into the formula to calculate:
[0150] Select the line structured light to scan the plane data line of the hole piece at any time to ensure that the collected data is theoretically at the same plane height, such as Fig.19 As shown in (a), assuming that the camera range is L4, the depth information difference between the start and end of this data line is calculated to be L3, and the deflection angle θ is calculated using the values of L4 and L3. y :
[0151]
[0152] The scanning range of the line structured light camera is 16 mm. The depth information difference of the selected data line at any time is 12×10 -3 mm, substitute into the formula to calculate:
[0153] The size of the double-layer hole piece is 50mm×50mm, which exceeds the range of the line structured light and needs to be scanned four times. When scanning the double-layer hole piece in multiple times, due to the deflection angle θ z There is a deflection phenomenon where the edges of the two scanned data are not in the same straight line, such as Fig.19 As shown in (b), L5 is taken as the range value of one scan, which is 16 mm. L6 is calculated from the point cloud data to be 16.006 mm. Then:
[0154] The double-layer hole data is subjected to distortion compensation and the three-dimensional point cloud data is regenerated, such as Fig. 20 As shown in the figure, the interference of distortion on the shape is reduced, the overall model information of the object to be measured is accurately reflected, and it is verified that the distortion compensation model can improve the accuracy of data fusion.
[0155] The size analysis and comparison of the double-layer hole parts before and after distortion compensation include the measured values of the upper and lower hole diameters and the length and width of the hole surface, as shown in Table 1. The Root Mean Square is used to measure the deviation between the measured size and the standard size. The calculation formula is:
[0156] Table 1 Dimensional comparison of double-layer hole parts before and after compensation
[0157]
[0158] The double-layer hole piece was tested for size measurement 5 times, that is, n = 5, d i ' is the actual measured value, d i It is the standard value, where the hole diameter is calculated from the spatial distance between the two points where the edge of the circular hole intersects the straight line passing through the center of the circle.
[0159] The RMS error of the diameter of the double-layer space large and small holes is large because the line segment selected through the center of the circle is relatively random, and the center coordinate measurement itself has a certain deviation, which increases the RMS error; while the length and width are selected as the edge endpoints of the hole surface, and their own relative deviation is small. It can be seen from Table 1 that the double-layer hole after distortion compensation has a greater correction than before compensation, and the RMS error of the hole surface length and width is error All are within 0.02 mm, verifying the effectiveness of the distortion compensation model in reducing the error of point cloud data acquisition.
[0160] To verify the universality of the data fusion and compensation method, the test objects were selected from common instrument components, double-layer hole components and grid components in the industrial field, which have the characteristics of most parts and have obvious features such as planes, curved surfaces, stepped surfaces, and space circular holes. Fig.21 As shown, under normal lighting conditions, a line structured light camera is used to complete the data collection of the test object.
[0161] 3. Analysis of test results
[0162] The point cloud data obtained is different from the point cloud data view converted from the CAD model. The iterative closest point method (ICP) is used to identify and select key point pairs with obvious features, calculate their feature descriptors, find translation and rotation parameters, and use the similarity of feature descriptors to estimate the direction and relative position of different point cloud data in the global coordinate frame. After translating and rotating the coordinate system, the intersection area of the data set is overlapped. Fig. 22 Shown is the effect of precise registration of line structured light point cloud data and CAD model. Blue represents line structured light data and cyan represents the original CAD model point cloud data.
[0163] The root mean square (RMS) is the mean error of the relative distance between the collected point cloud data after registration and all corresponding points of the original CAD model point cloud. It can be used as an evaluation index to measure the accuracy of the fused point cloud model. The calculation formula is: Among them, RMS error is the mean RMS error of all point pairs, and n represents the number of corresponding points in point cloud registration.
[0164] RMS i is the root mean square error of any corresponding point pair i, and the calculation formula is:
[0165]
[0166] In order to more accurately measure the accuracy of the point cloud data generated by the fusion derivation, 20 pairs of points were randomly selected from the test object point cloud data and the original CAD model data for distance calculation. The distance between the nearest neighbor point of each point in the point cloud data and the CAD model data was calculated to express the deviation value (mm). The results are shown in Figure 23-25 As shown in the figure, they represent the deviation values of the point pairs taken by the instrument component, double-layer hole component, and grid component respectively. The black square represents the point cloud deviation value before compensation, and the red circle represents the point pair deviation value after compensation. Compared with the former, the latter deviation value has a high degree of distribution concentration and a small discrete range, that is, the gap between the expected and actual data values of the neighboring points is small, and the morphological characteristics of the reconstructed point cloud data match the original model.
[0167] Three test objects with obvious features were selected to verify the correctness of the data fusion method. By comparing the scanned point cloud data with the original model data, the RMS errors after data fusion compensation were reduced by 0.009mm, 0.036mm, and 0.024mm respectively. By comparing the registration map and the deviation value, it can be found that there is no obvious visual error between the point cloud model generated by compensation and the original model, and the degree of pose matching between the two is high, which verifies the versatility of the data fusion compensation method for different test objects.
[0168] Although specific embodiments of the present invention are described above, those skilled in the art should understand that these are merely examples and that various changes or modifications may be made to these embodiments without departing from the principles and essence of the present invention. Therefore, the scope of protection of the present invention is limited by the appended claims.
Claims
1. A high-precision point cloud data reconstruction method, comprising a detection platform, on which a motion mechanism and a bracket are arranged, the motion mechanism is used to drive the object to be detected to move along / around the X-axis and the Y-axis, the bracket is provided with a line structured light detection module, the laser beam emitted by the line structured light detection module is vertically directed toward the object to be detected, and the point cloud data of the object to be detected is collected, characterized in that: Taking the sampling period as a unit, according to the principle of similar triangles, combined with the measurement range of the line structured light detection module in the Z-axis direction, the Z-axis coordinate of the point to be measured is obtained. Then, combined with the measurement range of the line structured light detection module in the X-axis direction, the arithmetic progression formula is used to obtain the X-axis coordinate of the point to be measured. Then, according to the physical parameters of the line structured light detection module and the number of sampling periods, the Y-axis coordinate of the point to be measured is obtained to reconstruct the three-dimensional point cloud data. Finally, the reconstructed three-dimensional point cloud data is compensated and adjusted according to the spatial angle between the camera coordinate system of the line structured light detection module and the world geographic coordinates to obtain the final reconstructed data.
2. The high-precision point cloud data reconstruction method according to claim 1, characterized in that: The moving distance limit of the object to be measured driven by the motion mechanism along the Y axis is recorded as one scan. The line structured light detection module performs W samplings during one scan, and a total of R scans are required to complete the data collection of the object to be measured. When the w-th sampling is performed in the first scan, the coordinate information of the i-th point to be measured is: At the uth scan, the coordinate information of the i-th point at the wth sampling is: Among them, D3 represents the measurement range of the line structured light detection module in the X-axis direction, n2 represents the number of test points evenly distributed in the measurement range in the X-axis direction, n1 represents the total number of test points, t1 represents the sampling period, v1 represents the movement speed of the motion mechanism along the Y-axis, Δh represents the measurement range of the line structured light detection module in the Z-axis direction, h3 represents the measurement range of the line structured light detection module in the Z-axis direction corresponding to the measurement range on the photosensitive element, and h represents the measurement distance of the test points within the measurement range of the line structured light detection module in the Z-axis direction corresponding to the photosensitive element.
3. The high-precision point cloud data reconstruction method according to claim 2, characterized in that: The motion mechanism drives the object to be measured to perform a scan along the Y axis, then moves a distance D3 along the X axis, and then performs a second scan along the Y axis, and so on, performing R scans to complete data collection of the object to be measured.
4. The high-precision point cloud data reconstruction method according to claim 2, characterized in that: Among them, h1 represents the object distance of the camera in the line structured light detection module, f represents the focal length of the camera in the line structured light detection module, α represents the angle between the outgoing light of the camera in the line structured light detection module and the optical axis of the receiving photosensitive lens, and β represents the field of view angle of the photosensitive element.
5. The high-precision point cloud data reconstruction method according to claim 2, characterized in that: The camera coordinate system of the line structured light detection module is O-XYZ, the world coordinate system is O1-X1Y1Z1, and the spatial angle between the two is θ xyz , project it to the XOY, XOZ, and YOZ planes in turn, then the X1 axis is projected to the XOY plane at an angle θ z , the projection of the X1 axis and the Z1 axis to the XOZ plane forms an angle θ y , the Z1 axis is projected onto the YOZ plane to form an angle θ x , the following formula is used to compensate and adjust the reconstructed 3D point cloud data: y k =S1×(w-1) Wherein, d3 represents the measurement width range of the camera in the line structured light detection module in the X-axis direction, that is, the distance between two adjacent points on the line segment D3.
6. The high-precision point cloud data reconstruction method according to claim 5, characterized in that: An object with steps and known size is placed on the motion mechanism, and the line structured light detection module is used to collect point cloud data. Then, the angle θ is calculated based on the point cloud data collection results and the actual size of the object. x ,θ y ,θ z .