A method, device, electronic device and storage medium for three-dimensional point cloud reconstruction
By using semantic annotation information to generate depth maps in 3D point cloud reconstruction, the problem of poor accuracy and completeness of the MVS matching scheme in scenes without rich image textures is solved, and higher 3D point cloud reconstruction quality is achieved.
Patent Information
- Application Number
- CN202110535229.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-05-17
AI Technical Summary
Existing multi-view solid geometry (MVS) matching solutions are prone to holes and outliers in scenes where the image texture is not rich enough (such as autonomous driving scenes), resulting in poor accuracy and integrity of the 3D point cloud.
By obtaining three-dimensional sparse point cloud data and semantic annotation information based on scene images taken at different angles, a depth map is generated, and the three-dimensional point cloud is reconstructed based on the depth map. The semantic annotation information is used to guide the point cloud reconstruction of weak texture areas to ensure point cloud reconstruction. Accuracy and integrity of cloud data.
It improves the accuracy and completeness of 3D point cloud reconstruction, reduces the appearance of holes and external points, and ensures the accuracy and completeness of reconstructed data.
Smart Images

Figure CN113160420B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer vision technology, and in particular to a method, device, electronic device and storage medium for three-dimensional point cloud reconstruction. Background Art
[0002] 3D reconstruction technology is one of the important research directions in the field of computer vision. Its purpose is to restore the 3D point cloud information of a scene or object from multiple images. With the rapid development of Structure From Motion (SFM) and Multiple Views Stereo (MVS), image-based dense point cloud 3D reconstruction has received more and more attention.
[0003] Among them, MVS matching, as an intermediate link in image-based 3D reconstruction, plays a role in generating dense point clouds. However, since the existing MVS matching scheme relies heavily on the richness of image textures, it is easy to leave holes and outliers for scenes with insufficient image textures such as roads and traffic signs (such as autonomous driving scenes), which leads to poor accuracy and integrity of the subsequently reconstructed 3D point clouds. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a method, device, electronic device and storage medium for three-dimensional point cloud reconstruction to improve the accuracy and completeness of three-dimensional reconstruction.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for reconstructing a three-dimensional point cloud, the method comprising:
[0006] Acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each of the scene images;
[0007] Based on the semantic annotation information of each scene image and the three-dimensional sparse point cloud data, generating a depth map corresponding to each scene image;
[0008] Based on the depth maps corresponding to each scene image, the three-dimensional point cloud is reconstructed to obtain three-dimensional dense point cloud data.
[0009] By adopting the above-mentioned 3D point cloud reconstruction method, a depth map corresponding to each scene image can be generated based on the acquired semantic annotation information of each scene image and the 3D sparse point cloud data, and then 3D dense point cloud data can be reconstructed based on the depth maps corresponding to each scene image. Here, in the process of generating the depth map, the combined semantic annotation information can better guide the point cloud reconstruction of the weak texture image area, which makes the generated 3D dense point cloud data less prone to defects such as holes and external points. Under the premise of ensuring the accuracy of the reconstructed point cloud data, the integrity is significantly improved.
[0010] In a possible implementation, the generating of depth maps corresponding to the respective scene images based on the semantic annotation information of the respective scene images and the three-dimensional sparse point cloud data includes:
[0011] For a projected pixel point of the three-dimensional sparse point cloud data in each of the scene images, determining an initial depth value corresponding to the projected pixel point in the three-dimensional sparse point cloud data;
[0012] Generate an initial depth map of the scene image based on the semantic annotation information and the initial depth value corresponding to each of the projected pixels in the scene image;
[0013] Using the initial depth values of the neighboring pixels of each pixel in the scene image in the initial depth map, the initial depth value of the pixel is updated to obtain an updated depth value of the pixel;
[0014] Based on the updated depth value, a depth map corresponding to each of the scene images is determined.
[0015] Here, an initial depth map of the scene image can be generated first, and then the initial depth value of each pixel in the scene image can be updated based on the initial depth values of the adjacent pixels in the initial depth map, and finally the depth map can be determined based on the updated depth values of each pixel. Considering that the depth values corresponding to pixels with the same or similar semantic annotation information are usually close, the accuracy of the initial depth map determined by combining the semantic annotation information corresponding to the projected pixel and the initial depth value can be improved, and the update of the depth value of the pixel in combination with the initial depth values of the adjacent pixels can make the determined updated depth map more accurate.
[0016] In a possible implementation, determining the projection pixel points of the three-dimensional sparse point cloud data in each of the scene images according to the following steps includes:
[0017] For each of the scene images, selecting a plurality of target point cloud points projected onto the scene image from a plurality of point cloud points included in the three-dimensional sparse point cloud data;
[0018] Based on the transformation relationship between the world coordinate system corresponding to the three-dimensional sparse point cloud data and the image coordinate system corresponding to the scene image, the projection pixel point of each target point cloud point in the image coordinate system is determined.
[0019] In a possible implementation, generating an initial depth map of the scene image based on the semantic annotation information and the initial depth value corresponding to each of the projected pixels in the scene image includes:
[0020] For each of the scene images, a plurality of projected triangular facets are constructed using the determined plurality of projected pixel points as vertices, and a three-dimensional triangular facet matching each of the constructed projected triangular facets is determined based on a transformation relationship between a world coordinate system corresponding to the three-dimensional sparse point cloud data and an image coordinate system corresponding to the scene image;
[0021] For other pixel points except vertices in each projected triangle in each of the scene images, based on semantic annotation information of the other pixel points and initial depth values and semantic annotation information of the vertex pixel points of the projected triangle, determine the initial depth values of the other pixel points;
[0022] Determine an initial depth map of the projected triangle based on each projected triangle in each of the scene images, based on initial depth values of other pixels in the projected triangle and initial depth values of vertex pixels of the projected triangle;
[0023] The initial depth maps of the projected triangular facets in each of the scene images are combined to obtain an initial depth map for the scene image.
[0024] Here, we can first construct the projected triangle patch, then determine the initial depth map of each projected triangle patch, and finally combine the initial depth maps of the projected triangle patches that make up the scene image to obtain the initial depth map for the scene image. Since the initial depth values of the vertices of the projected triangle patch are known, the premise for determining the initial depth map of the projected triangle patch is to determine the initial depth values of other pixels except the vertices. Here, the semantic annotation information of other pixels and the initial depth values and semantic annotation information of the vertex pixels of the projected triangle patch can be combined to determine, thereby improving the accuracy of the depth values of other pixels determined, and further improving the accuracy of the initial depth map of the entire scene image.
[0025] In a possible implementation manner, determining the initial depth values of the other pixels includes:
[0026] For the other pixel points in each projected triangle in each of the scene images, when it is determined that the semantic annotation information of the vertex pixel points included in the projected triangle to which the other pixel points belong is consistent with the semantic annotation information of the other pixel points, the depth value of the three-dimensional point cloud point corresponding to the other pixel point in the three-dimensional triangle matched by the projected triangle to which the other pixel points belong is used as the initial depth value of the other pixel point;
[0027] Alternatively, when it is determined that the semantic annotation information of some vertex pixels included in the projected triangle patch to which the other pixel points belong is consistent with the semantic annotation information of the other pixel points, the initial depth values of the other pixel points are determined based on the initial depth values of the some vertex pixels.
[0028] In a possible implementation, the updating the initial depth value of each pixel in the scene image by using the initial depth value of the adjacent pixel in the initial depth map includes:
[0029] For each pixel in the scene image, determining a first cross-correlation window corresponding to the pixel; and,
[0030] Using the initial depth value of each of the neighboring pixels of the pixel in the initial depth map as the depth value to be updated of the pixel, and determining a mapping point of the pixel in the target neighborhood image of the scene image and a second cross-correlation window corresponding to the mapping point based on each depth value to be updated of the pixel;
[0031] Determine a similarity between a first mutual correlation window corresponding to each pixel point in the scene image and at least one second mutual correlation window corresponding to a mapping point determined for the pixel point;
[0032] A depth value whose similarity meets a preset requirement is selected from at least one depth value to be updated as the updated depth value of the pixel.
[0033] Here, the updated depth value can be selected from the initial depth values of each adjacent pixel of the pixel based on the similarity between the two cross-correlation windows. Since the same pixel has similar features in the domain image, the greater the similarity, the more the selected depth value to be updated conforms to the above characteristics, which also makes the updated depth value more accurate.
[0034] In a possible implementation, selecting, from at least one depth value to be updated, a depth value whose similarity meets a preset requirement as the updated depth value of the pixel point includes:
[0035] Selecting, from at least one depth value to be updated, a depth value pointed to by a similarity greater than a preset threshold as the updated depth value of the pixel;
[0036] Alternatively, a depth value pointed to by a maximum similarity is selected from at least one depth value to be updated as the updated depth value of the pixel.
[0037] In a possible implementation manner, the similarity between the first mutual correlation window and the second mutual correlation window is determined according to the following steps:
[0038] Determine a covariance between the first correlation window and the second correlation window based on a pixel value of each pixel point included in the first correlation window and a pixel value of each pixel point included in the second correlation window;
[0039] Based on the determined covariance, a similarity between the first cross-correlation window and the second cross-correlation window is determined.
[0040] In a possible implementation, determining the similarity between the first mutual correlation window and the second mutual correlation window based on the determined covariance includes:
[0041] For each pixel point included in the first correlation window, determine the pixel difference, distance difference and semantic difference between the pixel point and the central pixel point of the first correlation window, and determine the weight for the pixel point based on the pixel difference, the distance difference and the semantic difference; and
[0042] For each pixel point included in the second correlation window, determine a pixel difference, a distance difference, and a semantic difference between the pixel point and a central pixel point of the second correlation window, and determine a weight for the pixel point based on the pixel difference, the distance difference, and the semantic difference;
[0043] The similarity between the first correlation window and the second correlation window is determined based on the calculated covariance, the weight of each pixel included in the first correlation window, and the weight of each pixel included in the second correlation window.
[0044] Considering that the pixel difference, distance difference and semantic difference between the pixel points in the cross-correlation window and the central pixel point can represent the possibility that the pixel points in the window and its central pixel belong to the same plane, the higher the possibility of belonging to the same plane, the smaller the above difference should be. The weights determined by the above differences can make the overall error represented by the covariance more in line with the actual scene to a certain extent.
[0045] In a possible implementation, determining, for each pixel in the scene image, a first cross-correlation window corresponding to the pixel includes:
[0046] For each pixel point in the scene image, determine a first window with a first window size corresponding to the pixel point with the pixel point as the center; and determine texture information of the first window based on pixel values of each pixel point included in the first window;
[0047] determining an adjustment amount for the first window based on texture information of the first window;
[0048] The first window is adjusted according to the adjustment amount to obtain an adjusted second window; the second window has a second window size that is greater than or equal to the first window size;
[0049] The adjusted second window is determined as the first cross-correlation window corresponding to the pixel point.
[0050] Here, the first cross-correlation window corresponding to each pixel point can be automatically determined based on the texture information of the first window. For example, a larger first cross-correlation window can be used for a situation where the texture is not rich, which can be used to better describe the weak texture area. That is, different cross-correlation windows can be set for different texture situations, thereby making the selected depth value more accurate.
[0051] In a possible implementation, determining the texture information of the first window based on the pixel value of each pixel point included in the first window includes:
[0052] Calculating an average of pixel values of each pixel point included in the first window to obtain an average pixel value of the first window;
[0053] Determine pixel differences between pixel values of each pixel point included in the first window and an average pixel value of the first window;
[0054] Based on the determined pixel difference values and the number of pixels included in the first window, texture information of the first window is determined.
[0055] In a possible implementation manner, determining the adjustment amount for the first window based on the texture information of the first window includes:
[0056] Acquire a third window having a third window size; the third window size is greater than or equal to the second window size;
[0057] determining a difference between the third window and the first window;
[0058] An adjustment amount for the first window is determined based on a ratio operation between the difference value and the texture information of the first window.
[0059] In a possible implementation, the target neighborhood image of each scene image is determined according to the following steps:
[0060] For each scene image, multiple candidate neighborhood images of the scene image are selected from each scene image;
[0061] For each candidate neighborhood image of the scene image, determine a first matching weight based on a degree of matching between a shooting parameter value corresponding to the candidate neighborhood image and a shooting parameter value corresponding to the scene image, determine semantic annotation information of a same target object corresponding to the candidate neighborhood image and the scene image, and determine a second matching weight based on a degree of matching between the determined semantic annotation information of the same target object;
[0062] Determine a total matching weight value corresponding to each candidate neighborhood image based on the first matching weight and the second matching weight;
[0063] A candidate neighborhood image whose total matching weight value is greater than a preset threshold is selected as a target neighborhood image of the scene image.
[0064] Here, in the process of determining the target neighborhood image of the scene image, the first matching weight determined based on the matching degree between the shooting parameter values and the second matching weight determined based on the matching degree between the semantic annotation information of the same target object can be determined. Since the matching degree between the semantic annotation information is taken into account, the selected target neighborhood image can focus on the same target object related to the scene, so that the point cloud data reconstructed subsequently can pay more attention to these target objects, reduce the possibility of forming holes and other problems, and improve the integrity of reconstruction.
[0065] In a possible implementation, determining a depth map corresponding to each of the scene images based on the updated depth value includes:
[0066] For each of the scene images, based on the updated depth value of each pixel in the scene image and the updated depth value of each pixel in the target neighborhood image of the scene image, a filtering operation is performed on each pixel included in the scene image;
[0067] For some of the filtered pixels, determining whether the semantic annotation information of the pixels is consistent with the semantic annotation information of the target scene reference object;
[0068] If yes, then completing the depth values of the filtered pixel points based on the updated depth values of the pixel points included in the target scene reference object to obtain updated depth values of the completed pixel points;
[0069] Based on the updated depth values of each of the completed pixel points, a depth map corresponding to each of the scene images is determined.
[0070] Here, the depth value completion operation can be implemented based on the semantic annotation information of the target scene reference object, thereby improving the integrity of the reconstruction while ensuring the accuracy of the reconstructed point cloud data.
[0071] In a possible implementation, for each of the scene images, based on the updated depth value of each pixel in the scene image and the updated depth value of each pixel in the target neighborhood image of the scene image, performing a filtering operation on each pixel included in the scene image includes:
[0072] For each pixel point in each of the scene images, based on the transformation relationship between the image coordinate system corresponding to the scene image, the world coordinate system, and the image coordinate system corresponding to the target neighborhood image, determine the projected pixel point of the pixel point projected onto the target neighborhood image of the scene image, and determine the projection depth value of the projected pixel point based on the updated depth value of the pixel point;
[0073] Based on the determined projection depth value of the projection pixel point and the updated depth value of the pixel point in the target neighborhood image pointing to the projection pixel point, it is determined whether to perform a filtering operation on the pixel point.
[0074] Here, whether to perform a filtering operation can be determined based on the comparison result between the projected depth value and the updated depth value. For example, if the two depth values tend to be consistent, the reconstructed point cloud is considered to be reliable, otherwise a filtering operation can be performed to ensure the accuracy of reconstruction.
[0075] In a possible implementation, reconstructing a three-dimensional point cloud based on the depth maps corresponding to each scene image to obtain three-dimensional dense point cloud data includes:
[0076] Obtaining the camera position information of each of the scene images;
[0077] Based on the acquired camera pose information and the depth maps corresponding to each scene image, the reconstructed three-dimensional dense point cloud data is determined.
[0078] In a second aspect, an embodiment of the present disclosure further provides a device for reconstructing a three-dimensional point cloud, the device comprising:
[0079] An acquisition module, used to acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each of the scene images;
[0080] A generation module, used to generate a depth map corresponding to each scene image based on the semantic annotation information of each scene image and the three-dimensional sparse point cloud data;
[0081] The reconstruction module is used to reconstruct the three-dimensional point cloud based on the depth maps corresponding to each scene image to obtain three-dimensional dense point cloud data.
[0082] In the third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for three-dimensional point cloud reconstruction as described in the first aspect and any of its various embodiments are performed.
[0083] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes the steps of the method for three-dimensional point cloud reconstruction as described in the first aspect and any of its various embodiments.
[0084] For a description of the effects of the above-mentioned three-dimensional point cloud reconstruction device, electronic device, and computer-readable storage medium, please refer to the description of the above-mentioned three-dimensional point cloud reconstruction method, which will not be repeated here.
[0085] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0087] Figure 1 A flowchart of a method for three-dimensional point cloud reconstruction provided by an embodiment of the present disclosure is shown;
[0088] Figure 2A schematic diagram showing a device for three-dimensional point cloud reconstruction provided by an embodiment of the present disclosure is shown;
[0089] Figure 3 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0090] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0091] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0092] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0093] Research has found that Multi-View Stereo (MVS) matching, as an intermediate link in image-based 3D reconstruction, plays a role in generating dense point clouds. However, since the existing MVS matching scheme relies heavily on the richness of image textures, it is easy to leave holes and outliers for scenes with insufficient image textures such as roads and traffic signs (such as autonomous driving scenes), which leads to poor accuracy and integrity of the subsequently reconstructed 3D point clouds.
[0094] Based on the above research, the present disclosure provides a method, device, electronic device and storage medium for three-dimensional point cloud reconstruction to improve the accuracy and completeness of three-dimensional reconstruction.
[0095] To facilitate understanding of the present embodiment, a method for reconstructing a three-dimensional point cloud disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for reconstructing a three-dimensional point cloud provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for reconstructing a three-dimensional point cloud may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0096] See also Figure 1 FIG. 1 is a flowchart of a method for reconstructing a three-dimensional point cloud provided by an embodiment of the present disclosure, the method comprising steps S101 to S103, wherein:
[0097] S101: Acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each scene image in each scene image;
[0098] S102: generating a depth map corresponding to each scene image based on the semantic annotation information of each scene image and the three-dimensional sparse point cloud data;
[0099] S103: Reconstructing a three-dimensional point cloud based on the depth maps corresponding to each scene image to obtain three-dimensional dense point cloud data.
[0100] In order to facilitate understanding of the method for three-dimensional point cloud reconstruction provided by the embodiment of the present disclosure, the application scenario of the method is first described in detail. The above-mentioned method for three-dimensional point cloud reconstruction can be mainly applied to the reconstruction process from sparse point cloud to dense point cloud in the field of three-dimensional reconstruction. The sparse point cloud here can be obtained based on the Structure From Motion (SFM) technology. The SFM input can be a series of scene images. The various parameters (including intrinsic and extrinsic parameters) of the camera that took the scene image can be inferred through the matching between two-dimensional images. In addition, three-dimensional sparse point cloud data can also be output. These sparse point cloud data can be used as reference points to generate large scene point cloud data (i.e., three-dimensional dense point cloud data). The process of generating three-dimensional dense point cloud data can be implemented by MVS.
[0101] It should be noted that the intrinsic and extrinsic parameters of the above-mentioned camera, as key parameters for conversion between coordinate systems, will be applied in various technical links of the method for three-dimensional point cloud reconstruction provided in the embodiment of the present disclosure, and are uniformly explained here.
[0102] Considering that the MVS matching scheme in the related technology relies heavily on the richness of image texture, for scenes with insufficient image textures such as roads and traffic signs (such as autonomous driving scenes), holes and external points are easily left, which leads to poor accuracy and completeness of the subsequently reconstructed three-dimensional point cloud.
[0103] Precisely to solve the above problems, the embodiments of the present disclosure provide a method for reconstructing three-dimensional point clouds based on semantic annotation information to guide the generation of large-scene point cloud data, with high accuracy and completeness.
[0104] Among them, the three-dimensional sparse point cloud data in the embodiment of the present disclosure can be determined based on each scene image taken from different shooting angles.
[0105] In specific applications, we can first select a suitable initialization image pair from each scene image, and then estimate the external parameters of the initialization image pair. After trajectory triangulation, we can provide an initialization of three-dimensional (3D) points. The two initialized frames of images can start the first bundle adjustment (BA) operation. Here, the sparse bundle adjustment (SBA) method can be used.
[0106] In the disclosed embodiment, new cameras and 3D points can be continuously added to perform BA operation until the number of points observed by the remaining cameras does not exceed 20, indicating that the remaining cameras do not have enough points to add, and the BA operation ends. The camera estimation parameters and scene geometry information, i.e., three-dimensional sparse point cloud data, are obtained.
[0107] Considering the supporting role of semantic annotation information for two-dimensional pixels, and the one-to-one correspondence between three-dimensional point clouds and two-dimensional pixels, the three-dimensional point cloud reconstruction can be supported by acquiring the semantic annotation information of the scene image to improve the accuracy and completeness of the reconstruction.
[0108] The semantic annotation information obtained by the embodiments of the present disclosure may be obtained based on manual annotation, or may be generated based on a trained semantic neural network, that is, the semantic annotation information of each pixel in the scene image may be determined by inputting the scene image into a trained semantic neural network.
[0109] A depth map corresponding to each scene image can be generated based on the semantic annotation information of the scene image and the three-dimensional sparse point cloud data. The depth map can be determined based on the depth value of each pixel in the scene image.
[0110] In the disclosed embodiment, the process of determining the depth value of a pixel point mainly includes an initialization process of determining an initial depth value / initial depth map based on the three-dimensional sparse point cloud data as a reference data and an update process of updating the depth value based on adjacent pixels. The former process ensures a relatively accurate basis for updating the depth value, and the latter process can realize the depth value update in combination with the verification method of adjacent pixels, so that the updated depth value finally determined for the pixel point is more accurate, and further makes the depth map corresponding to the scene image composed of pixels more accurate.
[0111] By determining the depth maps corresponding to each scene image taken at different shooting angles, the 3D point cloud can be reconstructed to obtain 3D dense point cloud data. In the process of reconstructing point cloud data, each depth map can correspond to a small local point cloud, and then the local point clouds are grouped together according to the camera pose information of each scene image in each scene image, and the complete 3D dense point cloud data can be reconstructed.
[0112] Considering the key role of depth map generation in 3D reconstruction, the process of generating a depth map can be described below, which may include the following steps:
[0113] Step 1: for the projected pixel point of the three-dimensional sparse point cloud data in each scene image, determine the initial depth value corresponding to the projected pixel point in the three-dimensional sparse point cloud data;
[0114] Step 2: Generate an initial depth map of the scene image based on the semantic annotation information and initial depth value corresponding to each projected pixel in the scene image;
[0115] Step 3: using the initial depth values of the adjacent pixels of each pixel in the scene image in the initial depth map, the initial depth value of the pixel is updated to obtain an updated depth value of the pixel;
[0116] Step 4: Based on the updated depth value, determine the depth map corresponding to each scene image.
[0117] Here, firstly, the three-dimensional sparse point cloud data can be used as a reference point to determine the initial depth map of the scene image, and then the depth value of each pixel in the scene image can be updated based on adjacent pixels, and finally the updated depth map corresponding to the scene image can be determined based on the updated depth value.
[0118] In the process of determining the initial depth map, the projected pixel points of the three-dimensional sparse point cloud data in each scene image can be determined first, and then the initial depth map of the scene image can be generated based on the semantic annotation information corresponding to the projected pixel points and the initial depth value.
[0119] The initial depth value of the projection pixel point can be selected from the depth information of the point cloud point included in the three-dimensional sparse point cloud data based on the correspondence between the three-dimensional sparse point cloud data and the projection pixel point. The determination process of the projection pixel point can be implemented by the following steps:
[0120] Step 1: for each scene image, select multiple target point cloud points projected onto the scene image from multiple point cloud points included in the three-dimensional sparse point cloud data;
[0121] Step 2: Based on the transformation relationship between the world coordinate system corresponding to the three-dimensional sparse point cloud data and the image coordinate system corresponding to the scene image, determine the projected pixel point of each target point cloud point in the image coordinate system.
[0122] Here, based on the correspondence between each pixel point included in the scene image and each point cloud point included in the three-dimensional sparse point cloud data, target point cloud points that can be projected onto the scene image can be selected from the three-dimensional sparse point cloud data, and then the projection of the target point cloud points to the projection pixel points can be realized based on the coordinate system transformation relationship.
[0123] Considering that the projected pixel points correspond to the point cloud points in the three-dimensional sparse point cloud data, these point cloud points have sparse characteristics. In order to obtain dense point cloud data, it is necessary to determine the depth values of all pixels in the scene image, and then determine the initial depth map for the scene image.
[0124] In the embodiment of the present disclosure, the above-mentioned process of determining the depth value of all pixels can be implemented in combination with semantic annotation information, which specifically includes the following steps:
[0125] Step 1: for each scene image, a plurality of projected triangles are constructed using the determined plurality of projected pixel points as vertices, and based on the transformation relationship between the world coordinate system corresponding to the three-dimensional sparse point cloud data and the image coordinate system corresponding to the scene image, a three-dimensional triangle matching each constructed projected triangle is determined;
[0126] Step 2: for each pixel point other than the vertex in each projected triangle in each scene image, determine the initial depth value of the other pixel point based on the semantic annotation information of the other pixel point and the initial depth value and semantic annotation information of the vertex pixel point of the projected triangle;
[0127] Step 3: Based on each projected triangle in each scene image, based on the initial depth values of other pixels in the projected triangle and the initial depth values of the vertex pixels of the projected triangle, determine the initial depth map of the projected triangle;
[0128] Step 4: Combine the initial depth maps of the projected triangles in each scene image to obtain an initial depth map for the scene image.
[0129] Here, first, multiple projected triangles can be constructed for each scene image, each of which can be constructed by three projected pixel points as vertices, and each of which can correspond to three point cloud points in the three-dimensional sparse point cloud data, and the three point cloud points correspond to one three-dimensional triangle.
[0130] When multiple projected triangles are constructed, an initial depth map of each projected triangle can be determined, and then the projected triangles included in a scene image are combined in a specific order to obtain an initial depth map for a scene image.
[0131] For a projected triangle facet, the depth values of the vertices of the projected triangle facet are known. The embodiment of the present disclosure can combine the semantic annotation information of other pixel points except the vertices in the projected triangle facet and the initial depth values and semantic annotation information of the vertex pixels to determine the initial depth values of other pixel points, and then determine the initial depth map of the projected triangle facet based on the initial depth values of other pixel points and the initial depth values of the vertex pixels.
[0132] Considering that for a projected triangle, if its three vertices have the same semantic label (corresponding to semantic annotation information), all pixels in the projected triangle may be located on the same scene plane, otherwise, the plane may have depth discontinuity. Therefore, the depth values of other pixels can be initialized here in combination with the semantic annotation information.
[0133] When it is determined that the semantic annotation information of the vertex pixel points included in the projected triangle patch to which other pixel points belong is consistent with the semantic annotation information of other pixel points, the depth value of the three-dimensional point cloud point corresponding to the other pixel points in the three-dimensional triangle patch matched by the projected triangle patch to which they belong is used as the initial depth value of the other pixel points.
[0134] In a specific application, a ray can be drawn from the camera from the optical center through other pixel points p in the scene image, and the intersection of the ray and the corresponding three-dimensional triangle in space can be found. In this way, the reprojection depth of the intersection is set as the initial depth value of other pixel points p.
[0135] When it is determined that semantic annotation information of some vertex pixels included in the projected triangle to which other pixels belong is consistent with the semantic annotation information of other pixels, initial depth values of other pixels are determined based on initial depth values of some vertex pixels.
[0136] In a specific application, if the semantic labels of other pixel points p are the same as one or two vertices, the initial depth values of other pixel points p can be set to the average depth of the same semantic vertices plus a random perturbation of the depth range.
[0137] When it is determined that the semantic annotation information of the vertex pixels included in the projected triangle to which other pixels belong is inconsistent with the semantic annotation information of other pixels, the initial depth values of other pixels will be determined based on the depth range of the three-dimensional triangle matched by the projected triangle.
[0138] Here, a depth value may be randomly selected from the depth range as the initial depth value of other pixels.
[0139] The method for reconstructing a three-dimensional point cloud provided by an embodiment of the present disclosure can update the initial depth value for each pixel in the scene image when an initial depth map of the scene image is determined, and can specifically include the following steps:
[0140] Step 1: for each pixel in the scene image, determine a first cross-correlation window corresponding to the pixel; and use the initial depth value of each adjacent pixel of the pixel in the initial depth map as the depth value to be updated of the pixel, and determine a mapping point of the pixel in the target neighborhood image of the scene image and a second cross-correlation window corresponding to the mapping point based on each depth value to be updated of the pixel;
[0141] Step 2: determining the similarity between a first mutual correlation window corresponding to each pixel in the scene image and at least one second mutual correlation window corresponding to a mapping point determined for the pixel;
[0142] Step 3: Select a depth value whose similarity meets a preset requirement from at least one depth value to be updated as the updated depth value of the pixel.
[0143] Here, for a pixel in the scene image, the initial depth values of the neighboring pixels of the pixel can be used to update the depth value. This is mainly because there is often a depth consistency between the neighboring pixels of a pixel and the pixel, and a more accurate depth value can be determined through spatial propagation.
[0144] Among them, the adjacent pixels of a target pixel may be other pixels directly adjacent to the target pixel selected from the scene image, or may be other pixels indirectly adjacent to the target pixel, and the embodiments of the present disclosure do not impose specific restrictions on this.
[0145] The method for reconstructing a three-dimensional point cloud provided by the embodiment of the present disclosure can verify whether the initial depth value of the selected adjacent pixel point can meet the update requirement of the current pixel point based on the similarity between the two mutual correlation windows. The two mutual correlation windows here correspond to the first mutual correlation window corresponding to the pixel point, and the second mutual correlation window corresponding to the mapping point of the pixel point in the target neighborhood image of the scene image. Since the initial depth values of different adjacent pixel points are different, when a pixel point adopts a different initial depth value, the mapping point corresponding to the pixel point also changes, so that the corresponding second mutual correlation window will also change accordingly. Here, the initial depth value of the appropriate adjacent pixel point can be selected based on the similarity between the first mutual correlation window and the second mutual correlation window to update the current pixel point.
[0146] In the disclosed embodiment, the depth value pointed to by a similarity greater than a preset threshold may be selected as the updated depth value of the current pixel, or the depth value pointed to by the maximum similarity may be selected as the updated depth value of the current pixel.
[0147] Considering the key role of determining the similarity between the first mutual correlation window and the second mutual correlation window in updating the depth value, the process of determining the similarity may be specifically described in the following steps.
[0148] Step 1: determining the covariance between the first correlation window and the second correlation window based on the pixel value of each pixel point included in the first correlation window and the pixel value of each pixel point included in the second correlation window;
[0149] Step 2: Based on the determined covariance, determine the similarity between the first mutual correlation window and the second mutual correlation window.
[0150] Here, the covariance is used to characterize the overall error between the two cross-correlation windows. The smaller the overall error, the higher the similarity of the two cross-correlation windows. Conversely, the larger the overall error, the lower the similarity of the two cross-correlation windows.
[0151] In order to obtain a more accurate similarity, the embodiment of the present disclosure also determines a weight for each pixel point included in the first correlation window based on the pixel difference, distance difference and semantic difference between the pixel point and the center pixel point of the first correlation window, and determines a weight for each pixel point included in the second correlation window based on the pixel difference, distance difference and semantic difference between the pixel point and the center pixel point of the second correlation window, and obtains the similarity of the two correlation windows in combination with the covariance and the determined weights.
[0152] Among them, the above-mentioned pixel difference is used to characterize the color similarity between a pixel point and the central pixel point, the above-mentioned distance difference is used to characterize the distance between a pixel point and the central pixel point, and the above-mentioned semantic difference is used to characterize the semantic similarity between a pixel point and the central pixel point. For pixels with smaller pixel difference, smaller distance difference and smaller semantic difference, the possibility that the pixel point and the central pixel point belong to the same plane is higher, and a higher weight can be assigned in the process of covariance calculation. This is mainly considering that such pixels have higher similarity influence. Similarly, for pixels with larger pixel difference, larger distance difference and larger semantic difference, the possibility that the pixel point and the central pixel point belong to the same plane is lower, and a lower weight can be assigned in the process of covariance calculation.
[0153] The larger the first cross-correlation window of the relevant pixel point, the larger the corresponding similarity calculation amount. Selecting a smaller first cross-correlation window may result in the inability to take into account the characteristics of the relevant pixel points. Here, in order to take into account the dual requirements of feature richness and small amount of calculation, an adaptive first cross-correlation window can be used for different pixel points. This can be achieved by the following steps:
[0154] Step 1: for each pixel point in the scene image, determine a first window with a first window size corresponding to the pixel point with the pixel point as the center; and determine texture information of the first window based on pixel values of each pixel point included in the first window;
[0155] Step 2: determining an adjustment amount for the first window based on texture information of the first window;
[0156] Step 3: adjusting the first window according to the adjustment amount to obtain an adjusted second window; the second window size of the second window is greater than or equal to the first window size;
[0157] Step 4: determine the adjusted second window as the first cross-correlation window corresponding to the pixel point.
[0158] In the embodiment of the present disclosure, the texture information of the first window may be determined based on the pixel points of each pixel point included in the first window, which may be specifically achieved by the following steps:
[0159] Step 1: averaging the pixel values of each pixel point included in the first window to obtain an average pixel value of the first window;
[0160] Step 2: determining the pixel difference between the pixel value of each pixel point included in the first window and the average pixel value of the first window;
[0161] Step three: determining texture information of the first window based on the determined pixel differences and the number of pixels included in the first window.
[0162] In the embodiment of the present disclosure, the texture information of the first window can be determined based on the pixel difference between the pixel value of the pixel point and the average pixel value. For the first window with a larger sum of pixel differences, the richer its texture is, and for the first window with a smaller sum of pixel differences, the richer its texture is.
[0163] Here, for the first window with richer texture, a smaller adjustment amount can be selected so as not to increase the amount of calculation while ensuring the ability to describe details. For the first window with less rich texture, a larger adjustment amount can be selected so as to increase the amount of calculation in exchange for the expression of weak texture.
[0164] In the embodiment of the present disclosure, the adjustment amount of the first window can be determined according to the following steps:
[0165] Step 1: Acquire a third window having a third window size; the third window size is greater than or equal to the second window size;
[0166] Step 2: determining the difference between the third window and the first window;
[0167] Step three: determining an adjustment amount for the first window based on a ratio operation between the difference and the texture information of the first window.
[0168] The third window and the first window here may correspond to the maximum window and the minimum window respectively. For the first window with richer texture, a smaller adjustment amount may be corresponding, and for the first window with less rich texture, a larger adjustment amount may be corresponding.
[0169] In order to facilitate understanding of the above window adjustment process, it can be explained in conjunction with the following formula.
[0170]
[0171] Among them, l max and l min are respectively used to represent the third window size of the third window and the first window size of the first window, It is used to represent the upward rounding function, which corresponds to the adjustment amount for the first window. t(B) is used to represent the texture information of the first window. The smaller t(B) is, the richer the corresponding texture is, and vice versa.
[0172] The above t(B) can use normalized texture information. In specific applications, t(B)∈(0,1]. Among them, s(B) is used to represent the texture information of the first window.
[0173] In specific applications, Among them, x i is the pixel value of the i-th pixel, is the average pixel value of the first window, and |B| is the number of pixels in window B. Obviously, the larger s(B) is, the richer the texture in the first window is.
[0174] The method for three-dimensional point cloud reconstruction provided by the embodiment of the present disclosure needs to determine the target neighborhood image of the scene image to implement relevant verification operations. Next, the process of determining the target neighborhood image of the scene image is specifically described.
[0175] The target neighborhood image in the disclosed embodiment is used as a reference image to provide a basis for depth representation of the scene image. The semantic annotation information can provide strong data support for the depth representation, mainly considering that the depth values corresponding to the pixels of similar or identical semantic labels are usually consistent. Therefore, in addition to determining the first matching weight of the two images (i.e., the scene image and the candidate neighborhood image) based on the degree of matching between the shooting parameter values, the second matching weight of the two images can also be determined based on the degree of matching between the semantic annotation information, and then the total matching weight corresponding to each candidate neighborhood image is determined by multiplication or addition of the two matching weights. Candidate neighborhood images with a sufficiently large total matching weight value can be selected as the target neighborhood image of the scene image.
[0176] In order to avoid possible errors in the updated depth value, the method for 3D point cloud reconstruction provided by the embodiment of the present disclosure usually needs to filter outliers, where outliers can be point cloud points that do not belong to the target object. The embodiment of the present disclosure can perform filtering operations on each pixel point included in the scene image based on the updated depth value of each pixel point in the scene image and the updated depth value of each pixel point in the target neighborhood image of the scene image, which can be specifically achieved by the following steps:
[0177] Step 1: for each pixel point in each scene image, based on the transformation relationship between the image coordinate system corresponding to the scene image, the world coordinate system, and the image coordinate system corresponding to the target neighborhood image, determine the projected pixel point of the pixel point projected to the target neighborhood image of the scene image, and determine the projection depth value of the projected pixel point based on the updated depth value of the pixel point;
[0178] Step 2: Based on the determined projection depth value of the projection pixel point and the updated depth value of the pixel point in the target neighborhood image pointing to the projection pixel point, determine whether to perform a filtering operation on the pixel point.
[0179] Here, based on the transformation relationship between the image coordinate system corresponding to the scene image, the world coordinate system and the image coordinate system corresponding to the target neighborhood image, the pixel points in the scene image can be projected to the target neighborhood image of the scene image, and the projection depth value of the projected pixel point obtained by projection can be determined based on the updated depth value of the pixel point.
[0180] When the possible error in the updated depth value is small, the difference between this projected depth value and the updated depth value of the pixel point pointing to the projected pixel point in the target neighborhood image is also small. Correspondingly, it can be considered that the updated depth value of this pixel point can be retained. Otherwise, it can be considered that the possible error in the updated depth value is large. In order to ensure the reconstruction accuracy, the updated depth value of the corresponding pixel point needs to be filtered out.
[0181] It should be noted that the depth map filtering process can remove a large number of depth outliers, but it may also leave holes in some areas. In order to further improve the integrity of reconstruction while ensuring the accuracy of reconstruction, the embodiment of the present disclosure can perform a semantically guided depth map completion process, which can be specifically achieved through the following steps:
[0182] Step 1: for some of the filtered pixels, determine whether the semantic annotation information of the pixels is consistent with the semantic annotation information of the target scene reference object;
[0183] Step 2: If yes, then the depth values of some of the filtered pixels are supplemented based on the updated depth values of each pixel included in the target scene reference object to obtain the updated depth values of each supplemented pixel;
[0184] Step 3: Based on the updated depth values of each completed pixel, determine the depth map corresponding to each scene image.
[0185] Here, whether to complete the depth value can be determined based on the consistency between the semantic annotation information of the filtered out pixels and the semantic annotation information of the target scene reference object. That is, consistent pixels can be completed using the updated depth value corresponding to the target scene reference object, and inconsistent pixels do not need to be processed. This is mainly because the target scene reference object, as a key component of the scene image, has a very important reference significance in the actual application scenario. Therefore, the completion of the filtered out pixels can be performed based on semantic consistency, while taking into account the integrity and accuracy of subsequent reconstruction.
[0186] It should be noted that different application scenarios correspond to different target scene reference objects. For example, for high-precision map navigation, the target scene reference object here can be a road or a signboard. Through the dense point cloud reconstruction of key objects in this application scenario, the accuracy of the high-precision map can be further improved, thereby facilitating the provision of better navigation services.
[0187] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0188] Based on the same inventive concept, the embodiments of the present disclosure also provide a device for three-dimensional point cloud reconstruction corresponding to the method for three-dimensional point cloud reconstruction. Since the principle of solving the problem by the device in the embodiments of the present disclosure is similar to the method for three-dimensional point cloud reconstruction mentioned above in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0189] Reference Figure 2 , which is a schematic diagram of a device for three-dimensional point cloud reconstruction provided by an embodiment of the present disclosure, the device includes: an acquisition module 201, a generation module 202, and a reconstruction module 203; wherein,
[0190] An acquisition module 201 is used to acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each scene image in each scene image;
[0191] A generating module 202, for generating a depth map corresponding to each scene image based on the semantic annotation information of each scene image and the three-dimensional sparse point cloud data;
[0192] The reconstruction module 203 is used to reconstruct the three-dimensional point cloud based on the depth maps corresponding to each scene image to obtain three-dimensional dense point cloud data.
[0193] The above-mentioned device for 3D point cloud reconstruction can generate a depth map corresponding to each scene image based on the acquired semantic annotation information of each scene image and the 3D sparse point cloud data, and then reconstruct the 3D dense point cloud data based on the depth map corresponding to each scene image. Here, in the process of generating the depth map, the combined semantic annotation information can better guide the point cloud reconstruction of the weak texture image area, which makes the generated 3D dense point cloud data less prone to defects such as holes and external points. Under the premise of ensuring the accuracy of the reconstructed point cloud data, the integrity is significantly improved.
[0194] In a possible implementation, the generation module 202 is configured to generate a depth map corresponding to each scene image based on the semantic annotation information of each scene image and the three-dimensional sparse point cloud data according to the following steps:
[0195] For a projected pixel point of the three-dimensional sparse point cloud data in each scene image, determine an initial depth value corresponding to the projected pixel point in the three-dimensional sparse point cloud data;
[0196] Generate an initial depth map of the scene image based on the semantic annotation information and initial depth value corresponding to each projected pixel in the scene image;
[0197] Using the initial depth values of the neighboring pixels of each pixel in the scene image in the initial depth map, the initial depth value of the pixel is updated to obtain an updated depth value of the pixel;
[0198] Based on the updated depth values, a depth map corresponding to each scene image is determined.
[0199] In a possible implementation, the generating module 202 is configured to determine the projected pixel points of the three-dimensional sparse point cloud data in each scene image according to the following steps:
[0200] For each scene image, multiple target point cloud points projected onto the scene image are selected from multiple point cloud points included in the three-dimensional sparse point cloud data;
[0201] Based on the transformation relationship between the world coordinate system corresponding to the three-dimensional sparse point cloud data and the image coordinate system corresponding to the scene image, the projection pixel point of each target point cloud point in the image coordinate system is determined.
[0202] In a possible implementation, the generating module 202 is configured to generate an initial depth map of the scene image based on the semantic annotation information and the initial depth value corresponding to each projected pixel point in the scene image according to the following steps:
[0203] For each scene image, a plurality of projected triangular facets are constructed using the determined plurality of projected pixel points as vertices, and a three-dimensional triangular facet matching each constructed projected triangular facet is determined based on a transformation relationship between a world coordinate system corresponding to the three-dimensional sparse point cloud data and an image coordinate system corresponding to the scene image;
[0204] For each pixel point other than the vertex in each projected triangle in each scene image, determine the initial depth value of the other pixel point based on the semantic annotation information of the other pixel point and the initial depth value and semantic annotation information of the vertex pixel point of the projected triangle;
[0205] Based on each projected triangle in each scene image, based on initial depth values of other pixels in the projected triangle and initial depth values of vertex pixels of the projected triangle, determine an initial depth map of the projected triangle;
[0206] The initial depth maps of the projected triangles in each scene image are combined to obtain an initial depth map for the scene image.
[0207] In a possible implementation, the generating module 202 is configured to determine the initial depth values of other pixels according to the following steps:
[0208] For other pixel points in each projected triangle in each scene image, when it is determined that the semantic annotation information of the vertex pixel points included in the projected triangle to which the other pixel points belong is consistent with the semantic annotation information of the other pixel points, the depth value of the three-dimensional point cloud point corresponding to the other pixel point in the three-dimensional triangle matched by the projected triangle to which the other pixel points belong is used as the initial depth value of the other pixel point;
[0209] Alternatively, when it is determined that the semantic annotation information of some vertex pixels included in the projected triangle patch to which other pixels belong is consistent with the semantic annotation information of other pixels, the initial depth values of other pixels are determined based on the initial depth values of some vertex pixels.
[0210] In a possible implementation, the generating module 202 is configured to update the initial depth value of each pixel in the scene image using the initial depth values of the neighboring pixels in the initial depth map according to the following steps:
[0211] For each pixel in the scene image, determining a first cross-correlation window corresponding to the pixel; and,
[0212] Using the initial depth value of each adjacent pixel of the pixel in the initial depth map as the depth value to be updated of the pixel, and determining a mapping point of the pixel in the target neighborhood image of the scene image and a second cross-correlation window corresponding to the mapping point based on each depth value to be updated of the pixel;
[0213] Determine a similarity between a first mutual correlation window corresponding to each pixel point in the scene image and at least one second mutual correlation window corresponding to a mapping point determined for the pixel point;
[0214] A depth value whose similarity meets a preset requirement is selected from at least one depth value to be updated as the updated depth value of the pixel.
[0215] In a possible implementation, the generating module 202 is configured to select a depth value whose similarity meets a preset requirement from at least one depth value to be updated as the updated depth value of the pixel point according to the following steps:
[0216] Selecting a depth value pointed to by a similarity greater than a preset threshold from at least one depth value to be updated as the updated depth value of the pixel;
[0217] Alternatively, a depth value pointed to by a maximum similarity is selected from at least one depth value to be updated as the updated depth value of the pixel.
[0218] In a possible implementation, the generating module 202 is configured to determine the similarity between the first mutual correlation window and the second mutual correlation window according to the following steps:
[0219] Determine the covariance between the first correlation window and the second correlation window based on the pixel value of each pixel point included in the first correlation window and the pixel value of each pixel point included in the second correlation window;
[0220] Based on the determined covariance, a similarity between the first cross-correlation window and the second cross-correlation window is determined.
[0221] In a possible implementation, the generating module 202 is configured to determine the similarity between the first mutual correlation window and the second mutual correlation window based on the determined covariance according to the following steps:
[0222] For each pixel point included in the first correlation window, determine the pixel difference, distance difference and semantic difference between the pixel point and the central pixel point of the first correlation window, and determine the weight for the pixel point based on the pixel difference, distance difference and semantic difference; and
[0223] For each pixel point included in the second correlation window, determine the pixel difference, distance difference and semantic difference between the pixel point and the central pixel point of the second correlation window, and determine the weight for the pixel point based on the pixel difference, distance difference and semantic difference;
[0224] The similarity between the first correlation window and the second correlation window is determined based on the calculated covariance, the weight of each pixel included in the first correlation window, and the weight of each pixel included in the second correlation window.
[0225] In a possible implementation, the generating module 202 is configured to determine, for each pixel in the scene image, a first cross-correlation window corresponding to the pixel according to the following steps:
[0226] For each pixel point in the scene image, a first window with a first window size corresponding to the pixel point is determined with the pixel point as the center; and texture information of the first window is determined based on pixel values of each pixel point included in the first window;
[0227] Determining an adjustment amount for the first window based on texture information of the first window;
[0228] The first window is adjusted according to the adjustment amount to obtain an adjusted second window; the second window has a second window size that is greater than or equal to the first window size;
[0229] The adjusted second window is determined as the first cross-correlation window corresponding to the pixel point.
[0230] In a possible implementation, the generating module 202 is configured to determine the texture information of the first window based on the pixel value of each pixel point included in the first window according to the following steps:
[0231] Calculating an average of pixel values of each pixel point included in the first window to obtain an average pixel value of the first window;
[0232] Determine pixel differences between pixel values of each pixel point included in the first window and an average pixel value of the first window;
[0233] Based on the determined pixel difference values and the number of pixels included in the first window, texture information of the first window is determined.
[0234] In a possible implementation, the generating module 202 is configured to determine the adjustment amount for the first window based on the texture information of the first window according to the following steps:
[0235] Acquire a third window having a third window size; the third window size is greater than or equal to the second window size;
[0236] determining a difference between the third window and the first window;
[0237] Based on a ratio operation between the difference value and the texture information of the first window, an adjustment amount for the first window is determined.
[0238] In a possible implementation, the generating module 202 is configured to determine the target neighborhood image for each scene image according to the following steps:
[0239] For each scene image, multiple candidate neighborhood images of the scene image are selected from each scene image;
[0240] For each candidate neighborhood image of the scene image, determine a first matching weight based on a degree of matching between a shooting parameter value corresponding to the candidate neighborhood image and a shooting parameter value corresponding to the scene image, determine semantic annotation information of a same target object corresponding to the candidate neighborhood image and the scene image, and determine a second matching weight based on a degree of matching between the determined semantic annotation information of the same target object;
[0241] Determine a total value of the matching weights corresponding to each candidate neighborhood image based on the first matching weight and the second matching weight;
[0242] The candidate neighborhood images whose total matching weight value is greater than a preset threshold are selected as the target neighborhood images of the scene image.
[0243] In a possible implementation, the generating module 202 is configured to determine a depth map corresponding to each scene image based on the updated depth value according to the following steps:
[0244] For each scene image, based on the updated depth value of each pixel in the scene image and the updated depth value of each pixel in the target neighborhood image of the scene image, a filtering operation is performed on each pixel included in the scene image;
[0245] For some of the filtered pixels, determining whether the semantic annotation information of the pixels is consistent with the semantic annotation information of the target scene reference object;
[0246] If yes, then the depth values of some of the filtered pixels are supplemented based on the updated depth values of each pixel included in the target scene reference object to obtain updated depth values of each supplemented pixel;
[0247] Based on the updated depth values of each completed pixel, a depth map corresponding to each scene image is determined.
[0248] In a possible implementation, the generation module 202 is configured to perform a filtering operation on each pixel included in each scene image based on the updated depth value of each pixel in the scene image and the updated depth value of each pixel in the target neighborhood image of the scene image according to the following steps:
[0249] For each pixel point in each scene image, based on the transformation relationship between the image coordinate system corresponding to the scene image, the world coordinate system, and the image coordinate system corresponding to the target neighborhood image, determine the projected pixel point of the pixel point projected onto the target neighborhood image of the scene image, and determine the projection depth value of the projected pixel point based on the updated depth value of the pixel point;
[0250] Based on the determined projection depth value of the projection pixel point and the updated depth value of the pixel point in the target neighborhood image pointing to the projection pixel point, it is determined whether to perform a filtering operation on the pixel point.
[0251] In a possible implementation, the reconstruction module 203 is used to reconstruct the three-dimensional point cloud based on the depth maps corresponding to each scene image according to the following steps to obtain three-dimensional dense point cloud data:
[0252] Obtaining the camera position information of each scene image captured;
[0253] Based on the acquired camera pose information and the depth maps corresponding to each scene image, the reconstructed three-dimensional dense point cloud data is determined.
[0254] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0255] The present disclosure also provides an electronic device, such as Figure 3 , which is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, includes: a processor 301, a memory 302, and a bus 303. The memory 302 stores machine-readable instructions executable by the processor 301 (for example, Figure 2 The machine-readable instructions corresponding to the acquisition module 201, the generation module 202, and the reconstruction module 203 in the device are executed, etc. When the electronic device is running, the processor 301 communicates with the memory 302 through the bus 303, and the following processing is performed when the machine-readable instructions are executed by the processor 301:
[0256] Acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each scene image in each scene image;
[0257] Based on the semantic annotation information of each scene image and the three-dimensional sparse point cloud data, a depth map corresponding to each scene image is generated;
[0258] Based on the depth maps corresponding to each scene image, the three-dimensional point cloud is reconstructed to obtain three-dimensional dense point cloud data.
[0259] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the method for three-dimensional point cloud reconstruction described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0260] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the method for three-dimensional point cloud reconstruction described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0261] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0262] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0263] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0264] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0265] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for 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 disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0266] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for three-dimensional point cloud reconstruction, characterized in that: The method comprises: Acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each of the scene images; For a projected pixel point of the three-dimensional sparse point cloud data in each of the scene images, determining an initial depth value corresponding to the projected pixel point in the three-dimensional sparse point cloud data; Generate an initial depth map of the scene image based on the semantic annotation information and the initial depth value corresponding to each of the projected pixels in the scene image; Using the initial depth values of the neighboring pixels of each pixel in the scene image in the initial depth map, the initial depth value of the pixel is updated to obtain an updated depth value of the pixel; Based on the updated depth value, determining a depth map corresponding to each of the scene images; Obtaining the camera position information of each of the scene images; Based on the acquired camera pose information and the depth maps corresponding to each scene image, the reconstructed three-dimensional dense point cloud data is determined.
2. The method according to claim 1, characterized in that Determining the projection pixel points of the three-dimensional sparse point cloud data in each of the scene images according to the following steps includes: For each of the scene images, selecting a plurality of target point cloud points projected onto the scene image from a plurality of point cloud points included in the three-dimensional sparse point cloud data; Based on the transformation relationship between the world coordinate system corresponding to the three-dimensional sparse point cloud data and the image coordinate system corresponding to the scene image, the projection pixel point of each target point cloud point in the image coordinate system is determined.
3. The method according to claim 2, characterized in that The generating an initial depth map of the scene image based on the semantic annotation information and the initial depth value corresponding to each of the projected pixels in the scene image includes: For each of the scene images, a plurality of projected triangular facets are constructed using the determined plurality of projected pixel points as vertices, and a three-dimensional triangular facet matching each of the constructed projected triangular facets is determined based on a transformation relationship between a world coordinate system corresponding to the three-dimensional sparse point cloud data and an image coordinate system corresponding to the scene image; For each pixel point other than the vertex in each projected triangle in each of the scene images, determine the initial depth value of the other pixel point based on the semantic annotation information of the other pixel point and the initial depth value and semantic annotation information of the vertex pixel point of the projected triangle; Determine an initial depth map of the projected triangle based on each projected triangle in each of the scene images, based on initial depth values of other pixels in the projected triangle and initial depth values of vertex pixels of the projected triangle; The initial depth maps of the projected triangular facets in each of the scene images are combined to obtain an initial depth map for the scene image.
4. The method according to claim 3, characterized in that The determining the initial depth values of the other pixels includes: For the other pixel points in each projected triangle in each of the scene images, when it is determined that the semantic annotation information of the vertex pixel points included in the projected triangle to which the other pixel points belong is consistent with the semantic annotation information of the other pixel points, the depth value of the three-dimensional point cloud point corresponding to the other pixel point in the three-dimensional triangle matched by the projected triangle to which the other pixel points belong is used as the initial depth value of the other pixel point; Alternatively, when it is determined that the semantic annotation information of some vertex pixels included in the projected triangle patch to which the other pixel points belong is consistent with the semantic annotation information of the other pixel points, the initial depth values of the other pixel points are determined based on the initial depth values of the some vertex pixels.
5. The method according to any one of claims 1 to 4, characterized in that: The updating of the initial depth value of each pixel in the scene image by using the initial depth value of the adjacent pixel in the initial depth map comprises: For each pixel in the scene image, determining a first cross-correlation window corresponding to the pixel; and, Using the initial depth value of each of the neighboring pixels of the pixel in the initial depth map as the depth value to be updated of the pixel, and determining a mapping point of the pixel in the target neighborhood image of the scene image and a second cross-correlation window corresponding to the mapping point based on each depth value to be updated of the pixel; Determine a similarity between a first mutual correlation window corresponding to each pixel point in the scene image and at least one second mutual correlation window corresponding to a mapping point determined for the pixel point; A depth value whose similarity meets a preset requirement is selected from at least one depth value to be updated as the updated depth value of the pixel.
6. The method according to claim 5, characterized in that Selecting a depth value whose similarity meets a preset requirement from at least one depth value to be updated as the updated depth value of the pixel point includes: Selecting, from at least one depth value to be updated, a depth value pointed to by a similarity greater than a preset threshold as the updated depth value of the pixel; Alternatively, a depth value pointed to by a maximum similarity is selected from at least one depth value to be updated as the updated depth value of the pixel.
7. The method according to claim 5, characterized in that Determine the similarity between the first correlation window and the second correlation window according to the following steps: Determine a covariance between the first correlation window and the second correlation window based on a pixel value of each pixel point included in the first correlation window and a pixel value of each pixel point included in the second correlation window; Based on the determined covariance, a similarity between the first cross-correlation window and the second cross-correlation window is determined.
8. The method according to claim 7, characterized in that The determining, based on the determined covariance, a similarity between the first mutual correlation window and the second mutual correlation window comprises: For each pixel point included in the first correlation window, determine the pixel difference, distance difference and semantic difference between the pixel point and the central pixel point of the first correlation window, and determine the weight for the pixel point based on the pixel difference, the distance difference and the semantic difference; and For each pixel point included in the second correlation window, determine a pixel difference, a distance difference, and a semantic difference between the pixel point and a central pixel point of the second correlation window, and determine a weight for the pixel point based on the pixel difference, the distance difference, and the semantic difference; The similarity between the first correlation window and the second correlation window is determined based on the calculated covariance, the weight of each pixel included in the first correlation window, and the weight of each pixel included in the second correlation window.
9. The method according to claim 5, characterized in that The step of determining, for each pixel point in the scene image, a first cross-correlation window corresponding to the pixel point includes: For each pixel point in the scene image, determine a first window with a first window size corresponding to the pixel point with the pixel point as the center; and determine texture information of the first window based on pixel values of each pixel point included in the first window; determining an adjustment amount for the first window based on texture information of the first window; The first window is adjusted according to the adjustment amount to obtain an adjusted second window; the second window has a second window size that is greater than or equal to the first window size; The adjusted second window is determined as the first cross-correlation window corresponding to the pixel point.
10. The method according to claim 9, characterized in that The determining of the texture information of the first window based on the pixel value of each pixel point included in the first window includes: Calculating an average of pixel values of each pixel point included in the first window to obtain an average pixel value of the first window; Determine pixel differences between pixel values of each pixel point included in the first window and an average pixel value of the first window; Based on the determined pixel difference values and the number of pixels included in the first window, texture information of the first window is determined.
11. The method according to claim 9, characterized in that The determining the adjustment amount for the first window based on the texture information of the first window includes: Acquire a third window having a third window size; the third window size is greater than or equal to the second window size; determining a difference between the third window and the first window; An adjustment amount for the first window is determined based on a ratio operation between the difference value and the texture information of the first window.
12. The method according to claim 5, characterized in that Determine the target neighborhood image for each scene image as follows: For each scene image, multiple candidate neighborhood images of the scene image are selected from each scene image; For each candidate neighborhood image of the scene image, determine a first matching weight based on a degree of matching between a shooting parameter value corresponding to the candidate neighborhood image and a shooting parameter value corresponding to the scene image, determine semantic annotation information of a same target object corresponding to the candidate neighborhood image and the scene image, and determine a second matching weight based on a degree of matching between the determined semantic annotation information of the same target object; Determine a total matching weight value corresponding to each candidate neighborhood image based on the first matching weight and the second matching weight; A candidate neighborhood image whose total matching weight value is greater than a preset threshold is selected as a target neighborhood image of the scene image.
13. The method according to claim 5, characterized in that The step of determining a depth map corresponding to each of the scene images based on the updated depth value comprises: For each of the scene images, based on the updated depth value of each pixel in the scene image and the updated depth value of each pixel in the target neighborhood image of the scene image, a filtering operation is performed on each pixel included in the scene image; For some of the filtered pixels, determining whether the semantic annotation information of the pixels is consistent with the semantic annotation information of the target scene reference object; If yes, then completing the depth values of the filtered pixel points based on the updated depth values of the pixel points included in the target scene reference object to obtain updated depth values of the completed pixel points; Based on the updated depth values of each of the completed pixel points, a depth map corresponding to each of the scene images is determined.
14. The method according to claim 13, characterized in that For each of the scene images, based on the updated depth value of each pixel in the scene image and the updated depth value of each pixel in the target neighborhood image of the scene image, filtering operations are performed on each pixel included in the scene image, including: For each pixel point in each of the scene images, based on the transformation relationship between the image coordinate system corresponding to the scene image, the world coordinate system, and the image coordinate system corresponding to the target neighborhood image, determine the projected pixel point of the pixel point projected onto the target neighborhood image of the scene image, and determine the projection depth value of the projected pixel point based on the updated depth value of the pixel point; Based on the determined projection depth value of the projection pixel point and the updated depth value of the pixel point in the target neighborhood image pointing to the projection pixel point, it is determined whether to perform a filtering operation on the pixel point.
15. A device for three-dimensional point cloud reconstruction, characterized in that: The device comprises: An acquisition module, used to acquire three-dimensional sparse point cloud data determined based on each scene image taken from different shooting angles, and semantic annotation information of each of the scene images; A generation module, for determining, for a projected pixel point of the three-dimensional sparse point cloud data in each of the scene images, an initial depth value corresponding to the projected pixel point in the three-dimensional sparse point cloud data; generating an initial depth map of the scene image based on the semantic annotation information and the initial depth value corresponding to each of the projected pixel points in the scene image; updating the initial depth value of each pixel point in the scene image using the initial depth value of the neighboring pixel points in the initial depth map to obtain an updated depth value of the pixel point; and determining a depth map corresponding to each of the scene images based on the updated depth value; The reconstruction module is used to obtain the camera pose information of each of the scene images; based on the obtained camera pose information and the depth map corresponding to each scene image, determine the reconstructed three-dimensional dense point cloud data.
16. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for three-dimensional point cloud reconstruction as described in any one of claims 1 to 14 are performed.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for three-dimensional point cloud reconstruction as claimed in any one of claims 1 to 14.
Citation Information
Patent Citations
Semantic and depth information-based positioning method and device, medium and equipment
CN112381828A
Image Processing Method and Apparatus
US20170302901A1
