Communication method and related device

By determining the data point collection in the overlapping area of ​​the point cloud in the three-dimensional reconstruction for precise registration, the problem of large precision registration errors in the three-dimensional reconstruction is solved and the three-dimensional reconstruction effect is improved.

CN118587295APending Publication Date: 2024-09-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310232899.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

During the three-dimensional reconstruction process, the precision registration error is large, resulting in poor three-dimensional reconstruction results, mainly due to the high error rate in finding corresponding points.

Method used

By determining the set of data points in the overlapping area of ​​the first point cloud and the second point cloud under the target coordinate system, precise registration is performed to obtain the target transformation matrix, thereby improving the accuracy of the corresponding point pairs and the accuracy of the fine registration. .

Benefits of technology

It reduces precision registration errors and improves the effect of three-dimensional reconstruction. The error is reduced by more than 50% and the time consumption is less increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587295A
    Figure CN118587295A
Patent Text Reader

Abstract

A communication method and related device, the method comprising: determining a first set in a first point cloud and a second set in a second point cloud, the first set being a set of data points of the first point cloud falling in a target area in a target coordinate system, the second set being a set of data points of the second point cloud falling in the target area in the target coordinate system, the target area is an overlapping area of a space occupied by the first point cloud and a space occupied by the second point cloud in a target coordinate system; according to the first set and the second set, fine registration is carried out on the first point cloud and the second point cloud, a target transformation matrix is obtained, and the target transformation matrix is used for transforming the point cloud under a first coordinate system where the first point cloud is located and the point cloud under a second coordinate system where the second point cloud is located to a target coordinate system. The accuracy of the corresponding point pairs found in the fine registration process is improved, so that the error of fine registration is reduced, and the accuracy of fine registration is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a communication method and related devices. Background Art

[0002] 3D reconstruction refers to the process of restoring the 3D information of a target object based on its 2D image. Common 3D reconstruction methods include 3D reconstruction based on structured light, 3D reconstruction based on lidar, and 3D reconstruction based on video streams captured by binocular cameras.

[0003] In the process of 3D reconstruction, point cloud registration is one of the important point cloud processing technologies. Point cloud registration includes coarse registration and fine registration. At present, fine registration mostly uses iterative closest point (ICP) algorithm, but in the process of fine registration, the error rate of finding corresponding points is high, resulting in large errors in fine registration, which in turn leads to poor 3D reconstruction effect.

[0004] Therefore, there is an urgent need to provide a three-dimensional reconstruction method in order to reduce the error rate of finding corresponding points, reduce the error of fine registration, improve the accuracy of fine registration, and thus improve the effect of three-dimensional reconstruction. Summary of the invention

[0005] The present application provides a communication method and related devices, in order to reduce the error rate of finding corresponding points, reduce the error of fine alignment, improve the accuracy of fine alignment, and thus improve the effect of three-dimensional reconstruction.

[0006] In the first aspect, the present application provides a communication method, which can be executed by a terminal device, or by a component configured in the terminal device (such as a chip, a chip system, etc.), or by a logic module or software that can implement all or part of the terminal device functions, and the present application does not limit this.

[0007] The present application does not limit the specific type of terminal device. For example, the terminal device may be a handheld device or vehicle-mounted device with a wireless connection function. For example, the terminal device may be a mobile phone, a tablet computer, a computer with a wireless transceiver function (such as a laptop computer, a PDA, etc.), etc.

[0008] Exemplarily, the method includes: determining a first set in the first point cloud and a second set in the second point cloud, the first set being a set of data points of the first point cloud falling within a target area in a target coordinate system, the second set being a set of data points of the second point cloud falling within a target area in a target coordinate system, the target area being an overlapping area between a space occupied by the first point cloud and a space occupied by the second point cloud in the target coordinate system; accurately aligning the first point cloud and the second point cloud according to the first set and the second set to obtain a target transformation matrix, the target transformation matrix being used to transform the point cloud in the first coordinate system and the point cloud in the second coordinate system to the target coordinate system, the first coordinate system being the coordinate system where the first point cloud is located, and the second coordinate system being the coordinate system where the second point cloud is located.

[0009] In the above technical solution, the first set in the first point cloud and the second set in the second point cloud are determined to perform precise alignment based on the data points in the first set and the second set to obtain the target transformation matrix. In this way, in the process of precise alignment, corresponding point pairs are found from the first set and the second set to calculate the target transformation matrix, and the first set and the second set are data points that fall within the overlapping area of ​​the space occupied by the first point cloud and the space occupied by the second point cloud in the target coordinate system. These data points are more likely to be corresponding points. Therefore, compared with directly finding corresponding point pairs from the first point cloud and the second point cloud, it is beneficial to improve the accuracy of the corresponding point pairs found, and then it is beneficial to improve the accuracy of the calculated target transformation matrix, which is beneficial to reduce the error of precise alignment. It is not difficult to understand that in the scene of three-dimensional reconstruction, if the error of precise alignment is reduced and the accuracy of precise alignment is improved, the effect of three-dimensional reconstruction will also be relatively improved.

[0010] It should be understood that the data points in the first set are part of the data points in the first point cloud, and the positions indicated by their coordinates are the positions in the first coordinate system. Similarly, the data points in the second set are part of the data points in the second point cloud, and the positions indicated by their coordinates are the positions in the second coordinate system. They are just transformed to the same coordinate system (i.e., the target coordinate system) in the process of determining the first set and the second set, and do not represent the data points in the target coordinate system.

[0011] It should also be understood that in the present application, transforming data points in a certain coordinate system to another coordinate system can also be understood as converting data points in a certain coordinate system to another coordinate system, or mapping data points in a certain coordinate system to another coordinate system, etc., and the present application does not limit this.

[0012] Optionally, the target coordinate system may be the first coordinate system, the second coordinate system, or other coordinate systems except the first coordinate system and the second coordinate system, which is not limited in the present application. In the following description, the target coordinate system takes the second coordinate system as an example.

[0013] Optionally, the above method also includes: based on the rough alignment of the first point cloud and the second point cloud, obtaining an initial transformation matrix, the initial transformation matrix is ​​used to transform the data points in the first point cloud to the second coordinate system; according to the initial transformation matrix, transforming the data points in the first point cloud to obtain a first transformed point cloud.

[0014] The above-mentioned determination of the first set in the first point cloud and the second set in the second point cloud specifically includes: according to the first transformed point cloud and the second point cloud, determining that the first set includes data points of the first transformed point cloud falling within the target area, and the second set includes data points of the second point cloud falling within the target area.

[0015] Among them, a possible design is to determine the first set, where the first set is determined based on at least one first spatial unit occupied by the second point cloud, and the at least one first spatial unit is obtained by dividing the space occupied by the second point cloud based on a first preset step size, and each first spatial unit includes at least one data point in the second point cloud.

[0016] In one example, any data point in the first set satisfies: the position in the second coordinate system falls within one of the at least one first spatial units.

[0017] In another example, any data point in the first set satisfies: it falls in the same first spatial unit as at least one data point in the second point cloud, and the number of at least one data point is greater than or equal to the first threshold.

[0018] Determine the second set. A possible design is that the second set is determined based on at least one second spatial unit occupied by the first transformed point cloud, and the at least one second spatial unit is obtained by dividing the space occupied by the first transformed point cloud based on a second preset step size, and each second spatial unit includes at least one data point in the first transformed point cloud.

[0019] In one example, any data point in the second set satisfies: the position in the second coordinate system falls within one of the at least one second spatial units.

[0020] As another example, any data point in the second set satisfies: it falls in the same second spatial unit as at least one data point in the first transformed point cloud, and the number of the at least one data point is greater than or equal to the second threshold.

[0021] In combination with the first aspect, in some possible implementations of the first aspect, the above method also includes: obtaining the three-dimensional structure of the target object based on the second transformed point cloud and the second point cloud, wherein the second transformed point cloud is obtained by transforming the data points in the first point cloud according to the target transformation matrix.

[0022] One possible design is to obtain the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud when the first condition is met.

[0023] Optionally, the first condition includes at least one of the following: the ratio of the number of data points in the first set to the number of data points in the first point cloud is greater than a third threshold; the ratio of the number of data points in the second set to the number of data points in the second point cloud is greater than a fourth threshold; the number of data points in the first set is greater than a fifth threshold; or the number of data points in the second set is greater than a sixth threshold.

[0024] Optionally, the data points in the first point cloud are obtained based on the first image and camera parameters, and the data points in the second point cloud are obtained based on the second image and camera parameters, and the first image and the second image are different images containing the target object.

[0025] In a second aspect, the present application provides a communication device that can implement the method described in the first aspect and any possible implementation of the first aspect. The device includes corresponding units for executing the above method. The units included in the device can be implemented by software and / or hardware.

[0026] In a third aspect, the present application provides a communication device, the device comprising a processor. The processor is coupled to a memory and can be used to execute a computer program in the memory to implement the method described in the first aspect and any possible implementation of the first aspect.

[0027] Optionally, the device further comprises a communication interface, and the processor is coupled to the communication interface. The communication interface is used to receive signals from other communication devices outside the device and transmit them to the processor, or send signals from the processor to other communication devices outside the device. Exemplarily, the communication interface can be a transceiver, circuit, bus, module or other type of communication interface.

[0028] Optionally, the device further comprises a memory, and the processor is coupled to the memory. The memory is used to store program instructions and data.

[0029] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program or instruction. When the computer program or instruction runs on a computer, the method in the above-mentioned first aspect and any possible implementation of the first aspect is executed.

[0030] In a fifth aspect, the present application provides a computer program product, comprising: a computer program (also referred to as code, or instructions), which, when executed, enables the method in the above-mentioned first aspect and any possible implementation of the first aspect to be executed.

[0031] In a sixth aspect, the present application provides a chip system comprising at least one processor for supporting the implementation of the functions involved in the above-mentioned first aspect and any possible implementation method of the first aspect, for example, receiving or processing the data involved in the above-mentioned method, etc.

[0032] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0033] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0034] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of a scenario applicable to the method provided in the embodiment of the present application;

[0036] Figure 2 is a schematic flow chart of a communication method provided in an embodiment of the present application;

[0037] Figure 3 It is a detailed flow chart of the communication method provided in the embodiment of the present application;

[0038] Figure 4 It is a schematic diagram of time consumption comparison provided in an embodiment of the present application;

[0039] Figure 5 is a schematic diagram of a captured image and a reconstructed three-dimensional structure of a target object provided by an embodiment of the present application;

[0040] Figure 6 is a schematic block diagram of a communication device provided in an embodiment of the present application;

[0041] Figure 7 This is another schematic block diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0043] In an embodiment of the present application, the terminal device may also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device.

[0044] The terminal device may be a device that provides voice / data connectivity to users, such as a handheld device or vehicle-mounted device with wireless connection function. At present, some examples of terminal devices can be: mobile phones, tablet computers, computers with wireless transceiver functions (such as laptops, PDAs, etc.), mobile Internet devices (mobile internet devices, MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, drones, wireless terminals in remote medical, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public land mobile network, PLMN) and other terminal devices.

[0045] Among them, wearable devices can also be called wearable smart devices, which are a general term for the intelligent design and development of wearable devices for daily wear using wearable technology, such as glasses, gloves, watches, clothing and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also realize powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and independent of smartphones to achieve complete or partial functions, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0046] In addition, the terminal device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection. IoT technology can achieve massive connections, deep coverage, and terminal power saving through narrowband (NB) technology, for example.

[0047] In addition, terminal devices can also include sensors such as smart printers, train detectors, and gas stations. Their main functions include collecting data (part of the terminal equipment), receiving control information and downlink data from network devices, and sending electromagnetic waves to transmit uplink data to network devices.

[0048] It should be understood that the present application does not limit the specific form of the terminal device. The method provided in the present application can be executed by a terminal device (such as a car, a computer, or a computer).

[0049] In order to better understand the communication method provided in the embodiments of the present application, the terms involved in the present application are first briefly explained.

[0050] 1. Camera calibration: Use the image captured by the camera to restore the objects in the space, that is, calculate the relationship between the camera's image coordinate system and the world coordinate system. Assume that there is the following simple linear relationship between the image captured by the camera and the object in the three-dimensional space: [image] = M[object], where the matrix M can be regarded as the geometric model of camera imaging, and the parameters in M ​​are the camera parameters (or camera parameters). Usually, these parameters are obtained through experiments and calculations. The process of solving the parameters can be called calibrating the camera, camera calibration, or calibrating camera parameters. Camera parameters include, but are not limited to, intrinsic parameters, extrinsic parameters, distortion parameters, etc. In this application, camera parameters mainly refer to the intrinsic parameters and extrinsic parameters of the camera.

[0051] Common camera calibration methods include, for example, the Zhang Dingyou calibration method, which uses a camera to photograph a flat plate with a fixed-pitch pattern array, and then calculates the camera parameters using a calibration algorithm, where the flat plate with a fixed-pitch pattern array is called a calibration plate.

[0052] 2. Scale-invariant feature transform (SIFT) algorithm: It is a description used in the field of image processing. This description is scale-invariant and can detect feature points in the image. It is a local feature descriptor. The SIFT algorithm usually includes the following steps: detecting extreme points in scale space, locating feature points, finding the main direction of feature points, and describing feature points with descriptors.

[0053] Among them, detecting extreme points in scale space includes convolving the image with a Gaussian kernel function to obtain a scale space, and then using Gaussian difference to obtain a Gaussian pyramid. In order to find extreme points, each pixel point must be compared with all its neighboring points to see whether it is larger or smaller than its neighboring points in the image domain and scale domain. Feature points are composed of local extreme points in scale space.

[0054] The step of finding the main direction of the feature point is specifically to assign a main direction to each feature point found according to the gradient distribution of the surrounding area.

[0055] The step of describing the feature points with descriptors specifically involves quantizing the coordinates, scale and main direction of each feature point to form a 128-dimensional feature descriptor, and normalizing the 128-dimensional vector. More detailed steps of the SIFT algorithm can be found in known technologies and will not be described in detail here.

[0056] 3. Patch based multi-view stereopesis (PMVS) algorithm: used to generate dense point clouds. Specifically, it includes the following steps:

[0057] 1. Construct a sparse patch model, where a patch refers to a small rectangle or circle that is approximately tangent to the surface of the reconstructed object and is parallel to the camera imaging plane.

[0058] 2. Dilate the patch to ensure that each small block of each image corresponds to at least one patch, so that the final patch is dense enough. For example, given a patch p, generate a set of neighborhood image blocks C(p) that meet certain conditions, and then iteratively generate adjacent patches of p.

[0059] 3. Filter the patches and remove low-quality patches, that is, delete the patches that do not meet the local grayscale consistency and global visibility consistency.

[0060] 4. Through repeated iterative expansion and filtering processes, a dense point cloud can be finally obtained. In the present application, the first point cloud and the second point cloud can be dense point clouds obtained by processing the PMVS algorithm. For more detailed steps of the PMVS algorithm, please refer to the known technology, which will not be described in detail here.

[0061] 4. Fast point feature histograms (FPFH) algorithm: It is a feature descriptor based on the normal angle between a point and its neighborhood points and the angle between the lines between points. It is an algorithm improved from the point feature histograms (PFH). It retains the main geometric characteristics of the point description in PFH and reduces the computational complexity from O(nk^2) to O(nk), where n is the number of points in the point cloud data and k is the number of points contained in the neighborhood of each point.

[0062] Calculating the FPFH feature by the FPFH algorithm specifically includes the following steps:

[0063] 1. Find the normal of the point cloud. For each data point p in the point cloud i , calculate its covariance matrix and calculate its eigenvalues ​​and eigenvectors. The covariance matrix is ​​as follows:

[0064]

[0065] Where k is the distance from point p i The nearest k points, is the center of the nearest neighbor, λ j is the jth eigenvalue, is the jth eigenvector.

[0066] 2. Select point p i All points inside the sphere with a radius r around it are connected in pairs to form a grid.

[0067] 3. Construct a local coordinate system between any two points in the grid. Define a local coordinate system at one of the points, with three unit vectors u, v, and w, where u = n1. w=u×v, ||p2-p1||2 represents the Euclidean distance between two points p1 and p2, and n1 represents the normal vector corresponding to p1. Using the above local coordinate system, the difference between n1 and n2 can be expressed by three specific angles (α, φ, θ), where n2 represents the normal vector corresponding to p2, α=v×n2,

[0068] 4. Use the triplet (α, φ, θ) to describe the positional relationship between two given points, divide each value in the triplet into n equal parts to form multiple sub-intervals, and count the number of sub-intervals in each interval to obtain a simplified point feature histogram, that is, the FPFH feature of the point cloud.

[0069] 5. 3D reconstruction: refers to the process of restoring the 3D structure of the target object based on the 2D image of the target object. Common 3D reconstruction methods include 3D reconstruction based on structured light, 3D reconstruction based on lidar, 3D reconstruction based on video streams shot by binocular cameras, etc. The 3D reconstructed target object model can provide more information than the 2D photograph, so 3D reconstruction is widely used in cultural relic modeling, game modeling, environmental detection, architectural design, and medical equipment.

[0070] Among them, for three-dimensional reconstruction based on the video stream captured by the binocular camera, it is first necessary to calibrate the camera, that is, calculate the relationship between the camera's image coordinate system and the world coordinate system, and then use the information in multiple two-dimensional images to reconstruct the three-dimensional target object.

[0071] In the process of 3D reconstruction, point cloud registration is one of the important point cloud processing technologies. The process of point cloud registration is actually to calculate the rotation and translation matrix (or "transformation matrix", "rigid transformation", "rotation matrix and translation vector" or "Euclidean transformation") between two point clouds, and transform the source point cloud to the same coordinate system as the target point cloud. The correspondence between the data points in the two point clouds is the core issue of point cloud registration. Usually, point cloud registration includes coarse registration and fine registration.

[0072] 6. Rough registration: It means calculating an approximate rotation and translation matrix of two point clouds without knowing the relative position relationship between the two point clouds. This rotation and translation matrix can prepare for the subsequent fine registration. For example, it can be used as the initial rotation and translation matrix for fine registration, and then the point cloud to be registered is converted to a unified coordinate system to provide a better initial position for precise registration. According to the different characteristics of the object to be measured, the more common rough registration methods include: labeling method, platform-based registration and curvature feature method.

[0073] 7. Precision registration: When an initial rotation and translation matrix is ​​known, a more accurate rotation and translation matrix is ​​further calculated. Common precision registration methods include ICP algorithm and various deformations.

[0074] Among them, the steps of the ICP algorithm generally include the following steps:

[0075] 1. The two point clouds P' (the source point cloud transformed by the initial transformation matrix obtained through coarse registration) and Q after initial registration are used as the initial point set for fine registration.

[0076] 2. For each point in the source point cloud P', find the corresponding point with the closest distance in the target point cloud Q to form an initial corresponding point pair.

[0077] 3. Calculate the rotation matrix R and translation vector T to minimize the mean square error between corresponding point sets.

[0078] 4. Repeat the above steps until the iteration conditions are met. The iteration conditions include, but are not limited to: reaching the maximum number of iterations, the mean square error, and being less than a threshold.

[0079] Currently, in the process of using the ICP algorithm for precise registration, the error rate of finding corresponding point pairs is high, resulting in large errors in precise registration and poor 3D reconstruction effects.

[0080] Therefore, the present application provides a communication method, which includes: determining a first set in a first point cloud and a second set in a second point cloud, so as to perform precise alignment based on the data points in the first set and the second set to obtain a target transformation matrix. In this way, in the process of precise alignment, corresponding point pairs are found from the first set and the second set to calculate the target transformation matrix. The first set and the second set are data points that fall within the overlapping area of ​​the space occupied by the first point cloud and the space occupied by the second point cloud in the target coordinate system. These data points are more likely to be corresponding points. Therefore, compared with directly finding corresponding point pairs from the first point cloud and the second point cloud, it is beneficial to improve the accuracy of the corresponding point pairs found, and thus it is beneficial to improve the accuracy of the precise alignment.

[0081] Figure 1 It is a schematic diagram of a scenario applicable to the method provided in the embodiment of the present application.

[0082] like Figure 1 As shown, the terminal device 110 ( Figure 1 The target object 120 is captured by taking different images of the target object 120, and then the target object 120 is 3D reconstructed according to the captured images to obtain its 3D structure.

[0083] It should be understood that Figure 1 The scenes shown are only examples and should not constitute any limitation to the embodiments of the present application. For example, in addition to being applicable to capturing images of the surrounding environment and constructing a three-dimensional structure of the surrounding environment based on the images, the method provided in the present application can also be applied to architectural design, medical equipment, and cultural relic modeling.

[0084] For ease of understanding, the following points are first explained:

[0085] First, in order to facilitate the clear description of the technical solution provided by the present application, in the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first point cloud and the second point cloud are only used to distinguish different point clouds, and their order is not limited. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit them to be different.

[0086] Second, in this application, "at least one" means one or more, and "plurality" means two or more. "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 character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0087] Third, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0088] Fourth, in this application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that under certain objective circumstances, the device (such as the computing node or management unit described below) will make corresponding processing, which does not limit the time, and does not require the device (such as the computing node or management unit described below) to have a judgment action when implementing, nor does it mean that there are other limitations. It should be noted that the above descriptions can be replaced in the embodiments of the present application, and there is no limitation on this.

[0089] Fifth, in the present application, transforming data points in a certain coordinate system to another coordinate system can also be understood as converting data points in a certain coordinate system to another coordinate system, or mapping data points in a certain coordinate system to another coordinate system, etc., and the present application does not limit this.

[0090] Sixth, in the present application, the first point cloud and the second point cloud are obtained based on two different images taken of the target object.

[0091] The communication method provided in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0092] It should be understood that the embodiments shown below are described with the terminal device as an example of the execution subject, but no limitation should be imposed on the execution subject of the method. As long as the program that can record the code of the method provided in the embodiment of the present application can be run, the method provided in the embodiment of the present application can be executed. For example, the terminal device can also be replaced by a component configured in the terminal device (such as a chip, a chip system, etc.), or other functional modules that can call and execute the program. The embodiment of the present application does not limit this.

[0093] Figure 2 2 is a schematic flow chart of a communication method 200 provided in an embodiment of the present application. Each step in the method 200 is described in detail below.

[0094] Step 210 , determining a first set in the first point cloud and a second set in the second point cloud.

[0095] Among them, the first set is the set of data points of the first point cloud falling within the target area in the target coordinate system, and the second set is the set of data points of the second point cloud falling within the target area in the target coordinate system. The above-mentioned target area is the overlapping area of ​​the space occupied by the first point cloud and the space occupied by the second point cloud in the target coordinate system.

[0096] It should be understood that the data points in the first set are part of the data points in the first point cloud, and the positions indicated by their coordinates are the positions in the first coordinate system. Similarly, the data points in the second set are part of the data points in the second point cloud, and the positions indicated by their coordinates are the positions in the second coordinate system. They are just transformed to the same coordinate system (i.e., the target coordinate system) in the process of determining the first set and the second set, and do not represent the data points in the target coordinate system.

[0097] Exemplarily, the terminal device determines, based on the first point cloud and the second point cloud, a set of data points (i.e., the first set) that fall within the target area when the first point cloud is transformed to the target coordinate system and a set of data points (i.e., the second set) that fall within the target area when the second point cloud is transformed to the target coordinate system.

[0098] For more detailed steps of the terminal device determining the first set and the second set, please refer to the description below.

[0099] Step 220: perform precise registration on the first point cloud and the second point cloud according to the first set and the second set to obtain a target transformation matrix.

[0100] The target transformation matrix is ​​used to transform the point cloud in the first coordinate system and the point cloud in the second coordinate system to the target coordinate system, where the first coordinate system is the coordinate system where the first point cloud is located, and the second coordinate system is the coordinate system where the second point cloud is located.

[0101] Exemplarily, the terminal device performs precise alignment according to the data points in the first set and the second set, specifically including the following steps:

[0102] 1. According to the initial transformation matrix obtained by rough registration, the data points in the first set and the data points in the second set are transformed to the same coordinate system (target coordinate system) to determine the initial corresponding point pairs. For example, for any data point in the first set, the data point closest to it in the second set is determined as the corresponding point.

[0103] 2. Calculate the rotation matrix R and translation vector T between the initial corresponding point pairs to minimize the mean square error between the corresponding point sets.

[0104] 3. Repeat the above steps until the iteration condition is met, where the iteration condition can be that the error between two iterations is less than a threshold value, and / or the current number of iterations is greater than the maximum number of iterations, and the terminal device determines the rotation matrix R and the translation vector T (i.e., the target transformation matrix). The specific process of calculating the rotation matrix R and the translation vector T based on the corresponding point pairs can be referred to the known technology, which will not be described in detail here.

[0105] Optionally, the target coordinate system may be the first coordinate system, the second coordinate system, or other coordinate systems except the first coordinate system and the second coordinate system, which is not limited in the present application. In the following description, the target coordinate system takes the second coordinate system as an example.

[0106] Among them, when the target coordinate system is the second coordinate system, the first point cloud can be regarded as the source point cloud, and the second point cloud can be regarded as the target point cloud. In other words, the data points in the first point cloud are transformed to the coordinate system where the second point cloud is located, so as to unify the coordinate systems of the data points in the first point cloud and the data points in the second point cloud.

[0107] When the target coordinate system is the first coordinate system, the first point cloud can be regarded as the target point cloud, and the second point cloud can be regarded as the source point cloud to be transformed. In other words, the data points in the second point cloud are transformed to the coordinate system where the first point cloud is located, so as to unify the coordinate systems of the data points in the first point cloud and the data points in the second point cloud.

[0108] When the target coordinate system is a coordinate system other than the first coordinate system and the second coordinate system, the data points in the first point cloud and the second point cloud need to be transformed to the target coordinate system. It should be understood that in the following description, the target coordinate system takes the second coordinate system as an example, but this should not constitute any limitation to the embodiments of the present application.

[0109] Optionally, before step 210, the method 200 further includes steps 211 and 212, wherein, in step 211, an initial transformation matrix is ​​obtained based on a rough alignment of the first point cloud and the second point cloud, and the initial transformation matrix is ​​used to transform the data points in the first point cloud to the second coordinate system; and in step 212, the data points in the first point cloud are transformed according to the initial transformation matrix to obtain a first transformed point cloud.

[0110] Exemplarily, n sampling points are selected from the first point cloud. For any sampling point among the n sampling points, one or more data points having similar FPFH features are searched in the second point cloud. A data point is randomly selected from the one or more data points as a corresponding point pair of the first point cloud in the second point cloud, and then the initial transformation matrix is ​​calculated based on the corresponding point pair.

[0111] When calculating the transformation matrix between corresponding point pairs, the effect of the current registration transformation can be judged by solving the "distance error sum" function after the corresponding point transformation. The distance error sum function is represented by the Huber function, which is recorded as Among them, m represents the preset value, l i represents the distance difference after the transformation of the i-th group of corresponding points, |l i | indicates l i The absolute value of .

[0112] Optionally, the above-mentioned determination of the first set in the first point cloud and the second set in the second point cloud includes: based on the first transformed point cloud and the second point cloud, determining that the first set includes data points of the first transformed point cloud that fall within the target area, and the second set includes data points of the second point cloud that fall within the target area.

[0113] The processes of determining the first set and the second set will be described in detail below.

[0114] For the first set:

[0115] One possible design is that the first set is determined based on at least one first spatial unit occupied by the second point cloud, and the at least one first spatial unit is obtained by dividing the space occupied by the second point cloud based on a first preset step size, and each first spatial unit includes at least one data point in the second point cloud.

[0116] Exemplarily, the maximum value x of the second point cloud on the x-axis is determined max , minimum value x min , the maximum value y on the y-axis max , minimum value y min , the maximum value z on the z-axis max , minimum value z minAccording to the first preset step length, the space occupied by the second point cloud is divided into a plurality of first space units (such as ((x max -x min ) / d)×((y max -y min ) / d)×((z max -z min ) / d)(wherein the division is rounded up) first spatial units), and further, by dividing the coordinates of the data point in the second point cloud by the first preset step size and rounding up, the first spatial unit in which the data point in the second point cloud is located is determined (that is, the at least one first spatial unit mentioned above is determined), so that the first set can be determined based on the first spatial unit including at least one data point in the second point cloud (that is, at least one first spatial unit).

[0117] One possible design is that any data point in the first set satisfies: the position in the second coordinate system falls in one of the at least one first spatial unit. In other words, for each data point in the first point cloud, the first spatial unit in which the data point falls is directly calculated based on the three-dimensional coordinates. If the data point falls in one of the at least one first spatial unit, the data point belongs to the first set; if the data point does not fall in any of the at least one first spatial unit, the data point does not belong to the first set.

[0118] Another possible design is that any data point in the first set satisfies: it falls in the same first spatial unit in at least one first spatial unit as at least one data point in the second point cloud, and the number of at least one data point is greater than or equal to the first threshold. In other words, for each data point in the first point cloud, the first spatial unit in which it falls is directly calculated based on the three-dimensional coordinates. If the data point falls in one of the at least one first spatial unit, and the number of data points in the first spatial unit is greater than or equal to the first threshold, then the data point belongs to the first set; if the data point does not fall in any of the at least one first spatial unit, or the data point falls in one of the at least one first spatial unit, but the number of data points in the first spatial unit is less than the first threshold, then the data point does not belong to the first set.

[0119] In one example, the at least one first spatial unit (i.e., the first spatial unit including at least one data point in the second point cloud) includes the first spatial unit 1, the first spatial unit 2, and the first spatial unit 3. For the data point 1 in the first point cloud, if the data point 1 falls in a first spatial unit among the first spatial unit 1, the first spatial unit 2, and the first spatial unit 3, such as the first spatial unit 3, and the number of data points in the first spatial unit 3 is greater than the first threshold (wherein the data points in the first spatial unit 3 include the data points in the first point cloud and the data points in the second point cloud), then the data point 1 belongs to the first set; if the data point 1 does not fall in any first spatial unit among the first spatial unit 1, the first spatial unit 2, and the first spatial unit 3, or the data point 1 falls in a first spatial unit among the first spatial unit 1, the first spatial unit 2, and the first spatial unit 3, such as the first spatial unit 3, but the number of data points in the first spatial unit 3 is less than the first threshold, then the data point 1 does not belong to the first set.

[0120] Optionally, a three-dimensional array may be established to store the number of data points in each first spatial unit. After determining the first spatial unit where the data point in the second point cloud is located by dividing the coordinates of the data point in the second point cloud by a preset step size and rounding up, the number of data points corresponding to the first spatial unit may be increased by one.

[0121] For the second set:

[0122] One possible design is that the second set is determined based on at least one second spatial unit occupied by the first transformed point cloud, and the at least one second spatial unit is obtained by dividing the space occupied by the first transformed point cloud based on a second preset step size, and each second spatial unit includes at least one data point in the first transformed point cloud.

[0123] Exemplarily, the maximum value x′ of the first transformed point cloud on the x-axis is determined max , the minimum value x′ min , the maximum value y′ on the y-axis max , minimum value y′ min , the maximum value z′ on the z-axis max , minimum value z′ min According to the second preset step size, the space occupied by the first transformed point cloud is divided into a plurality of second spatial units in the direction of the coordinate axis. Further, the second spatial unit where the data point in the first transformed point cloud is located is determined by dividing the coordinates of the data point in the first transformed point cloud by the second preset step size and rounding up. In this way, the second set can be determined based on the second spatial unit including at least one data point in the first transformed point cloud.

[0124] One possible design is that any data point in the second set satisfies: the position in the second coordinate system falls in one of the at least one second spatial unit. In other words, for each data point in the second point cloud, the second spatial unit in which the data point falls is directly calculated based on the three-dimensional coordinates. If the data point falls in one of the at least one second spatial unit, the data point belongs to the second set; if the data point does not fall in any of the at least one second spatial unit, the data point does not belong to the second set.

[0125] Another possible design is that any data point in the second set satisfies: it falls in the same second spatial unit in at least one second spatial unit as at least one data point in the first transformed point cloud, and the number of at least one data point is greater than or equal to the second threshold. In other words, for each data point in the second point cloud, the second spatial unit in which it falls is directly calculated based on the three-dimensional coordinates. If the data point falls in one of the at least one second spatial unit, and the number of data points in the second spatial unit is greater than or equal to the second threshold, then the data point belongs to the second set; if the data point does not fall in any of the at least one second spatial unit, or the data point falls in one of the at least one second spatial unit, but the number of data points in the second spatial unit is less than the second threshold, then the data point does not belong to the second set.

[0126] In one example, the at least one second spatial unit (i.e., the second spatial unit including at least one data point in the first transformed point cloud) includes second spatial unit 1, second spatial unit 2, and second spatial unit 3. For data point 1 in the second point cloud, if data point 1 falls in a second spatial unit among second spatial unit 1, second spatial unit 2, and second spatial unit 3, such as second spatial unit 3, and the number of data points in second spatial unit 3 is greater than a second threshold (wherein the data points in second spatial unit 3 include data points in the first point cloud and data points in the second point cloud), then data point 1 belongs to the second set; if data point 1 does not fall in any second spatial unit among second spatial unit 1, second spatial unit 2, and second spatial unit 3, or data point 1 falls in a second spatial unit among second spatial unit 1, second spatial unit 2, and second spatial unit 3, such as second spatial unit 3, but the number of data points in second spatial unit 3 is less than or equal to the second threshold, then data point 1 does not belong to the second set.

[0127] It should be understood that the above-mentioned first threshold and second threshold may be the same or different; the first preset step size used to divide the first transformed point cloud and the second preset step size used to divide the second point cloud may be the same or different, and the embodiment of the present application does not limit this.

[0128] Optionally, the method 200 further includes step 230, wherein step 230 is: obtaining a three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud, wherein the second transformed point cloud is obtained by transforming the data points in the first point cloud according to the target transformation matrix. The target transformation matrix includes a target rotation matrix and a translation vector.

[0129] Exemplarily, each data point in the first point cloud is transformed according to the target transformation matrix to obtain a second transformed point cloud, and the three-dimensional structure of the target object is obtained according to the second transformed point cloud and the second point cloud.

[0130] Optionally, obtaining the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud includes: obtaining the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud when the first condition is satisfied.

[0131] The above-mentioned first condition includes at least one of the following: the ratio between the number of data points in the first set and the number of data points in the first point cloud is greater than a third threshold; the ratio between the number of data points in the second set and the number of data points in the second point cloud is greater than a fourth threshold; the number of data points in the first set is greater than a fifth threshold; or, the number of data points in the second set is greater than a sixth threshold.

[0132] In one example, if the ratio between the number of data points in the first set and the number of data points in the first point cloud is greater than a third threshold, the three-dimensional structure of the target object is obtained based on the second transformed point cloud and the second point cloud; if the ratio between the number of data points in the first set and the number of data points in the first point cloud is less than or equal to the third threshold, the data points in the first point cloud are discarded, that is, the data points in the first point cloud are not used to determine the three-dimensional structure of the target object.

[0133] In another example, if the ratio between the number of data points in the second set and the number of data points in the second point cloud is greater than a fourth threshold, the three-dimensional structure of the target object is obtained based on the second transformed point cloud and the second point cloud; if the ratio between the number of data points in the second set and the number of data points in the second point cloud is less than or equal to the fourth threshold, the data points in the second point cloud are discarded, that is, the data points in the second point cloud are not used to determine the three-dimensional structure of the target object.

[0134] In another example, if the number of data points in the first set is greater than a fifth threshold, the three-dimensional structure of the target object is obtained based on the second transformed point cloud and the second point cloud; if the number of data points in the first set is less than or equal to the fifth threshold, the data points in the first point cloud are discarded, that is, the data points in the first point cloud are not used to determine the three-dimensional structure of the target object.

[0135] It should be understood that the above-mentioned first condition can be used separately or in combination. In other words, if one of the conditions is met, the three-dimensional structure of the target object can be obtained based on the second transformed point cloud and the second point cloud; or, if two or more of the conditions are met, the three-dimensional structure of the target object can be obtained based on the second transformed point cloud and the second point cloud.

[0136] It should also be understood that the data points in the first set and the data points in the second set mentioned above can be the first set and the second set determined based on the first transformed point cloud and the second point cloud after the first point cloud is transformed according to the initial transformation matrix, thereby obtaining the first transformed point cloud; or the first set and the second set can be determined based on the second transformed point cloud and the second point cloud using the same principle after the first point cloud is transformed according to the target transformation matrix, thereby obtaining the second transformed point cloud, and the present application does not limit this. Among them, the specific steps of determining the first set and the second set based on the second transformed point cloud and the second point cloud can refer to the relevant description of determining the first set and the second set based on the first transformed point cloud and the second point cloud, which will not be repeated here.

[0137] Optionally, the data points in the first point cloud are obtained based on the first image and camera parameters, and the data points in the second point cloud are obtained based on the second image and camera parameters, and the first image and the second image are different images containing the target object.

[0138] One possible implementation method is to obtain a first image and a second image, wherein the first image and the second image are different images containing the target object, and then determine the feature points in the first image and the second image respectively through the SIFT algorithm, and transform the coordinates of the feature points in the first image and the second image to the world coordinate system according to the camera parameters to obtain the feature points in the transformed first image and the second image; based on the feature points in the transformed first image and the second image, generate the first point cloud and the second point cloud through the PMVS algorithm.

[0139] Optionally, the first image and the second image may be images directly obtained by photographing the target object, or may be images obtained by photographing a video of the target object and then capturing key frames from the video, which is not limited in the present application.

[0140] When shooting a video of the target object, an image can be captured every 10 frames, and the method provided in the present application can be used for any two adjacent frames of the captured images.

[0141] Figure 3 Detailed flowchart of the three-dimensional reconstruction method provided in the embodiment of the present application is shown in FIG. Figure 3 Describe the 3D reconstruction process in detail.

[0142] Step 301, calibrate camera parameters.

[0143] Exemplarily, a calibration plate is placed in front of the camera, and photos of the calibration plate in multiple postures are collected. Furthermore, the intrinsic and extrinsic parameters of the camera are obtained by using the Zhang Zhengyou calibration method.

[0144] Step 302: image acquisition and preprocessing.

[0145] The above-mentioned image refers to an image containing a target object (or an object to be reconstructed or a scene to be reconstructed).

[0146] One possible implementation method is to shoot a video around the target object, and further capture key frames to obtain images of the target object, wherein the key frames refer to different images containing the target object.

[0147] Another possible implementation is to directly take different photos of the target object. For example, different photos of the target object can be directly taken by moving the camera.

[0148] Step 303: extract two-dimensional feature points of the image.

[0149] In the present application, for the collected image, the SIFT algorithm is used to extract the two-dimensional feature points of the image, which specifically includes detecting extreme points in the scale space, locating the feature points, finding the main direction of the feature points and describing the feature points with descriptors.

[0150] Exemplarily, the scale space is obtained by convolving the image with a Gaussian kernel function, and then the Gaussian pyramid is obtained by using Gaussian difference to determine the feature points. The feature points are composed of local extreme points in the scale space. In order to find the extreme points, each pixel point must be compared with all its neighboring points to see whether it is larger or smaller than its neighboring points in the image domain and scale domain. Further, a main direction is assigned to each feature point obtained according to the gradient distribution of the surrounding area. Finally, the step of describing the feature points with descriptors specifically quantizes the coordinates, scale and main direction of each feature point to form a 128-dimensional feature descriptor, and normalizes the 128-dimensional vector. The specific steps of the SIFT algorithm can refer to the known technology and will not be described in detail here.

[0151] Step 304, calculate the point cloud FPFH features.

[0152] The point cloud may be point clouds corresponding to two images, such as a first point cloud corresponding to the first image and a second point cloud corresponding to the second image.

[0153] Exemplarily, after extracting the feature points of the first image and the second image by the SIFT algorithm, the coordinates of the feature points in the first image and the second image are transformed to the world coordinate system according to the camera parameters to obtain the feature points in the transformed first image and the second image; based on the feature points in the transformed first image and the second image, a dense point cloud is generated by the PMVS algorithm, that is, the first point cloud and the second point cloud. For a more detailed description of the PMVS algorithm, please refer to the known technology, which will not be repeated here.

[0154] After obtaining the first point cloud and the second point cloud, FPFH features are calculated for the first point cloud and the second point cloud. The specific steps can be referred to the relevant explanation of the FPFH algorithm and known technologies, which will not be repeated here.

[0155] Step 305: perform coarse registration to obtain an initial transformation matrix.

[0156] Exemplarily, n sampling points are selected from the first point cloud. For any sampling point among the n sampling points, one or more data points having similar FPFH features are searched in the second point cloud, and a data point is randomly selected from the one or more data points as a corresponding point pair of the first point cloud in the second point cloud.

[0157] Calculate the transformation matrix between the corresponding points, and then determine the effect of the current registration transformation by solving the "distance error sum" function after the corresponding points are transformed. For specific steps, please refer to Figure 2 The relevant description will not be repeated here.

[0158] Step 306: Determine the first set and the second set.

[0159] Exemplarily, based on the first transformed point cloud and the second point cloud, the data points of the first transformed point cloud falling within the target area are determined to obtain a first set; based on the first transformed point cloud and the second point cloud, the data points of the second point cloud falling within the target area are determined to obtain a second set. The first transformed point cloud is obtained after the first point cloud is transformed by the initial transformation matrix. The specific steps for determining the first set and the second set can be found in Figure 2 Related description.

[0160] Step 307, searching for corresponding point pairs.

[0161] According to the initial transformation matrix obtained by rough registration, the data points in the first set are transformed to obtain the transformed first set. For each data point in the transformed first set, the closest corresponding point is found in the second set to form an initial corresponding point pair.

[0162] Step 308, calculating the error function.

[0163] In this application, the error function can be represented by the distance error sum function, and the distance error sum function can be represented by the Huber function, which is recorded as Among them, m represents the preset value, l i represents the distance difference after the transformation of the i-th group of corresponding points, |l i | indicates l i The absolute value of .

[0164] Step 309, calculate the target transformation matrix.

[0165] According to the corresponding point pairs, the target transformation matrix between the corresponding points is calculated to minimize the value of the error function.

[0166] Step 310, determine whether the error has converged?

[0167] If the error value is less than the preset threshold, convergence is determined and step 311 is further executed; if the error is greater than or equal to the preset threshold, step 307 is re-executed, that is, corresponding point pairs are searched.

[0168] Step 311, determine whether the first set meets the first condition?

[0169] For the description of the first condition, please refer to Figure 2 Related description.

[0170] If the first set meets the first condition, then continue to execute step 312; if the first set does not meet the first condition, then discard the first point cloud, in other words, return to step 302 to perform image acquisition and preprocessing.

[0171] Step 312: Obtain the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud.

[0172] According to the target transformation matrix, each data point in the first point cloud is transformed to obtain a second transformed point cloud, and according to the second transformed point cloud and the second point cloud, the three-dimensional structure of the target object is obtained.

[0173] The advantages of the method provided by the present application compared with the existing precise registration methods will be analyzed below in conjunction with Table 1.

[0174] Table 1

[0175]

[0176] In Table 1, the method of not determining the first set and the second set refers to a method of directly using the data points in the first point cloud and the second point cloud for precise alignment without extracting the first set from the first point cloud and the second set from the second point cloud (that is, an existing precise alignment method). The method provided by the present application is to extract the first set from the first point cloud, extract the second set from the second point cloud, and perform precise alignment based on the first set and the second set. As can be seen from the above, the transformation includes rotation transformation and translation transformation. From the results in Table 1, it can be seen that the method provided by the present application reduces the error by more than 50%, and the time consumption is only increased by 0.19s, which is a small increase and can still meet the requirements. Therefore, the present application reduces the error and improves the reconstruction effect while meeting the time consumption requirements.

[0177] It can be understood that in the present application, in the process of determining the first set and the second set, the space where the first transformed point cloud and the second point cloud are located is divided into spatial units to determine the data points of the first point cloud and the second point cloud respectively falling in the overlapping area in the target coordinate system. Compared with the existing method of determining the data points in the overlapping area, as the number of data points in the point cloud increases, the time consumption is shorter. Figure 4 The time consumption of the method for determining data points in the overlapping area provided by the present application and the existing methods 1 and 2 is analyzed.

[0178] Figure 4 It is a schematic diagram of time consumption comparison provided in the embodiment of the present application.

[0179] like Figure 4 As shown, it can be seen that as the number of data points in the point cloud gradually increases, the method for determining data points in the overlapping area provided by the present application consumes significantly less time than the existing method one (such as the radius search method) and method two (the distance search method based on the KD tree).

[0180] Figure 5 It is a schematic diagram of a captured image and a reconstructed three-dimensional structure of a target object provided in an embodiment of the present application.

[0181] like Figure 5 As shown, Figure 5 a) and b) in FIG. 1 show two different images taken of the target object. Figure 5 c) in the figure shows the three-dimensional structure of the target object after being reconstructed by the method provided in the present application. It can be seen that the three-dimensional structure of the target object after being reconstructed is basically consistent with the photographed target object, and the reconstruction effect is good.

[0182] Based on the above technical solution, the terminal device determines the first set in the first point cloud and the second set in the second point cloud to perform precise alignment according to the data points in the first set and the second set to obtain the target transformation matrix. In this way, in the process of precise alignment, corresponding point pairs are found from the first set and the second set to calculate the target transformation matrix, and the first set and the second set are data points that fall within the overlapping area of ​​the space occupied by the first point cloud and the space occupied by the second point cloud in the target coordinate system. These data points are more likely to be corresponding points. Therefore, compared with directly finding corresponding point pairs from the first point cloud and the second point cloud, it is beneficial to improve the accuracy of the corresponding point pairs found, and then it is beneficial to improve the accuracy of the calculated target transformation matrix, which is beneficial to reduce the error of precise alignment. It is not difficult to understand that in the scene of three-dimensional reconstruction, if the error of precise alignment is reduced and the accuracy of precise alignment is improved, the effect of three-dimensional reconstruction will also be relatively improved.

[0183] Combine the following Figure 6 and Figure 7 The device provided in the embodiments of the present application is described in detail.

[0184] Figure 6 is a schematic block diagram of a communication device provided in an embodiment of the present application. Figure 6 As shown, the apparatus 600 may include: a determination unit 610 and a registration unit 620. The apparatus 600 may be used to perform Figure 2 or Figure 3 The method described in the illustrated embodiment.

[0185] Exemplarily, the apparatus 600 is used to perform Figure 2 When using the method shown, the determination unit 610 can be used to determine a first set in the first point cloud and a second set in the second point cloud, the first set being a set of data points of the first point cloud falling within a target area in the target coordinate system, the second set being a set of data points of the second point cloud falling within a target area in the target coordinate system, and the target area being an overlapping area between the space occupied by the first point cloud and the space occupied by the second point cloud in the target coordinate system; the registration unit 620 can be used to perform precise registration of the first point cloud and the second point cloud according to the first set and the second set to obtain a target transformation matrix, the target transformation matrix being used to transform the point cloud in the first coordinate system and the point cloud in the second coordinate system to the target coordinate system, the first coordinate system being the coordinate system where the first point cloud is located, and the second coordinate system being the coordinate system where the second point cloud is located.

[0186] It can be understood that the above method can be implemented by one or more units, and the one or more units can be placed together or in different devices.

[0187] Optionally, the target coordinate system is a second coordinate system.

[0188] Optionally, the registration unit 620 is also used to: obtain an initial transformation matrix based on a rough registration of the first point cloud and the second point cloud, wherein the initial transformation matrix is ​​used to transform the data points in the first point cloud to a second coordinate system; transform the data points in the first point cloud according to the initial transformation matrix to obtain a first transformed point cloud; the above-mentioned determination unit 610 is specifically used to: determine, based on the first transformed point cloud and the second point cloud, that the first set includes data points of the first transformed point cloud that fall within the target area, and the second set includes data points of the second point cloud that fall within the target area.

[0189] Optionally, the first set is determined based on at least one first spatial unit occupied by the second point cloud, and the at least one first spatial unit is obtained by dividing the space occupied by the second point cloud based on a first preset step size, and each first spatial unit includes at least one data point in the second point cloud.

[0190] Optionally, any data point in the first set satisfies: a position in the second coordinate system falls within a first spatial unit of at least one first spatial unit.

[0191] Optionally, any data point in the first set further satisfies: falling in the same first spatial unit in at least one first spatial unit as at least one data point in the second point cloud, and the number of at least one data point is greater than or equal to a first threshold.

[0192] Optionally, the second set is determined based on at least one second spatial unit occupied by the first transformed point cloud, and the at least one second spatial unit is obtained by dividing the space occupied by the first transformed point cloud based on a second preset step size, and each second spatial unit includes at least one data point in the first transformed point cloud.

[0193] Optionally, any data point in the second set satisfies: a position in the second coordinate system falls within a second spatial unit of at least one second spatial unit.

[0194] Optionally, any data point in the second set further satisfies: falling in the same second spatial unit in at least one second spatial unit as at least one data point in the first transformed point cloud, and the number of at least one data point is greater than or equal to a second threshold.

[0195] Optionally, the above-mentioned device 600 also includes a transformation unit 630, and the transformation unit 630 is used to obtain the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud, and the second transformed point cloud is obtained by transforming the data points in the first point cloud according to the target transformation matrix.

[0196] Optionally, the transformation unit 630 is specifically used to obtain the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud when a first condition is satisfied, and the first condition includes at least one of the following: the ratio of the number of data points in the first set to the number of data points in the first point cloud is greater than a third threshold; the ratio of the number of data points in the second set to the number of data points in the second point cloud is greater than a fourth threshold; the number of data points in the first set is greater than a fifth threshold; or the number of data points in the second set is greater than a sixth threshold.

[0197] Optionally, the data points in the first point cloud are obtained based on the first image and camera parameters, and the data points in the second point cloud are obtained based on the second image and camera parameters, and the first image and the second image are different images containing the target object.

[0198] It should be understood that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional modules.

[0199] Figure 7 This is another schematic block diagram of a communication device provided in an embodiment of the present application.

[0200] like Figure 7 As shown, the apparatus 700 may include at least one processor 710 for implementing Figure 2 or Figure 3 The method described in the illustrated embodiment.

[0201] The device 700 may also include at least one memory 720 for storing program instructions and / or data. The memory 720 is coupled to the processor 710. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, for information exchange between devices, units or modules. The processor 710 may operate in conjunction with the memory 720. The processor 710 may execute program instructions stored in the memory 720. At least one of the at least one memory may be included in the processor.

[0202] The apparatus 700 may also include a communication interface 730 for communicating with other devices via a transmission medium, so that the apparatus 700 can communicate with other devices. The communication interface 730 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of implementing transceiver functions. The processor 710 may use the communication interface 730 to send and receive data and / or information, and to implement Figure 2 or Figure 3 The method described in the corresponding embodiment.

[0203] For example, when the apparatus 700 is used to implement Figure 2 When the method described in the illustrated embodiment is used, the processor 710 may be used to determine a first set in the first point cloud and a second set in the second point cloud, the first set being a set of data points of the first point cloud falling within a target area in the target coordinate system, the second set being a set of data points of the second point cloud falling within a target area in the target coordinate system, the target area being an overlapping area between the space occupied by the first point cloud and the space occupied by the second point cloud in the target coordinate system; based on the first set and the second set, the first point cloud and the second point cloud are precisely aligned to obtain a target transformation matrix, the target transformation matrix being used to transform the point cloud in the first coordinate system and the point cloud in the second coordinate system to the target coordinate system, the first coordinate system being the coordinate system where the first point cloud is located, and the second coordinate system being the coordinate system where the second point cloud is located.

[0204] The specific connection medium between the processor 710, the memory 720 and the communication interface 730 is not limited in the embodiment of the present application. Figure 7 In the embodiment, the processor 710, the memory 720 and the communication interface 730 are connected via a bus 740. The bus 740 is Figure 7 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0205] The present application also provides a chip system, which includes at least one processor for implementing the above Figure 2 or Figure 3 The functions involved in the methods described in the illustrated embodiments, for example, receive or process the data and / or information involved in the above methods.

[0206] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0207] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0208] The present application also provides a computer-readable storage medium, wherein a computer program (also referred to as code or instruction) is stored on the computer storage medium. When the computer program is executed by a processor, the above Figure 2 or Figure 3The method described in the illustrated embodiment is carried out.

[0209] The present application also provides a computer program product, the computer program product comprising: a computer program (also referred to as code, or instruction), when the computer program is executed, causes the computer to execute Figure 2 or Figure 3 The method described in the illustrated embodiment.

[0210] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0211] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0212] The terms "unit", "module", etc. used in this specification may be used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. The units and modules in the embodiments of the present application have the same meaning and can be used interchangeably.

[0213] It will be appreciated by those skilled in the art that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in combination with 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. In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of units is only a logical function division, and 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, 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.

[0214] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When loading and executing computer program instructions (programs) on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrated. Available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, digital video discs (DVD)), or semiconductor media (eg, solid state drives (SSD)).

[0215] If the functions provided by the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the known technology, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0216] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A communication method, characterized in that: include: Determine a first set in the first point cloud and a second set in the second point cloud, the first set being a set of data points of the first point cloud falling within a target area in a target coordinate system, the second set being a set of data points of the second point cloud falling within the target area in the target coordinate system, the target area being an overlapping area of ​​a space occupied by the first point cloud and a space occupied by the second point cloud in the target coordinate system; According to the first set and the second set, the first point cloud and the second point cloud are precisely aligned to obtain a target transformation matrix, and the target transformation matrix is ​​used to transform the point cloud in the first coordinate system and the point cloud in the second coordinate system to the target coordinate system, the first coordinate system is the coordinate system where the first point cloud is located, and the second coordinate system is the coordinate system where the second point cloud is located.

2. The method according to claim 1, characterized in that The target coordinate system is the second coordinate system.

3. The method according to claim 2, characterized in that The method further includes: obtaining an initial transformation matrix based on a rough registration of the first point cloud and the second point cloud, wherein the initial transformation matrix is ​​used to transform data points in the first point cloud to a second coordinate system; transforming the data points in the first point cloud according to the initial transformation matrix to obtain a first transformed point cloud; The determining of the first set in the first point cloud and the second set in the second point cloud comprises: According to the first transformed point cloud and the second point cloud, it is determined that the first set includes data points of the first transformed point cloud that fall within the target area, and the second set includes data points of the second point cloud that fall within the target area.

4. The method according to claim 3, characterized in that The first set is determined based on at least one first spatial unit occupied by the second point cloud, and the at least one first spatial unit is obtained by dividing the space occupied by the second point cloud based on a first preset step size, and each first spatial unit includes at least one data point in the second point cloud.

5. The method according to claim 4, characterized in that Any data point in the first set satisfies: the position in the second coordinate system falls within one of the at least one first spatial units.

6. The method according to claim 5, characterized in that Any data point in the first set also satisfies: falling in the same first spatial unit as at least one data point in the second point cloud, and the number of the at least one data point is greater than or equal to a first threshold.

7. The method according to any one of claims 3 to 6, characterized in that The second set is determined based on at least one second spatial unit occupied by the first transformed point cloud, and the at least one second spatial unit is obtained by dividing the space occupied by the first transformed point cloud based on a second preset step size, and each second spatial unit includes at least one data point in the first transformed point cloud.

8. The method according to claim 7, characterized in that Any data point in the second set satisfies: the position in the second coordinate system falls within one second spatial unit of the at least one second spatial unit.

9. The method according to claim 8, characterized in that Any data point in the second set also satisfies: falling in the same second spatial unit as at least one data point in the first transformed point cloud, and the number of the at least one data point is greater than or equal to a second threshold.

10. The method according to any one of claims 2 to 9, characterized in that The method further comprises: The three-dimensional structure of the target object is obtained according to the second transformed point cloud and the second point cloud, wherein the second transformed point cloud is obtained by transforming the data points in the first point cloud according to the target transformation matrix.

11. The method according to claim 10, characterized in that The step of obtaining the three-dimensional structure of the target object according to the second transformed point cloud and the second point cloud comprises: When a first condition is met, a three-dimensional structure of the target object is obtained according to the second transformed point cloud and the second point cloud, wherein the first condition includes at least one of the following: A ratio between the number of data points in the first set and the number of data points in the first point cloud is greater than a third threshold; a ratio between the number of data points in the second set and the number of data points in the second point cloud is greater than a fourth threshold; The number of data points in the first set is greater than a fifth threshold; or, The number of data points in the second set is greater than a sixth threshold.

12. The method according to any one of claims 1 to 11, characterized in that The data points in the first point cloud are obtained based on a first image and camera parameters, and the data points in the second point cloud are obtained based on a second image and the camera parameters. The first image and the second image are different images containing a target object.

13. A communication device, characterized in that: include: a determining unit, configured to determine a first set in a first point cloud and a second set in a second point cloud, wherein the first set is a set of data points of the first point cloud falling within a target area in a target coordinate system, and the second set is a set of data points of the second point cloud falling within the target area in the target coordinate system, and the target area is an overlapping area of ​​a space occupied by the first point cloud and a space occupied by the second point cloud in the target coordinate system; A registration unit is used to accurately align the first point cloud and the second point cloud according to the first set and the second set to obtain a target transformation matrix, wherein the target transformation matrix is ​​used to transform the point cloud in the first coordinate system and the point cloud in the second coordinate system to the target coordinate system, wherein the first coordinate system is the coordinate system where the first point cloud is located, and the second coordinate system is the coordinate system where the second point cloud is located.

14. The device according to claim 13, characterized in that The target coordinate system is the second coordinate system.

15. The device according to claim 14, characterized in that The registration unit is further used to: obtain an initial transformation matrix based on the rough registration of the first point cloud and the second point cloud, wherein the initial transformation matrix is ​​used to transform the data points in the first point cloud into a second coordinate system; transform the data points in the first point cloud according to the initial transformation matrix to obtain a first transformed point cloud; The determining unit is specifically used for: According to the first transformed point cloud and the second point cloud, it is determined that the first set includes data points of the first transformed point cloud that fall within the target area, and the second set includes data points of the second point cloud that fall within the target area.

16. The device according to claim 15, characterized in that The first set is determined based on at least one first spatial unit occupied by the second point cloud, and the at least one first spatial unit is obtained by dividing the space occupied by the second point cloud based on a first preset step size, and each first spatial unit includes at least one data point in the second point cloud.

17. The device according to claim 16, characterized in that Any data point in the first set satisfies: the position in the second coordinate system falls within one of the at least one first spatial units.

18. The device according to claim 17, characterized in that Any data point in the first set also satisfies: falling in the same first spatial unit as at least one data point in the second point cloud, and the number of the at least one data point is greater than or equal to a first threshold.

19. The device according to any one of claims 15 to 18, characterized in that The second set is determined based on at least one second spatial unit occupied by the first transformed point cloud, and the at least one second spatial unit is obtained by dividing the space occupied by the first transformed point cloud based on a second preset step size, and each second spatial unit includes at least one data point in the first transformed point cloud.

20. The device according to claim 19, characterized in that Any data point in the second set satisfies: the position in the second coordinate system falls within one second spatial unit of the at least one second spatial unit.

21. The device according to claim 20, characterized in that Any data point in the second set also satisfies: falling in the same second spatial unit as at least one data point in the first transformed point cloud, and the number of the at least one data point is greater than or equal to a second threshold.

22. The device according to any one of claims 14 to 21, characterized in that The device further comprises a transforming unit, wherein the transforming unit is configured to: The three-dimensional structure of the target object is obtained according to the second transformed point cloud and the second point cloud, wherein the second transformed point cloud is obtained by transforming the data points in the first point cloud according to the target transformation matrix.

23. The device according to claim 22, characterized in that The transformation unit is specifically used for: When a first condition is met, a three-dimensional structure of the target object is obtained according to the second transformed point cloud and the second point cloud, wherein the first condition includes at least one of the following: A ratio between the number of data points in the first set and the number of data points in the first point cloud is greater than a third threshold; a ratio between the number of data points in the second set and the number of data points in the second point cloud is greater than a fourth threshold; The number of data points in the first set is greater than a fifth threshold; or, The number of data points in the second set is greater than a sixth threshold.

24. The device according to any one of claims 13 to 23, characterized in that The data points in the first point cloud are obtained based on a first image and camera parameters, and the data points in the second point cloud are obtained based on a second image and the camera parameters. The first image and the second image are different images containing a target object.

25. A communication device, characterized in that: comprising a processor and a memory, wherein: The memory is used to store computer programs; The processor is configured to call the computer program so that the apparatus executes the method according to any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or instruction. When the computer program or instruction is executed by a computer, the method according to any one of claims 1 to 12 is implemented.

27. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 12 is implemented.