A closed-loop detection method, device, electronic device and storage medium

By calculating the percentage of position deviation between closed-loop frames and optimizing, the problem of high error detection rate of closed-loop detection in the prior art is solved, and high-precision map construction is realized in weak texture or repeated texture scenarios.

CN113345006BActive Publication Date: 2025-02-18SHICHEN INFORMATION TECH SHANGHAI CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110470688.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-28
Publication Date
2025-02-18
Estimated Expiration
2041-04-28

AI Technical Summary

Technical Problem

The prior art has a high closed-loop detection error rate in weak texture or repeated texture scenarios, resulting in low accuracy of the built map.

Method used

By calculating the percentage of position deviation between two closed-loop frames and determining whether to perform closed-loop optimization based on this percentage, the potential error closed-loop is automatically eliminated.

Benefits of technology

Accurate and efficient closed-loop detection in weak texture or repeated texture scenarios are achieved, the error closed-loop detection rate is reduced, and the high accuracy of the map is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113345006B_ABST
    Figure CN113345006B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a closed-loop detection method, device, electronic device and storage medium. In one method, it includes collecting an input image sequence; performing closed-loop detection to obtain two closed-loop frames A and B; calculating the position deviation percentage between the two closed-loop frames A and B, and judging whether to perform closed-loop optimization based on the percentage. By calculating the position deviation percentage between the two closed-loop frames, it is judged whether to perform closed-loop optimization, and potential erroneous closed loops can be automatically eliminated, and the requirements for application scenarios and equipment are very low, saving manpower and material resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a closed-loop detection method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of camera technology, the ability of cameras to perceive the world is getting stronger and stronger, and there are more and more technologies that integrate 3D high-precision map capabilities, spatial computing capabilities, strong environmental understanding capabilities, and virtual-reality fusion capabilities. In the fields of augmented reality, virtual reality, navigation, mobile robots, drones, and unmanned driving, obtaining high-precision three-dimensional reconstructed maps is a very important requirement. Existing technologies usually use three-dimensional modeling of space or buildings to create 3D maps. The 3D maps created based on three-dimensional modeling can preserve the shape, position, angle, features, and semantic information of objects in real three-dimensional space. In order to improve the accuracy of three-dimensional reconstruction, closed-loop detection and optimization are often required to eliminate cumulative drift in order to create high-precision maps.

[0003] The closed-loop detection methods in the prior art usually rely on vision, and judge the similarity between images through the features or semantics of the images. If the judgment conditions are met, it is considered to be a closed loop. For example, patent CN201710350174.4 proposes a visual SLAM closed-loop detection method based on deep neural networks, and patent CN201910411429.2 proposes a visual SLAM closed-loop detection method based on target detection. However, the closed-loop detection method based on vision will have a high probability of error under the texture of repeated scenes, such as the left and right channels with exactly the same layout in the airport, the two-story parking lot with exactly the same layout, two buildings with exactly the same appearance, two identical stores in the shopping mall, etc. It is difficult, high-risk, and computationally intensive to distinguish two scenes with the same layout based on vision. Summary of the invention

[0004] The embodiments of the present application provide a closed-loop detection method, device, electronic device and storage medium to implement an accurate and efficient closed-loop detection method to solve the technical problem that the false detection rate of closed-loop detection in weak texture or repeated texture scenes is high, resulting in low accuracy of the constructed map.

[0005] In a first aspect of the present invention, a closed-loop detection method is provided, which is characterized by comprising: S1: acquiring an input image sequence; S2: performing closed-loop detection to obtain two closed-loop frames A and B; S3: calculating the position deviation percentage between the two closed-loop frames A and B, and judging whether to perform closed-loop optimization based on the percentage.

[0006] Further preferably, the two closed-loop frames A and B are two image frames whose similarity is greater than or equal to a first similarity, and image frame B is located after image frame A in time sequence.

[0007] Further preferably, the position deviation percentage between two closed-loop frames is calculated, including: S31: calculating the position deviation tab between two closed-loop frames A and B; S32: calculating the cumulative path total length Tab of each frame image from frame A to frame B; S33: the position deviation percentage is set to the percentage tab / Tab between tab and Tab.

[0008] Further preferably, the position deviation tab between the two closed-loop frames A and B is calculated, including: S311: obtaining the current position Ta of image A; S312: obtaining the current position Tb of image B; S313: calculating the position deviation tab between image A and image B = abs(Ta-Tb).

[0009] Further preferably, the cumulative path total length Tab of each frame image between frame A and frame B is calculated, including: S321: acquiring each frame image C1...Cn between image A and image B, and obtaining a time-sequentially arranged image set {A, C1,..., Cn, B}, where n is the total number of image frames between image A and image B; S322: calculating the position deviation between each two adjacent frames in the image set {A, C1,..., Cn, B}; S323: accumulating the position deviation between each two adjacent frames to obtain the cumulative path total length Tab.

[0010] Further preferably, judging whether to perform closed-loop optimization based on the percentage includes: calculating the position deviation percentage between two closed-loop frames, and when the percentage is less than a threshold value th, judging that the closed-loop detection is correct, and performing closed-loop optimization; otherwise, judging that the closed-loop detection is wrong, and not performing closed-loop optimization.

[0011] In a second aspect of the present invention, a closed-loop detection device is provided, comprising: an image acquisition module for acquiring an input image sequence; a closed-loop detection module for performing closed-loop detection to obtain two closed-loop frames A and B; a closed-loop judgment module for calculating the position deviation percentage between the two closed-loop frames A and B, and judging whether to perform closed-loop optimization based on the percentage.

[0012] Further preferably, the two closed-loop frames A and B are two image frames whose similarity is greater than or equal to a first similarity, and image frame B is located after image frame A in time sequence.

[0013] Further preferably, the closed-loop judgment module includes: a position deviation calculation module: used to calculate the position deviation tab between two closed-loop frames A and B; a cumulative path calculation module: used to calculate the total cumulative path length Tab of each frame image from frame A to frame B; a percentage calculation module: used to set the position deviation percentage to the percentage tab / Tab between tab and Tab.

[0014] Further preferably, the position deviation calculation module includes: a current position acquisition submodule: used to obtain the current positions Ta and Tb of image A and image B respectively; a position deviation calculation submodule: used to calculate the position deviation tab between image A and image B = abs(Ta-Tb).

[0015] Further preferably, the cumulative path calculation module includes: an image sequence acquisition submodule: used to acquire each frame image C1...Cn between image A and image B, and obtain a time-sequentially arranged image set {A, C1,..., Cn, B}, where n is the total number of image frames between image A and image B; an adjacent frame deviation calculation submodule: used to calculate the position deviation between each two adjacent frames in the image set {A, C1,..., Cn, B}; and a cumulative path calculation submodule: used to accumulate the position deviation between each two adjacent frames to obtain the cumulative path total length Tab.

[0016] Further preferably, the closed-loop judgment module further includes: calculating the position deviation percentage between the two closed-loop frames, when the percentage is less than the threshold th, the closed-loop detection is judged to be correct, and closed-loop optimization is performed; otherwise, the closed-loop detection is judged to be wrong, and closed-loop optimization is not performed.

[0017] In a third aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the method described in the first aspect.

[0018] In a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and the program is loaded and executed by a processor to implement the method according to the first aspect.

[0019] The above closed-loop detection method can automatically eliminate potential erroneous closed loops by calculating the position deviation percentage between two closed-loop frames to determine whether to perform closed-loop optimization. It has very low requirements for application scenarios and equipment, saving manpower and material resources. It can reduce the false closed-loop detection rate in scenes with weak or repeated textures and ensure the accuracy of the constructed map. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flow chart of a closed-loop detection method provided in this application;

[0021] Figure 2 A flow chart for calculating the position deviation percentage between two closed-loop frames provided in this application;

[0022] Figure 3 A flow chart for calculating the position deviation between two closed-loop frames provided in this application;

[0023] Figure 4 A flowchart for calculating the total cumulative path length between two closed-loop frames provided in an embodiment of the present application;

[0024] Figure 5 A schematic diagram of a closed-loop detection scenario provided in an embodiment of the present application.

[0025] Figure 6 A schematic diagram of the structure of a closed-loop detection device provided in an embodiment of the present application;

[0026] Figure 7 A schematic diagram of the specific structure of a closed-loop judgment module provided in an embodiment of the present application;

[0027] Figure 8 A schematic diagram of the specific structure of a position deviation calculation module provided in an embodiment of the present application.

[0028] Fig. 9 A schematic diagram of the specific structure of a cumulative path calculation module provided in an embodiment of the present application.

[0029] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0031] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. It should also be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0032] For ease of understanding, the specific implementation of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings and other implementations can be obtained based on these accompanying drawings without creative work.

[0033] Embodiment 1

[0034] The first embodiment of the present invention will be described in detail below with reference to the accompanying drawings. Figure 1 The flowchart of a closed-loop detection method of the present invention is shown. Specifically, it includes:

[0035] S1: Collect input image sequence.

[0036] Specifically, in this embodiment, the input image sequence may be an image sequence captured by a robot through a camera or the like in an SFM or SLAM system, and the image sequence is a plurality of image frames that are sequentially connected in time.

[0037] S2: Perform closed-loop detection to obtain two closed-loop frames A and B;

[0038] Specifically, in this embodiment, closed loop detection can adopt closed loop detection methods known in the prior art, such as closed loop detection methods based on similarity of continuous key frames, closed loop detection methods based on deep learning matching images to determine similarity, closed loop detection methods based on semantics, closed loop detection methods based on distance judgment of candidates and then calculating similarity, etc. This embodiment does not make specific limitations on this.

[0039] After performing closed-loop detection using the closed-loop detection method of the prior art, two closed-loop frames A and B are obtained. Specifically, how to obtain the two closed-loop frames can be determined based on the closed-loop detection method adopted. When performing closed-loop detection based on a similarity judgment method, the two closed-loop frames A and B may be two image frames in the image sequence whose similarity is greater than or equal to the first similarity. This embodiment does not specifically limit how to obtain the two closed-loop frames A and B, as long as the frames A and B can be judged to be closed-loop according to the closed-loop detection method adopted. And as is well known in the art, although the closed-loop frames A and B are collected from the same location, since the postures of the two frames of images are calculated by SFM or SLAM, there must be a certain deviation between the two closed-loop frames A and B obtained.

[0040] S3: Calculate the position deviation percentage between the two closed-loop frames A and B, and determine whether to perform closed-loop optimization based on the percentage.

[0041] like Figure 2 The flowchart of an embodiment of the present invention for calculating the position deviation percentage between two closed-loop frames is shown. Specifically, it includes:

[0042] S31: Calculate the position deviation tab between two closed-loop frames A and B;

[0043] Specifically, for SFM or SLAM systems, each frame of an image has a pose, which includes the position of the frame when it was taken and the direction of the camera. Then, based on the position data of each frame of the image, the position deviation between two frames of images can be obtained. Figure 3 The flowchart of an embodiment of the present invention for calculating the position deviation between two closed-loop frames is shown.

[0044] S311: Obtain the current position Ta of image A;

[0045] Specifically, the current position Ta is the position of the image A obtained by the corresponding algorithm of the SFM or SLAM system.

[0046] S312: Obtain the current position Tb of image B;

[0047] Specifically, the current position Tb is the position of the image B obtained by the corresponding algorithm of the SFM or SLAM system.

[0048] S313: Calculate the positional deviation tab=abs(Ta-Tb) between image A and image B.

[0049] Figure 5 A schematic diagram of an embodiment of the closed-loop detection scene of the present invention is shown. In the figure, each triangle represents each captured image frame, two black triangles represent two closed-loop frames A and B, and the line between the two triangles represents the distance between the two frames. In the figure, the two closed-loop frames A and B are images captured by the camera at the same position. However, since the positions of each frame shown in the figure are obtained by a corresponding algorithm, there is a certain position deviation between the two image frames shown.

[0050] according to Figure 5 As shown, the position deviation tab between the two closed-loop frames A and B is the distance between frame A and frame B, that is, the dotted line distance between the two black triangles.

[0051] S32: Calculate the total cumulative path length Tab of each frame image from frame A to frame B;

[0052] like Figure 4 The flowchart of an embodiment of calculating the total cumulative path length between two closed-loop frames of the present invention is shown. Specifically, it includes:

[0053] S321: Acquire each frame of image C1…C between image A and image B n , and obtain a set of images {A, C1, ..., C n, B}, where n is the total number of image frames between image A and image B;

[0054] Specifically, Figure 5 As shown, each image frame between frame A and frame B is an image frame represented by a white triangle in the figure.

[0055] S322: Calculate the image set {A, C1, ..., C n , the position deviation between each two adjacent frames in B};

[0056] Specifically, Figure 5 As shown, the position deviation between each adjacent frame is the distance shown by the solid line between the triangles in the figure, that is, the distance between the white triangles in the figure, the distance between the black triangle representing frame A and the next white triangle, and the distance between the black triangle representing frame B and the previous white triangle.

[0057] S323: Accumulate the position deviations between each two adjacent frames to obtain the accumulated path total length Tab.

[0058] Specifically, Figure 5 As shown, the total cumulative path length Tab between frame A and frame B is the sum of the solid lines between the triangles in the figure, that is, the sum of the distances of all solid lines except the dotted line between frame A and frame B in the figure.

[0059] S33: The position deviation percentage is set to the percentage between tab and Tab, tab / Tab.

[0060] In some embodiments, determining whether to perform closed-loop optimization based on the percentage includes: calculating the position deviation percentage tab / Tab between the two closed-loop frames A and B; when the percentage tab / Tab is less than a threshold value th, the closed-loop detection is determined to be correct, and closed-loop optimization is performed; otherwise, the closed-loop detection is determined to be incorrect, and closed-loop optimization is not performed.

[0061] In some embodiments, the threshold th can be obtained by testing a large number of scenes. For example, m tests can be performed to calculate the deviation percentage tab between images captured at two completely overlapping positions (i.e., images A and B) n / Tab n , where n = 1…m represents the number of trials performed. Calculate the average value of the deviation percentage obtained from m trials, i.e. (tab / Tab) avg =(tab1 / Tab1+…+tab m / Tab m ) / m, the threshold th can be set to twice the average value, that is, th = 2*(tab / Tab) avg .

[0062] Embodiment 2

[0063] The second embodiment of the present invention will be described in detail below with reference to the accompanying drawings. Figure 6 A closed-loop detection device 600 of the present invention is shown. Specifically comprising:

[0064] An image acquisition module, used for acquiring an input image sequence;

[0065] Specifically, in this embodiment, the input image sequence may be an image sequence captured by a robot through a camera or the like in an SFM or SLAM system, and the image sequence is a plurality of image frames that are sequentially connected in time.

[0066] A closed-loop detection module is used to perform closed-loop detection to obtain two closed-loop frames A and B;

[0067] Specifically, in this embodiment, closed loop detection can adopt closed loop detection methods known in the prior art, such as closed loop detection methods based on similarity of continuous key frames, closed loop detection methods based on deep learning matching images to determine similarity, closed loop detection methods based on semantics, closed loop detection methods based on distance judgment of candidates and then calculating similarity, etc. This embodiment does not make specific limitations on this.

[0068] In some embodiments, after closed-loop detection is performed using a closed-loop detection method in the prior art, two closed-loop frames A and B are obtained. Specifically, how to obtain the two closed-loop frames can be determined based on the closed-loop detection method adopted. When closed-loop detection is performed based on a similarity judgment method, the two closed-loop frames A and B may be two image frames in the image sequence whose similarity is greater than or equal to the first similarity. This embodiment does not specifically limit how to obtain the two closed-loop frames A and B, as long as the frames A and B can be judged to be closed-loop according to the closed-loop detection method adopted. And as is well known in the art, although the closed-loop frames A and B are collected from the same location, since the postures of the two frames of images are calculated by SFM or SLAM, there must be a certain deviation between the two closed-loop frames A and B obtained.

[0069] The closed-loop judgment module is used to calculate the position deviation percentage between the two closed-loop frames A and B, and judge whether to perform closed-loop optimization based on the percentage.

[0070] like Figure 7 An embodiment of the closed-loop judgment module of the present invention is shown. Specifically, it includes:

[0071] Position deviation calculation module: used to calculate the position deviation tab between two closed-loop frames A and B; specifically, for SFM or SLAM systems, each frame image has a pose, which includes the position of the frame image when it was taken and the direction of the camera. Then, based on the position data of each frame image, the position deviation between the two frames of image can be obtained.

[0072] Cumulative path calculation module: used to calculate the cumulative path total length Tab of each frame image from frame A to frame B; specifically, the position deviation percentage is the percentage between the position deviation between the two closed-loop frames and the cumulative position deviation between the two closed-loop frames.

[0073] Percentage calculation module: used to set the position deviation percentage to the percentage between tab and Tab, tab / Tab.

[0074] In some embodiments, the closed-loop judgment module also includes a closed-loop judgment submodule: used to receive the percentage tab / Tab calculated by the percentage calculation module. When the percentage tab / Tab is less than the threshold th, the closed-loop detection is judged to be correct and closed-loop optimization is performed; otherwise, the closed-loop detection is judged to be wrong and closed-loop optimization is not performed.

[0075] In some embodiments, the threshold th can be obtained by testing a large number of scenes. Specifically, m tests can be performed to calculate the deviation percentage tab between the images captured at two completely overlapping positions (i.e., images A and B) n / Tab n , where n = 1…m, represents the number of tests performed. Calculate the average deviation percentage obtained from m tests, i.e. (tab / Tab) avg =(tab1 / Tab1+…+tab m / Tab m ) / m, the threshold th can be set to twice the average value, that is, th = 2*(tab / Tab) avg .

[0076] Figure 8 An embodiment of the position deviation calculation module of the present invention is shown. It includes a current position acquisition submodule and a position deviation calculation submodule, specifically:

[0077] Current position acquisition submodule: used to obtain the current positions Ta and Tb of image A and image B respectively;

[0078] Specifically, the current positions Ta and Tb are the positions of image A and image B obtained by the corresponding algorithm of the SFM or SLAM system;

[0079] Position deviation calculation submodule: used to calculate the position deviation tab=abs(Ta-Tb) between image A and image B based on the positions Ta and Tb acquired by the current position acquisition submodule;

[0080] Fig. 9 An embodiment of the cumulative path calculation module of the present invention is shown. It includes an image sequence acquisition submodule, an adjacent frame deviation calculation submodule and a cumulative path calculation submodule, specifically:

[0081] Image sequence acquisition submodule: used to acquire each frame of image C1...Cn between image A and image B, and obtain a set of images {A, C1,..., Cn, B} arranged in time sequence, where n is the total number of image frames between image A and image B;

[0082] Adjacent frame deviation calculation submodule: used to calculate the position deviation between every two adjacent frames in the image set {A, C1, ..., Cn, B};

[0083] Cumulative path calculation submodule: used to accumulate the position deviation between each two adjacent frames to obtain the cumulative path total length Tab.

[0084] Embodiment 3

[0085] The third embodiment of the present invention will be described in detail below with reference to the accompanying drawings. Fig.10 An electronic device 1000 of the present invention is shown. The electronic device 1000 may be a desktop computer, a notebook, a PDA, a tablet computer, a mobile phone, a human-computer interaction screen, or other devices. The electronic device 1000 at least includes: a memory 1001 and a processor 1002. The memory 1001 is used to store program instructions for closed-loop detection based on position deviation percentage in any of the above embodiments. The processor 1002 is used to execute program instructions to enable the electronic device 1000 to implement the above closed-loop detection algorithm.

[0086] In some embodiments, the memory 1001 may be an internal storage unit of the electronic device 1000, such as a hard disk of the electronic device 1000. In other embodiments, the memory 1001 may also be an external storage device of the electronic device 1000, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD), a flash card, etc. equipped on the electronic device 1000. Further, the memory 1001 may also include both an internal storage unit of the electronic device 1000 and an external storage device.

[0087] In some embodiments, the processor 1002 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run program instructions or process data stored in the memory 1001. Specifically, the processor 1002 executes program instructions of the closed-loop detection algorithm to control the electronic device 1000 to implement the closed-loop detection algorithm.

[0088] Furthermore, the electronic device 1000 may also include a bus 1003 which may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0089] Furthermore, the electronic device 1000 may also include a display component 1004. The display component 1004 may be an LED (Light Emitting Diode) display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light Emitting Diode) touch device, etc. The display component 1004 may also be appropriately referred to as a display device or a display unit, which is used to display information processed in the electronic device 1000 and to display a visual user interface.

[0090] Furthermore, the electronic device 1000 may also include a communication component 1005, which may optionally include a wired communication component and / or a wireless communication component (such as a WI-FI communication component, a Bluetooth communication component, etc.), which is generally used to establish a communication connection between the electronic device 1000 and other electronic devices.

[0091] Fig.10 Only the electronic device 1000 having components 1001-1005 and program instructions for implementing the closed-loop detection algorithm is shown, and those skilled in the art will appreciate that Fig.10 The structure shown does not constitute a limitation on the electronic device 1000 , and the electronic device 1000 may include fewer or more components than shown in the figure, or combine some components, or arrange the components differently.

[0092] Embodiment 4

[0093] According to one embodiment of the present invention, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores program instructions of the above-mentioned closed-loop detection algorithm that can be loaded and executed by a processor. Specifically, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present application. The aforementioned computer-readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program instructions.

[0094] In the embodiments provided in the present application, it should be understood that the disclosed device / electronic device / computer-readable storage medium and method can be implemented in other ways. Exemplarily, the device / electronic device embodiments described above are merely schematic. Exemplarily, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation. Exemplarily, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0095] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed with hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0096] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A closed-loop detection method, characterized in that: include: S1: collect input image sequence; S2: Perform closed-loop detection to obtain two closed-loop frames A and B; S3: Calculate the position deviation percentage between the two closed-loop frames A and B, and determine whether to perform closed-loop optimization based on the percentage, wherein the position deviation percentage is the ratio of the position deviation tab between the two closed-loop frames A and B to the cumulative path total length Tab of each frame image from frame A to frame B, and the cumulative path total length Tab is the sum of the position deviations between each two adjacent frames; Calculating the position deviation percentage between the two closed-loop frames A and B includes: S31: Calculate the position deviation tab between two closed-loop frames A and B; S32: Calculate the total cumulative path length Tab of each frame image from frame A to frame B, where the total cumulative path length Tab is the sum of position deviations between each two adjacent frames; S33: The position deviation percentage is set to the percentage between tab and Tab, tab / Tab.

2. The method according to claim 1, characterized in that: The two closed-loop frames A and B in S2 are two image frames whose similarity is greater than or equal to the first similarity, and the image frame B is located after the image frame A in time sequence.

3. The method according to claim 1, characterized in that In S31, calculating the position deviation tab between the two closed-loop frames A and B includes: S311: Obtain the current position Ta of image A; S312: Obtain the current position Tb of image B; S313: Calculate the positional deviation tab=abs(Ta-Tb) between image A and image B.

4. The method according to claim 1, characterized in that: In the step S32, the total cumulative path length Tab of each frame image from frame A to frame B is calculated, including: S321: Acquire each frame of image C1...Cn between image A and image B to obtain a set of images {A, C1,..., Cn, B} arranged in time sequence, where n is the total number of image frames between image A and image B; S322: Calculate the position deviation between every two adjacent frames in the image set {A, C1, ..., Cn, B}; S323: Accumulate the position deviations between each two adjacent frames to obtain the accumulated path total length Tab.

5. The method according to any one of claims 1 to 4, characterized in that: In S3, judging whether to perform closed-loop optimization based on the percentage includes: calculating the position deviation percentage between two closed-loop frames, and when the percentage is less than a threshold value th, judging that the closed-loop detection is correct, and performing closed-loop optimization.

6. A closed-loop detection device, characterized in that: include: An image acquisition module, used for acquiring an input image sequence; A closed-loop detection module is used to perform closed-loop detection to obtain two closed-loop frames A and B; A closed-loop judgment module, used to calculate the position deviation percentage between the two closed-loop frames A and B, and judge whether to perform closed-loop optimization based on the percentage, wherein the position deviation percentage is the ratio of the position deviation tab between the two closed-loop frames A and B to the cumulative path total length Tab of each frame image from frame A to frame B, and the cumulative path total length Tab is the sum of the position deviations between each two adjacent frames; The closed-loop judgment module comprises: Position deviation calculation module: used to calculate the position deviation tab between two closed-loop frames A and B; Cumulative path calculation module: used to calculate the cumulative path total length Tab of each frame image from frame A to frame B, and the cumulative path total length Tab is the sum of the position deviations between each two adjacent frames; Percentage calculation module: used to set the position deviation percentage to the percentage between tab and Tab, tab / Tab.

7. The device according to claim 6, characterized in that The two closed-loop frames A and B are two image frames whose similarity is greater than or equal to a first similarity, and image frame B is located after image frame A in time sequence.

8. The device according to claim 6, characterized in that The position deviation calculation module comprises: Current position acquisition submodule: used to obtain the current positions Ta and Tb of image A and image B respectively; Position deviation calculation submodule: used to calculate the position deviation tab=abs(Ta-Tb) between image A and image B based on the positions Ta and Tb acquired by the current position acquisition submodule.

9. The device according to claim 6, characterized in that The cumulative path calculation module includes: Image sequence acquisition submodule: used to acquire each frame of image C1...Cn between image A and image B, and obtain a set of images {A, C1,..., Cn, B} arranged in time sequence, where n is the total number of image frames between image A and image B; Adjacent frame deviation calculation submodule: used to calculate the position deviation between every two adjacent frames in the image set {A, C1, ..., Cn, B}; Cumulative path calculation submodule: used to accumulate the position deviation between each two adjacent frames to obtain the cumulative path total length Tab.

10. The device according to any one of claims 6 to 9, characterized in that The closed-loop judgment module further includes: Closed-loop judgment submodule: used to receive the percentage tab / Tab calculated by the percentage calculation module. When the percentage is less than the threshold th, it is judged that the closed-loop detection is correct and the closed-loop optimization is performed.

11. An electronic device, characterized in that: include: one or more processors; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method according to any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Visual SLAM closed-loop detection method based on depth neural network

    CN107330357A

  • Visual SLAM closed-loop detection method based on target detection

    CN110110694A

  • Improved method of RGB-D-based SLAM algorithm

    CN104851094A

  • Feature point positioning method and device, reconstruction method and system, equipment and medium

    CN110443887A