Visual inertia semi-dense reconstruction method and device, electronic equipment and storage medium
By using the visual inertial semi-dense reconstruction method in the visual inertial SLAM system, the matching point pairs are identified by the lattice quadrant and pyramid optical flow method and in-depth analysis is carried out, the problem of poor three-dimensional reconstruction effect in underwater environments in the prior art is solved, and a three-dimensional reconstruction effect with higher accuracy and robustness is achieved.
Patent Information
- Application Number
- CN202311421755.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2043-10-30
AI Technical Summary
The existing visual inertial SLAM system is difficult to achieve high accuracy and robust three-dimensional reconstruction in underwater environments, especially in deep-sea environments. The existing semi-dense reconstruction methods cannot meet the needs of deep-sea robots for three-dimensional information.
A visual inertial semi-dense reconstruction method is proposed. By collecting submarine exploration images, calculating the pixel gap between pixel grids, building a square quadrilateral tree, selecting the smallest grid, identifying the polar line segments of the central pixel point, using the pyramid optical flow method to identify matching point pairs, and performing in-depth analysis based on pixel point motion information to achieve semi-dense reconstruction of the scene.
This method can achieve more accurate and robust three-dimensional reconstruction in a deep-sea environment, meet the needs of deep-sea robots for three-dimensional information, and improve the prior information acquisition ability of underwater operations.
Smart Images

Figure CN119919571A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of marine oil and gas exploration and development, and in particular to a visual-inertial semi-dense reconstruction method, device, electronic equipment and storage medium. Background Art
[0002] The exploration and development of marine oil and gas has great development prospects. Due to the complex and changeable environment of deep-sea diving exploration operations and many uncertain factors, marine exploration and development faces higher risks and difficulties. Deep-sea robots are extreme operation robots used in deep-water environments. The large demand for underwater operations requires deep-sea robots to obtain more accurate trajectory positioning while hoping to have more accurate and robust three-dimensional reconstruction methods to help them restore the three-dimensional information of underwater scenes and provide effective prior information for underwater operations.
[0003] Historically, RGB-D cameras can help SLAM systems with positioning and mapping. The main reason for its dense mapping is that RGB-D cameras can provide depth information for each pixel in the image frame, and the depth information it provides can help with scale recovery and positioning. The RGB information obtained by the RGB-D camera can help the map markers of the RGB-D SLAM system obtain more color information. In terms of three-dimensional reconstruction, the obtained 3D point cloud is also more suitable for human visual cognition.
[0004] Although RGB-D SLAM has many advantages in 3D reconstruction, the huge amount of pixel data obtained by RGB-D cameras has become a burden. Taking 1080p images as an example, the RGB information attached to each pixel plus the depth information, the data volume of an image frame can reach tens of millions, which poses a great challenge to the long-term maintenance and management of the system.
[0005] Visual SLAM systems can be classified into direct methods and feature point methods according to the image information used. Each frame of the image has hundreds of thousands or even more pixels, but the number of feature points extracted each time is only a few hundred. The feature point method mainly relies on the extraction of key points and the calculation of descriptors at the front end, and will ignore other useful image information except feature points. Therefore, the feature point method can usually only achieve sparse reconstruction effects and cannot meet the needs of most applications for 3D reconstruction that are aware of the surrounding environment. With the emergence of some open source projects of direct SLAM, they can overcome the defects of RGB-DSLAM's huge data management, and the density of their reconstruction can also meet some practical needs, thus gradually coming to the mainstream stage and becoming an important part of visual mileage calculation methods.
[0006] The direct method overcomes the problem of low image information utilization of the feature point method. It mainly calculates the camera motion based on the image pixel information. According to the number of pixels used, the direct method can be divided into sparse, semi-dense and dense types. It can help restore relatively dense structures and is more conducive to applications in scenarios such as scene interaction.
[0007] Dense visual SLAM methods aim to estimate the depth of each pixel, including both high and low gradients, but this also results in a large amount of data, which puts a burden on the system. Unlike dense visual SLAM, semi-dense visual SLAM only uses high-gradient image pixels because these are the only pixels that produce reliable matches.
[0008] LSD-SLAM proposes a direct monocular SLAM algorithm, which maintains and tracks on a global map. The map contains keyframe pose graphs and related probabilistic semi-dense depth maps, and realizes CPU-level semi-dense reconstruction. Considering the uncertainty of triangulation, a novel filtering form is used for depth estimation. The LSD-SLAM algorithm adopts direct tracking, so it has advantages such as insensitivity to missing feature points, but it also covers the shortcomings of the direct method: it is sensitive to camera exposure and can easily lead to loss due to rapid movement. In addition, in the loop detection part, LSD-SLAM still needs to rely on the feature point method and has not completely gotten rid of the calculation of feature points.
[0009] DSO is a high-precision direct visual odometer that does not include loop detection. In order to deal with the problem that the direct method is easily affected by lighting, it uses photometric calibration, takes into account exposure time, lens vignetting and nonlinear response function, and calculates the camera pose and the position of map points by minimizing the photometric error. In the later period, there is still a lot of work to improve DSO. LDSO retains the characteristic that DSO can use any image pixel with sufficient intensity gradient, and adds loop detection and pose graph optimization function modules on this basis. Stereo DSO is a stereo direct sparse odometer used to obtain semi-dense reconstruction of a large range of environments from a stereo camera, with loop closure and global BA functions.
[0010] DSM is a completely direct monocular VSLAM method that allows the reuse of existing map information directly using the photometric error formula. DSM adopts a coarse-to-fine optimization scheme to increase the convergence radius of PBA. This strategy allows the use of rich geometric information provided by observable points. In addition, DSM uses a local map co-visibility window to select active keyframes that observe the same scene area (even if they are not close in time).
[0011] Visual inertial SLAM also has the functional requirement of 3D reconstruction, but there are not many existing open source algorithms: VI-DSO is improved based on DSO, adopts a novel initialization strategy, adds scale and gravity direction to the model, and performs joint optimization after initialization, and jointly estimates the camera pose and semi-dense scene geometry by minimizing the photometric error and IMU measurement error, but it is not open source. The existing VI-Stereo-DSO has open source code, but it adds an erroneous binocular residual, resulting in a memory leak. ORB-SLAM3 is an open source system that can perform visual, visual inertial and multi-map SLAM using monocular, binocular and RGB-D cameras. One of its innovations is the multi-map system, which relies on a new location recognition method that can improve the recall rate, enabling ORB-SLAM3 to survive long-term poor visual information: when it is lost, it starts a new map, which will be seamlessly merged with the previous map when revisiting the previous map, but its disadvantage is that the reconstructed map is too sparse.
[0012] Cameras have become a research hotspot for visual SLAM due to their advantages of small size, low cost, and rich information acquisition. However, visual SLAM is easily affected by motion state and drastic changes in light intensity, resulting in unsatisfactory results and is difficult to apply in underwater environments. In addition, monocular visual SLAM cannot restore scale information. Existing research on the application of visual inertial SLAM to underwater environments is very rare. The large demand for underwater operations requires visual inertial SLAM systems to obtain more accurate trajectory positioning while also hoping for more accurate and robust 3D reconstruction methods to help them restore the 3D information of underwater scenes and provide effective prior information for underwater operations. To ensure the understanding of the scene, the minimum requirement for 3D reconstruction is semi-dense reconstruction, but visual inertial SLAM systems often abandon old ground Figure 3 dimensional information to obtain more accurate device positioning information, so it cannot meet the semi-dense reconstruction requirements of the scene.
[0013] Therefore, there is an urgent need for a semi-dense scene reconstruction method that optimizes the old semi-dense scene reconstruction algorithm and is suitable for deep-sea robots. Summary of the invention
[0014] In order to solve the above problems, the present invention provides a visual-inertial semi-dense reconstruction method, device, electronic device and storage medium, which can realize a semi-dense scene reconstruction method suitable for deep-sea robots by optimizing the old semi-dense scene reconstruction algorithm.
[0015] In a first aspect, the present invention provides a visual-inertial semi-dense reconstruction method, comprising the following steps:
[0016] Collecting a submerged sea exploration image in a visual front end of a visual inertial SLAM system, calculating a pixel difference between a pixel square in the submerged sea exploration image and a neighboring pixel square of the pixel square, constructing a square quadtree of the submerged sea exploration image based on the pixel difference, and selecting a minimum square from the square quadtree;
[0017] Identify the central pixel point of the minimum square and construct an epipolar segment of the central pixel point;
[0018] When the number of pixel points included in the epipolar segment is less than a first preset number, a first matching pixel point matching the central pixel point is identified by using a preset pyramid optical flow method to obtain a first matching point pair between the central pixel point and the first matching pixel point;
[0019] When the number of pixel points included in the epipolar segment is not less than the first preset number and less than the second preset number, identifying a second matching pixel point that matches the central pixel point from the epipolar segment, and obtaining a second matching point pair between the central pixel point and the second matching pixel point;
[0020] When the number of pixel points included in the epipolar segment is not less than the second preset number, a third matching pixel point matching the central pixel point is selected from the block where the epipolar segment is located, to obtain a third matching point pair between the central pixel point and the third matching pixel point;
[0021] Based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, depth analysis is performed on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, and each analysis depth of the analysis depths is spliced to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
[0022] In one embodiment, the step of calculating the pixel gap between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid comprises:
[0023] Dividing pixel grids in the submerged sea exploration image;
[0024] The pixel difference between the pixel grid and the neighboring pixel grid of the pixel grid is calculated using the following formula:
[0025]
[0026] Wherein, β represents the pixel difference, x represents the pixel value of the central pixel point in the pixel grid, Represents the pixel mean of the adjacent pixels in the four directions of the central pixel in the pixel grid.
[0027] In one embodiment, constructing a grid quadtree of the submersible exploration image based on the pixel difference includes:
[0028] When the pixel difference is greater than a preset threshold, the submerged sea exploration image is divided into four grids with the central pixel point in the pixel grid corresponding to the pixel difference as the center, and the four grids are used as secondary quadtree nodes;
[0029] When the size of the four grids is not less than a preset size, the four grids are divided into multiple levels of grids to obtain a multi-level grid, and the multi-level grid is used as a multi-level quadtree node;
[0030] When the size of the multi-level grid is smaller than the preset size, using the multi-level grid as a quadtree leaf node;
[0031] The grid quadtree is determined based on a central pixel point in the pixel grid, the secondary quadtree node, the multi-level quadtree node and the quadtree leaf node.
[0032] In one embodiment, constructing the epipolar segment of the central pixel point includes:
[0033] Acquire a first visual point and a second visual point of the central pixel;
[0034] The position where the distance from the central pixel is the minimum is taken as the starting point;
[0035] Starting from the starting point and extending from the first visual point to the position direction of the minimum value, construct a depth range segment of the central pixel point;
[0036] identifying a visual interval from the second visual point to the depth range segment;
[0037] In the visual interval, a straight line segment parallel to the depth range segment is searched, and the straight line segment is used as the polar segment.
[0038] In one embodiment, identifying a second matching pixel point that matches the central pixel point from the epipolar segment includes:
[0039] Collecting pixel points included in the epipolar segment;
[0040] Calculating the similarity between the central pixel and the pixels included in the epipolar segment;
[0041] When the similarity level is greater than a preset similarity level, the pixel points included in the polar line segment corresponding to the similarity level are used as the second matching pixel points.
[0042] In one embodiment, selecting a third matching pixel point that matches the central pixel point from the block where the epipolar segment is located includes:
[0043] Select a first square from the neighborhood of the central pixel point, and extract a second square having the same size as the first square from the square where the epipolar segment is located;
[0044] The difference between the first block and the second block is calculated using the following formula:
[0045] S(A,B) SSD =∑ i,j (A(i,j)-B(i,j)) 2
[0046] Among them, S(A,B) SSD represents the difference between the first block and the second block, A(i,j) represents the gray value of the first block minus the mean of each small block, (i,j) represents the coordinates in the block, and B(i,j) represents the gray value of the second block minus the mean of each small block;
[0047] When the difference value is less than a preset difference value, a center pixel point in the second block corresponding to the difference value is used as the third matching pixel point.
[0048] In one embodiment, the pixel point motion information of the submersible exploration image in the visual inertial SLAM system is used to perform depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, including:
[0049] The depth interval of the central pixel is calculated using the following formula:
[0050]
[0051]
[0052] Wherein, (s1, s2) represents the depth interval, s1 represents the depth interval corresponding to the central pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, s2 represents the depth interval corresponding to the matching pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, the matrix formed by R and t represents the transformation matrix from the world coordinate system to the camera coordinate system, x1 represents the coordinates of the central pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, and x2 represents the coordinates of the matching pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair;
[0053] Based on the depth interval, coordinate transformation is performed on the coordinates of the central pixel point in the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point.
[0054] In a second aspect, the present invention provides a visual inertial semi-dense reconstruction device, characterized in that the device comprises:
[0055] A grid selection module is used to collect a submerged sea exploration image in the visual front end of the visual inertial SLAM system, calculate the pixel difference between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid, construct a grid quadtree of the submerged sea exploration image based on the pixel difference, and select a minimum grid from the grid quadtree;
[0056] An epipolar line construction module, used to identify the central pixel point of the minimum square and construct an epipolar line segment of the central pixel point;
[0057] a first identification module, configured to identify a first matching pixel point that matches the central pixel point by using a preset pyramid optical flow method when the number of pixel points included in the epipolar segment is less than a first preset number, so as to obtain a first matching point pair between the central pixel point and the first matching pixel point;
[0058] A second identification module is used to identify a second matching pixel point that matches the central pixel point from the epipolar segment when the number of pixel points included in the epipolar segment is not less than the first preset number and less than a second preset number, so as to obtain a second matching point pair between the central pixel point and the second matching pixel point;
[0059] A third selection module is used to select a third matching pixel point that matches the central pixel point from the block where the polar segment is located when the number of pixel points included in the polar segment is not less than the second preset number, so as to obtain a third matching point pair between the central pixel point and the third matching pixel point;
[0060] A depth stitching module is used to perform depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, obtain the analysis depth of the central pixel point, and stitch each of the analysis depths to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
[0061] In a third aspect, the present invention provides an electronic device, characterized in that the electronic device comprises:
[0062] at least one processor; and,
[0063] a memory communicatively connected to the at least one processor; wherein,
[0064] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the visual-inertial semi-dense reconstruction method as described.
[0065] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the visual-inertial semi-dense reconstruction method as described above is implemented.
[0066] Compared with the prior art, the embodiments of the present invention have at least the following advantages:
[0067] The embodiment of the present invention first calculates the pixel gap between the pixel grid in the submersible sea exploration image and the neighboring pixel grid of the pixel grid, so as to divide the image frame into blocks using a quadtree strategy, so that the pixels in the same block have similar pixel values, and the pixel values in the leaf node, that is, the smallest block, are obviously different from those in other adjacent blocks, and have a high image gradient, which can meet the requirements of three-dimensional reconstruction. Secondly, the embodiment of the present invention constructs an epipolar segment of the central pixel point, so as to query the matching point of the central pixel point by using an epipolar search method. Furthermore, the embodiment of the present invention uses the pixel point motion information of the submersible sea exploration image in the visual inertial SLAM system to search the matching point of the central pixel point. The first matching point pair, the second matching point pair, and the third matching point pair are subjected to depth analysis to achieve a good semi-dense reconstruction effect on the VI-SLAM system, and the spatial position of the feature points is estimated by using the camera motion. With the assistance of the front-end false matching elimination algorithm IM, the visual-inertial SLAM has obtained relatively accurate motion information, so the matching point pairs obtained by the polar line search and block matching strategy can be estimated in depth with the help of these motion information. For the pixels obtained in the monocular system, the depth information of the pixels cannot be solved by simply relying on one image frame, so it is necessary to estimate the depth information by observing under different perspectives, that is, to use the triangulation method to estimate the depth information. Therefore, the visual-inertial semi-dense reconstruction method, device, electronic device, and storage medium proposed in the embodiment of the present invention can realize a semi-dense scene reconstruction method that optimizes the old semi-dense scene reconstruction algorithm and is suitable for deep-sea robots. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0070] Figure 1 A schematic diagram of a flow chart of a visual-inertial semi-dense reconstruction method provided by an embodiment of the present invention;
[0071] Figure 2 In one embodiment of the present invention Figure 1 A functional schematic diagram of a visual-inertial SLAM system using a visual-inertial semi-dense reconstruction method is provided;
[0072] Figure 3 In one embodiment of the present invention Figure 1 A schematic diagram of a grid quadtree of a visual-inertial semi-dense reconstruction method is provided;
[0073] Figure 4 In one embodiment of the present invention Figure 1 A schematic diagram of the epipolar segments of a visual-inertial semi-dense reconstruction method is provided;
[0074] Figure 5 In one embodiment of the present invention Figure 1 A schematic diagram of the depth range of a visual-inertial semi-dense reconstruction method is provided;
[0075] Figure 6 A schematic diagram of a module of a visual-inertial semi-dense reconstruction device provided by an embodiment of the present invention;
[0076] Figure 7 A schematic diagram of the internal structure of an electronic device for implementing a visual-inertial semi-dense reconstruction method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0077] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0078] The embodiment of the present invention provides a visual-inertial semi-dense reconstruction method, and the execution subject of the visual-inertial semi-dense reconstruction method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the visual-inertial semi-dense reconstruction method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0079] Embodiment 1
[0080] See also Figure 1 FIG. 1 is a flow chart of a visual inertial semi-dense reconstruction method according to an embodiment of the present invention. Figure 1 The visual-inertial semi-dense reconstruction method described in includes:
[0081] S1. Acquire a submerged sea exploration image in the visual front end of a visual inertial SLAM system, calculate the pixel gap between a pixel square in the submerged sea exploration image and a neighboring pixel square of the pixel square, construct a square quadtree of the submerged sea exploration image based on the pixel gap, and select a minimum square from the square quadtree.
[0082] In an embodiment of the present invention, the visual inertial SLAM system refers to a system that uses a camera to complete the perception of the environment, wherein the full name of SLAM in English is Simultaneous Localization and Mapping, which is called Simultaneous Positioning and Map Creation in Chinese. The functions of the visual inertial SLAM system include acquiring images, extracting features from images, constructing maps based on the extracted features, updating the map constructed in the previous step according to subsequent motion trajectories, determining the current position according to the constructed map and the robot's motion trajectory, and querying matching buildings in the constructed map according to the buildings passed by the current path.
[0083] See also Figure 2 As shown, an embodiment of the present invention Figure 1 A functional schematic diagram of a visual-inertial SLAM system using a visual-inertial semi-dense reconstruction method is provided. Figure 2 In the software, IMU stands for inertial sensor, which is mainly used to detect and measure data such as acceleration and rotational motion.
[0084] Furthermore, the embodiment of the present invention calculates the pixel gap between the pixel grid in the submerged sea exploration image and the neighboring pixel grid of the pixel grid, so as to divide the image frame into blocks using a quadtree strategy, so that pixels in the same block have similar pixel values, and the pixel values in the leaf node, that is, the smallest block, are obviously different from those in other adjacent blocks, have a high image gradient, and can meet the requirements of three-dimensional reconstruction.
[0085] In one embodiment of the present invention, the step of calculating the pixel difference between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid comprises: dividing the pixel grid in the submerged sea exploration image; and calculating the pixel difference between the pixel grid and the neighboring pixel grid of the pixel grid using the following formula:
[0086]
[0087] Wherein, β represents the pixel difference, x represents the pixel value of the central pixel point in the pixel grid, Represents the pixel mean of the adjacent pixels in the four directions of the central pixel in the pixel grid.
[0088] In one embodiment of the present invention, constructing a grid quadtree of the submerged sea exploration image based on the pixel difference includes: when the pixel difference is greater than a preset threshold, dividing the submerged sea exploration image into four grids with a central pixel point in the pixel grid corresponding to the pixel difference as the center, and using the four grids as secondary quadtree nodes; when the size of the four grids is not less than a preset size, performing multi-level grid division on the four grids to obtain multi-level grids, and using the multi-level grids as multi-level quadtree nodes; when the size of the multi-level grid is less than the preset size, using the multi-level grids as quadtree tree leaf nodes; and determining the grid quadtree based on the central pixel point in the pixel grid, the secondary quadtree node, the multi-level quadtree node, and the quadtree tree leaf nodes.
[0089] The preset threshold is set to 6, and the preset size is set to 4*4, which can also be set according to actual conditions.
[0090] See also Figure 3 As shown, an embodiment of the present invention Figure 1 A schematic diagram of a grid quadtree for a visual-inertial semi-dense reconstruction method is provided. Figure 3 In the example, each square represents a grid.
[0091] Optionally, the process of selecting the minimum square from the square quadtree is: taking the grid corresponding to the quadtree tree child node in the square quadtree as the minimum square.
[0092] S2. Identify the central pixel point of the minimum square and construct an epipolar segment of the central pixel point.
[0093] The embodiment of the present invention constructs an epipolar segment of the central pixel point so as to query the matching point of the central pixel point by adopting an epipolar search method.
[0094] In one embodiment of the present invention, constructing the epipolar segment of the central pixel point includes: obtaining a first visual point and a second visual point of the central pixel point; taking a position at which the distance from the central pixel point is a minimum as a starting point; constructing a depth range segment of the central pixel point from the starting point and extending from the first visual point to the position of the minimum value; identifying a visual interval from the second visual point to the depth range segment; and within the visual interval, querying a straight line segment parallel to the depth range segment, and taking the straight line segment as the epipolar segment.
[0095] See also Figure 4 As shown, an embodiment of the present invention Figure 1 A schematic diagram of the epipolar segments of a visual-inertial semi-dense reconstruction method is provided. Figure 4 In the figure, P1 represents the center pixel, O1 represents the camera visual angle, O2 represents the IMU visual angle, d represents the depth range, and l2 represents the epipolar line.
[0096] S3. When the number of pixel points included in the polar segment is less than a first preset number, a preset pyramid optical flow method is used to identify a first matching pixel point that matches the central pixel point, and a first matching point pair between the central pixel point and the first matching pixel point is obtained.
[0097] When the number of pixels contained in the epipolar segment is less than the first preset number, it means that the epipolar segment is short, and the number of matching points of the central pixel point queried by the epipolar search method will be small. Therefore, the pyramid optical flow method is used to query the matching points of the central pixel point.
[0098] The first preset number is set to 2, and can also be set according to actual conditions.
[0099] Optionally, the method of using a preset pyramid optical flow method to identify a first matching pixel point that matches the central pixel point includes: first, constructing a pyramid by continuously reducing the resolution of the original image composed of the central pixel point, and each layer is a reduced version of the original image; second, in each layer of the pyramid, using some feature point extraction algorithms (such as SIFT, Harris, etc.) to find some stable and representative image feature points; in the image pyramid of two adjacent layers, using some feature point matching algorithms (such as LK algorithm) to match similar feature point pairs.
[0100] S4. When the number of pixel points contained in the polar segment is not less than the first preset number and less than the second preset number, identify a second matching pixel point that matches the central pixel point from the polar segment to obtain a second matching point pair between the central pixel point and the second matching pixel point.
[0101] When the number of pixel points included in the polar line segment is not less than the first preset number and less than the second preset number, it means that the number of pixel points included in the polar line segment is moderate, and the matching point of the central pixel point can be queried by the polar line search method.
[0102] Among them, the second preset number is set to 70.
[0103] In one embodiment of the present invention, the identifying of a second matching pixel point that matches the central pixel point from the polar segment includes: collecting pixel points contained in the polar segment; calculating the degree of similarity between the central pixel point and the pixel points contained in the polar segment; and when the degree of similarity is greater than a preset degree of similarity, taking the pixel point contained in the polar segment corresponding to the degree of similarity as the second matching pixel point.
[0104] The preset similarity level is set to 90%.
[0105] S5. When the number of pixel points contained in the polar segment is not less than the second preset number, a third matching pixel point matching the central pixel point is selected from the block where the polar segment is located to obtain a third matching point pair between the central pixel point and the third matching pixel point.
[0106] When the number of pixel points contained in the polar line segment is not less than the second preset number, the number of pixel points contained in the polar line segment is relatively large, and the process of comparing the similarity between each pixel point on the polar line and the central pixel point one by one is relatively cumbersome, and it is necessary to adopt a block matching method to increase the query speed of the block matching points.
[0107] In one embodiment of the present invention, selecting a third matching pixel point that matches the central pixel point from the block where the epipolar segment is located includes: selecting a first block from a neighborhood of the central pixel point, and extracting a second block of the same size as the first block from the block where the epipolar segment is located; and calculating a difference value between the first block and the second block using the following formula:
[0108] S(A,B) SSD =∑ i,j (A(i,j)-B(i,j)) 2
[0109] Among them, S(A,B)SSD represents the difference between the first block and the second block, A(i,j) represents the gray value of the first block minus the mean of each small block, (i,j) represents the coordinates in the block, and B(i,j) represents the gray value of the second block minus the mean of each small block;
[0110] When the difference value is less than a preset difference value, a center pixel point in the second block corresponding to the difference value is used as the third matching pixel point.
[0111] Wherein, the preset difference value is set to 0.5.
[0112] S6. Based on the pixel motion information of the submersible sea exploration image in the visual-inertial SLAM system, perform depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, and splice each analysis depth in the analysis depths to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
[0113] The embodiment of the present invention performs depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair based on the pixel motion information of the submersible exploration image in the visual-inertial SLAM system, so as to achieve a good semi-dense reconstruction effect on the VI-SLAM system, and use the camera motion to estimate the spatial position of the feature point. With the assistance of the front-end false matching elimination algorithm IM, the visual-inertial SLAM has obtained relatively accurate motion information. Therefore, the matching point pairs obtained by the polar line search and block matching strategy can be estimated in depth with the help of this motion information. For the pixels obtained in the monocular system, the depth information of the pixels cannot be solved by relying solely on one image frame, so it is necessary to estimate it through observations under different perspectives, that is, to use the triangulation method to estimate the depth information.
[0114] The analysis depth refers to the 3D position information of the central pixel point.
[0115] In one embodiment of the present invention, the pixel point motion information of the submersible exploration image in the visual inertial SLAM system is used to perform depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, including: calculating the depth interval of the central pixel point using the following formula:
[0116]
[0117]
[0118] Wherein, (s1, s2) represents the depth interval, s1 represents the depth interval corresponding to the central pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, s2 represents the depth interval corresponding to the matching pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, the matrix formed by R and t represents the transformation matrix from the world coordinate system to the camera coordinate system, x1 represents the coordinates of the central pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, and x2 represents the coordinates of the matching pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair;
[0119] Based on the depth interval, coordinate transformation is performed on the coordinates of the central pixel point in the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point.
[0120] The depth interval has a similar meaning to the depth range segment mentioned above.
[0121] See also Figure 5 As shown, an embodiment of the present invention Figure 1 A schematic diagram of the depth range of a visual-inertial semi-dense reconstruction method is provided. Figure 5 In the example, the coordinates of P can be calculated based on the depth interval of P1 and the depth interval of P2, and the coordinates of P are the analysis depth.
[0122] Optionally, the process of splicing each analysis depth in the analysis depths is to splice the analysis depths according to timestamps to obtain a final semi-dense reconstruction result of the scene.
[0123] It can be seen that the embodiment of the present invention first calculates the pixel gap between the pixel grid in the submersible sea exploration image and the neighboring pixel grid of the pixel grid, so as to divide the image frame into blocks using a quadtree strategy, so that pixels in the same block have similar pixel values, and the pixel values in the leaf node, that is, the smallest block, are obviously different from those in other adjacent blocks, and have a high image gradient, which can meet the requirements of three-dimensional reconstruction. Secondly, the embodiment of the present invention constructs the polar line segment of the central pixel point, so as to query the matching point of the central pixel point by using the polar line search method. Furthermore, the embodiment of the present invention uses the pixel point motion information of the submersible sea exploration image in the visual inertial SLAM system, The first matching point pair, the second matching point pair, and the third matching point pair are subjected to depth analysis to achieve a good semi-dense reconstruction effect on the VI-SLAM system. The spatial position of the feature points is estimated by using the camera motion. With the assistance of the front-end false matching elimination algorithm IM, the visual-inertial SLAM has obtained relatively accurate motion information. Therefore, the matching point pairs obtained by the polar line search and block matching strategies can be used with the help of these motion information to perform depth estimation. For the pixels obtained in the monocular system, the depth information of the pixels cannot be solved by relying solely on one image frame. Therefore, it is necessary to estimate the depth information by observing from different perspectives, that is, to use the triangulation method to estimate the depth information. Therefore, a visual-inertial semi-dense reconstruction method proposed in an embodiment of the present invention can realize a semi-dense scene reconstruction method that optimizes the old semi-dense scene reconstruction algorithm and is suitable for deep-sea robots.
[0124] Embodiment 2
[0125] In order to more clearly understand the present invention, a second embodiment is used below to further explain the present invention's embodiment of calculating the pixel gap between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid, and constructing a grid quadtree of the submerged sea exploration image based on the pixel gap.
[0126] The present invention proposes a visual-inertial semi-dense reconstruction method, comprising the following steps:
[0127] The embodiment of the present invention calculates the pixel gap between the pixel grid in the submerged sea exploration image and the neighboring pixel grid of the pixel grid, so as to divide the image frame into blocks using a quadtree strategy, so that pixels in the same block have similar pixel values, and the pixel values in the leaf node, that is, the smallest block, are obviously different from those in other adjacent blocks, have a high image gradient, and can meet the requirements of three-dimensional reconstruction.
[0128] In one embodiment of the present invention, the step of calculating the pixel difference between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid comprises: dividing the pixel grid in the submerged sea exploration image; and calculating the pixel difference between the pixel grid and the neighboring pixel grid of the pixel grid using the following formula:
[0129]
[0130] Wherein, β represents the pixel difference, x represents the pixel value of the central pixel point in the pixel grid, Represents the pixel mean of the adjacent pixels in the four directions of the central pixel in the pixel grid.
[0131] In one embodiment of the present invention, constructing a grid quadtree of the submerged sea exploration image based on the pixel difference includes: when the pixel difference is greater than a preset threshold, dividing the submerged sea exploration image into four grids with a central pixel point in the pixel grid corresponding to the pixel difference as the center, and using the four grids as secondary quadtree nodes; when the size of the four grids is not less than a preset size, performing multi-level grid division on the four grids to obtain multi-level grids, and using the multi-level grids as multi-level quadtree nodes; when the size of the multi-level grid is less than the preset size, using the multi-level grids as quadtree tree leaf nodes; and determining the grid quadtree based on the central pixel point in the pixel grid, the secondary quadtree node, the multi-level quadtree node, and the quadtree tree leaf nodes.
[0132] The preset threshold is set to 6, and the preset size is set to 4*4, which can also be set according to actual conditions.
[0133] Embodiment 3
[0134] like Figure 6 , which is a functional module diagram of the visual-inertial semi-dense reconstruction device of the present invention.
[0135] The visual inertial semi-dense reconstruction device 600 of the present invention can be installed in an electronic device. According to the functions to be implemented, the visual inertial semi-dense reconstruction device can include a grid selection module 601, an epipolar construction module 602, a first recognition module 603, a second recognition module 604, a third selection module 605 and a depth stitching module 606. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0136] In the embodiment of the present invention, the functions of each module / unit are as follows:
[0137] The grid selection module 601 is used to collect the underwater exploration image in the visual front end of the visual inertial SLAM system, calculate the pixel difference between the pixel grid in the underwater exploration image and the neighboring pixel grid of the pixel grid, construct a grid quadtree of the underwater exploration image based on the pixel difference, and select the minimum grid from the grid quadtree;
[0138] The epipolar line construction module 602 is used to identify the central pixel point of the minimum square and construct the epipolar line segment of the central pixel point;
[0139] The first recognition module 603 is used to identify a first matching pixel point matching the central pixel point by using a preset pyramid optical flow method when the number of pixel points included in the epipolar segment is less than a first preset number, so as to obtain a first matching point pair between the central pixel point and the first matching pixel point;
[0140] The second identification module 604 is used to identify a second matching pixel point that matches the central pixel point from the epipolar segment when the number of pixel points included in the epipolar segment is not less than the first preset number and less than a second preset number, so as to obtain a second matching point pair between the central pixel point and the second matching pixel point;
[0141] The third selection module 605 is used to select a third matching pixel point matching the central pixel point from the block where the epipolar segment is located when the number of pixel points included in the epipolar segment is not less than the second preset number, to obtain a third matching point pair between the central pixel point and the third matching pixel point;
[0142] The depth stitching module 606 is used to perform depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, obtain the analysis depth of the central pixel point, and stitch each analysis depth in the analysis depths to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
[0143] In detail, each module in the visual inertial semi-dense reconstruction device 600 in the embodiment of the present invention is used in the same manner as described above. Figure 1 The visual-inertial semi-dense reconstruction method described in is the same technical means and can produce the same technical effects, so it will not be repeated here.
[0144] Embodiment 4
[0145] like Figure 7 , which is a schematic diagram of the structure of an electronic device for implementing the visual-inertial semi-dense reconstruction method of the present invention.
[0146] The electronic device may include a processor 70 , a memory 71 , a communication bus 72 , and a communication interface 73 , and may also include a computer program stored in the memory 71 and executable on the processor 70 , such as a visual-inertial semi-dense reconstruction program.
[0147] In some embodiments, the processor 70 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 70 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 71 (for example, executing a visual inertial semi-dense reconstruction program, etc.), and calls data stored in the memory 71 to execute various functions of the electronic device and process data.
[0148] The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 71 may be an internal storage unit of an electronic device in some embodiments, such as a mobile hard disk of the electronic device. The memory 71 may also be an external storage device of an electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 71 may also include both an internal storage unit of the electronic device and an external storage device. The memory 71 may not only be used to store application software and various types of data installed in the electronic device, such as the code of the database configuration connection program, but also be used to temporarily store data that has been output or is to be output.
[0149] The communication bus 72 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 71 and at least one processor 70, etc.
[0150] The communication interface 73 is used for communication between the above-mentioned electronic device 7 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0151] Figure 7 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0152] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 70 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0153] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.
[0154] The database configuration connection program stored in the memory 71 in the electronic device is a combination of multiple computer programs. When running in the processor 70, it can achieve:
[0155] Collecting a submerged sea exploration image in a visual front end of a visual inertial SLAM system, calculating a pixel difference between a pixel square in the submerged sea exploration image and a neighboring pixel square of the pixel square, constructing a square quadtree of the submerged sea exploration image based on the pixel difference, and selecting a minimum square from the square quadtree;
[0156] Identify the central pixel point of the minimum square and construct an epipolar segment of the central pixel point;
[0157] When the number of pixel points included in the epipolar segment is less than a first preset number, a first matching pixel point matching the central pixel point is identified by using a preset pyramid optical flow method to obtain a first matching point pair between the central pixel point and the first matching pixel point;
[0158] When the number of pixel points included in the epipolar segment is not less than the first preset number and less than the second preset number, identifying a second matching pixel point that matches the central pixel point from the epipolar segment, and obtaining a second matching point pair between the central pixel point and the second matching pixel point;
[0159] When the number of pixel points included in the epipolar segment is not less than the second preset number, a third matching pixel point matching the central pixel point is selected from the block where the epipolar segment is located, to obtain a third matching point pair between the central pixel point and the third matching pixel point;
[0160] Based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, depth analysis is performed on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, and each analysis depth of the analysis depths is spliced to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
[0161] Specifically, the specific implementation method of the processor 70 for the above-mentioned computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0162] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0163] The present invention further provides a storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0164] Collecting a submerged sea exploration image in a visual front end of a visual inertial SLAM system, calculating a pixel difference between a pixel square in the submerged sea exploration image and a neighboring pixel square of the pixel square, constructing a square quadtree of the submerged sea exploration image based on the pixel difference, and selecting a minimum square from the square quadtree;
[0165] Identify the central pixel point of the minimum square and construct an epipolar segment of the central pixel point;
[0166] When the number of pixel points included in the epipolar segment is less than a first preset number, a first matching pixel point matching the central pixel point is identified by using a preset pyramid optical flow method to obtain a first matching point pair between the central pixel point and the first matching pixel point;
[0167] When the number of pixel points included in the epipolar segment is not less than the first preset number and less than the second preset number, identifying a second matching pixel point that matches the central pixel point from the epipolar segment, and obtaining a second matching point pair between the central pixel point and the second matching pixel point;
[0168] When the number of pixel points included in the epipolar segment is not less than the second preset number, a third matching pixel point matching the central pixel point is selected from the block where the epipolar segment is located, to obtain a third matching point pair between the central pixel point and the third matching pixel point;
[0169] Based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, depth analysis is performed on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, and each analysis depth of the analysis depths is spliced to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
[0170] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0171] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0173] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0174] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0175] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0176] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A visual-inertial semi-dense reconstruction method, characterized in that: The following steps are involved: Collecting a submerged sea exploration image in a visual front end of a visual inertial SLAM system, calculating a pixel difference between a pixel square in the submerged sea exploration image and a neighboring pixel square of the pixel square, constructing a square quadtree of the submerged sea exploration image based on the pixel difference, and selecting a minimum square from the square quadtree; Identify the central pixel point of the minimum square and construct an epipolar segment of the central pixel point; When the number of pixel points included in the epipolar segment is less than a first preset number, a first matching pixel point matching the central pixel point is identified by using a preset pyramid optical flow method to obtain a first matching point pair between the central pixel point and the first matching pixel point; When the number of pixel points included in the epipolar segment is not less than the first preset number and less than the second preset number, identifying a second matching pixel point that matches the central pixel point from the epipolar segment, and obtaining a second matching point pair between the central pixel point and the second matching pixel point; When the number of pixel points included in the epipolar segment is not less than the second preset number, a third matching pixel point matching the central pixel point is selected from the block where the epipolar segment is located, to obtain a third matching point pair between the central pixel point and the third matching pixel point; Based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, depth analysis is performed on the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point, and each analysis depth of the analysis depths is spliced to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
2. The visual-inertial semi-dense reconstruction method according to claim 1, characterized in that: The step of calculating the pixel gap between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid comprises: Dividing pixel grids in the submerged sea exploration image; The pixel difference between the pixel grid and the neighboring pixel grid of the pixel grid is calculated using the following formula: Wherein, β represents the pixel difference, x represents the pixel value of the central pixel point in the pixel grid, Represents the pixel mean of the adjacent pixels in the four directions of the central pixel in the pixel grid.
3. The visual-inertial semi-dense reconstruction method according to claim 1, characterized in that: The step of constructing a grid quadtree of the submerged sea exploration image based on the pixel gap comprises: When the pixel difference is greater than a preset threshold, the submerged sea exploration image is divided into four grids with the central pixel point in the pixel grid corresponding to the pixel difference as the center, and the four grids are used as secondary quadtree nodes; When the size of the four grids is not less than a preset size, the four grids are divided into multiple levels of grids to obtain a multi-level grid, and the multi-level grid is used as a multi-level quadtree node; When the size of the multi-level grid is smaller than the preset size, using the multi-level grid as a quadtree leaf node; The grid quadtree is determined based on a central pixel point in the pixel grid, the secondary quadtree node, the multi-level quadtree node and the quadtree leaf node.
4. The visual-inertial semi-dense reconstruction method according to claim 1, characterized in that: The step of constructing the epipolar segment of the central pixel point comprises: Acquire a first visual point and a second visual point of the central pixel; The position where the distance from the central pixel is the minimum is taken as the starting point; Starting from the starting point and extending from the first visual point to the position direction of the minimum value, construct a depth range segment of the central pixel point; identifying a visual interval from the second visual point to the depth range segment; In the visual interval, a straight line segment parallel to the depth range segment is searched, and the straight line segment is used as the polar segment.
5. The visual-inertial semi-dense reconstruction method according to claim 1, characterized in that: The step of identifying a second matching pixel point that matches the central pixel point from the epipolar segment comprises: Collecting pixel points included in the epipolar segment; Calculating the similarity between the central pixel and the pixels included in the epipolar segment; When the similarity level is greater than a preset similarity level, the pixel points included in the epipolar segment corresponding to the similarity level are used as the second matching pixel points.
6. The visual-inertial semi-dense reconstruction method according to claim 1, characterized in that: The selecting a third matching pixel point that matches the central pixel point from the block where the epipolar segment is located includes: Select a first square from the neighborhood of the central pixel point, and extract a second square having the same size as the first square from the square where the epipolar segment is located; The difference between the first block and the second block is calculated using the following formula: S(A,B) SSD =∑ i,j (A(i,j)-B(i,j)) 2 Among them, S(A,B) SSD represents the difference between the first block and the second block, A(i,j) represents the gray value of the first block minus the mean of each small block, (i,j) represents the coordinates in the block, and B(i,j) represents the gray value of the second block minus the mean of each small block; When the difference value is less than a preset difference value, a center pixel point in the second block corresponding to the difference value is used as the third matching pixel point.
7. The visual-inertial semi-dense reconstruction method according to claim 1, characterized in that: The method of performing depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair based on the pixel point motion information of the submersible exploration image in the visual inertial SLAM system to obtain the analysis depth of the central pixel point includes: The depth interval of the central pixel is calculated using the following formula: Wherein, (s1, s2) represents the depth interval, s1 represents the depth interval corresponding to the central pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, s2 represents the depth interval corresponding to the matching pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, the matrix formed by R and t represents the transformation matrix from the world coordinate system to the camera coordinate system, x1 represents the coordinates of the central pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair, and x2 represents the coordinates of the matching pixel point in a certain matching point pair among the first matching point pair, the second matching point pair, and the third matching point pair; Based on the depth interval, coordinate transformation is performed on the coordinates of the central pixel point in the first matching point pair, the second matching point pair, and the third matching point pair to obtain the analysis depth of the central pixel point.
8. A visual-inertial semi-dense reconstruction device, characterized in that: The device comprises: A grid selection module is used to collect a submerged sea exploration image in the visual front end of the visual inertial SLAM system, calculate the pixel difference between a pixel grid in the submerged sea exploration image and a neighboring pixel grid of the pixel grid, construct a grid quadtree of the submerged sea exploration image based on the pixel difference, and select a minimum grid from the grid quadtree; An epipolar line construction module, used to identify the central pixel point of the minimum square and construct an epipolar line segment of the central pixel point; a first identification module, configured to identify a first matching pixel point that matches the central pixel point by using a preset pyramid optical flow method when the number of pixel points included in the epipolar segment is less than a first preset number, so as to obtain a first matching point pair between the central pixel point and the first matching pixel point; A second identification module is used to identify a second matching pixel point that matches the central pixel point from the epipolar segment when the number of pixel points included in the epipolar segment is not less than the first preset number and less than a second preset number, so as to obtain a second matching point pair between the central pixel point and the second matching pixel point; A third selection module is used to select a third matching pixel point that matches the central pixel point from the block where the polar segment is located when the number of pixel points included in the polar segment is not less than the second preset number, so as to obtain a third matching point pair between the central pixel point and the third matching pixel point; A depth stitching module is used to perform depth analysis on the first matching point pair, the second matching point pair, and the third matching point pair based on the pixel motion information of the submersible sea exploration image in the visual inertial SLAM system, obtain the analysis depth of the central pixel point, and stitch each of the analysis depths to obtain a semi-dense reconstruction result of the scene of the submersible sea exploration image.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the visual-inertial semi-dense reconstruction method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the visual-inertial semi-dense reconstruction method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Monocular vision-based dense point cloud reconstruction method and system for triangulation measurement depth
CN111798505A
Depth value determination method and device, electronic equipment and storage medium
CN112085842A
Visual synchronous localization and mapping method and system
CN116152337A
Densifying sparse depth maps
US11238604B1
Depth map acquisition method and device, and computer storage medium
WO2021035627A1