Measurement method, system, electronic device and storage medium

By using a small number of landmark points and a weight fusion method in 3D scanning technology, the problem of reduced measurement accuracy of large-sized objects is solved, high-precision and efficient measurement is achieved, and labor costs are reduced.

CN118442945BActive Publication Date: 2024-09-03SHINING 3D TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410901849.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-09-03
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The measurement accuracy of existing 3D scanning technology decreases when measuring large-size objects, especially the problem of reduced tracking and scanning accuracy caused by vibration and increased splicing errors of reflective landmark points.

Method used

By pasting a small number of landmark points on the measured object, the tracking device is used to determine the reference coordinate system and the posture and movement speed of the scanning device, and weighted fusion of multi-frame scanning data is generated to generate point cloud fusion data, reducing labor costs and improving measurement accuracy.

Benefits of technology

It achieves high-precision measurement of large-sized objects, reduces labor costs, improves the quality and efficiency of measurement data through weight evaluation, and avoids the need for imaging effect evaluation after measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118442945B
    Figure CN118442945B
Patent Text Reader

Abstract

The present application provides a measurement method, system, electronic device and storage medium, the method is applied to an electronic device, the electronic device is respectively connected to a tracking device and a scanning device in communication, the method includes: based on the image set corresponding to the measured object photographed by the tracking device, determining multiple frame points in the reference coordinate system of the measured object, the multiple frame points are the landmark points on the surface of the measured object; based on the multiple frame points, converting multiple frames of scanning data obtained based on the scanning device to the reference coordinate system; based on the position and movement speed of the scanning device determined by the tracking device, obtaining the weight of each frame of scanning data in the reference coordinate system; based on the weight, fusing the multiple frames of scanning data in the reference coordinate system to generate point cloud fusion data. The above method can improve the measurement accuracy of large-sized objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional scanning technology, and in particular to a measurement method, system, electronic device and storage medium. Background Art

[0002] 3D scanning technology is widely used in dimension detection, position detection, defect detection and industrial design. It mainly combines tracking equipment and scanning equipment to obtain 3D shape data of the object being measured, thereby obtaining 3D measurement results. In related technologies, 3D measurement is usually achieved based on tracking scanning, and 3D measurement is achieved based on reflective marker point splicing scanning.

[0003] Among them, the tracking scanning method has high requirements on the measurement environment and needs to place the object to be measured in the effective area. However, in the actual measurement process, the accuracy of the tracking scan is usually reduced due to the vibration generated by the operation of large equipment. In order to solve this kind of problem, the traditional method introduced the stacking method, but as the number of stacking times increases, cumulative deviations will be introduced and the loss of accuracy will also increase significantly. The method based on the splicing scanning of reflective markers requires a large number of reflective markers to be pasted on the object to be measured, which has high labor costs. In addition, adjacent frames need to be spliced ​​during the measurement process. When the size of the object to be measured is large and the surface complexity is high, the number of splicing times will increase significantly, resulting in a larger cumulative splicing error and a decrease in the overall measurement accuracy. Summary of the invention

[0004] The embodiments of the present application disclose a measurement method, system, electronic device and storage medium, which solve the technical problem that the overall measurement accuracy of related measurement technologies decreases when measuring large-sized objects.

[0005] The present application provides a measurement method, which is applied to an electronic device, wherein the electronic device is communicatively connected with a tracking device and a scanning device respectively, and the method comprises: determining a plurality of framework points in a reference coordinate system of the object to be measured based on a set of images corresponding to the object to be measured taken by the tracking device, wherein the plurality of framework points are landmark points on the surface of the object to be measured; based on the plurality of framework points, converting a plurality of frames of scanning data obtained based on the scanning device to the reference coordinate system; obtaining a weight of each frame of scanning data in the reference coordinate system based on the posture and moving speed of the scanning device determined by the tracking device; and fusing the plurality of frames of scanning data in the reference coordinate system based on the weight to generate point cloud fusion data.

[0006] In some embodiments of the present application, the multi-frame scanning data in the reference coordinate system is fused based on the weight to generate point cloud fusion data, including: dividing the multi-frame scanning data in the reference coordinate system based on a preset plurality of voxels to obtain scanning data corresponding to each voxel; based on the weight, fusing the scanning data corresponding to each voxel to generate the point cloud fusion data corresponding to each voxel.

[0007] In some embodiments of the present application, the method further includes: obtaining a quality assessment result of the point cloud fusion data corresponding to the voxel based on the weight and the number of frames corresponding to the voxel.

[0008] In some embodiments of the present application, the quality assessment result of the point cloud fusion data corresponding to the voxel is obtained based on the weight and the number of frames corresponding to the voxel, including: calculating the number of frames of the scan data corresponding to the weight greater than a preset weight threshold in the voxel; calculating a proportion value based on the number and the number of frames; if the proportion value is greater than a preset proportion and the number of frames is greater than or equal to a preset number of frames, determining that the quality assessment result indicates that the point cloud fusion data is qualified; if the proportion value is less than or equal to the preset proportion, or the number of frames is less than the preset number of frames, determining that the quality assessment result indicates that the point cloud fusion data is unqualified.

[0009] In some embodiments of the present application, the method also includes: if the quality assessment result indicates that the point cloud fusion data is unqualified, determining the scanning path of the scanning device based on local features corresponding to the point cloud fusion data; based on the scanning path and the local features, determining the measurement data corresponding to the object under test.

[0010] In some embodiments of the present application, based on the multiple framework points, converting multiple frames of scanning data obtained based on the scanning device to the reference coordinate system includes: determining a first conversion relationship between a tracking device coordinate system of the tracking device and the reference coordinate system, and a second conversion relationship between the tracking device coordinate system and the scanning device coordinate system of the scanning device based on the multiple framework points; based on the first conversion relationship and the second conversion relationship, converting multiple frames of scanning data scanned by the scanning device to the reference coordinate system.

[0011] In some embodiments of the present application, the first transformation relationship between the tracking device coordinate system of the tracking device and the reference coordinate system, and the second transformation relationship between the tracking device coordinate system and the scanning device coordinate system of the scanning device are determined based on the multiple framework points, including: obtaining a three-dimensional marker point set based on a marker point image of the marker point photographed by the tracking device; determining the first transformation relationship based on a first matching result of matching the three-dimensional marker point set with marker points with the same name in the multiple framework points; obtaining a scanning data point set based on a scanning image obtained by scanning the marker points by the scanning device; obtaining a device scanning point set determined by obtaining a device framework point image of the external framework points of the scanning device photographed by the tracking device; and determining the second transformation relationship based on a second matching result of matching the scanning data point set with marker points with the same name in the device scanning point set.

[0012] In some embodiments of the present application, the method of determining a plurality of framework points in a reference coordinate system of the object to be measured based on a set of images corresponding to the object to be measured taken by the tracking device includes: constructing the reference coordinate system based on the image set; determining a plurality of marker points from all two-dimensional marker points in the image set using inter-frame deduplication technology; constructing an objective function based on the plurality of marker points using a bundle adjustment optimization algorithm, and adjusting the parameters of the objective function using a nonlinear optimization method to obtain the plurality of framework points, wherein the plurality of framework points are the optimal solution for minimizing the output of the objective function.

[0013] In some embodiments of the present application, the objective function is constructed based on the multiple marker points using a bundle adjustment optimization algorithm, including: based on the camera shooting parameters of the tracking device, converting the coordinates of the multiple marker points into multiple three-dimensional coordinates; based on the camera shooting parameters and the position information of the tracking device, reprojecting the multiple three-dimensional coordinates to a two-dimensional plane to obtain projection coordinates; and constructing the objective function based on the projection coordinates and the image coordinates of the multiple marker points.

[0014] The present application also provides a measurement system, including: a tracking device, a scanning device and an electronic device: the tracking device is used to capture an image set of the object to be measured and an external frame image of the scanning device; the scanning device is used to scan the object to be measured to obtain multiple frames of scanning data; the electronic device is used to determine multiple frame points in a reference coordinate system of the object to be measured based on the image set of the tracking device, and the multiple frame points are landmark points on the surface of the object to be measured; the electronic device is also used to convert multiple frames of scanning data obtained based on the scanning device to the reference coordinate system based on the multiple frame points; the weight of each frame of scanning data in the reference coordinate system is obtained based on the posture of the scanning device determined by the tracking device and the moving speed of the scanning device; and the multiple frames of scanning data in the reference coordinate system are fused based on the weight to generate point cloud fusion data.

[0015] The present application also provides an electronic device, which includes a processor and a memory, and the processor is used to implement the measurement method when executing a computer program stored in the memory.

[0016] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the measurement method is implemented.

[0017] In the measurement method provided in the present application, based on the image set corresponding to the measured object captured by the tracking device, multiple frame points in the reference coordinate system of the measured object are determined, and based on the multiple frame points, the multiple frames of scan data obtained based on the scanning device are converted to the reference coordinate system, and the coordinates of the multiple frames of scan data in the reference coordinate system can be determined through the multiple frame points, avoiding the pasting of a large number of marker points on the surface of the measured object, thereby reducing labor costs. Based on the posture and moving speed of the scanning device determined by the tracking device, the weight of each frame of the scan data in the reference coordinate system is obtained; based on the weight, the multiple frames of scan data in the reference coordinate system are fused to generate point cloud fusion data, and the weight is added during the fusion process, which can solve the problem that the distance between the scanning device and the tracking device and the moving speed will affect the imaging quality. Based on the weight, the quality of the point cloud fusion data can be known, avoiding the evaluation of the imaging effect after completing the overall scan of the measured object, and to a certain extent, the efficiency of determining the measurement data can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the architecture of the measurement system provided in an embodiment of the present application.

[0019] Figure 2 It is a flow chart of the measurement method provided in the embodiment of the present application.

[0020] Figure 3 It is a flow chart for obtaining measurement data provided in an embodiment of the present application.

[0021] Figure 4 It is a flow chart for determining multiple framework points provided in an embodiment of the present application.

[0022] Figure 5 It is a flow chart for determining multi-frame scanning data in a reference coordinate system provided in an embodiment of the present application.

[0023] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given by way of example for reference.

[0025] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0026] 3D scanning technology is widely used in dimension detection, position detection, defect detection and industrial design. It mainly combines tracking equipment and scanning equipment to obtain 3D shape data of the object being measured, thereby obtaining 3D measurement results. In related technologies, 3D measurement is usually achieved based on tracking scanning, and 3D measurement is achieved based on reflective marker point splicing scanning.

[0027] Among them, the tracking scanning method has high requirements on the measurement environment and needs to place the object to be measured in the effective area. However, in the actual measurement process, the accuracy of the tracking scan is usually reduced due to the vibration generated by the operation of large equipment. In order to solve this kind of problem, the traditional method introduced the stacking method, but as the number of stacking times increases, cumulative deviations will be introduced and the loss of accuracy will also increase significantly. The method based on the splicing scanning of reflective markers requires a large number of reflective markers to be pasted on the object to be measured, which has high labor costs. In addition, adjacent frames need to be spliced ​​during the measurement process. When the size of the object to be measured is large and the surface complexity is high, the number of splicing times will increase significantly, resulting in a larger cumulative splicing error and a decrease in the overall measurement accuracy.

[0028] In order to solve the technical problem that the overall measurement accuracy of related measurement technologies decreases when measuring large-sized objects, the embodiments of the present application provide a measurement method, system, electronic device and storage medium. On the one hand, by pasting a small number of marker points on the measured object, high-precision measurement of large-sized measured objects can be achieved, reducing labor costs. On the other hand, by assigning weights to each frame of reference data converted to the reference coordinate system, the quality of the fused point cloud fusion data is determined, thereby achieving the purpose of improving the overall measurement accuracy of the measured object. The measurement system of the present application is first described below.

[0029] Figure 1 is a schematic diagram of the architecture of the measurement system provided in the embodiment of the present application, such as Figure 1 As shown, the measurement system includes an electronic device 10, a tracking device 20 and a scanning device 30, wherein the present application does not limit the number of tracking devices 20 and scanning devices 30. In addition, the tracking device 20 and the scanning device 30 can be two independently operated devices that can achieve communication connection, or can be two sub-devices belonging to the same device (for example, a tracking scanner), which can be assembled to operate collaboratively or disassembled to operate independently. The present application does not limit the device form, operation mode, etc. of the tracking device 20 and the scanning device 30.

[0030] The electronic device 10 may include a laptop, a tablet computer, a programmable logic controller (PLC), a human-machine interface (HMI) with a touch input function, and other devices with communication functions, and may also include a device simulated by a virtual machine or a simulator. The electronic device 10 is used to receive data sent by the tracking device 20 and the scanning device 30, and to calculate the data.

[0031] The tracking device 20 includes a shooting device 210, which may be a binocular camera. The shooting device 210 is used to record the position and posture of the scanning device 30, shoot the device frame point image of the scanning device 30 and the image of the marker point of the measured object, and the tracking device 20 sends the device scanning point set determined based on the device frame point image and the image of the marker point to the electronic device 10.

[0032] The scanning device 30 includes a shooting device 310, which is used to capture scanned images of the object under test in different postures, and the scanning device 30 sends the scanned image to the electronic device 10. The scanning device 30 may include a scanning head, and a plurality of marking points on the scanning head. The marking points are also called reflective identification points / reflective marking points (Marker), which can be objects of various shapes and materials, and are used to locate and calibrate the key positions and movements of the scanning head during the scanning process to ensure the scanning effect. This application does not limit the number of scanning heads, and the number of scanning heads in a scanning device can be one or more.

[0033] The indication Figure 1 It is only an example of a measurement system and does not constitute a limitation of the measurement system. The measurement system may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the measurement system may also include input and output devices, network access equipment, and a power supply.

[0034] Figure 2 is a flow chart of a measurement method provided in an embodiment of the present application, which is applied to an electronic device (e.g. Figure 1 According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0035] Step S201: determining a plurality of framework points in a reference coordinate system of the object under test based on a set of images corresponding to the object under test taken by the tracking device.

[0036] In some embodiments of the present application, the object to be measured can be any object or living body whose geometric shape needs to be measured, such as a car, a medical device, and a product part, etc. The present application does not limit the properties and shape of the object to be measured. Before measuring the object to be measured, a small number of marking points can be pasted on the object to be measured, and the marking points can be reflective marking points.

[0037] A binocular camera is provided in the tracking device, and the binocular camera is used to photograph the mark points on the measured object. By changing the shooting position of the tracking device, shooting data of the measured object at different depths and angles is obtained, wherein the specific shooting posture of the tracking device and the changed shooting position can be determined according to the number of mark points and the size of the measured object, and this application does not limit this. An image set is obtained based on the shooting data, and the shooting data can be a set of images of the measured object photographed by the tracking device at different depths and different angles, or it can be photographic data of the measured object photographed by the tracking device at different depths and different angles, and the video frame of the marker point photographed in the photographic data is used as an image frame in the image set.

[0038] In some embodiments of the present application, a plurality of framework points in a reference coordinate system of the object to be measured are obtained based on an image set, and the plurality of framework points are landmark points on the surface of the object to be measured. Specifically, the landmark points of the object to be measured are photographed using a tracking device to obtain an image set. Based on the landmark points in the image set, a plurality of framework points in a reference coordinate system of the object to be measured can be obtained by extraction, reconstruction, tracking and matching, inter-frame deduplication technology, and bundle adjustment optimization algorithm, wherein the reference coordinate system is a coordinate system corresponding to the object to be measured, which can be constructed in advance based on the initial image frame of the image set, or can be constructed based on multiple image frames in the image set, and the present application does not limit this.

[0039] Step S202: based on the multiple framework points, convert the multiple frames of scanning data obtained based on the scanning device into the reference coordinate system.

[0040] In some embodiments of the present application, based on multiple framework points, the coordinate transformation relationship between the tracking device coordinate system of the tracking device and the scanning device coordinate system of the scanning device can be determined. Based on the coordinate transformation relationship, the multi-frame scanning data obtained by the scanning device can be converted to the reference coordinate system to obtain the multi-frame scanning data in the reference coordinate system.

[0041] Step S203: obtaining the weight of each frame of scanning data in the reference coordinate system based on the position and movement speed of the scanning device determined by the tracking device.

[0042] In some embodiments of the present application, since the distance between the tracking device and the scanning device and the moving speed of the scanning device will affect the imaging quality of the image collected by the tracking device, if the moving speed of the scanning device is too fast, or the distance between the tracking device and the scanning device is far, image ghosting will occur. Therefore, in the process of dynamic measurement of the object to be measured by the scanning device, the upper limit of the moving speed of the scanning device can be determined based on the frame rate value of the tracking device. The frame rate value is proportional to the moving speed, wherein the frame rate value represents the number of frames captured by the tracking device per second, which is a measure of the change in the number of frames captured over time. During the measurement process, the tracking device can determine the posture of the scanning device and the moving speed of the scanning device, and the weight of the scanning data in each frame of the reference coordinate system can be obtained according to the posture and the moving speed.

[0043] In one example, assume that any voxel The coordinates of the point cloud fusion data in are , then the relationship between the multi-frame scanning data in the voxel, the weight corresponding to the scanning data in each frame of the reference coordinate system, and the point cloud fusion data can be expressed by the following formula:

[0044] ;

[0045] in, Indicates the weight value corresponding to the scan data in the i-th frame reference coordinate system, Represented in voxel The coordinates of the i-th frame scan data in the reference coordinate system.

[0046] Step S204: fusing the multi-frame scanning data in the reference coordinate system based on the weights to generate point cloud fusion data.

[0047] In some embodiments of the present application, the multi-frame scanning data in the reference coordinate system may be data obtained by performing coordinate transformation after multiple scans of the same location on the object under test, and the multi-frame scanning data corresponding to the same location may be fused to generate point cloud fusion data corresponding to the location.

[0048] In some embodiments of the present application, based on the spatiotemporal positioning technology, a cube for fusing data can be pre-set, and the cube can be called a voxel. During the data fusion process, the three-dimensional space is subdivided into voxels of a specified size, and the size of the voxel can be 0.1mm*0.1mm*0.1mm.

[0049] The multi-frame scan data is divided based on multiple voxels to obtain the scan data corresponding to each voxel, and the scan data corresponding to each voxel is fused. In the fusion process, a weight is assigned to each frame to generate point cloud fusion data corresponding to each voxel.

[0050] In an embodiment of the present application, based on the image set corresponding to the measured object captured by the tracking device, multiple frame points in the reference coordinate system of the measured object are determined, and based on the multiple frame points, the multiple frames of scan data obtained based on the scanning device are converted to the reference coordinate system, and the coordinates of the multiple frames of scan data in the reference coordinate system can be determined through the multiple frame points, avoiding the pasting of a large number of marker points on the surface of the measured object, thereby reducing labor costs. Based on the posture and moving speed of the scanning device determined by the tracking device, the weight of each frame of the scan data in the reference coordinate system is obtained; based on the weight, the multiple frames of scan data in the reference coordinate system are fused to generate point cloud fusion data, and the weight is added during the fusion process, which can solve the problem that the distance between the scanning device and the tracking device and the moving speed will affect the imaging quality. Based on the weight, the quality of the point cloud fusion data can be known, avoiding the evaluation of the imaging effect after completing the overall scan of the measured object, and to a certain extent, the efficiency of determining the measurement data can be improved.

[0051] Figure 3 is a flow chart for obtaining measurement data provided by an embodiment of the present application. After the point cloud fusion data is determined, the quality assessment result of the point cloud fusion data corresponding to the voxel can be determined based on the weight and the number of frames corresponding to the voxel, such as Figure 3 As shown, the following steps are included:

[0052] Step S301, calculating the number of frames of scan data corresponding to weights greater than a preset weight threshold in the voxel.

[0053] In some embodiments of the present application, the weight threshold can be set according to actual conditions, and the present application does not limit this. The weights of all scan data corresponding to the voxels are obtained, and each weight is compared with the weight threshold to obtain the number of frames of scan data corresponding to the weight greater than the preset weight threshold.

[0054] In one example, the preset weight threshold is 0.9, and the weights of each frame of scan data in the voxel are 0.95, 0.65, 0.95, 0.96, 0.5, 0.4, 0.91, 0.85, 0.94, and 0.93, respectively. Then, the number of frames with weights greater than the preset weight threshold 0.9 is 6.

[0055] Step S302: Calculate a percentage value based on the quantity and the number of frames.

[0056] In one example, the preset weight threshold is 0.9, the number of frames in the voxel is 10 frames, and the weights of each frame of scanning data in the voxel are 0.95, 0.65, 0.95, 0.96, 0.5, 0.4, 0.91, 0.85, 0.94, and 0.93, respectively. The number of weights greater than the preset weight threshold 0.9 is 6, and the proportion = 6 / 10 = 0.6.

[0057] Step S303, determining whether the proportion value is greater than a preset proportion and whether the number of frames is greater than or equal to a preset number of frames.

[0058] In some embodiments of the present application, if the proportion value is greater than the preset proportion and the number of frames is greater than or equal to the preset number of frames, it is determined that the quality assessment result indicates that the point cloud fusion data is qualified, indicating that the measurement of the current scanning device meets the quality requirements and there is no need to re-measure the part of the object being measured. The preset proportion and the preset number of frames can be determined based on the local characteristics of the point cloud fusion data to meet the quality requirements of the characteristic surfaces of different objects being measured. For example, the complexity of the characteristic surface is positively correlated with the preset proportion and the preset number of frames, respectively.

[0059] If the proportion value is less than or equal to the preset proportion, or the number of frames is less than the preset number of frames, it is determined that the quality assessment result shows that the point cloud fusion data is unqualified, indicating that the measurement of the current scanning device does not meet the quality requirements and it is necessary to re-measure the part of the object being measured.

[0060] In some embodiments of the present application, if the proportion is greater than a preset proportion and the number of frames is greater than or equal to the preset number of frames, step S304 is performed. If the proportion is less than or equal to the preset proportion, or the number of frames is less than the preset number of frames, step S305 is performed.

[0061] Step S304: determine whether the quality assessment result indicates that the point cloud fusion data is qualified.

[0062] Step S305 , determining that the quality assessment result indicates that the point cloud fusion data is unqualified, and determining a scanning path of the scanning device based on local features corresponding to the point cloud fusion data.

[0063] In some embodiments of the present application, if the quality assessment result indicates that the point cloud fusion data is unqualified and it is necessary to re-measure the part of the object to be measured, the local features corresponding to the point cloud fusion data can be obtained. The local features are determined based on the surface features of the scanned object to be measured. The scanning path of the scanning device can be calculated through the local features. The scanning path can be displayed to the user in a visual manner through the display screen of the electronic device, so that the user can move based on the scanning path and re-acquire multiple frames of scanning data.

[0064] Step S306: determining measurement data corresponding to the measured object based on the scanning path and the local features.

[0065] In some embodiments of the present application, new multi-frame scanning data is reacquired based on the scanning path, new point cloud fusion data is determined based on the new multi-frame scanning data, and a preset weight threshold and a preset number of frames for evaluating the new point cloud fusion data are set based on local features until a quality assessment result of the new point cloud fusion data indicates that the new point cloud fusion data is qualified, thereby splicing the qualified point cloud fusion data, executing a global joint optimization process, a laser line fusion process, and a point cloud optimization process, etc., to obtain measurement data corresponding to the object under test, which is the scanning data of the entire object under test.

[0066] In an embodiment of the present application, a quality assessment result of the point cloud fusion data is obtained based on the weight and the number of frames corresponding to the point cloud fusion data, so that the quality of the point cloud fusion data can be known in a timely manner, avoiding the need to evaluate the imaging effect after completing the overall scan of the object to be measured, and to a certain extent, improving the efficiency of determining the measurement data.

[0067] If the quality assessment result indicates that the point cloud fusion data is unqualified, the scanning path of the scanning device is determined based on the local features corresponding to the point cloud fusion data, and the optimal scanning path can be planned for the scanning device based on the local features. Based on the scanning path and the local features, the measurement data corresponding to the object to be measured is determined. When it is determined that the point cloud fusion data is unqualified, the local features and the scanning path are combined to make the data rescanned by the scanning device meet the accuracy requirements. In addition, by ensuring the measurement quality of each part of the object to be measured, the increase of cumulative errors during subsequent data splicing is avoided, which can improve the overall measurement accuracy to a certain extent.

[0068] Figure 4 is a flow chart for determining multiple framework points provided in the embodiment of the present application, such as Figure 4 As shown, based on a set of images corresponding to the measured object captured by a tracking device, a plurality of framework points in a reference coordinate system of the measured object are determined, including the following steps.

[0069] Step S401: construct the reference coordinate system based on the image set.

[0070] In some embodiments of the present application, an image collection can be based on video frames corresponding to a video stream captured by a binocular camera of a tracking device, and a reference coordinate system can be constructed based on an initial image frame as a coordinate system corresponding to the object under test, wherein the initial image frame is the first video frame determined in the image collection, and the initial image frame contains marker points pasted on the object under test, and based on the marker points on the initial image frame, a reference coordinate system is constructed as a coordinate system corresponding to the object under test.

[0071] Step S402: using inter-frame deduplication technology, determine multiple marker points from all two-dimensional marker points in the image set.

[0072] In some embodiments of the present application, in order to ensure the uniqueness of the marker points in the extracted image frames, inter-frame deduplication technology is used to deduplicate all two-dimensional marker points in the image set, and the two-dimensional marker points determined after deduplication are used as multiple marker points.

[0073] Step S403, based on the multiple marker points, construct an objective function using a bundle adjustment optimization algorithm, and adjust the parameters of the objective function using a nonlinear optimization method to obtain the multiple framework points, and the multiple framework points are the optimal solution that minimizes the output of the objective function.

[0074] In some embodiments of the present application, the bundle adjustment optimization algorithm is an algorithm that adjusts the parameters of the calibration system so as to minimize the back-projection error of the calibration system. Based on multiple marker points, the bundle adjustment optimization algorithm is used to construct an objective function. Specifically, based on the camera shooting parameters of the tracking device, the coordinates of the multiple marker points are converted into multiple three-dimensional coordinates. Based on the camera shooting parameters and the position information of the tracking device, the multiple three-dimensional coordinates are reprojected to a two-dimensional plane to obtain projection coordinates. Based on the projection coordinates and the coordinates of the multiple marker points, the objective function is constructed, which is expressed by the following formula:

[0075] ;

[0076] In the formula, Represents the spatial coordinates (three-dimensional coordinates) of the i-th marker point, Indicates the position parameters (position information) of the binocular camera taking the jth image, represents the camera parameters and distortion coefficients, Represents the projection coordinates of the three-dimensional coordinates of the i-th point reprojected onto the j-th image (two-dimensional plane), represents the image coordinates of the i-th marker point detected on the j-th image, and m and n represent the number of frame images and the number of marker points, respectively.

[0077] To minimize the objective function, nonlinear optimization (Levenberg-Marquardt, LM) method can be used for optimization, including: Under the mapping of , for the current variable estimate x, how to find a certain increment within its neighborhood , so that the next variable estimate The corresponding function value and known function observations The sum of squared distances Minimum, expressed as follows:

[0078] ;

[0079] ;

[0080] Where J is the function The Jacobian matrix at x.

[0081] make ,but The incremental satisfaction we are looking for The first-order derivative of is zero, that is, when When , it is determined to find an increment within a neighborhood range, obtain the optimal solution that minimizes the output of the objective function, and use the optimal solution as the coordinates of multiple framework points.

[0082] In the embodiment of the present application, the overall measurement of the object to be measured is achieved by pasting a small number of marker points. Based on an image set containing a small number of marker points, multiple frame points on the reference coordinate system are determined using inter-frame deduplication technology and a bundle adjustment optimization algorithm to improve the accuracy of the subsequent determination of the first conversion relationship and the second conversion relationship, which improves the accuracy of the conversion of the multi-frame scanning data of the scanning device to the reference coordinate system to a certain extent, and achieves high-precision measurement of the object to be measured.

[0083] Figure 5 is a flow chart for determining multi-frame scanning data in a reference coordinate system provided in an embodiment of the present application, such as Figure 5 As shown, in order to achieve high-precision overall measurement of the object to be measured based on a small number of landmark points, a reference coordinate system of the object to be measured is constructed, and based on a first conversion relationship and a second conversion relationship, multiple frames of scanning data scanned by a scanning device are converted to the reference coordinate system, including the following steps.

[0084] Step S501: determining a first conversion relationship between a tracking device coordinate system of the tracking device and the reference coordinate system, and a second conversion relationship between the tracking device coordinate system and a scanning device coordinate system of the scanning device based on the multiple framework points and the marker points.

[0085] In some embodiments of the present application, based on the marker point image captured by the tracking device, the two-dimensional points in the marker point image are converted into three-dimensional points to obtain a three-dimensional marker point set, and the three-dimensional marker point set is used as a floating frame to perform frame alignment with the reference frame corresponding to the multiple frame points, and the three-dimensional marker point set is matched with the marker points with the same name in the multiple frame points, so as to obtain a first conversion relationship, which is expressed by the following formula:

[0086] ;

[0087] In the formula, Indicates the 3D marker point corresponding to the i-th marker point in the tracking device coordinate system. Indicates the frame point corresponding to the i-th marker point in the reference coordinate system, They represent the rotation matrix and translation vector that transform the tracking device coordinate system into the reference coordinate system. , three or more groups of marker points with the same name can be found, so that the first transformation relationship between the tracking device coordinate system and the reference coordinate system can be obtained.

[0088] In some embodiments of the present application, a scanning image is determined based on a marker point scanned by a scanning device, and the scanning image may be a multi-line laser image, and a scanning data point set is obtained, and the scanning data point set is determined based on converting two-dimensional points on the scanning image into three-dimensional points. A device scanning point set is determined by obtaining a device frame point image of an external frame point of the scanning device captured by a tracking device, and the device scanning point set in the tracking device coordinate system is aligned with the scanning data point set in the scanning device coordinate system, and the marker points with the same name in the scanning data point set and the device scanning point set are matched to obtain a second conversion relationship, which is expressed by the following formula:

[0089] ;

[0090] In the formula, Indicates the 3D coordinate point corresponding to the punctuation point of the i-th object, which is determined by the device frame point image of the external frame point of the scanning device captured by the tracking device based on the hand-eye calibration result. represents the scanned data point determined by the scanned image obtained by the scanning device scanning the i-th marker point, They represent the rotation matrix and translation vector that transform the scanning device coordinate system into the tracking device coordinate system. , three or more groups of marker points with the same name can be found, so that the second transformation relationship between the tracking device coordinate system and the scanning device coordinate system can be obtained.

[0091] Step S502: based on the first conversion relationship and the second conversion relationship, convert the multiple frames of scan data scanned by the scanning device into the reference coordinate system.

[0092] In some embodiments of the present application, based on the first conversion relationship and the second conversion relationship, an expression for converting multiple frames of scan data scanned by a scanning device into a reference coordinate system can be constructed.

[0093] ;

[0094] According to this expression, the i-th frame scan data scanned by the scanning device can be solved Convert to coordinates in the base coordinate system .

[0095] In the embodiments of the present application, the scanning data obtained by the scanning device is converted into a reference coordinate system to provide a data basis for subsequent data fusion, thereby improving the efficiency of data fusion and achieving high-precision measurement of large-sized objects.

[0096] Figure 6The measurement method provided in the embodiment of the present application is applied to an electronic device 10, which may be a computer device with a camera function, such as a mobile phone, a tablet computer, a laptop computer, a face scanner, etc.

[0097] The electronic device 10 includes a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the communication interface 101, the memory 102, and the I / O interface 104 through the bus 105.

[0098] The communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB), Controller Area Network (CAN), etc. The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication network, Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc.

[0099] The memory 102 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 103, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0100] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110. The non-volatile memory may include a disk storage device and a flash memory.

[0101] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions, and when the multiple instructions are executed by the processor 103, the measurement method executed on the electronic device 10 can be implemented.

[0102] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10 .

[0103] The processor 103 may include one or more processing units, for example, the processor 103 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0104] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute a computer program stored in the memory 102 to implement the above-mentioned measurement method.

[0105] The I / O interface 104 is used to provide a channel for user input or output. For example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.

[0106] The bus 105 is at least used to provide a channel for mutual communication among the communication module 101 , the memory 102 , the processor 103 , and the I / O interface 104 in the electronic device 10 .

[0107] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.

[0108] The computer-readable storage medium may be an internal memory of the electronic device described in the above embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device.

[0109] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0111] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0112] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A measurement method, applied to electronic equipment, characterized in that: The electronic device is communicatively connected with the tracking device and the scanning device respectively, and the method comprises: Based on a set of images corresponding to the object being measured taken by the tracking device, a plurality of framework points in a reference coordinate system of the object being measured are determined, wherein the plurality of framework points are landmark points on the surface of the object being measured; Based on the multiple framework points, converting multiple frames of scan data obtained based on the scanning device into the reference coordinate system; Based on the position and movement speed of the scanning device determined by the tracking device, obtaining the weight of the scanning data of each frame in the reference coordinate system; The multi-frame scanning data in the reference coordinate system is fused based on the weights to generate point cloud fusion data.

2. The measuring method according to claim 1, characterized in that: The step of fusing the multi-frame scanning data in the reference coordinate system based on the weights to generate point cloud fusion data includes: Dividing the multiple frames of scan data in the reference coordinate system based on a plurality of preset voxels to obtain scan data corresponding to each voxel; Based on the weight, the scan data corresponding to each voxel is fused to generate the point cloud fusion data corresponding to each voxel.

3. The measuring method according to claim 2, characterized in that: The method further comprises: Based on the weight and the number of frames corresponding to the voxel, a quality assessment result of the point cloud fusion data corresponding to the voxel is obtained.

4. The measuring method according to claim 3, characterized in that: The obtaining, based on the weight and the number of frames corresponding to the voxel, a quality assessment result of the point cloud fusion data corresponding to the voxel comprises: Calculating the number of frames of scan data corresponding to weights greater than a preset weight threshold in the voxel; Calculate a percentage value based on the quantity and the number of frames; If the proportion value is greater than a preset proportion and the number of frames is greater than or equal to a preset number of frames, it is determined that the quality assessment result indicates that the point cloud fusion data is qualified; If the proportion value is less than or equal to the preset proportion, or the number of frames is less than the preset number of frames, it is determined that the quality assessment result indicates that the point cloud fusion data is unqualified.

5. The measuring method according to claim 4, characterized in that: The method further comprises: If the quality assessment result indicates that the point cloud fusion data is unqualified, determining a scanning path of the scanning device based on local features corresponding to the point cloud fusion data; Based on the scanning path and the local features, measurement data corresponding to the measured object is determined.

6. The measuring method according to claim 1, characterized in that: The converting the multiple frames of scanning data obtained based on the scanning device to the reference coordinate system based on the multiple framework points includes: Based on the multiple framework points, determining a first conversion relationship between a tracking device coordinate system of the tracking device and the reference coordinate system, and a second conversion relationship between the tracking device coordinate system and a scanning device coordinate system of the scanning device; Based on the first conversion relationship and the second conversion relationship, multiple frames of scan data scanned by the scanning device are converted into the reference coordinate system.

7. The measuring method according to claim 6, characterized in that: The determining, based on the plurality of framework points, a first conversion relationship between a tracking device coordinate system of the tracking device and the reference coordinate system, and a second conversion relationship between the tracking device coordinate system and a scanning device coordinate system of the scanning device, comprises: Obtaining a three-dimensional marker point set based on a marker point image of the marker point photographed by the tracking device; Determining the first conversion relationship based on a first matching result of matching the three-dimensional marker point set with marker points having the same name among the multiple framework points; Obtaining a set of scanned data points based on a scanned image obtained by scanning the marker points with the scanning device; Acquire a set of device scanning points determined by capturing a device frame point image of external frame points of the scanning device by the tracking device; The second conversion relationship is determined based on a second matching result of matching the scan data point set with the marker points with the same name in the device scan point set.

8. The measuring method according to claim 1, characterized in that: The step of determining a plurality of framework points in a reference coordinate system of the object to be measured based on a set of images corresponding to the object to be measured taken by the tracking device comprises: Based on the image set, construct the reference coordinate system; Determine a plurality of marker points from all two-dimensional marker points in the image set by using an inter-frame deduplication technique; Based on the multiple marker points, a bundle adjustment optimization algorithm is used to construct an objective function, and a nonlinear optimization method is used to adjust the parameters of the objective function to obtain the multiple framework points, which are the optimal solution for minimizing the output of the objective function.

9. The measuring method according to claim 8, characterized in that: The objective function is constructed based on the multiple marker points using a bundle adjustment optimization algorithm, including: Based on the camera shooting parameters of the tracking device, the coordinates of the plurality of marker points are converted into a plurality of three-dimensional coordinates; Based on the camera shooting parameters and the position information of the tracking device, the multiple three-dimensional coordinates are reprojected onto a two-dimensional plane to obtain projection coordinates; The objective function is constructed based on the projection coordinates and the image coordinates of the multiple marker points.

10. A measurement system, characterized in that: include: Tracking devices, scanning devices, and electronic devices: The tracking device is used to capture a set of images of the object being measured and an image of the external frame of the scanning device; The scanning device is used to scan the object to be measured to obtain multiple frames of scanning data; The electronic device is used to determine a plurality of framework points in a reference coordinate system of the measured object based on the image set of the tracking device, wherein the plurality of framework points are landmark points on the surface of the measured object; The electronic device is further used to convert multiple frames of scanning data obtained based on the scanning device into the reference coordinate system based on the multiple framework points; Based on the position and posture of the scanning device determined by the tracking device and the moving speed of the scanning device, obtaining the weight of the scanning data of each frame in the reference coordinate system; The multi-frame scanning data in the reference coordinate system is fused based on the weights to generate point cloud fusion data.

11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the measurement method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the measurement method according to any one of claims 1 to 9 is implemented.