Multi-device measurement method, system, electronic device and storage medium
Through the multi-device measurement method, the coordinate system conversion relationship between the tracking device and the scanning device is established, which solves the problems of high labor cost and low measurement efficiency in 3D scanning technology, and achieves efficient 3D measurement.
Patent Information
- Application Number
- CN202410901846.6
- 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
Existing 3D scanning technology requires a large number of reflective marking points to be pasted on the object to be measured, resulting in high labor costs and low measurement efficiency.
Through the multi-device measurement method, the image data between the tracking device and the scanning device is used to establish a coordinate system conversion relationship, which avoids pasting landmark points on the measured object and directly converts the scanning data to the tracking coordinate system, reducing labor costs and improving measurement. efficiency.
It realizes efficient three-dimensional measurement without pasting landmark points, reduces labor costs, and improves measurement efficiency.
Smart Images

Figure CN118424151B
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional scanning technology, and in particular to a multi-device 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 the shape of the object to be measured, thereby obtaining 3D measurement results. Related technologies usually achieve the conversion between multiple tracker coordinate systems by pasting marker points on the object to be measured, thereby obtaining 3D measurement results. However, this method requires pasting a large number of reflective marker points on the object to be measured, which has high labor costs and reduces the measurement efficiency of the object to be measured. Summary of the invention
[0003] The embodiments of the present application disclose a multi-device measurement method, system, electronic device and storage medium, which solve the technical problems of high labor cost and low measurement efficiency in related technologies.
[0004] This application provides a multi-device measurement method.
[0005] The present application also provides an electronic device, which includes a processor and a memory, and the processor is used to implement the multi-device measurement method when executing a computer program stored in the memory.
[0006] 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 multi-device measurement method is implemented.
[0007] In the multi-device measurement method provided in the present application, a first reconstructed coordinate is determined based on a first image of a scanning head frame point of the first scanning device taken by the first tracking device; a second reconstructed coordinate is determined based on a second image of the scanning head frame point taken by the second tracking device; a first conversion relationship between a first tracking coordinate system of the first tracking device and a second tracking coordinate system of the second tracking device is determined based on the first reconstructed coordinate, the second reconstructed coordinate and the first scanning coordinate, the first scanning coordinate being the coordinate of the scanning head frame point in the first scanning coordinate system of the first scanning device; in the case where no marking points are affixed to the measured object, a first conversion relationship between the first tracking coordinate system and the second tracking coordinate system can be established with the first scanning device as the intermediary.
[0008] Based on the scanning image acquired by each scanning device, the second scanning coordinates are determined; based on the second reconstructed coordinates and the second scanning coordinates, the second conversion relationship between the second tracking coordinate system and the scanning coordinate system corresponding to each scanning device is determined; when no marking points are affixed to the measured object, the second conversion relationship between the second tracking coordinate system and the scanning coordinate system corresponding to each scanning device can be established with the second tracking device as the intermediary.
[0009] Based on the first conversion relationship and the second conversion relationship, the multi-frame scanning data of the object to be measured acquired by each scanning device is converted to the first tracking coordinate system. When no marking points are affixed to the object to be measured, based on the constructed first conversion relationship and the second conversion relationship, the multi-frame data of the object to be measured by multiple scanning devices can be converted to the first tracking coordinate system, which reduces labor costs and improves measurement efficiency to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a schematic diagram of the architecture of the measurement system provided in an embodiment of the present application.
[0011] Figure 2 It is a flow chart of the multi-device measurement method provided in an embodiment of the present application.
[0012] Figure 3 This is a flow chart of a multi-device measurement method provided by another embodiment of the present application.
[0013] Figure 4 This is a flow chart of a multi-device measurement method provided by another embodiment of the present application.
[0014] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given by way of example for reference.
[0016] 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.
[0017] 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 the shape of the object to be measured, thereby obtaining 3D measurement results. Related technologies usually achieve the conversion between multiple tracker coordinate systems by pasting marker points on the object to be measured, thereby obtaining 3D measurement results. However, this method requires pasting a large number of reflective marker points on the object to be measured, which has high labor costs and reduces the measurement efficiency of the object to be measured.
[0018] In order to solve the technical problems of high labor costs and low measurement efficiency in related technologies, the present application provides a multi-device measurement method, system, electronic device and storage medium, which do not require the attachment of marker points on the measured object, reduce labor costs, and also improve the measurement efficiency of the measured object. The following first describes the multi-device measurement system of the present application.
[0019] 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 multi-device 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.
[0020] 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.
[0021] The tracking device 20 includes a shooting device 210, which may be a binocular camera. The shooting device 210 is used to record the posture of the scanning device 30 and shoot an image of the device frame point of the scanning device 30. If a marker point is attached to the measured object, the shooting device 210 may also shoot an image of the marker point of the measured object. The tracking device 20 sends the image based on the device frame point or the marker point to the electronic device 10.
[0022] 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.
[0023] 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.
[0024] Figure 2 is a flow chart of a multi-device measurement method provided in an embodiment of the present application, which is applied to electronic devices (such as Figure 1 According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0025] Step S201 : determining first reconstructed coordinates based on a first image of a frame point of a scanning head of the first scanning device captured by the first tracking device.
[0026] In some embodiments of the present application, a multi-device measurement system includes multiple tracking devices and at least one scanning device, and any one of the multiple tracking devices can be randomly set as a reference device, for example, the first tracking device can be used as the reference device. The scanning device photographed by the first tracking device can be used as the first scanning device, or any scanning device photographed by the first tracking device can be used as the first scanning device, and the present application does not limit this.
[0027] In one example, the tracking device with device number 0 is called the No. 0 tracking device, and the No. 0 tracking device is used as the first tracking device. If the No. 0 tracking device captures the No. j scanning device, the No. j scanning device is used as the first scanning device.
[0028] In another example, if tracking device No. 0 captures scanning device No. j-1, scanning device No. j, and scanning device No. j+1, scanning device No. j-1, scanning device No. j, or scanning device No. j+1 is used as the first scanning device. This can be selected based on actual conditions. For example, the scanning device closest to tracking device No. 0 is used as the first scanning device. The above is just an example, and actual applications are not limited to this.
[0029] In some embodiments of the present application, the first scanning device includes a scanning head, and a scanning head framework point is set on the scanning head, and the scanning head framework point can be a marker point. A first image of the scanning head framework point of the first scanning device taken by the first tracking device is obtained, and the image coordinates corresponding to the scanning head framework point on the first image are reconstructed into three-dimensional coordinates, namely, first reconstructed coordinates.
[0030] Step S202: determining second reconstructed coordinates based on a second image of the scanning head framework point captured by the second tracking device.
[0031] In some embodiments of the present application, the second tracking device may be a non-first tracking device and may be one or more tracking devices among multiple tracking devices. The present application does not limit the number of second tracking devices. An image corresponding to the scanning frame point of the first scanning device taken by the second tracking device and the first tracking device is obtained, and the image corresponding to the scanning frame point of the first scanning device taken by the second tracking device is used as the second image.
[0032] In one example, the tracking device No. 0 is used as the first tracking device, and the device other than No. 0 is used as the second tracking device, for example, the tracking device No. i is used as the second tracking device. Assuming that the tracking device No. 0 and the tracking device No. i simultaneously capture the scanning device No. j, the image of the scanning head frame point of the scanning device No. j captured by the tracking device No. i is used as the second image.
[0033] The image coordinates corresponding to the scanning head frame points on the second image are reconstructed into three-dimensional coordinates, namely, second reconstructed coordinates.
[0034] Step S203: determining a first conversion relationship between a first tracking coordinate system of the first tracking device and a second tracking coordinate system of the second tracking device based on the first reconstructed coordinates, the second reconstructed coordinates and the first scanning coordinates.
[0035] In some embodiments of the present application, the first scanning coordinates are the coordinates of the scanning head frame point in the first scanning coordinate system of the first scanning device. The electronic device can pre-acquire the first scanning coordinates through at least one tracking device, and the present application does not limit this.
[0036] In some embodiments of the present application, the conversion relationship between the first scanning device and the second tracking device is determined according to the first scanning coordinates and the second reconstructed coordinates, which is expressed by the following formula:
[0037] ;
[0038] in, represents the first scanning coordinate of the scanning head frame point of the j-th scanning device in the first scanning coordinate system, represents the second reconstructed coordinates determined after the i-th tracking device captures the scanning head frame point of the j-th scanning device, Represents the rotation matrix and translation vector of the j-th scanning device transformed to the i-th tracking device.
[0039] In some embodiments of the present application, a conversion relationship between the first scanning device and the first tracking device is determined according to the first scanning coordinates and the first reconstructed coordinates, which is expressed by the following formula:
[0040] ;
[0041] in, It indicates the first reconstructed coordinates determined after the tracking device No. 0 captures the image of the scanning device No. j. Represents the rotation matrix and translation vector of the j-th scanning device transformed to the 0-th tracking device.
[0042] In some embodiments of the present application, a first conversion relationship between the first tracking device and the second tracking device is determined according to the first reconstructed coordinates, the second reconstructed coordinates, and the first scanning coordinates.
[0043] ;
[0044] ;
[0045] in, Represents the initial rotation matrix and initial translation vector of the second tracking device transformed to the first tracking device. In order to solve , you can find three or more sets of first reconstruction coordinates, second reconstruction coordinates and first scanning coordinates. Since there will be alignment errors between the tracking coordinate system and the scanning coordinate system during the conversion process, Later, weight values may be set for the initial rotation matrix and the initial translation vector, and the rotation matrix and the translation vector of the second tracking device converted to the first tracking device may be determined by the following formula:
[0046] ;
[0047] ;
[0048] in, Indicates the weight value set based on the alignment error when converting between the tracking coordinate system and the scanning coordinate system. , Represents the rotation matrix and translation vector of the second tracking device transformed to the first tracking device.
[0049] The first conversion relationship between the first tracking coordinate system of the first tracking device and the second tracking coordinate system of the second tracking device is expressed by the following formula:
[0050] .
[0051] Step S204: determining a second scanning coordinate based on the scanning image acquired by each scanning device.
[0052] In some embodiments of the present application, the scanning device has a laser scanning system, which controls the laser to perform laser scanning on the object to be measured to obtain a corresponding scanned image, which can be a multi-line laser image. Based on the image coordinates corresponding to the scanned image, the second scanning coordinates are reconstructed. Each scanning device has an independent scanning coordinate system, and the second scanning coordinates represent the three-dimensional coordinates reconstructed from the scanned image obtained by each scanning device.
[0053] Step S205: determining a second conversion relationship between the second tracking coordinate system and a scanning coordinate system corresponding to each scanning device based on the second reconstructed coordinates and the second scanning coordinates.
[0054] In some embodiments of the present application, the second conversion relationship between the second tracking coordinate system and the scanning coordinate system corresponding to each scanning device is expressed by the following formula:
[0055] ;
[0056] in, represents the second scanning coordinates corresponding to the j-th scanning device, Represents the rotation matrix and translation vector of the j-th scanning device transformed to the j-th tracking device. In order to solve , three or more sets of second reconstructed coordinates and second scanning coordinates may be searched to obtain a second conversion relationship.
[0057] Step S206: based on the first conversion relationship and the second conversion relationship, convert the multiple frames of scanning data of the object to be measured acquired by each scanning device into the first tracking coordinate system.
[0058] In some embodiments of the present application, the first tracking coordinate system is used as the reference coordinate system. Based on the first conversion relationship and the second conversion relationship, an expression for converting the multi-frame scanning data of the object to be measured acquired by each scanning device to the first tracking coordinate system can be constructed:
[0059] ;
[0060] in, It can be recorded as , It indicates that the multiple frames of scanning data captured by the j-th scanning device are converted into coordinates in the first tracking coordinate system.
[0061] In an embodiment of the present application, a first reconstructed coordinate is determined based on a first image of a scanning head frame point of the first scanning device captured by the first tracking device; a second reconstructed coordinate is determined based on a second image of the scanning head frame point captured by the second tracking device; a first conversion relationship between a first tracking coordinate system of the first tracking device and a second tracking coordinate system of the second tracking device is determined based on the first reconstructed coordinate, the second reconstructed coordinate and the first scanning coordinate; and in the case where no marking points are attached to the measured object, a first conversion relationship between the first tracking coordinate system and the second tracking coordinate system can be established with the first scanning device as the intermediary.
[0062] Based on the scanning image acquired by each scanning device, the second scanning coordinates are determined; based on the second reconstructed coordinates and the second scanning coordinates, the second conversion relationship between the second tracking coordinate system and the scanning coordinate system corresponding to each scanning device is determined; when no marking points are affixed to the measured object, the second conversion relationship between the second tracking coordinate system and the scanning coordinate system corresponding to each scanning device can be established with the second tracking device as the intermediary.
[0063] Based on the first conversion relationship and the second conversion relationship, the multi-frame scanning data of the object to be measured acquired by each scanning device is converted to the first tracking coordinate system. When no marking points are affixed to the object to be measured, based on the constructed first conversion relationship and the second conversion relationship, the multi-frame data of the object to be measured by multiple scanning devices can be converted to the first tracking coordinate system, which reduces labor costs and improves measurement efficiency to a certain extent.
[0064] In other embodiments of the present application, an external coordinate system may be pre-set in the electronic device, and the external coordinate system may be associated with the first tracking coordinate system, and the coordinate points in the first tracking coordinate system may be uniformly converted to the external coordinate system, which is not limited in the present application.
[0065] Figure 3 is a flow chart of a multi-device measurement method provided by another embodiment of the present application. After determining the multi-frame scanning data in the first tracking coordinate system, the multi-frame scanning data in the first tracking coordinate system is fused. Figure 3 As shown, the following steps are included:
[0066] Step S301 : dividing the multi-frame scan data in the first tracking coordinate system based on a plurality of preset voxels to obtain the multi-frame scan data corresponding to each voxel.
[0067] In some embodiments of the present application, based on the spatiotemporal positioning technology, a cube for fusing data may be pre-set, and the cube may 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 may be 0.1 mm*0.1 mm*0.1 mm. The multi-frame scan data in the first tracking coordinate system is divided based on the multiple voxels to obtain the multi-frame scan data corresponding to each voxel.
[0068] Step S302: determining the weight of each frame of scanning data in a voxel based on the position and movement speed of the at least one scanning device determined by the multiple tracking devices.
[0069] In some embodiments of the present application, each tracking device may capture one or more scanning devices, and each tracking device has a corresponding frame rate value when capturing the scanning device. The frame rate value represents the number of frames captured by the tracking device per second, and is a measure of the change in the number of frames captured over time. 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, and the frame rate value is proportional to the moving speed. 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 smearing will occur. Therefore, in the process of dynamic measurement of the object to be measured by the scanning device, the weight of each frame of scanning data is determined based on the posture and moving speed of at least one scanning device determined by the tracking device, providing a data basis for evaluating the point cloud fusion data.
[0070] In one example, if the i-th tracking device captures the j-th scanning device, the frame rate value of the i-th tracking device is the number of frames captured per second by the j-th scanning device, and the moving speed of the j-th scanning device is obtained, then the weight of the k-th frame voxel metadata can be calculated based on the frame rate value of the i-th tracking device and the moving speed of the j-th scanning device. .
[0071] Assuming that any voxel The coordinates of the point cloud fusion data in are , then the relationship between the multi-frame scan data in the voxel, the weight corresponding to each frame scan data, and the point cloud fusion data can be expressed by the following formula:
[0072] ;
[0073] in, Indicates the weight value corresponding to the k-th frame scan data, Represented in voxel The coordinates of the scan data of the kth frame.
[0074] Step S303: fusing multiple frames of scan data corresponding to each voxel based on the weights to generate point cloud fusion data corresponding to each voxel.
[0075] In some embodiments of the present application, multiple frames of scan data corresponding to each voxel are fused to generate point cloud fusion data corresponding to each voxel. During the fusion process, the weight is assigned to each frame of scan data. Multiple frames of scan data can be fused by data preprocessing and point cloud registration, which is not limited by the present application. Step S304, based on the weight and the number of frames corresponding to the point cloud fusion data, a quality assessment result of the point cloud fusion data is obtained.
[0076] In some embodiments of the present application, the number of frames of scan data corresponding to weights greater than a preset weight threshold in a voxel is calculated, and a proportion is calculated based on the number and the number of frames. For 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 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 weights greater than the preset weight threshold of 0.9 is 6, and the proportion = 6 / 10 = 0.6.
[0077] If the ratio is greater than the preset ratio 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 current measurement of at least one scanning device meets the quality requirements and there is no need to re-measure the part of the object being measured. The preset ratio 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 ratio and the preset number of frames, respectively.
[0078] 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, which means 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 under test. 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 under test. The scanning path of the scanning device can be calculated based on the local features. The scanning path can be displayed to the user in a visual way through the display screen of the electronic device, so that the user can move based on the scanning path and re-obtain multiple frames of scanning data.
[0079] In an embodiment of the present application, by assigning a weight to each frame of scanning data as a means of evaluating the quality of the point cloud fusion data, the quality of the point cloud fusion data can be effectively determined, avoiding the need to evaluate the imaging effect after completing the overall scan of the object being measured, and to a certain extent improving the efficiency of determining the measurement data.
[0080] Figure 4 is a flow chart of a multi-device measurement method provided by another embodiment of the present application. The measured object may be placed in a vibration environment or in a non-vibration environment. When the measured object is placed in a non-vibration environment, the following may be performed: Figure 2 The steps of the embodiment shown in the figure can be performed as follows when the object to be measured is placed in a vibration environment. Figure 4 The steps shown include:
[0081] Step S401, determining whether the measurement environment of the measured object is a first type of environment.
[0082] In some embodiments of the present application, a non-vibration environment is regarded as a first type of environment, and a vibration environment is regarded as a second type of environment. If the measurement environment of the measured object is determined to be a first type of environment, the following is performed: Figure 2 In the illustrated embodiment, steps S201 to S206 are as follows: If it is determined that the measurement environment of the measured object is the second type of environment, step S402 is executed.
[0083] Step S402: acquiring an image set corresponding to the object under test based on at least one tracking device, and constructing a reference coordinate system.
[0084] 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.
[0085] 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 the present 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 angles, or it can be photographic data of the measured object photographed by the tracking device at different depths and angles, and the video frame of the mark point photographed in the photographic data is used as an image frame in the image set. The reference coordinate system is the coordinate system corresponding to the measured object, and can be constructed in advance based on the initial frame image of the image set.
[0086] Step S403: determining a plurality of framework points in the reference coordinate system based on a plurality of marker points in the image set.
[0087] In some embodiments of the present application, based on an image set, a plurality of framework points in a reference coordinate system of the object to be measured are obtained, and the plurality of framework points are marking points on the surface of the object to be measured. Specifically, at least one tracking device is used to photograph the marking points of the object to be measured to obtain an image set containing the plurality of marking points.
[0088] In order to ensure the uniqueness of the marker points in the extracted image frame, the inter-frame deduplication technology is used to deduplicate all the two-dimensional marker points in the image set, and the two-dimensional marker points determined after deduplication are used as multiple marker points. Based on the multiple marker points, the objective function is constructed using the bundle adjustment optimization algorithm, and the parameters of the objective function are adjusted using the nonlinear optimization method to obtain multiple framework points, which are the optimal solutions for minimizing the output of the objective function.
[0089] Specifically, the bundle adjustment optimization algorithm is an algorithm that adjusts the parameters of the calibration system to minimize the back-projection error of the calibration system. Based on the camera shooting parameters of at least one tracking device, the coordinates of multiple scanning marker points are converted into multiple three-dimensional coordinates; based on the camera shooting parameters and the position information of at least one tracking device, the multiple three-dimensional coordinates are reprojected to a two-dimensional plane to obtain projection coordinates, and the objective function is constructed based on the projection coordinates and the coordinates of the multiple scanning marker points. The objective function is expressed by the formula as follows:
[0090] ;
[0091] In the formula, Represents the spatial coordinates (3D coordinates) of the i-th scanning mark 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 scanning mark point detected on the j-th image, and m and n represent the number of frame images and the number of scanning mark points, respectively.
[0092] Step S404: determining, based on the multiple framework points, a third transformation relationship between the tracking coordinate system corresponding to each tracking device and the reference coordinate system, and a fourth transformation relationship between the tracking coordinate system corresponding to each tracking device and the scanning coordinate system corresponding to each scanning device.
[0093] In some embodiments of the present application, based on the marker point image captured by each 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, thereby obtaining a third conversion relationship, which is expressed by the following formula:
[0094] ;
[0095] in, It means that the u-th tracking device captured the 3D marker point corresponding to the marker point at time v. Indicates the frame point, They represent the rotation matrix and translation vector that transform the tracking coordinate system of the uth tracking device into the reference coordinate system at time v. At the vth moment, three or more groups of marker points with the same name can be matched to obtain a first matching result, and a third conversion relationship between the tracking coordinate system and the reference coordinate system of the uth tracking device can be obtained based on the first matching result.
[0096] In some embodiments of the present application, based on a scanning image obtained by scanning a marker point by a scanning device, 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 a two-dimensional point on the scanning image into a three-dimensional point. A device scanning point set determined by a device frame point image of an external frame point of each scanning device taken by multiple tracking devices is obtained, 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 scanning data point set is matched with the marker points with the same name in the device scanning point set to obtain a second matching result. Based on the second matching result, a fourth conversion relationship is obtained, which is expressed by the following formula:
[0097] ;
[0098] in, It indicates the 3D coordinate point corresponding to the time when the uth tracking device captures the wth scanning device at the vth time. It is determined based on the hand-eye calibration result and the device frame point image of the external frame point of the scanning device captured by the tracking device. represents the scanned data point determined by the scanned image obtained by scanning the marker point by the w-th scanning device at the v-th time. They represent the rotation matrix and translation vector that transform the scanning coordinate system of the w-th scanning device into the tracking coordinate system of the u-th tracking device. , three or more groups of marker points with the same name can be found at the vth moment, so that the fourth transformation relationship between the uth tracking device coordinate system and the wth scanning device coordinate system can be obtained.
[0099] Step S405: based on the third conversion relationship and the fourth conversion relationship, convert the multiple frames of scanning data of the object to be measured acquired by each scanning device into the reference coordinate system.
[0100] In some embodiments of the present application, based on the third conversion relationship and the fourth conversion relationship, an expression for converting multiple frames of scanning data of the object under test acquired by each scanning device into a reference coordinate system can be constructed.
[0101] ;
[0102] According to this expression, the multi-frame scanning data acquired by the w-th scanning device at the vth time can be solved: Convert to base coordinates .
[0103] In an embodiment of the present application, scanning data obtained by at least one 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 under vibration environments.
[0104] Figure 5 The 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] 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. When the multiple instructions are executed by the processor 103, the multi-device measurement method executed on the electronic device 10 can be implemented.
[0110] 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 .
[0111] 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.
[0112] 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 multi-device measurement method.
[0113] 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.
[0114] 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 .
[0115] 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.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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.
[0122] 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 multi-device measurement method, applied to electronic equipment, characterized in that: The electronic device is respectively connected to a plurality of tracking devices and at least one scanning device for communication, the plurality of tracking devices include a first tracking device and a second tracking device, the plurality of scanning devices include a first scanning device, and the method includes: determining first reconstructed coordinates based on a first image of a scanning head frame point of the first scanning device captured by the first tracking device; determining second reconstructed coordinates based on a second image of the scanning head framework point captured by the second tracking device; Determine a first conversion relationship between a first tracking coordinate system of the first tracking device and a second tracking coordinate system of the second tracking device based on the first reconstructed coordinates, the second reconstructed coordinates and a first scanning coordinate, wherein the first scanning coordinates are coordinates of the scanning head frame point in the first scanning coordinate system of the first scanning device; Determining second scanning coordinates based on the scanned images acquired by each scanning device; Determine a second conversion relationship between the second tracking coordinate system and a scanning coordinate system corresponding to each scanning device based on the second reconstructed coordinates and the second scanning coordinates; Based on the first conversion relationship and the second conversion relationship, convert the multiple frames of scanning data of the object to be measured acquired by each scanning device to the first tracking coordinate system; After determining the multi-frame scanning data in the first tracking coordinate system, the multi-frame scanning data in the first tracking coordinate system is divided based on a preset plurality of voxels to obtain the multi-frame scanning data corresponding to each voxel; based on the posture and moving speed of the at least one scanning device determined by the multiple tracking devices, the weight of each frame of scanning data in the voxel is determined; based on the weight, the multi-frame scanning data corresponding to each voxel is fused to generate point cloud fusion data corresponding to each voxel; based on the weight and the number of frames corresponding to the point cloud fusion data, a quality assessment result of the point cloud fusion data is obtained.
2. The multi-device measurement method according to claim 1, characterized in that: The obtaining of a quality assessment result of the point cloud fusion data based on the weight and the number of frames corresponding to the point cloud fusion data includes: 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, and the scanning path of the scanning device is determined based on the local features corresponding to the point cloud fusion data.
3. The multi-device measurement method according to claim 1, characterized in that: The method further comprises: If the measured object is measured in the first type of environment, the step of capturing a first image of a scanning head frame point of the first scanning device based on the first tracking device is performed; If the measured object is measured in the second type of environment, a set of images corresponding to the measured object is acquired based on at least one tracking device to construct a reference coordinate system.
4. The multi-device measurement method according to claim 3, characterized in that: The method further comprises: Determine a plurality of framework points in the reference coordinate system based on a plurality of marker points in the image set, wherein the plurality of marker points are marker points on the surface of the measured object; Based on the multiple framework points, determining a third transformation relationship between a tracking coordinate system corresponding to each tracking device and the reference coordinate system, and a fourth transformation relationship between a tracking coordinate system corresponding to each tracking device and a scanning coordinate system corresponding to each scanning device; Based on the third conversion relationship and the fourth conversion relationship, the multiple frames of scanning data of the object to be measured acquired by each scanning device are converted into the reference coordinate system.
5. The multi-device measurement method according to claim 4, characterized in that: The determination of the third conversion relationship and the fourth conversion relationship includes: Obtaining a three-dimensional marker point set based on the marker point images taken by the multiple tracking devices; Obtaining the third conversion relationship based on a first matching result obtained by matching the three-dimensional marker point set with marker points having the same name among the multiple framework points; Obtaining a set of scanning data points based on scanning images obtained by scanning the object under test by the multiple scanning devices; Based on the device frame point image set of each scanning device captured by the multiple tracking devices, a device scanning point set is obtained; The fourth conversion relationship is obtained based on a second matching result obtained by matching the scan data point set with the marker points with the same name in the device scan point set.
6. The multi-device measurement method according to claim 4, characterized in that: The determining of a plurality of framework points in the reference coordinate system based on a plurality of marker points in the image set comprises: Determine the plurality of marker points from all two-dimensional marker points in the image set by using an inter-frame deduplication technology; 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.
7. The multi-device measurement method according to claim 6, characterized in that: The objective function is constructed based on the multiple marker points using a bundle adjustment optimization algorithm, including: Based on camera shooting parameters of the at least one tracking device, converting the coordinates of the plurality of marker points into a plurality of three-dimensional coordinates; Based on the camera shooting parameters and the position information of the at least one tracking device, reprojecting the multiple three-dimensional coordinates onto a two-dimensional plane to obtain projection coordinates; The objective function is constructed based on the projection coordinates and the coordinates of the multiple marker points.
8. A multi-device measurement system, characterized in that: include: Multiple tracking devices, at least one scanning device, and electronic devices: a first tracking device among the plurality of tracking devices, configured to capture a first image of a first scanning device among the at least one scanning device; a second tracking device among the plurality of tracking devices, configured to capture a second image of the first scanning device; The at least one scanning device is used to obtain a scanned image; The electronic device is used to determine first reconstruction coordinates based on the first image, determine second reconstruction coordinates based on the second image, and determine second scanning coordinates based on the scanning images acquired by each scanning device; The electronic device is further used to determine a first conversion relationship between a first tracking coordinate system of the first tracking device and a second tracking coordinate system of the second tracking device based on the first reconstructed coordinates, the second reconstructed coordinates and the first scanning coordinates, wherein the first scanning coordinates are coordinates of the scanning head frame point in the first scanning coordinate system of the first scanning device; determine a second conversion relationship between the second tracking coordinate system and a scanning coordinate system corresponding to each scanning device based on the second reconstructed coordinates and the second scanning coordinates; and convert multiple frames of scanning data of the object to be measured acquired by each scanning device to the first tracking coordinate system based on the first conversion relationship and the second conversion relationship; After determining the multi-frame scan data in the first tracking coordinate system, dividing the multi-frame scan data in the first tracking coordinate system based on a plurality of preset voxels to obtain the multi-frame scan data corresponding to each voxel; Determine a weight of each frame of scanning data in a voxel based on the position and movement speed of the at least one scanning device determined by the multiple tracking devices; Based on the weights, multiple frames of scan data corresponding to each voxel are fused to generate point cloud fusion data corresponding to each voxel; Based on the weight and the number of frames corresponding to the point cloud fusion data, a quality assessment result of the point cloud fusion data is obtained.
9. 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 multi-device measurement method according to any one of claims 1 to 7.
10. 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 multi-device measurement method according to any one of claims 1 to 7 is implemented.
