A method and device for constructing a depth map

Through the pose reconstruction algorithm and depth estimation algorithm, combined with error correction, the problem of sparse depth maps in the existing technology is solved, and high-precision and dense depth map construction is achieved to meet the needs of high-precision maps.

CN113989342BActive Publication Date: 2024-10-25BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111227644.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2024-10-25
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

The depth map obtained by the existing vision-based depth map construction method is relatively sparse, especially the depth values ​​of points on the ground are missing, which cannot meet the needs of high-precision maps for dense and rich ground data.

Method used

The depth value of the target point is determined through the pose reconstruction algorithm, and combined with the depth estimation algorithm, the depth value of each pixel is calculated, and an accurate and dense depth map is obtained using error correction.

Benefits of technology

It achieves the acquisition of accurate and dense depth maps, meets the requirements for depth value accuracy and density of high-precision maps, and improves the positioning and path planning capabilities of unmanned driving equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989342B_ABST
    Figure CN113989342B_ABST
Patent Text Reader

Abstract

This specification discloses a method and device for constructing a depth map. According to the image sequence collected by the acquisition device, through the posture reconstruction algorithm, combined with the positioning position when the acquisition device collects each frame of the image, the target posture of the acquisition device and the target position of each target point in the environment corresponding to the image sequence are obtained in the target coordinate system, so as to obtain the accurate target depth value of the pixel point corresponding to each target point, and through the depth estimation algorithm, the dense estimated depth value of all pixels in the image sequence is obtained, based on the target depth value and the estimated depth value corresponding to the same pixel point, the error of the depth estimation algorithm is calculated, and the estimated depth value of each pixel point is corrected based on the error to obtain an accurate and dense depth map. The posture reconstruction algorithm and the depth estimation algorithm can be combined to obtain an accurate and dense depth map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method and device for constructing a depth map. Background Art

[0002] High-precision maps are an important basis for planning the trajectory of unmanned driving equipment and controlling the safe movement of unmanned driving equipment in the field of unmanned driving technology. When building a high-precision map, you need to build a depth map of the environment first.

[0003] At present, the methods for constructing depth maps are divided into two categories: one is a radar-based construction method, and the other is a vision-based construction method. In the existing vision-based construction method, according to the acquired image sequence, through the pose reconstruction algorithm, such as Structure From Motion (SFM), Visual Simultaneous Localization and Mapping (VSLAM), etc., the image sequence is feature extracted, and the position of the three-dimensional point in the environment corresponding to the feature point in the image and the corresponding pose of each image are restored. Afterwards, based on the obtained three-dimensional point position and the pose of the image, combined with the device data of the acquired image sequence, the depth value of each three-dimensional point is obtained.

[0004] This method can obtain accurate depth values, but since this method performs pose recovery based on feature points extracted from the image, the final depth value is only the depth value corresponding to the feature point, rather than the depth value corresponding to each pixel in the image, making the final depth map relatively sparse. In addition, the ground texture is usually sparse, and the feature points on the ground extracted by this method are also sparse, making the final depth values ​​of the points on the ground equally sparse.

[0005] However, building a high-precision map requires a dense depth map that contains rich ground data. The existing technology has the problem that the constructed depth map is sparse and the depth values ​​of points on the ground are missing. Summary of the invention

[0006] This specification provides a method and device for constructing a depth map to partially solve the above-mentioned problems existing in the prior art.

[0007] This manual adopts the following technical solutions:

[0008] This specification provides a method for constructing a depth map, including:

[0009] Determine, according to the acquired image sequence, a collection pose set of the image sequence acquired by the device and a reconstructed position of each target point in the acquisition environment in a reconstruction coordinate system;

[0010] Determine a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition pose set and each reconstruction position;

[0011] According to the target pose set and each target position, for each frame of image, determining a target depth value of each target point in the frame of image corresponding to the frame of image;

[0012] Determine, according to the image sequence, an estimated depth value of each pixel in each frame image in the image sequence by using a depth estimation algorithm;

[0013] For each frame of image, determine each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself;

[0014] According to the error corresponding to each frame image and the estimated depth value of each pixel point, each depth map is determined, and the determined depth maps are used to construct a high-precision map.

[0015] Optionally, determining a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set, the acquisition pose set and each reconstruction position in the target coordinate system when the device acquires the image sequence, specifically includes:

[0016] Determining, according to the positioning position set and the acquisition posture set, transformation parameters from the reconstructed coordinate system to the target coordinate system;

[0017] Determine, according to the transformation parameters and the acquisition pose set, a target pose set of the device corresponding to the image sequence in the target coordinate system;

[0018] The target position of each target point corresponding to the image sequence in the target coordinate system is determined according to the transformation parameters and the reconstructed position of each target point.

[0019] Optionally, determining the transformation parameters from the reconstructed coordinate system to the target coordinate system according to the positioning position set and the acquisition posture set specifically includes:

[0020] Determine a conversion loss function from the reconstructed coordinate system to the target coordinate system according to the positioning position set, the acquisition posture set and the transformation parameters;

[0021] The transformation parameters are determined with the goal of minimizing the value of the conversion loss function.

[0022] Optionally, according to the target pose set and each target position, for each frame of image, determining a target depth value of each target point of the frame of image corresponding to the frame of image specifically includes:

[0023] For each frame of image, determine each target point falling within the frame of image;

[0024] Determine the target pose of the device corresponding to the frame image from the target pose set;

[0025] For each target point corresponding to the frame image, a target depth value of the target point corresponding to the frame image is determined according to the target position of the target point and the target posture corresponding to the frame image.

[0026] Optionally, for each frame of image, determining each pixel point matching each target point of the frame of image, and determining the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point matching each target point itself, specifically includes:

[0027] For each frame of image, determine each target point corresponding to the frame of image;

[0028] For each target point corresponding to the frame image, determine the pixel point corresponding to the target point in the frame image;

[0029] Determine the error corresponding to the target point according to the target depth value of the frame image corresponding to the target point and the estimated depth value of the pixel point corresponding to the target point in the frame image;

[0030] The error of the depth estimation algorithm corresponding to the frame image is determined according to the errors of each target point corresponding to the frame image.

[0031] Optionally, determining each target point corresponding to the frame image specifically includes:

[0032] Determine, according to a preset time interval, adjacent frames of images collected before and after the frame of image in the image sequence;

[0033] According to the positions of the target points determined based on adjacent images of each frame and the frame image and the target pose of the device corresponding to the frame image in the target pose set, the target points falling within the frame image are determined as the target points corresponding to the frame image.

[0034] Optionally, determining each depth map according to the error corresponding to each frame image and the estimated depth value of each pixel point specifically includes:

[0035] Determining an overall error corresponding to the depth estimation algorithm according to the errors corresponding to each frame image;

[0036] For each frame of image, the pixel points in the frame of image that do not correspond to any target point are regarded as non-matching pixel points;

[0037] Determining a target depth value of each non-matching pixel point according to the overall error and an estimated depth value of each non-matching pixel point in the frame image;

[0038] A depth map corresponding to the frame image is determined according to the target depth value of the frame image corresponding to each matching target point and the target depth value of each non-matching pixel point in the frame image.

[0039] This specification provides a depth map construction device, including:

[0040] A reconstruction module, used to determine, according to the acquired image sequence, a collection pose set of the image sequence acquired by the device and a reconstruction position of each target point in the acquisition environment in a reconstruction coordinate system;

[0041] A conversion module, used to determine a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition pose set and each reconstruction position;

[0042] A target depth determination module is used to determine, for each frame of image, a target depth value of each target point in the frame of image corresponding to the frame of image according to the target pose set and each target position;

[0043] A depth estimation module, used to determine the estimated depth value of each pixel in each frame image in the image sequence according to the image sequence by using a depth estimation algorithm;

[0044] An error determination module is used to determine, for each frame of image, each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself;

[0045] The construction module is used to determine each depth map based on the error corresponding to each frame image and the estimated depth value of each pixel point. The determined depth maps are used to construct a high-precision map.

[0046] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for constructing the depth map is implemented.

[0047] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for constructing a depth map when executing the program.

[0048] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0049] In the depth map construction method provided in the present specification, based on the image sequence captured by the acquisition device, a pose reconstruction algorithm is used, combined with the positioning position of the acquisition device when capturing each frame of the image, to obtain the target pose of the acquisition device and the target position of each target point in the environment corresponding to the image sequence in the target coordinate system, so as to obtain accurate target depth values ​​of the pixels corresponding to each target point, and through a depth estimation algorithm, dense estimated depth values ​​of all pixels in the image sequence are obtained, and based on the target depth value and the estimated depth value corresponding to the same pixel, the error of the depth estimation algorithm is calculated, so as to correct the estimated depth value of each pixel based on the error, and obtain an accurate and dense depth map.

[0050] It can be seen from the above method that this method can combine the pose reconstruction algorithm and the depth estimation algorithm to obtain an accurate and dense depth map. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0052] Figure 1 A schematic diagram of a depth map construction method in this specification;

[0053] Figure 2 A schematic diagram of a depth map construction device provided in this specification;

[0054] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this manual. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0056] Creating a dense depth map that contains rich depth values ​​corresponding to feature points on the ground and has sufficiently high depth value accuracy is the basis for building an accurate high-precision map.

[0057] Therefore, in this specification, the accuracy problem of the depth value is solved by a pose reconstruction algorithm, and the problem of whether the depth map is dense and whether it contains depth values ​​of pixels corresponding to abundant ground points is solved by a depth estimation algorithm.

[0058] In this specification, the depth values ​​of some pixels with sufficiently high accuracy are obtained through the pose reconstruction algorithm, and the depth values ​​of all pixels with lower accuracy are obtained through the depth estimation algorithm. Based on the two depth values, the depth values ​​of all pixels with lower accuracy are converted into high-precision depth values, and dense, high-precision depth values ​​of pixels corresponding to rich ground points are obtained, and a depth map that meets the requirements of building a high-precision map is obtained.

[0059] In one or more embodiments of the present specification, in order to obtain an accurate depth value, the acquisition posture of the acquisition device of the image sequence when acquiring each frame of the image sequence is obtained through a posture reconstruction algorithm, and the reconstructed position of the three-dimensional target point in the environment corresponding to the feature points extracted from each frame of the image. Among them, a feature point corresponds to at least one pixel point in the image where it is located. The posture in the present specification includes position and posture.

[0060] Since the pose reconstruction algorithm focuses on the relative pose between images and the position of feature points in the reconstructed coordinate system when restoring the pose, it also restores the absolute pose of the acquisition device in the reconstructed coordinate system and the absolute position of the target point in the reconstructed coordinate system. In addition, the selection of the reconstruction coordinate system is flexible. For example, since the pose reconstruction process based on the pose reconstruction algorithm is an incremental reconstruction, the coordinate system with the origin determined based on the position of the acquisition device corresponding to the first frame of the image is used as the reconstruction coordinate system (e.g., the camera coordinate system corresponding to the first frame of the image).

[0061] The resulting depth map is used to construct a high-precision map, which is used for positioning and path planning of unmanned driving equipment. Therefore, the acquisition posture of the acquisition device in the reconstructed coordinate system and the reconstructed position of the target point can be restored to a fixed coordinate system corresponding to the high-precision map, such as a geographic coordinate system (i.e., a longitude and latitude coordinate system). Alternatively, the acquisition posture of the acquisition device and the reconstructed position of the target point can be restored to a fixed coordinate system with a known conversion relationship with the coordinate system corresponding to the high-precision map.

[0062] In this specification, the fixed coordinate system to which the acquisition posture of the acquisition device and the position of the target point in the reconstructed coordinate system are finally converted can be used as the target coordinate system.

[0063] In one or more embodiments of the present specification, the conversion relationship between the reconstructed coordinate system and the target coordinate system can be obtained by combining the positioning data of the acquisition device in the target coordinate system when acquiring each frame of image, so as to convert each acquisition posture of the acquisition device and the reconstructed position of the target point restored by the posture reconstruction algorithm to the target coordinate system, so as to further obtain the depth value of the pixel point in the image corresponding to the target point. Based on the positioning data, the depth values ​​of the pixel points corresponding to each target point and the target posture of the acquisition device finally restored to the target coordinate system can be sufficiently accurate.

[0064] Since the pose-based reconstruction algorithm can only obtain the depth values ​​of some pixels corresponding to the target point, rather than the depth values ​​of all pixels in each image in the image sequence, the obtained depth values ​​are not dense enough.

[0065] Therefore, in this specification, according to the image sequence, a depth estimation algorithm is used to output the depth value of each pixel in each frame of the image sequence to obtain a dense depth value.

[0066] Since all the pixels in the image sequence contain a large number of pixels corresponding to the ground, but the dense depth value obtained by the depth estimation algorithm is not accurate enough, and the pixels corresponding to the target point are only part of the pixels in the image sequence, the depth value of the pixel corresponding to the target point obtained by the pose reconstruction algorithm is sparse but accurate. Therefore, in order to finally obtain the depth value of each pixel in the image sequence and the obtained depth value is accurate enough, that is, to obtain a dense and accurate depth value, for each pixel corresponding to the target point, the estimation error of the depth estimation algorithm is calculated according to the depth value corresponding to the pixel obtained by the pose reconstruction algorithm and the depth value obtained by the depth estimation algorithm, and the error of the depth value of all pixels output by the depth estimation algorithm is corrected to obtain a dense and sufficiently accurate depth map containing the depth value of each pixel in each image in the image sequence.

[0067] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0068] Figure 1 The following is a flow chart of a method for constructing a depth map in this specification, which specifically includes the following steps:

[0069] S100: Determine, according to a captured image sequence, a collection pose set of the image sequence captured by the device in a reconstruction coordinate system and a reconstruction position of each target point in a capture environment.

[0070] In this specification, the method for constructing the depth map can be executed by a server, or it can also be executed by an unmanned driving device. This specification does not limit this and will be described below using the server executing the method as an example.

[0071] In one or more embodiments of the present specification, first, the server may obtain a captured image sequence, and determine, through a pose reconstruction algorithm, a set of capture poses of the image sequence captured by the device in a reconstruction coordinate system and each reconstructed position of each target point in the capture environment in the reconstruction coordinate system.

[0072] Among them, the device is the acquisition device of the image sequence, and the image sequence can be collected in advance or in real time. The acquisition device can be a device equipped with a visual sensor, such as a camera, a robot equipped with a camera (such as an unmanned driving device), etc., then the image sequence can be collected by a manually carried acquisition device, or it can be collected by an acquisition device with a mobile function. The acquisition posture set is a set of acquisition postures of the acquisition device corresponding to each frame image in the image sequence when the acquisition device acquires the image sequence. The target point in the acquisition environment, that is, through the posture reconstruction algorithm, the image in the image sequence is feature extracted, and after the feature points in the image are obtained, the adjacent frame images are feature matched, and the three-dimensional points in the environment corresponding to the feature points are restored based on the matched feature points.

[0073] The pose reconstruction algorithm may adopt an existing algorithm, such as the traditional 3D reconstruction algorithm: Structure From Motion (SFM). Alternatively, Visual Simultaneous Localization and Mapping (VSLAM) may be used. Of course, other algorithms that can restore the pose of the acquisition device corresponding to each frame image and the position of the target point corresponding to the image may also be used, and this specification does not limit this.

[0074] Since the acquisition posture corresponding to each frame image in the image sequence reconstructed based on the posture reconstruction algorithm and the reconstructed position of the target point are incremental reconstructions, the visual sensor coordinate system of the acquisition device corresponding to the first frame image during reconstruction can be used as the reconstruction coordinate system.

[0075] In addition, since the posture reconstruction algorithm used in this specification is a mature existing technology, this specification does not elaborate on the specific process of how to reconstruct the collection posture set of the collection device of the image sequence and the reconstruction positions of each target point in the reconstruction coordinate system.

[0076] S102: Determine a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition pose set and each reconstruction position.

[0077] In one or more embodiments of the present specification, the server may convert the captured pose set and the reconstructed position of each target point in the reconstructed coordinate system to the target coordinate system based on the positioning data of the device in the target coordinate system when capturing the image sequence.

[0078] Therefore, the server can determine the positioning position set of the acquisition device in the target coordinate system when acquiring the image sequence, and determine the target pose set of the device and the target position of each target point in the target coordinate system based on the positioning position set, the acquisition pose set and each reconstruction position in the target coordinate system when the device acquires the image sequence.

[0079] Specifically, the server may first determine the transformation parameters from the reconstructed coordinate system to the target coordinate system based on the positioning position set and the acquisition posture set. Then, based on the transformation parameters and the acquisition posture set, determine the target posture set of the device corresponding to the image sequence in the target coordinate system. And based on the transformation parameters and the reconstructed position of each target point, determine the target position of each target point corresponding to the image sequence in the target coordinate system.

[0080] The transformation parameters at least include a rotation matrix, a translation matrix, and a transformation scale. The positioning position set is a set of positioning positions of each frame image when the acquisition device acquires the image sequence. For example, the positioning position set can be a global positioning system (GPS) track of the acquisition device when acquiring the image sequence. The target pose set is a set of poses (target poses) when the acquisition device acquires each frame image in the target coordinate system.

[0081] In one or more embodiments of the present specification, when determining the transformation parameters, the server may determine the transformation loss function from the reconstructed coordinate system to the target coordinate system based on the positioning position set, the acquisition posture set and the transformation parameters, and determine the transformation parameters with the goal of minimizing the value of the transformation loss function.

[0082] In one or more embodiments of this specification, the loss function may be specifically as follows:

[0083] Loss=∑(P i -s(RX i +T)) 2

[0084] Among them, Loss represents the conversion loss of converting the pose in the reconstructed coordinate system to the target coordinate system, P irepresents the location corresponding to the i-th frame image in the image sequence, s represents the transformation scale from the reconstructed coordinate system to the target coordinate system, R represents the rotation matrix from the reconstructed coordinate system to the target coordinate system, T represents the translation matrix from the reconstructed coordinate system to the target coordinate system, X i It represents the acquisition posture of the acquisition device corresponding to the i-th frame image obtained by the posture reconstruction algorithm.

[0085] In one or more embodiments of the present specification, the conversion from the reconstructed coordinate system to the target coordinate system may be performed using the following conversion formula:

[0086] L m =S(RX+T)

[0087] Among them, S is the transformation scale, R is the rotation matrix, and T is the translation matrix. When determining the target pose of the acquisition device, X is the acquisition pose, L is the m Indicates the target pose corresponding to the acquisition pose. When determining the target position of each target point in the target coordinate system, X represents the reconstructed position, L m Indicates the target position of the target point corresponding to the reconstructed position.

[0088] S104: According to the target pose set and each target position, for each frame of image, determine the target depth value of each target point in the frame of image corresponding to the frame of image.

[0089] In one or more embodiments of this specification, after determining the target pose set and the target position of each target point in the target coordinate system, the server can determine the depth values ​​of each target point in the target coordinate system according to the target pose set and each target position as the depth value of each target. The depth value in this specification is the distance from the target point to the optical center of the visual sensor of the acquisition device. Alternatively, the distance between the target point and the acquisition device can be used as the depth value of the target point, and this specification does not limit this.

[0090] Since the acquisition posture of the acquisition device and the reconstruction position of each target point are reconstructed by the posture reconstruction algorithm in step S100, it depends on the co-viewing relationship between the images in the image sequence, and different images in the image sequence may have the same partial images, then different images may correspond to the same target point, and one target point may also correspond to multiple frames of images. However, the acquisition position and acquisition time of different images are different. Therefore, for different images corresponding to the same target point, the distance from the target point to the position of the acquisition device corresponding to each frame of the image is not necessarily the same. Therefore, for different images, the depth value of the target point is not necessarily the same, and one target point may correspond to multiple target depth values.

[0091] Therefore, in one or more embodiments of the present specification, the server may determine, for each frame of image, a target depth value of each target point in the frame of image corresponding to the frame of image based on the target pose set and each target position.

[0092] Specifically, the server may determine each target point falling within the frame image for each frame image, and determine the target pose of the device corresponding to the frame image from the target pose set. Afterwards, the server may determine the target depth value of each target point corresponding to the frame image according to the target position of the target point and the target pose corresponding to the frame image.

[0093] S106: Determine, according to the image sequence, an estimated depth value of each pixel in each frame image in the image sequence by using a depth estimation algorithm.

[0094] In one or more embodiments of the present specification, since step S104 can only obtain the target depth value of the target point instead of the target depth value of each pixel, the server can also determine the depth value of each pixel in each frame image of the image sequence according to the image sequence through a depth estimation algorithm as an estimated depth value.

[0095] Among them, the depth estimation algorithm can adopt existing algorithms, such as the depth value, depth pose and depth uncertainty monocular visual odometry (Deep Depth, Deep Pose and Deep Uncertainty for Monocular Visual Odometry, D3VO) algorithm, the deep video to depth value (Deep Video To Depth, DeepV2D) algorithm, etc.

[0096] It should be noted that since the execution of steps S100 to S104 and step S106 do not affect each other, this manual does not limit the execution order of steps S100 to S104 and step S106. That is, it is not necessary to execute step S104 before executing step S106. For example, steps S100 to S104 can be executed first, and then step S106, or step S106 can be executed first, and then step S100 to S104, or step S106 can be executed before executing step S102, and so on, as long as step S106 is executed before step S108.

[0097] S108: For each frame of image, determine each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image based on the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself.

[0098] Since the pixels in the image sequence correspond to the feature points extracted from the image sequence, and the feature points correspond to the target points in the environment, the determined target points also correspond to the pixels in the image sequence. For at least some pixels, there are both a target depth value and an estimated depth value corresponding to the pixel. Therefore, the error of the depth estimation algorithm can be determined based on the difference between the target depth value and the estimated depth value of these pixels.

[0099] Therefore, in one or more embodiments of the present specification, the server may determine, for each frame of image, each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image based on the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself.

[0100] As mentioned above, a target point may correspond to multiple frames of images. Therefore, the server can determine the target points corresponding to each frame of image, and determine the pixel point corresponding to the target point in the frame of image for each target point corresponding to the frame of image. Then, the error corresponding to the target point is determined based on the target depth value of the frame of image corresponding to the target point and the estimated depth value of the pixel point corresponding to the target point in the frame of image. Then, the server can determine the error of the depth estimation algorithm corresponding to the frame of image based on the errors of each target point corresponding to the frame of image.

[0101] In one or more embodiments of the present specification, the pixel point corresponding to the target point in the frame image may be used as the matching pixel point of the target point.

[0102] In one or more embodiments of the present specification, when determining the error corresponding to the target point, the server may use the ratio of the target depth value of the frame image corresponding to the target point to the estimated depth value of the matching pixel point of the target point as the error, or may use the difference between the two as the error of the target point.

[0103] In one or more embodiments of the present specification, when determining the error of the depth estimation algorithm corresponding to the frame image based on the errors corresponding to each target point, the server may determine the average value of the errors corresponding to each target point corresponding to the frame image as the error of the depth estimation algorithm corresponding to the frame image, or may take the median, etc. This specification does not impose any restrictions here.

[0104] In one or more embodiments of the present specification, when determining the target points corresponding to each frame of image, the target point whose reconstructed position is restored based on the feature points in the frame of image extracted by the pose reconstruction algorithm can be used as the target point corresponding to the image where the feature point is located, that is, the target point in the environment corresponding to the feature point in the frame of image is used as the target point corresponding to the frame of image. Specifically, the server can determine the feature points extracted from each frame of image, and for each feature point extracted from the frame of image, determine the target point in the acquisition environment restored based on the feature point as the target point corresponding to the frame of image.

[0105] Since the feature points extracted from a frame image are relatively sparse, the corresponding target points are also sparse. When calculating the error of the depth estimation algorithm for each frame image based on the target points corresponding to the frame image and the pixels matched by each target point, there are fewer pixels involved in the error calculation. Usually, adjacent frame images have a common view area, but the feature points extracted from the common view area may not be exactly the same. For a target point, the target point is also the target point corresponding to the pixel points in image A and image B, but the feature points extracted from image A include the feature points corresponding to the target point, while the feature points extracted from image B do not have the feature points corresponding to the target point. In this case, the target point cannot participate in the calculation of the error corresponding to image B. Therefore, in order to make more pixels involved in the error calculation and make the calculated errors corresponding to each frame image more accurate, when calculating the error corresponding to a frame image, the target points corresponding to the adjacent frames before and after the frame image can be combined as the target points corresponding to the frame image, and participate in the calculation of the error corresponding to the frame image. This allows adjacent frame images to complement each other's target points, making the data involved in error calculation richer and the calculated error more accurate.

[0106] Therefore, in one or more embodiments of the present specification, when determining the target points corresponding to each frame of image, the server can determine the adjacent frames of image collected before and after the frame of image in the image sequence according to a preset time interval. And according to the positions of the target points determined based on the adjacent frames of image and the frame of image and the target pose of the device corresponding to the frame of image in the target pose set, determine the target points falling within the frame of image, that is, the target points falling within the field of view corresponding to the frame of image as the target points corresponding to the frame of image.

[0107] Since the acquisition frame rate of the device that captures the image sequence affects the size of the common viewing area between two adjacent frames of images, the time interval can be set based on the acquisition frame rate of the device. The specific time interval for capturing adjacent images is not limited in this manual.

[0108] S110: Determine each depth map according to the error corresponding to each frame image and the estimated depth value of each pixel point, and the determined depth maps are used to construct a high-precision map.

[0109] In one or more embodiments of the present specification, after calculating the errors corresponding to each frame image, the server can determine each depth map based on the obtained errors corresponding to each frame image and the estimated depth value of each pixel point, wherein the determined depth maps are used to construct a high-precision map.

[0110] Since for the image sequence, the pixel points in each frame of the image sequence may have their corresponding target points, or there may be pixel points that do not correspond to any target points. For the pixel points that have corresponding target points, the target depth value corresponding to the target point of the pixel point can be directly used as the final depth value of the pixel point. For the pixel points that do not have corresponding target points, the estimated depth value can be corrected according to the calculated errors corresponding to each frame of the image, and converted into the target depth value in the target coordinate system.

[0111] Therefore, in one or more embodiments of the present specification, the server can determine the overall error corresponding to the depth estimation algorithm based on the errors corresponding to each frame image, and for each frame image, the pixels in the frame image that do not correspond to any target point are regarded as non-matching pixels. Afterwards, the server can determine the target depth value of each non-matching pixel point based on the overall error and the estimated depth value of each non-matching pixel point in the frame image, and determine the depth map corresponding to the frame image based on the target depth value of the frame image corresponding to each matching target point in the frame image and the target depth value of each non-matching pixel point.

[0112] In one or more embodiments of the present specification, when determining non-matching pixel points, the server may determine each target point falling into the frame image as the matching target point of the frame image, and use the pixel points in the frame image corresponding to the matching target point of the frame image as the matching pixel points, and use other pixel points in the frame image outside the matching image as non-matching pixel points.

[0113] In one or more embodiments of the present specification, when determining the overall error corresponding to the depth estimation algorithm based on the errors corresponding to each frame image, the server may determine the average value or median of the errors corresponding to each frame image as the overall error.

[0114] In one or more embodiments of the present specification, after determining the error corresponding to each frame image, the server may not determine the overall error, but instead, for each frame image, based on the error corresponding to the frame image, correct the estimated depth value of each pixel in the frame image to the target depth value in the target coordinate system.

[0115] Therefore, in one or more embodiments of the present specification, the server may also determine, for each frame image, each target point corresponding to the frame image as the matching target point of the frame image, each pixel point in the frame image corresponding to the matching target point of the frame image as the matching pixel point, and each pixel point that does not correspond to any matching target point as the non-matching pixel point. Afterwards, the server may determine the target depth value of each non-matching pixel point based on the error corresponding to the frame image and the estimated depth value of each non-matching pixel point in the frame image. Finally, the depth map corresponding to the frame image is determined based on the target depth value of the frame image corresponding to each matching target point in the frame image and the target depth value of each non-matching pixel point.

[0116] based on Figure 1 The method for constructing a depth map shown in the figure obtains the target pose of the acquisition device and the target position of each target point in the environment corresponding to the image sequence in the target coordinate system through a pose reconstruction algorithm based on the image sequence acquired by the acquisition device, combined with the positioning position of the acquisition device when acquiring each frame of the image, so as to obtain accurate target depth values ​​of the pixels corresponding to each target point, and obtain dense estimated depth values ​​of all pixels in the image sequence through a depth estimation algorithm, calculate the error of the depth estimation algorithm based on the target depth value corresponding to the same pixel and the estimated depth value, and correct the estimated depth value of each pixel based on the error to obtain an accurate and dense depth map.

[0117] It can be seen from the above method that this method can combine the pose reconstruction algorithm and the depth estimation algorithm to obtain an accurate and dense depth map containing rich ground points.

[0118] In addition, in one or more embodiments provided in the present specification, the server may also fit an error function based on the target depth value of each target point and the depth estimation value of the pixel point corresponding to each target point, and based on the error function, correct the estimated depth value of the pixel point in each frame image to the depth value in the target coordinate system, that is, the target depth value.

[0119] The above is a method for constructing a depth map provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding device for constructing a depth map, such as Figure 2 shown.

[0120] Figure 2 A schematic diagram of a depth map construction device provided in this specification, the device comprising:

[0121] The reconstruction module 200 is used to determine, according to the acquired image sequence, a collection pose set of the image sequence acquired by the device and a reconstruction position of each target point in the acquisition environment in a reconstruction coordinate system;

[0122] A conversion module 201 is used to determine a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition pose set and each reconstruction position;

[0123] The target depth determination module 202 is used to determine, for each frame of image, a target depth value of each target point in the frame of image corresponding to the frame of image according to the target pose set and each target position;

[0124] A depth estimation module 203 is used to determine an estimated depth value of each pixel in each frame image in the image sequence by using a depth estimation algorithm according to the image sequence;

[0125] The error determination module 204 is used to determine, for each frame of image, each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself;

[0126] The construction module 205 is used to determine each depth map according to the error corresponding to each frame image and the estimated depth value of each pixel point, and the determined depth maps are used to construct a high-precision map.

[0127] Optionally, the conversion module 201 is also used to determine the transformation parameters from the reconstructed coordinate system to the target coordinate system based on the positioning position set and the acquisition posture set, determine the target posture set of the device corresponding to the image sequence in the target coordinate system based on the transformation parameters and the acquisition posture set, and determine the target position of each target point in the image sequence in the target coordinate system based on the transformation parameters and the reconstructed position of each target point.

[0128] Optionally, the conversion module 201 is further used to determine a conversion loss function from the reconstructed coordinate system to the target coordinate system based on the positioning position set, the acquisition posture set, and the transformation parameters, and to determine the transformation parameters with the goal of minimizing the value of the conversion loss function.

[0129] Optionally, the target depth determination module 202 is also used to determine, for each frame image, each target point falling within the frame image, determine the target pose of the device corresponding to the frame image from the target pose set, and, for each target point corresponding to the frame image, determine the target depth value of the target point corresponding to the frame image based on the target position of the target point and the target pose corresponding to the frame image.

[0130] Optionally, the error determination module 204 is also used to determine, for each frame image, each target point corresponding to the frame image, and, for each target point corresponding to the frame image, determine the pixel point corresponding to the target point in the frame image, determine the error corresponding to the target point based on the target depth value of the frame image corresponding to the target point and the estimated depth value of the pixel point corresponding to the target point in the frame image, and determine the error of the depth estimation algorithm corresponding to the frame image based on the errors of each target point corresponding to the frame image.

[0131] Optionally, the error determination module 204 is also used to determine, according to a preset time interval, each adjacent image frame collected before and after the frame image in the image sequence, and determine each target point falling within the frame image as the target points corresponding to the frame image based on the positions of the target points determined based on the adjacent images and the frame image and the target pose of the device corresponding to the frame image in the target pose set.

[0132] Optionally, the construction module 205 is also used to determine the overall error corresponding to the depth estimation algorithm based on the errors corresponding to each frame image, and for each frame image, the pixel points in the frame image that do not correspond to any target point are regarded as non-matching pixel points, and the target depth value of each non-matching pixel point is determined based on the overall error and the estimated depth value of each non-matching pixel point in the frame image, and the depth map corresponding to the frame image is determined based on the target depth value of the frame image corresponding to each matching target point in the frame image and the target depth value of each non-matching pixel point.

[0133] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The construction method of the provided depth map.

[0134] This manual also provides Figure 3 The schematic diagram of the structure of the electronic equipment shown in FIG. Figure 3 As shown, at the hardware level, the electronic device includes a processor, an internal bus, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The construction method of the provided depth map.

[0135] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0136] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0137] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0138] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0139] For the convenience of description, the above device is described by dividing it into various units according to its functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0140] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0141] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0144] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0145] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0146] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0147] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0148] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0151] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for constructing a depth map, characterized in that: include: Determine, according to the acquired image sequence, a collection pose set of the image sequence acquired by the device and a reconstructed position of each target point in the acquisition environment in a reconstruction coordinate system; Determine a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition pose set and each reconstruction position; According to the target pose set and each target position, for each frame of image, determining a target depth value of each target point in the frame of image corresponding to the frame of image; Determine, according to the image sequence, an estimated depth value of each pixel in each frame image in the image sequence by using a depth estimation algorithm; For each frame of image, determine each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself; According to the error corresponding to each frame image and the estimated depth value of each pixel point, each depth map is determined, and the determined depth maps are used to construct a high-precision map.

2. The method according to claim 1, characterized in that According to the positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition posture set and each reconstruction position, determining the target posture set of the device and the target position of each target point in the target coordinate system, specifically including: Determining, according to the positioning position set and the acquisition posture set, transformation parameters from the reconstructed coordinate system to the target coordinate system; Determine, according to the transformation parameters and the acquisition pose set, a target pose set of the device corresponding to the image sequence in the target coordinate system; The target position of each target point corresponding to the image sequence in the target coordinate system is determined according to the transformation parameters and the reconstructed position of each target point.

3. The method according to claim 2, characterized in that Determining the transformation parameters from the reconstructed coordinate system to the target coordinate system according to the positioning position set and the acquisition posture set, specifically includes: Determine a conversion loss function from the reconstructed coordinate system to the target coordinate system according to the positioning position set, the acquisition posture set and the transformation parameters; The transformation parameters are determined with the goal of minimizing the value of the conversion loss function.

4. The method according to claim 1, characterized in that According to the target pose set and each target position, for each frame of image, determining the target depth value of each target point in the frame of image corresponding to the frame of image, specifically including: For each frame of image, determine each target point falling within the frame of image; Determine the target pose of the device corresponding to the frame image from the target pose set; For each target point corresponding to the frame image, a target depth value of the target point corresponding to the frame image is determined according to the target position of the target point and the target posture corresponding to the frame image.

5. The method according to claim 1, characterized in that For each frame of image, determine each pixel point matching each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point matching each target point itself, specifically including: For each frame of image, determine each target point corresponding to the frame of image; For each target point corresponding to the frame image, determine the pixel point corresponding to the target point in the frame image; Determine the error corresponding to the target point according to the target depth value of the frame image corresponding to the target point and the estimated depth value of the pixel point corresponding to the target point in the frame image; The error of the depth estimation algorithm corresponding to the frame image is determined according to the errors of each target point corresponding to the frame image.

6. The method according to claim 5, characterized in that Determine each target point corresponding to the frame image, specifically including: Determine, according to a preset time interval, adjacent frames of images collected before and after the frame of image in the image sequence; According to the positions of the target points determined based on adjacent images of each frame and the frame image and the target pose of the device corresponding to the frame image in the target pose set, the target points falling within the frame image are determined as the target points corresponding to the frame image.

7. The method according to claim 1, characterized in that Determine each depth map based on the error corresponding to each frame image and the estimated depth value of each pixel point, specifically including: Determining an overall error corresponding to the depth estimation algorithm according to the errors corresponding to each frame image; For each frame of image, the pixel points in the frame of image that do not correspond to any target point are regarded as non-matching pixel points; Determining a target depth value of each non-matching pixel point according to the overall error and an estimated depth value of each non-matching pixel point in the frame image; A depth map corresponding to the frame image is determined according to the target depth value of the frame image corresponding to each matching target point and the target depth value of each non-matching pixel point in the frame image.

8. A device for constructing a depth map, characterized in that: include: A reconstruction module, used to determine, according to the acquired image sequence, a collection pose set of the image sequence acquired by the device and a reconstruction position of each target point in the acquisition environment in a reconstruction coordinate system; A conversion module, used to determine a target pose set of the device and a target position of each target point in the target coordinate system according to a positioning position set in the target coordinate system when the device acquires the image sequence, the acquisition pose set and each reconstruction position; A target depth determination module is used to determine, for each frame of image, a target depth value of each target point in the frame of image corresponding to the frame of image according to the target pose set and each target position; A depth estimation module, used to determine the estimated depth value of each pixel in each frame image in the image sequence according to the image sequence by using a depth estimation algorithm; An error determination module is used to determine, for each frame of image, each pixel point that matches each target point of the frame of image, and determine the error of the depth estimation algorithm corresponding to the frame of image according to the target depth value of each target point and the estimated depth value of the pixel point that matches each target point itself; The construction module is used to determine each depth map based on the error corresponding to each frame image and the estimated depth value of each pixel point. The determined depth maps are used to construct a high-precision map.

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

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.