Motor vehicle positioning and mapping method and device and computer readable storage medium

By extracting three-dimensional feature points, lines and planes from vehicle camera video images, we construct and optimize local scene maps, which solves the problem of inaccurate pose estimation when the Manhattan world assumption does not hold, improves positioning accuracy and map accuracy, and enhances the system stability.

CN118609079APending Publication Date: 2024-09-06SHENZHEN LONGHORN AUTOMOTIVE ELECTRONICS EQUIPCO
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410930162.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing vehicle positioning methods have inaccurate pose estimation when the Manhattan world assumption does not hold, and the local scene map error is large.

Method used

By extracting feature points, feature lines and feature planes of three-dimensional objects from video images collected by on-board cameras, a local scene map is constructed, and the inter-frame reprojection error and plane constraints are used to solve the initial pose, feature matching tracking and local BA optimization. Updated map to improve location accuracy.

Benefits of technology

It improves the accuracy of motor vehicle pose estimation and the accuracy and stability of local scene maps, reduces map errors, and enhances the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609079A
    Figure CN118609079A
Patent Text Reader

Abstract

The embodiment of the invention provides a motor vehicle positioning and mapping method and device and a computer readable storage medium. The method comprises the following steps: obtaining an image frame; extracting positioning features of the three-dimensional object from the image frame, wherein the positioning features comprise feature points, feature lines and feature planes; constructing a local scene map of the surrounding environment of the motor vehicle based on the positioning features; solving and obtaining the current initial pose of the motor vehicle based on the inter-frame re-projection error of the positioning features in the reference frame and the current image frame and the plane matching constraint of the feature plane in the local scene map and the feature plane in the current image frame; optimizing the initial pose to obtain the current accurate pose of the motor vehicle; judging whether the current image frame is a key frame based on a preset key frame judgment condition, and if so, updating the local scene map by adopting the positioning features in the current image frame; and carrying out local BA optimization on the updated local scene map. The embodiment of the invention can improve the positioning precision and reduce the map error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of motor vehicle positioning, and more particularly to a motor vehicle positioning and mapping method, device, and computer-readable storage medium. Background Art

[0002] At present, in order to realize intelligent assisted driving, vision-based SLAM (Simultaneous Localization and Mapping) technology is widely used in motor vehicles. Among them, a structured scene visual SLAM method based on improved point and line features is to estimate the posture of the motor vehicle by extracting the feature points and feature lines of three-dimensional objects in the structured scene; and in order to minimize the influence of drift, the structured environment characteristics are used to estimate the drift-free rotational motion between cameras through the Manhattan world coordinate system, and then estimate the translational motion by minimizing the derotation reprojection error function of the point, line and surface features, thereby optimizing the posture estimation of the motor vehicle.

[0003] However, the inventors found during the specific implementation that the above method for posture optimization is based on the Manhattan world assumption, which is not true in some cases. When the movement of the motor vehicle does not comply with the Manhattan world assumption, the posture estimation will be inaccurate; and the above method only uses the feature points and feature lines of three-dimensional objects, and when constructing a local scene map, the map also has large errors. Summary of the invention

[0004] The technical problem to be solved by the embodiments of the present invention is to provide a method for positioning and mapping a motor vehicle, thereby improving positioning accuracy and reducing map errors.

[0005] A further technical problem to be solved by the embodiments of the present invention is to provide a motor vehicle positioning and mapping device to improve positioning accuracy and reduce map errors.

[0006] A further technical problem to be solved by an embodiment of the present invention is to provide a computer-readable storage medium for storing a computer program for improving positioning accuracy and reducing map errors.

[0007] In order to solve the above technical problems, the embodiment of the present invention provides the following technical solutions: a method for positioning and mapping a motor vehicle, comprising the following steps: Extracting image frames frame by frame from the video images of the surrounding environment of the motor vehicle collected and transmitted by the vehicle-mounted camera; Extracting positioning features of a three-dimensional object from the image frame, the positioning features including feature points, feature lines and feature planes; Building a local scene map of the surrounding environment of the motor vehicle based on the positioning features in the image frame, and matching and tracking the positioning features of the three-dimensional object; Obtaining the current initial position of the motor vehicle based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame and the plane matching constraint solution of the feature plane in the local scene map and the feature plane in the current image frame; Performing feature matching and tracking based on the current image frame and the positioning features in the local scene map to optimize the initial posture to obtain the current accurate posture of the motor vehicle; Determine whether the current image frame is a key frame based on a preset key frame determination condition, and if so, update the local scene map using the positioning feature in the current image frame; and Perform local BA optimization on the updated local scene map to obtain an optimized local scene map.

[0008] Furthermore, the obtaining of the current initial posture of the motor vehicle based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame and the plane matching constraint solving of the feature plane in the local scene map and the feature plane in the current image frame specifically includes: Determine a reference frame corresponding to the current image frame based on a current tracking mode; Respectively calculating a reprojection error function of the positioning features of the three-dimensional object in the reference frame reprojected into the current image frame; Adding vertical and parallel constraints to the feature plane in the local scene map and the feature plane in the current image frame to construct a plane constraint function; and The reprojection error function corresponding to each of the positioning features and the plane constraint function are combined to obtain a joint function, and the LM algorithm model is used to minimize the joint function to solve the current initial posture of the motor vehicle.

[0009] Furthermore, when matching and tracking the feature planes in the positioning feature, if the angle between the normals of the two feature planes is less than a predetermined angle and the distance difference between the origin of the vehicle-mounted camera and the normals of the two feature planes is less than a preset difference threshold, the two feature planes match.

[0010] Furthermore, after local BA optimization is performed on the updated local scene map, it is determined whether a closed loop is generated based on the bag-of-words model. If so, all key frames and the corresponding positioning features are used to globally optimize the precise posture and the optimized local scene map.

[0011] Furthermore, after local BA optimization is performed on the updated local scene map, the key frames in which at least a first predetermined proportion of feature points and all feature planes can be extracted from other key frames are deleted. At the same time, the feature points and feature planes in the updated local scene map whose actual error rate exceeds the predetermined error rate threshold are deleted, and then it is determined whether a closed loop is generated based on the bag-of-words model.

[0012] Furthermore, the extraction of positioning features of three-dimensional objects from the image frames includes: first obtaining an RGB color image and a depth image respectively from the image frames captured by a vehicle-mounted camera, using an ORB feature point extraction model to extract feature points of the three-dimensional object based on the RGB color image and calculate feature point descriptors, performing matching and tracking of feature points based on the feature point descriptors, using LSD and LBD feature line extraction models to extract feature lines of the three-dimensional object based on the RGB color image and calculate feature line descriptors, performing matching and tracking of feature lines based on the feature line descriptors, and using a hierarchical clustering AHC algorithm model to extract feature planes of the three-dimensional object based on the depth image.

[0013] Furthermore, after extracting the feature lines of the three-dimensional object based on the RGB color image, the RANSAC algorithm model is first used to remove abnormal points on the feature lines, and then the feature line descriptors are calculated.

[0014] Furthermore, the key frame determination condition is one of the following conditions: The number of frames between the current image frame and the previous key frame exceeds a first predetermined number of frames, and the mapping thread of the local scene map is in an idle state; The number of frames between the current image frame and the previous key frame exceeds a second predetermined number of frames, and the second predetermined number of frames is greater than the first predetermined number of frames; The ratio of the number of the positioning features in the current image frame to the number of the positioning features in the corresponding reference key frame is lower than a second predetermined ratio; or The current image frame extracts the new feature plane relative to the local scene map.

[0015] On the other hand, in order to solve the above-mentioned further technical problems, an embodiment of the present invention provides the following technical solutions: a motor vehicle positioning and mapping device, connected to a vehicle-mounted camera, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the motor vehicle positioning and mapping method as described in any one of the above items is implemented.

[0016] On the other hand, in order to solve the above-mentioned further technical problems, an embodiment of the present invention provides the following technical solutions: a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the motor vehicle positioning and mapping method as described in any one of the above-mentioned items.

[0017] After adopting the above technical scheme, the embodiment of the present invention has at least the following beneficial effects: after the embodiment of the present invention obtains an image frame from the vehicle-mounted camera, the positioning features of the three-dimensional objects in the image frame are used to construct a local scene map of the surrounding environment of the motor vehicle, and the positioning features of the three-dimensional objects are matched and tracked. Since the positioning features include feature points, feature lines and feature planes of the three-dimensional objects, the structural lines and planes that are obviously adjusted in the structured scene are introduced, thereby improving the accuracy and stability of constructing the local scene map in the structured scene with weak texture and illumination changes; then, based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame, and adding the plane matching constraint solution of the feature plane in the local scene map and the feature plane in the current image frame, the current initial posture of the motor vehicle is obtained, and the solution accuracy of the initial posture is improved; then, based on the positioning features in the current image frame and the local scene map, feature matching and tracking are performed to optimize the initial posture to obtain the current accurate posture of the motor vehicle, and then through key frame decision, after the key frame is determined, the local scene map is updated using the key frame and local BA optimization is performed, so that a more accurate local scene map can be obtained, and the stability of the system is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The present invention is a flowchart of the steps of an optional embodiment of the vehicle positioning and mapping method of the present invention.

[0019] Figure 2 This is a flow chart of step S4 of an optional embodiment of the method for positioning and mapping a motor vehicle of the present invention.

[0020] Figure 3 The figure is a flowchart of an optional embodiment of the vehicle positioning and mapping method of the present invention.

[0021] Figure 4 The present invention is a block diagram of the structural principles of an optional embodiment of the vehicle positioning and mapping device of the present invention.

[0022] Figure 5 This is a functional module diagram of an optional embodiment of the vehicle positioning and mapping device of the present invention. DETAILED DESCRIPTION

[0023] The present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following illustrative embodiments and descriptions are only used to explain the present invention and are not intended to limit the present invention. In addition, the embodiments and features in the embodiments of the present application may be combined with each other without conflict.

[0024] like Figure 1 As shown, an optional embodiment of the present invention provides a method for positioning and mapping a motor vehicle, comprising the following steps: S1: extracting image frames frame by frame from the video image of the surrounding environment of the motor vehicle collected and transmitted by the vehicle-mounted camera 1; S2: extracting positioning features of the three-dimensional object from the image frame, wherein the positioning features include feature points, feature lines and feature planes; S3: constructing a local scene map of the surrounding environment of the motor vehicle based on the positioning features in the image frame, and matching and tracking the positioning features of the three-dimensional object, wherein the positioning features include feature points, feature lines, and feature planes; S4: Obtaining the current initial position of the motor vehicle based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame and the plane matching constraint solution of the feature plane in the local scene map and the feature plane in the current image frame; S5: performing feature matching and tracking based on the current image frame and the positioning features in the local scene map to optimize the initial posture and obtain the current accurate posture of the motor vehicle; S6: determining whether the current image frame is a key frame based on a preset key frame determination condition, and if so, updating the local scene map using the positioning features in the current image frame; and S7: Perform local BA optimization on the updated local scene map to obtain an optimized local scene map.

[0025] After the embodiment of the present invention obtains an image frame from the vehicle-mounted camera 1, the positioning features of the three-dimensional objects in the image frame are used to construct a local scene map of the surrounding environment of the motor vehicle, and the positioning features of the three-dimensional objects are matched and tracked. Since the positioning features include feature points, feature lines and feature planes of the three-dimensional objects, the structural lines and planes that are obviously adjusted in the structured scene are introduced, thereby improving the accuracy and stability of constructing the local scene map in the structured scene with weak texture and illumination changes; then, based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame, the plane matching constraint solution between the feature plane in the local scene map and the feature plane in the current image frame is added to obtain the current initial posture of the motor vehicle, thereby improving the solution accuracy of the initial posture; then, based on the current image frame and the positioning features in the local scene map, feature matching and tracking are performed to optimize the initial posture to obtain the current accurate posture of the motor vehicle, and then through key frame decision, after the key frame is determined, the local scene map is updated using the key frame and local BA optimization is performed, so that a more accurate local scene map can be obtained, and the stability of the system is higher.

[0026] In an optional embodiment of the present invention, Figure 2 As shown, the step S4 specifically includes: S41: determining a reference frame corresponding to the current image frame based on the current tracking mode; S42: respectively calculating a reprojection error function of the positioning features of the three-dimensional object in the reference frame reprojected into the current image frame; S43: adding vertical and parallel constraints to the feature plane in the local scene map and the feature plane in the current image frame to construct a plane constraint function; and S44: Combining the reprojection error functions corresponding to the positioning features and the plane constraint function to obtain a joint function, and using the LM algorithm model to minimize the joint function to solve and obtain the current initial posture of the motor vehicle.

[0027] In this embodiment, in step S41, when the current tracking mode is in constant speed motion model tracking, the reference frame refers to the previous frame of the current image frame, that is, the posture and speed of the previous frame are used to estimate the posture of the current image frame; when it is in the reference key frame tracking mode (the motion model is empty or repositioning has just been completed), the reference frame is the previous key frame of the current image frame; and when it is in the repositioning mode (that is, the constant speed mode tracking of the current image frame is unsuccessful and the reference key frame tracking also fails, and only repositioning can be performed), the reference frame is the candidate key frame similar to the current image frame in the key frame database searched through the bag of words model.

[0028] In step S42, first, for the feature points, a reprojection error function is calculated based on the reprojection of the three-dimensional points in the reference frame to the matching feature points in the current image frame: (Formula 1) Among them, P j is a 3D point in the reference frame, p k is the pixel coordinate in the current image frame, R k,j is the rotation matrix from the reference frame to the current image frame, t k,j is the translation matrix from the reference frame to the current image frame; Secondly, for the characteristic line, from the two endpoints p of the two-dimensional line start and p end Get the normalized straight line function of the characteristic line: (Formula 2) Then, according to the two endpoints p of the 3D line segment in the reference frame start and p end The reprojection error function of the feature line is calculated by projecting the distance between the matched straight lines in the current image frame: (Formula 3) Finally, for the characteristic plane, in order to avoid over-parameterization of the plane representation method, the characteristic plane parameter expression adopted by the embodiment of the present invention is as follows: (Formula 4) Where d represents the distance from the origin of the vehicle camera to the feature plane, φ and ψ represent the azimuth and elevation of the normal vector of the feature plane, and the feature plane is represented as (n, d), where n = (n x , n y , n z ) represents the unit normal vector of the feature plane; Plane π in the reference frame j With the plane π in the current image frame k The reprojection error function between is: (Formula 5) Among them, T cw is the transformation matrix from the world coordinate system to the current image frame; Combining the above formulas 1, 3 and 5, the joint error function can be obtained as follows: (Formula 6) where ρ p , l and ρ π They represent the robust kernel Huber functions corresponding to the feature points, feature lines and feature planes in the joint error function respectively.

[0029] In step S33, since the feature planes are perpendicular and parallel to each other in a structured environment, the embodiment of the present invention uses this feature to add perpendicular and parallel constraints to the feature planes in the local scene map and the feature planes detected in the current image frame. The constraint function is as follows: (Formula 7) Among them, R cw The rotation matrix from the world coordinate system to the current image frame.

[0030] Finally, Formula 6 and Formula 7 are combined into a joint function, and the LM (Levenberg-Marquart) algorithm is used to minimize the joint function to obtain the rotation matrix and translation matrix from the world coordinate system to the current image frame.

[0031] In an optional embodiment of the present invention, when matching and tracking the feature planes in the positioning feature, if the angle between the normals of the two feature planes is less than a predetermined angle (e.g., 8-12 degrees, preferably 10 degrees) and the distance difference between the origin of the vehicle-mounted camera 1 and the normals of the two feature planes is less than a preset difference threshold (e.g., 0.08-0.12 meters, preferably 0.1 meters), the two feature planes match. In this embodiment, the angle between the plane normals extracted between two adjacent frames and the distance difference from the camera origin to the two planes are used to achieve high matching accuracy.

[0032] In an optional embodiment of the present invention, Figure 3 As shown, after the local BA (Bundle Adjustment) optimization is performed on the updated local scene map, it is also determined whether a closed loop is generated based on the bag-of-words model. If so, all key frames and the corresponding positioning features are used to perform global optimization on the precise pose and the optimized local scene map. In this embodiment, after completing the local BA optimization, the bag-of-words model is used to determine whether a closed loop is generated. Once a closed loop is detected, the cumulative drift error is reduced through the pose graph optimization process to obtain a more accurate camera pose; in the global optimization, all key frames and positioning features will participate in the optimization, that is, the pose, feature points, feature lines and feature planes of the motor vehicle in the local scene map will be optimized.

[0033] In an optional embodiment of the present invention, after performing local BA optimization on the updated local scene map, first delete the key frames in which at least a first predetermined proportion (e.g., 85%-95%, preferably 90%) of feature points and all feature planes can be extracted from other key frames, and delete the feature points and feature planes in the updated local scene map whose actual error rate exceeds the predetermined error rate threshold, and then determine whether a closed loop is generated based on the bag-of-words model. In this embodiment, after completing the BA optimization, if the feature points and all feature planes exceeding the first predetermined proportion in a key frame can be extracted from other key frames, it indicates that the key frame is a redundant key frame and is removed; similarly, if there is a large error in the construction of the local scene map by the feature points and feature planes and the actual error rate exceeds the predetermined error rate threshold, it indicates that the feature points and feature planes are bad points and error planes, and are also deleted, thereby improving data processing efficiency and accuracy.

[0034] In an optional embodiment of the present invention, the extraction of positioning features of three-dimensional objects from the image frame includes: first obtaining an RGB color image and a depth image respectively from the image frame captured by the vehicle-mounted camera 1, using an ORB feature point extraction model to extract feature points of the three-dimensional object based on the RGB color image and calculate feature point descriptors, performing matching and tracking of feature points based on the feature point descriptors, using LSD and LBD feature line extraction models to extract feature lines of the three-dimensional object based on the RGB color image and calculate feature line descriptors, performing matching and tracking of feature lines based on the feature line descriptors, and using a hierarchical clustering AHC algorithm model to extract feature planes of the three-dimensional object based on the depth image. In this embodiment, the vehicle-mounted camera 1 is a depth camera, which outputs an RGB-D image sequence, from which an RGB color image and a depth image can be obtained. The ORB feature point extraction model with fast extraction speed and strong matching robustness is used to quickly and accurately extract feature points, and the feature point descriptor is used to match and track the feature points. In view of the defect that it is difficult to extract enough feature points for pose estimation in a low-texture environment, an LSD feature line and an LBD feature line are used to extract the feature lines in the RGB color image, so that the motor vehicle can rely on the feature lines to estimate the pose of the motor vehicle in a scene with less texture, thereby improving the robustness. After extracting the two-dimensional feature points and feature lines in the image, the feature points and feature lines can be reversely projected to the camera coordinate system using the intrinsic parameters and depth map of the vehicle-mounted camera 1 to obtain three-dimensional points and three-dimensional lines, which is convenient for subsequent calculation and processing. For the extraction of feature planes, the depth map can provide an ordered point cloud. The embodiment of the present invention adopts a hierarchical clustering AHC (Fast plane extraction in organized point clouds using agglomerative hierarchical clustering) algorithm model to quickly extract plane features from the downsampled three-dimensional point cloud.

[0035] In an optional embodiment of the present invention, after extracting the feature lines of the three-dimensional object based on the RGB color image, the RANSAC algorithm model is first used to remove abnormal points on the feature lines, and then the feature line descriptor is calculated. In this embodiment, for feature lines, since feature lines are more affected by depth discontinuity and occlusion than feature points, and the depth camera will produce serious errors at the edges of objects, in order to reduce the impact of this factor on pose estimation, the RANSAC algorithm model is used to remove abnormal points on the feature lines, thereby reducing the error.

[0036] In an optional embodiment of the present invention, the key frame determination condition is one of the following conditions: The number of frames between the current image frame and the previous key frame exceeds a first predetermined number of frames (for example, 8-12 frames, preferably 10 frames), and the mapping thread of the local scene map is in an idle state; The number of frames between the current image frame and the previous key frame exceeds a second predetermined number of frames (for example, 18-22 frames, preferably 20 frames), and the second predetermined number of frames is greater than the first predetermined number of frames; The ratio of the number of the positioning features in the current image frame to the number of the positioning features in the corresponding reference key frame is lower than a second predetermined ratio (for example, 85%-95%, preferably 90%); or The current image frame extracts the new feature plane relative to the local scene map.

[0037] In this embodiment, using one of the above conditions to filter key frames can not only ensure the accuracy of updating the local scene map, but also reduce errors and improve the stability of the system.

[0038] On the other hand, Figure 4 As shown, an embodiment of the present invention provides a motor vehicle positioning and mapping device 3, which is connected to a vehicle-mounted camera 1, and includes a processor 30, a memory 32, and a computer program stored in the memory 32 and configured to be executed by the processor 30. When the processor 30 executes the computer program, the motor vehicle positioning and mapping method as described above is implemented.

[0039] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 32 and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the mask repair control device. For example, the computer program may be divided into Figure 5 The functional modules in the mask repair control device 1, wherein the image frame extraction module 41, the feature extraction module 42, the mapping module 43, the pose solving module 44, the pose optimization module 45, the key frame decision module 46 and the BA optimization module 47 respectively execute the above steps S1 to S7.

[0040] The motor vehicle positioning and mapping device 3 can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The motor vehicle positioning and mapping device 3 can include, but is not limited to, a processor 30 and a memory 32. Those skilled in the art can understand that the schematic diagram is only an example of the motor vehicle positioning and mapping device 3, and does not constitute a limitation on the motor vehicle positioning and mapping device 3. It can include more or less components than the diagram, or combine certain components, or different components. For example, the motor vehicle positioning and mapping device 3 can also include input and output devices, network access devices, buses, etc.

[0041] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 30 is the control center of the vehicle positioning and mapping device 3, and uses various interfaces and lines to connect various parts of the entire vehicle positioning and mapping device 3.

[0042] The memory 32 can be used to store the computer program and / or module. The processor 30 realizes various functions of the vehicle positioning and mapping device 3 by running or executing the computer program and / or module stored in the memory 32 and calling the data stored in the memory 32. The memory 32 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a graphic recognition function, a graphic overlay function, etc.), etc.; the data storage area can store data (such as graphic data, etc.) created according to the use of the control device, etc. In addition, the memory 32 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0043] If the functions described in the embodiments of the present invention are implemented in the form of software function modules or units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the embodiments of the present invention implement all or part of the processes in the above-mentioned embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 30, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0044] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the motor vehicle positioning and mapping methods described above.

[0045] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0046] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, which all belong to the protection scope of the present invention.

Claims

1. A method for positioning and mapping a motor vehicle, characterized in that: The method comprises the following steps: Extracting image frames frame by frame from the video images of the surrounding environment of the motor vehicle collected and transmitted by the vehicle-mounted camera; Extracting positioning features of a three-dimensional object from the image frame, the positioning features including feature points, feature lines and feature planes; Building a local scene map of the surrounding environment of the motor vehicle based on the positioning features in the image frame, and matching and tracking the positioning features; Obtaining the current initial position of the motor vehicle based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame and the plane matching constraint solution of the feature plane in the local scene map and the feature plane in the current image frame; Performing feature matching and tracking based on the current image frame and the positioning features in the local scene map to optimize the initial posture to obtain the current accurate posture of the motor vehicle; Determine whether the current image frame is a key frame based on a preset key frame determination condition, and if so, update the local scene map using the positioning feature in the current image frame; and Perform local BA optimization on the updated local scene map to obtain an optimized local scene map.

2. The method for positioning and mapping a motor vehicle according to claim 1, wherein: The obtaining of the current initial posture of the motor vehicle by solving the plane matching constraint between the feature plane in the local scene map and the feature plane in the current image frame based on the inter-frame reprojection error of the positioning features in the reference frame and the current image frame specifically includes: Determine a reference frame corresponding to the current image frame based on a current tracking mode; Respectively calculating a reprojection error function of the positioning features of the three-dimensional object in the reference frame reprojected into the current image frame; Adding vertical and parallel constraints to the feature plane in the local scene map and the feature plane in the current image frame to construct a plane constraint function; and The reprojection error function corresponding to each of the positioning features and the plane constraint function are combined to obtain a joint function, and the LM algorithm model is used to minimize the joint function to solve the current initial posture of the motor vehicle.

3. The method for positioning and mapping a motor vehicle according to claim 1, wherein: When matching and tracking the feature planes in the positioning feature, if the angle between the normals of the two feature planes is less than a predetermined angle and the distance difference between the origin of the vehicle camera and the normals of the two feature planes is less than a preset difference threshold, the two feature planes match.

4. The method for positioning and mapping a motor vehicle according to claim 1, wherein: After performing local BA optimization on the updated local scene map, it is also determined whether a closed loop is generated based on the bag-of-words model. If so, all key frames and the corresponding positioning features are used to perform global optimization on the precise posture and the optimized local scene map.

5. The method for positioning and mapping a motor vehicle according to claim 4, characterized in that: After performing local BA optimization on the updated local scene map, first delete the key frames in which at least a first predetermined proportion of feature points and all feature planes can be extracted from other key frames. At the same time, delete the feature points and feature planes in the updated local scene map whose actual error rate exceeds the predetermined error rate threshold, and then determine whether a closed loop is generated based on the bag-of-words model.

6. The method for positioning and mapping a motor vehicle according to claim 1, wherein: The method of extracting the positioning features of the three-dimensional object from the image frame includes: first obtaining an RGB color image and a depth image respectively from the image frame collected by the vehicle-mounted camera, using an ORB feature point extraction model to extract the feature points of the three-dimensional object based on the RGB color image and calculate the feature point descriptor, performing matching and tracking of the feature points based on the feature point descriptor, using LSD and LBD feature line extraction models to extract the feature lines of the three-dimensional object based on the RGB color image and calculate the feature line descriptor, performing matching and tracking of the feature lines based on the feature line descriptor, and using a hierarchical clustering AHC algorithm model to extract the feature plane of the three-dimensional object based on the depth image.

7. The method for positioning and mapping a motor vehicle according to claim 6, wherein: After extracting the feature lines of the three-dimensional object based on the RGB color image, the RANSAC algorithm model is first used to remove abnormal points on the feature lines, and then the feature line descriptors are calculated.

8. The method for positioning and mapping a motor vehicle according to claim 1, wherein: The key frame determination condition is one of the following conditions: The number of frames between the current image frame and the previous key frame exceeds a first predetermined number of frames, and the mapping thread of the local scene map is in an idle state; The number of frames between the current image frame and the previous key frame exceeds a second predetermined number of frames, and the second predetermined number of frames is greater than the first predetermined number of frames; The ratio of the number of the positioning features in the current image frame to the number of the positioning features in the corresponding reference key frame is lower than a second predetermined ratio; or The current image frame extracts the new feature plane relative to the local scene map.

9. A motor vehicle positioning and mapping device connected to a vehicle-mounted camera, characterized in that: The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the motor vehicle positioning and mapping method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the motor vehicle positioning and mapping method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Motor vehicle mapping and positioning method and device and computer readable storage medium

    CN121557993A