Visual localization method and related apparatus

By matching the visual positioning method of feature points and combining the information of the high-precision image and the first image, the problem of low outdoor positioning accuracy is solved and high-precision and efficient outdoor scene positioning is achieved.

WO2024083010A9PCT designated stage expired Publication Date: 2024-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/123970
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-10-20
Filing Date
2023-10-11
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve high-precision positioning in outdoor scenes. Affected by factors such as weather, season, and lighting changes, visual positioning technology is not very accurate when applied outdoors.

Method used

By acquiring the first image when the image acquisition device is at the reference position, matching the feature points in the pre-stored high-precision image, determining the target matching feature point pair, combining the feature point information of the high-precision image and the first image, adjusting the positioning result, and achieving High-precision outdoor scene positioning.

Benefits of technology

It achieves high-precision, high-efficiency, and high-reliability positioning of image acquisition equipment in outdoor scenes, overcoming the challenges of the complexity and variability of the outdoor environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023123970_19092024_PF_FP_ABST
    Figure CN2023123970_19092024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in embodiments of the present application are a visual localization method and a related apparatus, applicable to the field of traffic. The method comprises: obtaining a first image acquired by an image acquisition device when being located at a reference position; determining, from high-precision images corresponding to the reference position stored in a visual fingerprint library, a reference high-precision image matching the first image, the visual fingerprint library being used for storing high-precision images corresponding to an outdoor scene acquired by a high-precision device and three-dimensional position information of feature points in the high-precision images in the world coordinate system, and data stored in the visual fingerprint library being updated according to standard-precision images acquired by a common device; determining a target matching feature point pair according to feature points having the matching relationship in the first image and the reference high-precision image; and determining a high-precision localization result of the image acquisition device according to the three-dimensional position information of the feature point belonging to the reference high-precision image and two-dimensional position information of the feature point belonging to the first image in the target matching feature point pair. The method can achieve high-precision outdoor scene localization.
Need to check novelty before this filing date? Find Prior Art

Description

A visual positioning method and related device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 20, 2022, with application number 202211289232.4 and application name “A visual positioning method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of positioning technology, and in particular to visual positioning. Background Art

[0003] Currently, common outdoor scene positioning methods generally rely on satellite-based global positioning systems. However, due to the large variations in air density in the stratosphere and troposphere, the propagation speed of electromagnetic waves in the medium is unmeasurable, making it difficult for the global positioning system to achieve high positioning accuracy.

[0004] Visual positioning technology has been a hot research topic in recent years. This technology is used to achieve high-precision positioning based on image information. Currently, visual positioning technology is primarily used for indoor positioning, for example, locating a mobile phone or robot based on images captured by it. However, due to the complexity and variability of outdoor scenes (such as those affected by weather, seasons, and lighting), it is difficult to reliably apply visual positioning technology to achieve high-precision positioning in outdoor scenarios.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a visual positioning method and related devices, which can apply visual positioning technology in outdoor scenes to achieve high-precision outdoor scene positioning.

[0007] In view of this, the first aspect of the present application provides a visual positioning method, the method comprising:

[0008] Acquiring a first image captured when the image capture device is in a reference position;

[0009] Determining a reference high-precision image that matches the first image from pre-stored high-precision images corresponding to the reference position, wherein the positioning accuracy of the pre-stored high-precision image is higher than that of the first image;

[0010] Determining a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image;

[0011] The positioning result corresponding to the image acquisition device is determined according to the position information of the feature points belonging to the reference high-precision image in the target matching feature point pair and the position information of the feature points belonging to the first image in the target matching feature point pair.

[0012] A second aspect of the present application provides a visual positioning device, the device comprising:

[0013] An image acquisition module, configured to acquire a first image acquired when the image acquisition device is in a reference position;

[0014] a matching image determination module, configured to determine a reference high-precision image that matches the first image from pre-stored high-precision images corresponding to the reference position, wherein the pre-stored high-precision image has a higher positioning accuracy than the first image;

[0015] a matching feature point determination module, configured to determine a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image;

[0016] A high-precision positioning module is used to determine the positioning result corresponding to the image acquisition device based on the position information of the feature points belonging to the reference high-precision image in the target matching feature point pair and the position information of the feature points belonging to the first image in the target matching feature point pair.

[0017] A third aspect of the present application provides a computer device, the device comprising a processor and a memory:

[0018] The memory is used to store computer programs;

[0019] The processor is used to execute the steps of the visual positioning method as described in the first aspect according to the computer program.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the steps of the visual positioning method described in the first aspect.

[0021] The fifth aspect of the present application provides a computer program product comprising a computer program, which, when executed on a computer, enables the computer device to execute the steps of the visual positioning method described in the first aspect.

[0022] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0023] The embodiment of the present application provides a visual positioning method, which realizes high-precision positioning of outdoor scenes based on high-precision images corresponding to outdoor scenes and position information of feature points in the high-precision images. When positioning, a matching reference high-precision image can be first determined in the high-precision image corresponding to the low-precision position information of the image acquisition device to be positioned; then, a target matching feature point pair is determined based on feature points with matching relationships in the first image and the reference high-precision image. Since the target matching feature point pair is determined based on the matching relationship, and the position information of the feature points in the target matching feature point pair belonging to the reference high-precision image has high positioning accuracy, the reference position can be effectively adjusted based on the positioning accuracy of the high-precision image involved in the target matching feature point pair and the position information of the feature points in the target matching feature point pair belonging to the first image, combined with the matching relationship, to determine a positioning result. The positioning result can identify the high-precision positioning information of the image acquisition device when capturing the first image; thus, high-precision, high-efficiency, and high-reliability positioning of the image acquisition device in outdoor scenes is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a schematic diagram of an application scenario of a visual positioning method provided in an embodiment of the present application;

[0025] FIG2 is a schematic diagram of a flow chart of a visual positioning method provided in an embodiment of the present application;

[0026] FIG3 is a schematic diagram of matching feature point pairs in a first image and a reference high-precision image provided by an embodiment of the present application;

[0027] FIG4 is a schematic diagram of reference matching feature point pairs in a first image and a reference high-precision image provided by an embodiment of the present application;

[0028] FIG5 is a schematic diagram of target matching feature point pairs in a first image and a reference high-precision image provided by an embodiment of the present application;

[0029] FIG6 is a schematic diagram of an exemplary positioning result provided in an embodiment of the present application;

[0030] FIG7 is a flow chart of a method for constructing a visual fingerprint library according to an embodiment of the present application;

[0031] FIG8 is a schematic diagram of a high-precision device provided in an embodiment of the present application;

[0032] FIG9 is a schematic diagram of feature points in a high-precision image provided by an embodiment of the present application;

[0033] FIG10 is a schematic diagram of an exemplary intra-frame matching provided in an embodiment of the present application;

[0034] FIG11 is a schematic diagram of a sliding window algorithm provided in an embodiment of the present application;

[0035] FIG12 is a schematic diagram of an exemplary inter-frame matching provided in an embodiment of the present application;

[0036] FIG13 is another exemplary schematic diagram of inter-frame matching provided in an embodiment of the present application;

[0037] FIG14 is a schematic diagram of the derivation of the G matrix formula provided in an embodiment of the present application;

[0038] FIG15 is a schematic diagram of determining associated elements in a standard-precision image and a high-precision image to be updated according to an embodiment of the present application;

[0039] FIG16 is a schematic structural diagram of a visual positioning device provided in an embodiment of the present application;

[0040] FIG17 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0041] FIG18 is a schematic diagram of the structure of the server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0043] The terms "first," "second," "third," "fourth," etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential sequence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or apparatus.

[0044] The Intelligent Traffic System (ITS), also known as the Intelligent Transportation System, effectively integrates advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control, and vehicle manufacturing, strengthening the connection between vehicles, roads, and users, thereby forming an integrated transportation system that ensures safety, improves efficiency, improves the environment, and conserves energy. The visual positioning method provided in the embodiments of this application can assist in the operation of the Intelligent Transportation System.

[0045] The visual positioning method provided in the embodiments of the present application can be executed by a computer device with image processing capabilities, which can be a terminal device or a server. Terminal devices include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server.

[0046] To facilitate understanding of the visual positioning method provided in the embodiments of the present application, the following uses a server as an example to executor of the visual positioning method to executor the visual positioning method to executor the application scenario of the visual positioning method.

[0047] Referring to Figure 1 , Figure 1 is a schematic diagram illustrating an application scenario of the visual positioning method provided in an embodiment of the present application. As shown in Figure 1 , the application scenario includes a vehicle 110, a server 120, and a visual fingerprint library 130. Vehicle 110 and server 120 can communicate via a network; server 120 can access visual fingerprint library 130 via the network, or visual fingerprint library 130 can be integrated into server 120.

[0048] In actual applications, the vehicle terminal on vehicle 110 can determine the current reference position of vehicle 110 using a global positioning system (which has low positioning accuracy). At the same time, the driving recorder installed on vehicle 110 can capture a first image and transmit the first image to the vehicle terminal. The vehicle terminal can then send the reference position and the first image captured by the driving recorder when vehicle 110 is at the reference position to server 120 via the network.

[0049] After receiving the reference position and the first image, the server 120 can first determine the high-definition image corresponding to the reference position in the visual fingerprint library 130, and then determine the reference high-definition image that matches the first image in the high-definition image corresponding to the reference position; such hierarchical search can improve the search efficiency of the reference high-definition image and avoid the full search taking too long. It should be noted that the visual fingerprint library 130 stores high-definition images corresponding to outdoor scenes collected by high-definition (HD) devices, as well as the three-dimensional position information of feature points in the high-definition images in the world coordinate system, and the data stored in the visual fingerprint library 130 can be updated based on standard definition (SD) images collected by ordinary devices; since the cost of collecting standard definition images by ordinary devices is relatively low, standard definition images collected by ordinary devices can be frequently obtained, and the visual fingerprint library 130 can be updated based on the obtained standard definition images, thereby ensuring that the data stored in the visual fingerprint library 130 has both high precision and freshness.

[0050] After server 120 determines a reference high-definition image that matches the first image, it can detect matching feature points in the first image and the reference high-definition image and perform outlier filtering based on these matching feature points to obtain highly reliable target matching feature point pairs. Furthermore, server 120 can determine a high-precision positioning result corresponding to the image acquisition device based on the three-dimensional position information of the feature points in each target matching feature point pair belonging to the reference high-definition image in the world coordinate system, and the two-dimensional position information of the feature points in each target matching feature point pair belonging to the first image in the image coordinate system.

[0051] It should be understood that the application scenario shown in FIG1 is merely an example. In actual applications, the visual positioning method provided in the embodiments of the present application can also be applied in other scenarios, for example, it can also be used to achieve outdoor scene positioning of mobile phones, etc. The application scenario of the visual positioning method provided in the embodiments of the present application is not limited herein.

[0052] The visual positioning method provided by this application is described in detail below through method embodiments.

[0053] See Figure 2, which is a flow chart of the visual positioning method provided in an embodiment of the present application. For ease of description, the following embodiment is still described using the server (as an example of the aforementioned computer device) as the execution subject of the visual positioning method. As shown in Figure 2, the visual positioning method includes the following steps:

[0054] Step 201: Acquire a first image captured when the image capture device is in a reference position.

[0055] In an embodiment of the present application, the server can obtain the reference position where the image acquisition device is currently located, and the first image captured when the image acquisition device is at the reference position. It should be noted that the image acquisition device in the embodiment of the present application is a device to be located, and the image acquisition device can be, for example, a vehicle to be located, a mobile terminal, etc. With respect to the reference position where the image acquisition device is located, the server can currently only obtain location information with low positioning accuracy, which can identify the current location of the image acquisition device. The reference position can generally be a positioning result determined based on a global positioning system (such as GPS (Global Positioning System), Beidou system, etc.), or a positioning result determined by other positioning methods. The first image is an image captured when the image acquisition device is at a reference position. The first image can be, for example, an image captured by a driving recorder installed on a vehicle to be located, or an image captured by a mobile terminal to be located through its camera.

[0056] Taking the image acquisition device as the target vehicle to be located as an example, the on-board terminal on the target vehicle can determine the current reference position of the target vehicle (its positioning accuracy is relatively low) based on the positioning signal of the global positioning system. At the same time, the on-board terminal can also receive the first image captured by the driving recorder on the target vehicle; then, the on-board terminal can send the reference position and the first image to the server.

[0057] Of course, in actual applications, the server may also obtain the reference position of the image acquisition device and the first image in other ways. This application does not impose any limitation on the way in which the server obtains the reference position and the first image.

[0058] Step 202: Determine a reference high-definition image that matches the first image from pre-stored high-definition images corresponding to the reference position.

[0059] High-precision images can be pre-stored in a storage location that can be retrieved by the server, such as a database. The database can be a visual positioning fingerprint library. By associating the positioning information with the high-precision image, it is equivalent to using the high-precision image as the "fingerprint" of the positioning information. Since it is constructed based on visual data such as images, it can be specifically recorded as a visual fingerprint library.

[0060] The positioning accuracy of the pre-stored high-precision image is higher than that of the first image.

[0061] The visual fingerprint library is used to store high-precision images corresponding to outdoor scenes and three-dimensional position information of feature points in the high-precision images in the world coordinate system. The data stored in the visual fingerprint library is updated according to the high-precision images.

[0062] After the server obtains the reference position of the image acquisition device and the first image captured by the image acquisition device at the reference position, it can first determine the high-precision image corresponding to the reference position from the large number of high-precision images stored in the visual fingerprint library based on the reference position. Furthermore, the server can determine the high-precision image that matches the first image among the high-precision images corresponding to the reference position as the reference high-precision image. This hierarchical search for reference high-precision images in the visual fingerprint library can improve the efficiency of searching for reference high-precision images and, in turn, improve the efficiency of locating the image acquisition device.

[0063] Exemplarily, the high-precision images stored in the visual fingerprint library are all associated with location information, and the location information associated with the high-precision image is the location information of the high-precision device when the high-precision device collects the high-precision image; based on this, the server can first search for the high-precision image corresponding to the reference position in the visual fingerprint library according to the reference position of the image acquisition device, such as searching for a high-precision image whose distance between the associated location information and the reference position is less than a preset distance threshold, as the high-precision image corresponding to the reference position.

[0064] Furthermore, the server can further search for a reference high-precision image that matches the first image in the high-precision image corresponding to the reference position. For example, the server can calculate the similarity between each high-precision image corresponding to the reference position and the first image; and then determine the high-precision image whose similarity with the first image exceeds a preset similarity threshold as the reference high-precision image, or determine the high-precision image with the highest similarity with the first image as the reference high-precision image. For another example, the server can determine the feature descriptor of the first image and the feature descriptors of each high-precision image corresponding to the reference position through a feature extraction algorithm (such as the superpoint algorithm), and then, for each high-precision image corresponding to the reference position, determine the degree of match between the high-precision image and the first image based on the feature descriptor of the first image and the feature descriptor of the high-precision image; and then determine the high-precision image whose degree of match with the first image exceeds a preset matching threshold as the reference high-precision image, or determine the high-precision image with the highest degree of match with the first image as the reference high-precision image.

[0065] Of course, in actual applications, the server can also determine the high-precision image corresponding to the reference position and the reference high-precision image matching the first image through other methods. This application does not impose any restrictions on the method of determining the high-precision image corresponding to the reference position and the reference high-precision image.

[0066] It should be noted that the visual fingerprint library mentioned above is constructed based on high-precision images, which stores high-precision images corresponding to outdoor scenes collected by high-precision equipment (such as professional collection equipment equipped with laser radar), and the position information of feature points in each high-precision image in a unified coordinate system; the visual fingerprint library can also store the update time of the three-dimensional position information of each feature point, and the update time is used to indicate whether the three-dimensional position information of the feature point was last detected to be valid. In addition, the data stored in the above-mentioned visual fingerprint library can be updated according to the standard-precision image; specifically, the update time of the three-dimensional position information of the feature point can be updated according to the standard-precision image collected by ordinary equipment (such as the image collection equipment mentioned in the embodiment of this application, such as a driving recorder, a mobile phone, etc.), and the high-precision image can also be updated according to the standard-precision image collected by ordinary equipment, such as reconstructing new elements in the outdoor scene in the high-precision image. The update can be carried out in real time based on the standard-definition image, or it can be updated periodically, for example, based on the standard-definition image collected within a period, the visual fingerprint library is updated uniformly.

[0067] The aforementioned unified coordinate system can be a coordinate system agreed upon for unified use in a region based on positioning requirements, such as a world coordinate system worldwide, or a national coordinate system within a country, etc., which is not limited here.

[0068] The following will introduce the method of constructing the above-mentioned visual fingerprint library and the method of updating the data stored in the visual fingerprint library based on the standard precision images collected by ordinary equipment through another method embodiment. For details, please refer to the method embodiment, which will not be described in detail in this method embodiment.

[0069] Step 203: Determine a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image.

[0070] In addition, the server may detect feature points in the first image using a feature extraction algorithm; for example, the server may detect feature points in the first image using a superpoint algorithm, a scale-invariant feature transform (SIFT) algorithm, etc. Furthermore, the server may detect feature points in the first image and a reference high-precision image that have a matching relationship using a feature matching algorithm; for example, the server may determine feature points in the first image and a reference high-precision image that have a matching relationship using a superglue algorithm, a SIFT algorithm, etc., that is, determine a pair of matching feature points in the first image and the reference high-precision image; that is, a pair of matching feature points may include two feature points, such as a first feature point and a second feature point, where the first feature point is a feature point in the first image and the second feature point is a feature point in the reference high-precision image.

[0071] Figure 3 is a schematic diagram of exemplary matching feature point pairs in a first image and a reference high-definition image, where 301 is the first image and 302 is the reference high-definition image. Two black dots connected by a line constitute a matching feature point pair. For example, feature points a1 and a2 are a matching feature point pair, feature points b1 and b2 are a matching feature point pair, and feature points c1 and c2 are a matching feature point pair.

[0072] Taking into account that the reliability of the matching feature point pairs determined by the above method may be low, and there may be matching feature point pairs with unreliable matching relationships, in order to avoid the matching feature point pairs with unreliable matching relationships affecting the accuracy and reliability of the subsequently determined positioning results, the embodiment of the present application can perform an external point filtering operation on these matching feature point pairs, filter out the matching feature point pairs with unreliable matching relationships, and retain the matching feature point pairs with more reliable matching relationships as target matching feature point pairs, so as to facilitate subsequent positioning based on the target matching feature point pairs.

[0073] In one possible implementation, the server may perform an outlier filtering operation based on a fundamental matrix (F matrix) or an essential matrix (E matrix). That is, the server may construct candidate matching feature point pairs based on feature points having a matching relationship in the first image and the reference high-precision image. Then, multiple first-level outlier filtering operations are performed based on the candidate matching feature point pairs; the first-level outlier filtering operation includes: selecting a basic matching feature point pair from the candidate matching feature point pairs, determining a predicted position and posture of the image acquisition device based on the basic matching feature point pair, and determining a filtering result and filtering effect of the first-level outlier filtering operation based on the predicted position and each candidate matching feature point pair. Furthermore, a target first-level outlier filtering operation with the best filtering effect is determined among the multiple first-level outlier filtering operations, and a target matching feature point pair is determined based on the filtering result of the target first-level outlier filtering operation.

[0074] For example, the server may use each pair of matching feature points in the first image and the reference high-definition image detected by the feature matching algorithm as candidate matching feature point pairs. The server then uses a random sample consensus (Ransac) algorithm to perform multiple first-level outlier filtering operations based on the candidate matching feature point pairs. The Ransac algorithm is an iterative algorithm that correctly estimates mathematical model parameters based on a set of data containing outliers. Outliers generally refer to noise in the data. In the embodiment of the present application, outliers refer to candidate matching feature point pairs with unreliable matching relationships.

[0075] Specifically, when performing each first-level outlier filtering operation, the server can randomly select a preset number of basic matching feature point pairs from each candidate matching feature point pair, and then determine the E matrix or F matrix based on the selected basic matching feature point pairs. The determined E matrix or F matrix can reflect the predicted pose of the image acquisition device, which is used to characterize the pose of the image acquisition device relative to the reference high-precision image, that is, the predicted pose is essentially a relative pose. For example, when it is necessary to reflect the predicted pose of the image acquisition device based on the E matrix, five basic matching feature point pairs can be selected from each candidate matching feature point pair, and then, using the five-point method, the E matrix is ​​determined based on the position information of the feature points included in each of the five basic matching feature point pairs. For another example, when it is necessary to reflect the predicted pose of the image acquisition device based on the F matrix, seven or eight basic matching feature point pairs can be selected from each candidate matching feature point pair, and then, using the seven-point method or the eight-point method, the F matrix is ​​determined based on the position information of the feature points included in each of the seven or eight basic matching feature point pairs.

[0076] After determining the predicted pose of the image acquisition device, an epipolar line can be constructed between the first image and the reference high-precision image based on the predicted pose of the image acquisition device. Then, based on the epipolar line constraint, the candidate matching feature point pairs (i.e., external points) that need to be filtered out in this first-level external point filtering operation and the candidate matching feature point pairs (i.e., internal points) that need to be retained are determined. It should be noted that if two cameras shoot the same object at different positions, or a moving camera shoots the same object at different times, there is a geometric correspondence between the points in the multiple images obtained. This geometric correspondence can be described by epipolar geometry, i.e., epipolar line constraints. In this embodiment of the present application, an epipolar line can be constructed based on the predicted pose of the image acquisition device to reflect the geometric correspondence between the first image and the reference high-precision image. If the distance between each feature point in the candidate matching feature point pair and the epipolar line is less than a preset distance threshold, then the candidate matching feature point pair can be considered as a candidate matching feature point pair that can be retained. Conversely, if the distance between any feature point in the candidate matching feature point pair and the epipolar line exceeds the preset distance threshold, then the candidate matching feature point pair can be considered as a candidate matching feature point pair that needs to be filtered out.

[0077] The candidate matching feature point pairs to be removed and the candidate matching feature point pairs to be retained, determined in the above manner, constitute the filtering results of this first-level outlier filtering operation. The server may use the number of candidate matching feature point pairs to be retained, determined through this first-level outlier filtering operation, as the filtering effect of this first-level outlier filtering operation. In this case, a greater number of candidate matching feature point pairs to be retained indicates a better filtering effect of this first-level outlier filtering operation. Alternatively, the server may use the number of candidate matching feature point pairs to be removed, determined through this first-level outlier filtering operation, as the filtering effect of this first-level outlier filtering operation. In this case, a smaller number of candidate matching feature point pairs to be removed indicates a better filtering effect of this first-level outlier filtering operation. Alternatively, the server may calculate the sum of the distances between the feature points in each candidate matching feature point pair and the constructed epipolar lines as the filtering effect of this first-level outlier filtering operation. In this case, a smaller sum of distances indicates a better filtering effect of this first-level outlier filtering operation. Of course, in actual applications, the server may also use other indicators as the filtering effect of the first-level outlier filtering operation, and this application does not impose any limitation on this.

[0078] After the server performs a preset number of first-level outlier filtering operations based on the candidate matching feature point pairs, it selects the first-level outlier filtering operation with the best filtering effect from each of the first-level outlier filtering operations performed and determines this first-level outlier filtering operation as the target first-level outlier filtering operation. Furthermore, based on the filtering results of the target first-level outlier filtering operation, that is, based on the candidate matching feature point pairs retained by the target first-level outlier filtering operation, the target matching feature point pair is determined.

[0079] In this way, by performing outlier filtering based on the E matrix or the F matrix in the above manner, the influence of the camera intrinsic parameter error of the image acquisition device on outlier filtering can be effectively avoided, thereby ensuring the number of retained candidate matching feature point pairs.

[0080] In one possible case, the server may directly use the candidate matching feature point pairs retained by the above-mentioned target first-level outlier filtering operation as the target matching feature point pairs.

[0081] In another possible case, considering that the mismatched feature point pairs located near the polar lines are difficult to filter out based on the E matrix or the F matrix, for example, there are many mismatches in the candidate matching feature point pairs located in the texture repetition area in the first image and the reference high-precision image, and such mismatched feature point pairs are difficult to filter out based on the E matrix and the F matrix, the embodiment of the present application further proposes a solution for secondary external point filtering based on the PnP (pespective-n-point) algorithm on the basis of the above-mentioned first-level external point filtering operation.

[0082] That is, the server can determine the candidate matching feature point pairs retained by the target first-level outlier filtering operation as reference matching feature point pairs. Then, multiple second-level outlier filtering operations are performed based on the reference matching feature point pairs. The second-level outlier filtering operations include: determining the two-dimensional position information of the feature points belonging to the reference high-precision image based on the assumed rotation parameters, assumed translation parameters, and the three-dimensional position information of the feature points belonging to the reference high-precision image in the reference matching feature point pairs; determining the filtering results and filtering effect of the second-level outlier filtering operation based on the two-dimensional position information of the feature points belonging to the reference high-precision image and the two-dimensional position information of the feature points belonging to the first image in each reference matching feature point pair. Furthermore, the target second-level outlier filtering operation with the best filtering effect is determined among the multiple second-level outlier filtering operations, and the target matching feature point pair is determined based on the filtering results of the target second-level outlier filtering operation.

[0083] For example, the server can use each candidate matching feature point pair retained by the target first-level outlier filtering operation as a reference matching feature point pair. Then, based on each reference matching feature point pair, the server uses the PnP algorithm to perform multiple second-level outlier filtering operations. The PnP algorithm is an algorithm for solving the pose of two-dimensional and three-dimensional point pairs. In other words, it estimates the camera pose given n three-dimensional spatial point coordinates and their two-dimensional projection positions. The present embodiment utilizes the inverse operation of the PnP algorithm to calculate the two-dimensional projection position of a three-dimensional spatial point given the camera pose and three-dimensional spatial point coordinates.

[0084] Specifically, when performing each secondary outlier filtering operation, the server can first set the assumed rotation parameters and assumed translation parameters corresponding to this secondary outlier filtering operation, that is, pre-set the assumed camera pose on which this secondary outlier filtering operation is based; the assumed rotation parameters and assumed translation parameters corresponding to each secondary outlier filtering operation are different. Then, based on the assumed rotation parameters, assumed translation parameters, and the three-dimensional position information of the feature points belonging to the reference high-precision image in each reference matching feature point pair in the world coordinate system, the two-dimensional position information of the feature points belonging to the reference high-precision image in each reference matching feature point pair in the camera coordinate system of the image acquisition device (that is, the image coordinate system of the first image) is determined. The three-dimensional position information of the feature points of the reference high-precision image in the world coordinate system here can be obtained from the visual fingerprint library. Furthermore, the server can determine, for each reference matching feature point pair, the reference two-dimensional distance between the two feature points in the reference matching feature point pair based on the two-dimensional position information of the feature point in the reference matching feature point pair belonging to the reference high-precision image in the image coordinate system and the two-dimensional position information of the feature point in the reference matching feature point pair belonging to the first image in the image coordinate system; if the reference two-dimensional distance is less than the preset two-dimensional distance threshold, it can be determined that the reference matching feature point pair is the reference matching feature point pair that needs to be retained in this secondary external point filtering operation, that is, the reference matching feature point pair is determined to be an internal point; conversely, if the reference two-dimensional distance exceeds the preset two-dimensional distance threshold, it can be determined that the reference matching feature point pair is the reference matching feature point pair that needs to be filtered out in this secondary external point filtering operation, that is, the reference matching feature point pair is determined to be an external point.

[0085] The reference matching feature point pairs to be removed and the reference matching feature point pairs to be retained, determined in the above manner, constitute the filtering results of this secondary outlier filtering operation. The server may use the number of reference matching feature point pairs determined to be retained during this secondary outlier filtering operation as the filtering effect of this secondary outlier filtering operation. In this case, a greater number of reference matching feature point pairs to be retained indicates a better filtering effect of this secondary outlier filtering operation. Alternatively, the server may use the number of reference matching feature point pairs determined to be removed during this secondary outlier filtering operation as the filtering effect of this secondary outlier filtering operation. In this case, a smaller number of reference matching feature point pairs to be removed indicates a better filtering effect of this secondary outlier filtering operation. Alternatively, the server may calculate the sum of the reference two-dimensional distances corresponding to each reference matching feature point pair as the process result of this secondary outlier filtering operation. In this case, a smaller sum of the reference two-dimensional distances indicates a better filtering effect of this secondary outlier filtering operation. Of course, in actual applications, the server may also use other indicators as the filtering effect of the secondary outlier filtering operation, and this application does not impose any limitation on this.

[0086] After the server performs a preset number of secondary outlier filtering operations based on the reference matching feature point pairs, it can select the secondary outlier filtering operation with the best filtering effect from each of the executed secondary outlier filtering operations and determine that secondary outlier filtering operation as the target secondary outlier filtering operation. Furthermore, based on the filtering results of the target secondary outlier filtering operation, that is, based on the reference matching feature point pairs retained by the target secondary outlier filtering operation, a target matching feature point pair is determined. For example, the reference matching feature point pair retained by the target secondary outlier filtering operation can be directly used as the target matching feature point pair.

[0087] Figure 4 is a schematic diagram of an exemplary reference matching feature point pair between a first image and a reference high-precision image, and Figure 5 is a schematic diagram of an exemplary target matching feature point pair between a first image and a reference high-precision image. By comparing Figures 3 and 4, it can be found that in the matching feature point pairs in Figure 3, the matching feature point pair b consisting of feature point b1 and feature point b2, and the matching feature point pair c consisting of feature point c1 and feature point c2 have relative position offsets of feature points, and their reliability is relatively low. In contrast, in the matching feature point pairs in Figure 4, the matching feature point pair c consisting of feature point c1 and feature point c2 has relative position offsets of feature points, and its reliability is higher than that of Figure 3. In other words, the reference matching feature point pair in Figure 4 has higher reliability than the candidate matching feature point pair in Figure 3.

[0088] By comparing Figure 4 and Figure 5, it can be found that the matching feature point pair c composed of feature point c1 and feature point c2 in Figure 4 has a relative position offset of the feature points, while the matching feature point pair a composed of feature point a1 and feature point a2 in Figure 5 has a more accurate relative position of the feature points. From the perspective of reliability, Figure 5 is higher than that of Figure 4, that is, the target matching feature point pair in Figure 5 has a higher reliability than the reference matching feature point pair in Figure 4, and there is basically no mismatched feature point pair in Figure 5.

[0089] It should be noted that the above reliability comparison is only exemplary, and the reliability determination results are made under the assumption that except for the marked matching feature point pairs in the figure, all other matching feature point pairs are completely consistent.

[0090] In this way, by performing secondary outlier filtering based on the PnP algorithm in the above manner, the number of mismatched feature point pairs in the texture repetitive area in the image can be effectively reduced, and the purity of the retained matching feature point pairs can be further improved, that is, the retained target matching feature point pairs can be guaranteed to have higher reliability.

[0091] It should be understood that in actual applications, the server may also use other methods to perform outlier filtering operations on the matching feature point pairs in the first image and the reference high-precision image, and this application does not impose any limitation on this.

[0092] Step 204: Determine the positioning result corresponding to the image acquisition device based on the position information of the feature points in the target matching feature point pair belonging to the reference high-precision image and the position information of the feature points in the target matching feature point pair belonging to the first image.

[0093] Since the positioning accuracy of the pre-stored high-precision image is higher than that of the first image, the positioning accuracy of the obtained positioning result is higher than that of the reference position based on the calibration and adjustment of the positioning information corresponding to the high-precision image.

[0094] The accuracy of the position information of the feature points belonging to the reference high-precision image in the target matching feature point pair is higher than the position information of the feature points belonging to the first image in the target matching feature point pair. Since the reference high-precision image generally carries depth information, the position information of its feature points can be three-dimensional position information, and the first image is collected by an image acquisition device with lower precision, so the first image generally does not carry depth information, so the position information of its feature points can be two-dimensional position information.

[0095] When the geographic coordinate system used to identify the position information of the high-definition image is a world coordinate system, the position information of the feature points of the reference high-definition image can be three-dimensional position information in the world coordinate system. When the geographic coordinate system used to identify the position information of the first image is an image coordinate system, the position information of the feature points of the first image can be two-dimensional position information in the image coordinate system.

[0096] After the server has screened out the target matching feature point pairs with higher reliability through step 203, it can determine the high-precision positioning result corresponding to the image acquisition device based on the three-dimensional position information of the feature points belonging to the reference high-precision image in each target matching feature point pair in the world coordinate system, and the two-dimensional position information of the feature points belonging to the first image in each target matching feature point pair in the image coordinate system. Among them, the three-dimensional position information of the feature points belonging to the reference high-precision image in the target matching feature point pair in the world coordinate system can be obtained from the visual fingerprint library; the two-dimensional position information of the feature points belonging to the first image in the target matching feature point pair in the image coordinate system can be directly determined based on the position of the feature points in the first image. The positioning result corresponding to the image acquisition device can be specifically represented by the position and posture of the image acquisition device in the world coordinate system. The positioning accuracy of the positioning result can be as high as 30cm. Based on this positioning result, various services with high positioning accuracy requirements, such as lane-level navigation and autonomous driving, can be implemented.

[0097] In one possible implementation, the positioning result of the image acquisition device can be determined using a BA (Bundle Adjustment) optimization algorithm. Specifically, the server can determine a projection error based on the three-dimensional position information of feature points belonging to the reference high-precision image in each target matching feature point pair, the two-dimensional position information of feature points belonging to the first image in each target matching feature point pair, the camera intrinsic parameters of the image acquisition device, and the attitude and position parameters of the image acquisition device. The server can then optimize the attitude and position parameters of the image acquisition device by minimizing the projection error, and then determine a high-precision positioning result for the image acquisition device based on the optimized attitude and position parameters of the image acquisition device.

[0098] It should be noted that the BA optimization algorithm is also known as bundle adjustment, which is an algorithm based on bundle smoothing errors. The essence of the BA optimization algorithm is an optimization model, which can optimize the position and posture of the camera by minimizing the projection error.

[0099] It should be noted that camera intrinsic parameters can specifically include an intrinsic parameter matrix and distortion parameters. The intrinsic parameter matrix can be constructed based on fx, fy, cx, and cy; fx = F / dx, fy = F / dy, where F represents the focal length of the camera, dx and dy represent the number of length units corresponding to one pixel in the x-axis and y-axis directions, respectively, that is, the actual physical value represented by one pixel in the x-axis and y-axis directions; cx and cy represent the number of horizontal and vertical pixels that differ between the pixel coordinates of the image center and the pixel coordinates of the image origin, respectively. Distortion parameters are parameters that convert points in the image coordinate system to the pixel coordinate system, and generally include radial distortion parameters and tangential distortion parameters. In an embodiment of the present application, if the image acquisition device is able to provide its camera intrinsic parameters to the server, that is, the image acquisition device is calibrated with its camera intrinsic parameters, the server can directly use the camera intrinsic parameters provided by the image acquisition device to determine the position and posture of the image acquisition device; if the image acquisition device cannot provide its camera intrinsic parameters to the server, the server needs to use the BA optimization algorithm to estimate the camera intrinsic parameters.

[0100] For example, the server can optimize the position and posture of the camera based on the visual projection error by using the following formula (1): min R,t ∑||K(RP w +t)-p sd || 2 (1)

[0101] Where K represents the camera intrinsic parameter of the image acquisition device, R represents the posture parameter of the camera of the image acquisition device in the world coordinate system (usually represented by a rotation matrix), t represents the position parameter of the camera of the image acquisition device in the world coordinate system (usually represented by longitude, latitude and altitude), P wIt represents the three-dimensional position information of the feature points in the reference high-precision image in the target matching feature point pair in the world coordinate system (obtained from the visual fingerprint library), p sd P represents the two-dimensional position information of the feature point belonging to the first image in the target matching feature point pair in the image coordinate system, w The corresponding feature points and p sd The corresponding feature points belong to the same target matching feature point pair.

[0102] The server minimizes the projection error through the above formula (1) and optimizes the posture parameter R and the position parameter t of the image acquisition device in the process; when the projection error meets the preset minimization condition, the high-precision positioning result of the image acquisition device in the world coordinate system can be determined based on the posture parameter R and the position parameter t of the image acquisition device obtained at this time.

[0103] Figure 6 shows an exemplary positioning result. The black circle in Figure 6 represents the position of the high-precision device used to capture high-precision images, while the white circle in Figure 6 represents the position of the image acquisition device determined through the above process. By comparing the trajectory of the black circle with the trajectory of the white circle, it can be seen that the positioning difference between the image acquisition device and the high-precision device is roughly one lane.

[0104] The visual positioning method provided in the embodiment of the present application realizes high-precision positioning of outdoor scenes based on a visual fingerprint library that stores high-precision images corresponding to outdoor scenes and three-dimensional position information of feature points in the high-precision images in a world coordinate system. Specifically, when positioning based on the visual fingerprint library, a reference high-precision image that matches the first image captured when the image acquisition device is in the low-precision position information can be determined in the high-precision image corresponding to the low-precision position information stored in the visual fingerprint library. Then, based on the feature points with matching relationships in the first image and the reference high-precision image, a target matching feature point pair is determined, and based on the three-dimensional position information of the feature points in the target matching feature point pair belonging to the reference high-precision image in the world coordinate system and the two-dimensional position information of the feature points in the target matching feature point pair belonging to the first image in the image coordinate system, the high-precision positioning information of the image acquisition device is determined. In this way, based on the visual fingerprint library, high-precision, high-efficiency, and high-reliability positioning of the image acquisition device in outdoor scenes is realized.

[0105] The following is a detailed introduction to the method for constructing the visual fingerprint library used in the visual positioning method shown in FIG2 through a method embodiment.

[0106] See Figure 7, which is a flow chart of the visual fingerprint library construction method provided in the embodiment of the present application. For ease of description, the following embodiment still takes the execution subject of the visual fingerprint library construction method as an example to introduce, of course, the execution subject of the visual fingerprint library construction method can also be a terminal device. As shown in Figure 7, the visual fingerprint library construction method includes the following steps:

[0107] Step 701: Acquire high-precision images captured by multiple cameras rigidly connected to the high-precision device.

[0108] In the embodiments of the present application, a high-precision device can capture high-precision images using multiple rigidly connected cameras installed thereon, and then transmit the captured high-precision images to a server so that the server can construct a visual fingerprint library based on these high-precision images. It should be noted that the high-precision device in the embodiments of the present application refers to a device that can determine its own positioning results with high precision. For example, the high-precision device can be a vehicle with high-precision positioning capabilities.

[0109] For example, FIG8 is a schematic diagram of a high-precision device provided in an embodiment of the present application. As shown in FIG8 , the high-precision device is a vehicle with high-precision positioning performance. The vehicle can be equipped with a real-time kinematic (RTK) device, an inertial measurement unit (IMU), and a high-precision wheel speed detection device. These components can help the vehicle achieve high-precision positioning. In addition, five cameras can be installed on the vehicle. The arrows numbered 1, 2, 3, 4, and 5 in FIG8 indicate the installation position of the camera and the direction of the camera lens. The angle between each two adjacent cameras is about 72 degrees. Each camera can have an elevation angle of about 20 degrees upwards. The five cameras are connected by a rigid body.

[0110] It should be understood that the high-precision equipment shown in Figure 8 is only an example. In actual applications, the high-precision equipment can also be manifested as other forms of equipment, such as mobile terminals, etc.; and the installation positions of multiple cameras on the high-precision equipment can also be set according to actual needs. The embodiments of this application do not impose any restrictions on this.

[0111] Step 702: Detect feature points in the high-precision image, perform intra-frame matching and inter-frame matching based on the feature points in the high-precision image, and determine matching feature point pairs.

[0112] After the server receives the high-precision images captured by the camera on the high-precision device, it can detect feature points in each high-precision image. For example, the server can process the received high-precision images using a feature point detection model or algorithm such as SuperPoint or SIFT to determine the feature points contained therein. Figure 9 is a schematic diagram of feature points in a high-precision image provided by an embodiment of the present application, where the black dots in the figure represent the determined feature points.

[0113] Furthermore, the server can use intra-frame matching and inter-frame matching to determine matching feature point pairs based on the feature points in each received high-definition image. This means identifying matching feature points in two different high-definition images. For example, feature point matching algorithms such as Superglue and SIFT can be used to identify matching feature points in two high-definition images.

[0114] It should be noted that intra-frame matching refers to matching feature points in high-precision images captured by different cameras at the same time. Taking the high-precision device shown in Figure 8 as an example, the intra-frame matching strategy adopted can be, for example, matching feature points in the high-precision image captured by camera 1 with feature points in the high-precision image captured by camera 2, matching feature points in the high-precision image captured by camera 2 with feature points in the high-precision image captured by camera 3, matching feature points in the high-precision image captured by camera 3 with feature points in the high-precision image captured by camera 4, matching feature points in the high-precision image captured by camera 4 with feature points in the high-precision image captured by camera 5, and matching feature points in the high-precision image captured by camera 5 with feature points in the high-precision image captured by camera 1. Figure 10 is an exemplary intra-frame matching schematic diagram provided in an embodiment of the present application. Figure 10 shows the matching of feature points in high-precision images captured at the same time by camera 1 (front-view camera, the corresponding high-precision image is the upper half of Figure 10) and camera 2 (left front camera, the corresponding high-precision image is the lower half of Figure 10).

[0115] It should be noted that inter-frame matching refers to matching feature points in high-precision images captured by the same or different cameras at different times. In the embodiment of the present application, inter-frame matching can be performed based on a sliding window algorithm, that is, a window of fixed time length is set, and feature point matching is performed on high-precision images captured by all cameras within the time period corresponding to the window. By continuously moving the window, inter-frame matching between more high-precision images is achieved. FIG11 is a schematic diagram of a sliding window algorithm provided by the embodiment of the present application. As shown in FIG11, within window 1101, the server needs to match the feature points included in each high-precision image captured by each camera at time t5 with the feature points in each high-precision image captured by each camera at time t1 to t4. Within window 1102, the server needs to match the feature points included in each high-precision image captured by each camera at time t6 with the feature points in each high-precision image captured by each camera at time t2 to t5, and so on. Figures 12 and 13 are exemplary inter-frame matching schematic diagrams provided in an embodiment of the present application. Figure 12 shows the matching of feature points in high-precision images taken by the same camera at different times, and Figure 13 shows the matching of feature points in high-precision images taken by different cameras at different times.

[0116] Optionally, to improve the reliability of the matching feature point pairs determined in step 702, embodiments of the present application may pre-process each received high-precision image before performing intra-frame and inter-frame matching based on the feature points in the high-precision image to determine the matching feature point pairs. Specifically, the server may use a segmentation model to determine the repetitive texture elements and dynamic obstacle elements in each high-precision image, and perform masking on the repetitive texture elements and dynamic obstacle elements in the high-precision image. Furthermore, intra-frame and inter-frame matching may be performed based on the feature points in the masked high-precision image to determine the matching feature point pairs.

[0117] Specifically, considering that the high-precision images corresponding to outdoor scenes captured by the cameras on high-precision equipment usually contain many texture repetitive elements (such as road surfaces, etc.) and dynamic obstacle elements (such as vehicles and pedestrians on the road, etc.), since these texture repetitive elements and dynamic obstacle elements cannot effectively serve as positioning references in outdoor scene positioning applications, and may even affect the accuracy of the determined positioning results, the embodiment of the present application can cover up the texture repetitive elements and dynamic obstacle elements in the high-precision image before performing feature point matching processing on the high-precision image, so as to avoid mismatching between feature points corresponding to texture repetitive elements and dynamic obstacle elements in the high-precision image, thereby affecting the accuracy of the three-dimensional position information of the feature points in the subsequently determined high-precision image.

[0118] For example, a segmentation model (such as the Mask RCNN model, etc.) can be used to detect texture repetitive elements and dynamic obstacle elements in high-precision images, and the detected texture repetitive elements and dynamic obstacle elements can be segmented out of the high-precision image through the segmentation model, that is, the texture repetitive elements and dynamic obstacle elements in the high-precision image are masked. Accordingly, when intra-frame matching and inter-frame matching are performed based on the feature points in the high-precision image, the feature points on the masked elements will not participate in the matching. In this way, the computing resources required for subsequent processing can be reduced to a certain extent, and the number of mismatched feature point pairs can also be reduced, which helps to improve the accuracy of the three-dimensional position information of the feature points in the high-precision image determined subsequently.

[0119] Step 703: performing an outlier filtering operation based on the matching feature point pairs to obtain inner matching feature point pairs.

[0120] Taking into account that the matching feature point pairs determined by step 702 may include matching feature point pairs with unreliable matching relationships, i.e., external matching feature point pairs, and these external matching feature point pairs may affect the accuracy and reliability of subsequent calculations, the server needs to perform an external point filtering operation based on the matching feature point pairs determined by step 702 to filter out the external matching feature point pairs with unreliable matching relationships and only retain the internal matching feature point pairs with relatively reliable matching relationships.

[0121] In one possible implementation, the present invention innovatively proposes a method for performing outlier filtering based on the General Matrix (G matrix). Specifically, the server can determine, for each matching feature point pair, the rotation and translation parameters corresponding to the matching feature point pair. Then, based on the rotation and translation parameters, the server determines the General Matrix corresponding to the matching feature point pair. Furthermore, based on the General Matrix and the ray representations corresponding to each feature point in the matching feature point pair, the server detects whether the matching feature point pair is an inner matching feature point pair.

[0122] Figure 14 is a schematic diagram illustrating the derivation of a G matrix formula provided in an embodiment of the present application. Figure 14 illustrates the Plucker coordinate system, where point P represents a three-dimensional point, corresponding to the three-dimensional position information of the high-definition image acquisition camera in the world coordinate system; q represents the direction vector of the camera's projection ray, which can be calculated based on the pixel position information in the image coordinate system and the camera's intrinsic parameters. A three-dimensional point on the camera ray has a scale factor α in the direction of the camera ray.

[0123] The Plücker coordinate system is a commonly used representation of a three-dimensional line. As shown in Figure 14, q represents the direction vector of the line, P represents a three-dimensional point on the line, then q′=P×q represents the normal vector of the plane formed by the origin and the line, and then there exists q T q′=0, then the equation of the three-dimensional point on the straight line can be expressed as follows (2): (q×q′)+αq (2)

[0124] The light L of camera C1 in the Plücker coordinate system can be expressed as follows (3):

[0125] Then, the light ray L′ of camera C2 rigidly connected to camera C1 at the same time, or the light ray L′ of camera C1 or camera C2 at another time, can be expressed as the following equation (4):

[0126] Wherein, R and t represent the rotation parameter and translation parameter between camera C1 and camera C2, or represent the rotation parameter and translation parameter of camera C1 at different times, or represent the rotation parameter and translation parameter of camera C1 and camera C2 at different times.

[0127] If the light and light If they intersect at one point, then there exists the relationship shown in the following formula (5):

[0128] Combining the above formulas (4) and (5), we can derive the relationship shown in the following formula (6):

[0129] Simplifying formula (6), we can get the following formula (7):

[0130] By changing formula (7) into a matrix form, we can get the following formula (8):

[0131] in, This is the essential matrix of the universal camera model required for this outlier removal operation. R and t represent the rotation and translation parameters of the same camera at different time sequences, or the rotation and translation parameters of different cameras at the same time sequence, or the rotation and translation parameters of different cameras at different time sequences.

[0132] In an embodiment of the present application, the rotation parameters and translation parameters in the above-mentioned G matrix can be determined in the following manner: if the matching feature point pair is determined by intra-frame matching, then the acquisition camera of the high-precision image to which each feature point in the matching feature point pair belongs is determined, and the rotation parameters and translation parameters corresponding to the matching feature point pair are determined based on the positional relationship parameters between the acquisition cameras; if the matching feature point pair is determined by inter-frame matching, then the acquisition time difference between the high-precision images to which each feature point in the matching feature point pair belongs is determined, and the motion parameters of the high-precision device in the time period corresponding to the acquisition time difference are pre-integrated to obtain the reference rotation parameters and reference translation parameters of the high-precision device; based on the reference rotation parameters and the reference translation parameters, the rotation parameters and translation parameters corresponding to the matching feature point pair are determined.

[0133] Specifically, for the matching feature point pairs whose matching relationship is determined by intra-frame matching, the server can determine the acquisition camera of the high-precision image to which each feature point in the matching feature point pair belongs, that is, the camera that acquired the high-precision image to which the feature point belongs, and then directly determine the rotation parameters and translation parameters between the two acquisition cameras based on the position relationship parameters between the cameras calibrated on the high-precision device, and substitute them into the above-mentioned G matrix expression to obtain the G matrix used to detect whether the matching feature point pair belongs to an internal matching feature point pair.

[0134] For the matching feature point pairs whose matching relationship is determined by inter-frame matching, the server can perform pre-integration (PreIntegration) on the motion parameters of the high-precision device to determine the reference rotation parameters and reference translation parameters corresponding to the matching feature point pairs. The specific formulas for pre-integration of motion parameters are shown in the following equations (9), (10), and (11), respectively: v t+1 =v t +(R(a m -a b )+g)Δt (10)

[0135] Among them, p t+1 and p t They represent the positions of the high-precision equipment at time t+1 and time t, respectively, and v t+1 and v t They represent the speed of the high-precision equipment at time t+1 and time t, respectively, and q t+1 and q t They represent the rotation angles of the high-precision device at time t+1 and time t (usually expressed as a quaternion); v is the actual wheel speed of the high-precision device, a m and a bare the actual measured acceleration and acceleration error, respectively. Δt is the time difference between time t+1 and time t. R is the rotation parameter measured by the IMU of the high-precision equipment. g is the acceleration of gravity. q is the rotation angle measured by the IMU. ω t and ω b are the actual measured angular velocity and angular velocity error, respectively.

[0136] In the embodiment of the present application, for the matching feature point pairs whose matching relationship is determined by inter-frame matching, the matching feature point pairs can be determined according to (p a -p b ) Determine the reference translation parameters corresponding to the matching feature point pair, where a and b represent the acquisition time of the high-precision images to which the two feature points in the matching feature point pair belong, and p a and p b They are the positions of the high-precision equipment at time a and time b respectively; and can be calculated based on (q a -q b ) Determine the reference rotation parameters corresponding to the matching feature point pair, where q a and q b are the rotation angles of the high-precision equipment at time a and time b respectively.

[0137] For matching feature point pairs determined through inter-frame matching based on high-precision images acquired by the same camera, the server can directly substitute the reference rotation parameters and reference translation parameters corresponding to the matching feature point pair determined in the above manner into the expression of the G matrix to obtain the G matrix used to detect whether the matching feature point pair is an internal matching feature point pair. For matching feature point pairs determined through inter-frame matching based on high-precision images acquired by different cameras, the server also needs to integrate the positional relationship parameters between the acquisition cameras of the two high-precision images based on the reference rotation parameters and reference translation parameters corresponding to the matching feature point pair to determine the G matrix used to detect whether the matching feature point pair is an internal matching feature point pair.

[0138] After determining the G matrix corresponding to the matching feature point pair, the light representation of each feature point in the matching feature point pair and the G matrix corresponding to the matching feature point pair can be substituted into the above formula 8. Calculate the matching degree between the two feature points in the matching feature point pair. If the calculated matching degree meets the preset matching condition (such as less than the preset threshold), it can be determined that the matching feature point pair belongs to the inner matching feature point pair. Conversely, if the calculated matching degree does not meet the preset matching condition, it can be determined that the matching feature point pair belongs to the outer matching feature point pair and needs to be filtered out.

[0139] Experiments have shown that outlier feature point pairs can be effectively filtered out. In the experiment, the number of matching feature point pairs dropped from 208 to 183 after the above-mentioned outlier filtering operation, and the retained inner matching feature point pairs were essentially free of mismatches. Compared to the traditional epipolar-based outlier filtering method, the G-matrix-based outlier filtering method proposed in the present application can effectively filter out outlier matching feature point pairs within texture-repeating regions in the image, achieving superior outlier filtering results.

[0140] It should be understood that in actual applications, in addition to using the above method to filter out the outer matching feature point pairs in the matching feature point pairs, the server can also use other methods to filter out the outer matching feature point pairs in the matching feature point pairs. This application does not impose any restrictions on this.

[0141] Step 704: Perform triangulation calculation based on the inner matching feature point pair and the posture corresponding to the high-precision image to which the feature points in the inner matching feature point pair belong, and determine the three-dimensional position information of the feature points in the inner matching feature point pair in the world coordinate system; the posture corresponding to the high-precision image is the posture of the camera that captured the high-precision image when capturing the high-precision image.

[0142] After the server filters out the outer matching feature point pairs in the matching feature point pairs through step 703, it can further perform triangulation calculations based on the two-dimensional position information of the feature points in each retained inner matching feature point pair in the image coordinate system, and the corresponding posture of the high-precision image to which the feature points in each inner matching feature point pair belong, thereby determining the three-dimensional position information of the feature points in the inner matching feature point pair in the world coordinate system. Among them, the posture corresponding to the high-precision image can be understood as the position and posture of the camera that captured the high-precision image when it captured the high-precision image. In this embodiment of the application, the position and posture of the high-precision device can be determined through the pre-integration introduced in the above step 702. Accordingly, the position and posture of the camera can be determined based on the deployment position of the camera on the high-precision device.

[0143] It should be noted that triangulation calculation, also known as triangulation measurement, refers to an algorithm that measures the depth value of a feature point in a three-dimensional space based on the angle when observing the feature point at different positions. In the embodiment of the present application, when the posture corresponding to the high-precision image and the two-dimensional position information of the feature points with matching relationship in the high-precision image in the image coordinate system are known, the three-dimensional position information of the feature points with matching relationship in the world coordinate system can be determined by triangulation calculation.

[0144] It should be understood that the three-dimensional position information of the feature point in the world coordinate system can essentially reflect the position of the actual element to which the feature point belongs (such as buildings, trees, signs and other elements in the real world) in the world coordinate system. The positions of these actual elements in the world coordinate system can be used as a reference for visual positioning in outdoor scenes, assisting in determining the high-precision positioning results of the device to be positioned in the outdoor scene.

[0145] Optionally, considering that there may be cumulative errors when determining the posture of the high-precision device by pre-integration of motion parameters, in order to avoid the cumulative errors affecting the accuracy and reliability of the three-dimensional position information of the determined feature points, in an embodiment of the present application, the server can eliminate the cumulative errors of the posture of the high-precision device determined by pre-integration based on RTK carrier phase differential technology at preset time intervals.

[0146] For example, the accumulated error can be eliminated based on RTK by using the following equation (12):

[0147] Among them, r p (x) is the residual corresponding to the prior factor generated by marginalization, r L (m, X) is the residual corresponding to the point cloud feature matching, which can be understood as the visual reprojection error in the embodiment of the present application. is the residual error generated by IMU pre-integration.

[0148] By constraining the absolute pose with RTK pose, the accumulated error in the pre-integration process can be eliminated, thereby constructing a pose graph to optimize the pose of the high-precision equipment and eliminate the accumulated error of pre-integration.

[0149] The embodiment of the present application can complete the construction of the initial visual fingerprint library through the above steps 701 to 704, that is, the visual fingerprint library is constructed based on the high-precision images collected by high-precision equipment, and the high-precision images corresponding to outdoor scenes collected by the high-precision equipment and the three-dimensional position information of the feature points in the high-precision images in the world coordinate system are stored in the visual fingerprint library.

[0150] In addition, in the embodiment provided by the present application, the data stored in the visual fingerprint library can also be updated based on the standard precision images collected by ordinary equipment, thereby ensuring that the data stored in the visual fingerprint library has both accuracy and freshness. Specifically, the server can update the data stored in the visual fingerprint library based on the standard precision images collected by ordinary equipment in the following manner: obtain the standard precision image collected by the ordinary equipment; determine the high-precision image to be updated that matches the standard precision image in the visual fingerprint library; determine the associated elements that exist in both the standard precision image and the high-precision image to be updated based on the standard precision image and the high-precision image to be updated through the extreme line search technology; and then adjust the update time of the three-dimensional position information of the feature point corresponding to the associated element in the visual fingerprint library to the acquisition time of the standard precision image.

[0151] For example, a server can receive a standard-precision image uploaded by a common device. Here, the common device can be a device with positioning capabilities but low positioning accuracy, such as a vehicle equipped with a dashcam. In this embodiment of the present application, the vehicle can upload the standard-precision image captured by the dashcam to the server through its onboard computer. At the same time, in order to facilitate the server to quickly determine the high-precision image to be updated that matches the standard-precision image, the onboard computer can also upload the low-precision positioning result of the vehicle when the standard-precision image was captured to the server. After the server obtains the standard-precision image and low-precision positioning result uploaded by the common device, it can first search the visual fingerprint library for the high-precision image corresponding to the low-precision positioning result based on the low-precision positioning result. Then, all the high-precision images corresponding to the low-precision positioning result can be used as the high-precision images to be updated, or the high-precision image corresponding to the low-precision positioning result can be selected from the high-precision images corresponding to the low-precision positioning result as the high-precision image to be updated. The specific method of selecting the high-precision image to be updated is similar to the method of selecting the reference high-precision image matching the first image in the embodiment shown in FIG. 2 above.

[0152] Furthermore, the server can use the epipolar line search technology to determine the elements that exist in both the standard precision image and the high-precision image to be updated, and use them as associated elements. Figure 15 is a schematic diagram of determining associated elements in the standard precision image and the high-precision image to be updated provided by an embodiment of the present application. As shown in Figure 15, the server uses the epipolar line search technology to perform data differentiation based on the standard precision image and the high-precision image to be updated, and can determine that element 1501 is an associated element that coexists in the standard precision image and the high-precision image to be updated. For this associated element, the server can assume that the associated element still exists in the real world when the standard precision image is collected, and its position has not changed. Therefore, the update time of the three-dimensional position information of the feature point corresponding to the associated element in the visual fingerprint library can be adjusted to the acquisition time of the standard precision image. Here, the update time of the three-dimensional position information of the feature point is used to represent the time of the most recent detection of whether the feature point is valid. Adjusting the update time to the acquisition time of the standard precision image indicates that the three-dimensional position information of the feature point is still valid at the acquisition time of the standard precision image.

[0153] It should be understood that updating the update time of the feature point's 3D position information based on the acquisition time of the standard precision image is beneficial for considering the reliability of the feature point's 3D position information during actual visual positioning. If, during actual visual positioning, it is found that the update time of the 3D position information of a feature point used is earlier, it indicates that the reliability of the 3D position information of the feature point is low. Therefore, the confidence level of the 3D position information of the feature point can be reduced, that is, the degree of consideration of the 3D position information of the feature point during visual positioning can be reduced to prevent the 3D position information of the feature point from affecting the accuracy and reliability of the determined positioning result.

[0154] Furthermore, if an unrelated element is determined to exist in the standard-precision image, the server needs to determine the unrelated element's three-dimensional position in the world coordinate system based on multiple standard-precision images containing the unrelated element and the corresponding poses of each of these images, and reconstruct the unrelated element in the high-precision image to be updated. Here, an unrelated element is an element that exists in the standard-precision image but not in the high-precision image to be updated. The pose corresponding to the standard-precision image is the pose of the standard-precision image when it was captured by the standard device that captured the image.

[0155] In practical applications, outdoor scenes are complex and changeable, and may be subject to change due to factors such as weather changes or urban planning. For example, it is common for outdoor scenes to have additional elements compared to when the high-definition image was captured. In this case, embodiments of the present application can reconstruct the newly added elements in the high-definition image to be updated corresponding to the standard-definition image based on subsequently received standard-definition images. In other words, they can reconstruct non-correlated elements that existed in the standard-definition image but not in the high-definition image to be updated.

[0156] For example, as shown in FIG15 , the server, using the epipolar line search technique, does not find an element matching element 1502 in the high-definition image to be updated, and therefore determines that the element in the standard-definition image is a non-correlated element. Furthermore, the server can obtain multiple standard-definition images including the non-correlated element. These multiple standard-definition images can be from the same general-purpose device or from different general-purpose devices. Then, through triangulation calculation, the server determines the three-dimensional position information of the feature points corresponding to the non-correlated element in the standard-definition images based on the two-dimensional position information of the feature points in the multiple standard-definition images corresponding to the non-correlated element in their respective standard-definition images, as well as the corresponding poses of the multiple standard-definition images. It should be understood that the implementation method for determining the three-dimensional position information of the feature points of the non-correlated element in the world coordinate system here is similar to the implementation method for determining the three-dimensional position information of the feature points in the high-definition image in the world coordinate system described above. For details, please refer to the relevant introduction above. Furthermore, the server can three-dimensionally reconstruct the non-associated element in the high-precision image to be updated based on the three-dimensional position information of the feature point corresponding to the non-associated element in the world coordinate system, thereby supplementing the visual fingerprint library.

[0157] It should be understood that since the three-dimensional position information of the feature points of the above-mentioned non-associated elements in the world coordinate system is determined based on the posture of the ordinary device, the three-dimensional position information of such feature points is less accurate than the three-dimensional position information of the feature points in the high-precision image. When actually performing visual positioning, if it is necessary to use the three-dimensional position information of such feature points for positioning, the confidence level of the three-dimensional position information of such feature points can be appropriately reduced to avoid reducing the accuracy of the determined positioning results due to the three-dimensional position information of such feature points.

[0158] The visual fingerprint library construction method provided in the embodiment of the present application can determine the three-dimensional position information of the feature points in the high-precision image in the world coordinate system based on the high-precision image captured by the high-precision equipment, and construct the visual fingerprint library accordingly. The data stored in the visual fingerprint library can also be updated according to the standard-precision image captured by ordinary equipment. Since the cost of capturing standard-precision images by ordinary equipment is relatively low, the standard-precision images captured by ordinary equipment can be frequently obtained, and the data stored in the visual fingerprint library can be updated using the obtained standard-precision images. In this way, the data stored in the visual fingerprint library has both high precision and freshness, which can be better suitable for positioning in complex and changeable outdoor scenes.

[0159] In response to the visual positioning method described above, the present application also provides a corresponding visual positioning device to enable the above-mentioned visual positioning method to be applied and implemented in practice.

[0160] Referring to FIG16 , FIG16 is a schematic diagram of the structure of a visual positioning device 1600 corresponding to the visual positioning method shown in FIG2 above. As shown in FIG16 , the visual positioning device 1600 includes:

[0161] An image acquisition module 1601 is configured to acquire a first image acquired when the image acquisition device is at a reference position;

[0162] a matching image determination module 1602 configured to determine, from the high-precision images corresponding to the reference position, a reference high-precision image that matches the first image, wherein the pre-stored high-precision image has a higher positioning accuracy than the first image;

[0163] The matching feature point determination module 1603 is configured to determine a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image;

[0164] The high-precision positioning module 1604 is used to determine the positioning result corresponding to the image acquisition device based on the position information of the feature points in the target matching feature point pair belonging to the reference high-precision image and the position information of the feature points in the target matching feature point pair belonging to the first image.

[0165] Optionally, the matching feature point determination module 1603 is specifically configured to:

[0166] constructing candidate matching feature point pairs based on feature points having a matching relationship in the first image and the reference high-precision image;

[0167] Performing multiple first-level outlier filtering operations based on the candidate matching feature point pairs; the first-level outlier filtering operations include: selecting basic matching feature point pairs from the candidate matching feature point pairs, determining a predicted position and posture of the image acquisition device based on the basic matching feature point pairs, and determining a filtering result and a filtering effect of the first-level outlier filtering operation based on the predicted position and each of the candidate matching feature point pairs;

[0168] A target first-level outlier filtering operation with the best filtering effect is determined among the multiple first-level outlier filtering operations, and the target matching feature point pair is determined according to the filtering result of the target first-level outlier filtering operation.

[0169] Optionally, the matching feature point determination module 1603 is specifically configured to:

[0170] Determining candidate matching feature point pairs retained by the target first-level outlier filtering operation as reference matching feature point pairs;

[0171] Performing multiple secondary outlier filtering operations based on the reference matching feature point pairs; the secondary outlier filtering operations comprising: determining two-dimensional position information of feature points belonging to the reference high-definition image based on assumed rotation parameters, assumed translation parameters, and three-dimensional position information of feature points belonging to the reference high-definition image in the reference matching feature point pairs; determining filtering results and filtering effects of the secondary outlier filtering operations based on the two-dimensional position information of feature points belonging to the reference high-definition image and the two-dimensional position information of feature points belonging to the first image in each of the reference matching feature point pairs;

[0172] A target secondary outlier filtering operation with the best filtering effect is determined among the multiple secondary outlier filtering operations, and the target matching feature point pair is determined according to the filtering result of the target secondary outlier filtering operation.

[0173] Optionally, the high-precision positioning module 1604 is specifically used to:

[0174] Determining a projection error based on three-dimensional position information of feature points belonging to the reference high-precision image in each of the target matching feature point pairs, two-dimensional position information of feature points belonging to the first image in each of the target matching feature point pairs, camera intrinsic parameters of the image acquisition device, and posture parameters and position parameters of the image acquisition device;

[0175] The posture parameters and position parameters of the image acquisition device are optimized by minimizing the projection error, and the positioning result is determined according to the optimized posture parameters and position parameters of the image acquisition device.

[0176] Optionally, the device further includes a fingerprint library construction module; the fingerprint library construction module includes:

[0177] A high-precision image acquisition unit, used to acquire high-precision images captured by multiple cameras rigidly connected to the high-precision device;

[0178] a feature point matching unit, configured to detect feature points in the high-precision image, perform intra-frame matching and inter-frame matching based on the feature points in the high-precision image, and determine matching feature point pairs;

[0179] an external point filtering unit, configured to perform an external point filtering operation based on the matching feature point pairs to obtain inner matching feature point pairs;

[0180] A position information determination unit is used to perform triangulation calculation based on the inner matching feature point pair and the posture corresponding to the high-precision image to which the feature points in the inner matching feature point pair belong, to determine the three-dimensional position information of the feature points in the inner matching feature point pair in the world coordinate system; the posture corresponding to the high-precision image is the posture of the camera that captures the high-precision image when the high-precision image is captured.

[0181] Optionally, the external point filtering unit is specifically used to:

[0182] For each of the matching feature point pairs, determine the rotation parameters and translation parameters corresponding to the matching feature point pair; determine the universal camera model intrinsic matrix corresponding to the matching feature point pair based on the rotation parameters and the translation parameters; and detect whether the matching feature point pair belongs to the inner matching feature point pair based on the universal camera model intrinsic matrix and the light representation corresponding to each feature point in the matching feature point pair.

[0183] Optionally, the external point filtering unit is specifically used to:

[0184] If the matching feature point pair is determined by intra-frame matching, then determining the acquisition camera of the high-precision image to which each feature point in the matching feature point pair belongs, and determining the rotation and translation parameters corresponding to the matching feature point pair based on the positional relationship parameters between the acquisition cameras;

[0185] If the matching feature point pair is determined through inter-frame matching, the acquisition time difference between the high-precision images to which each feature point in the matching feature point pair belongs is determined, and the motion parameters of the high-precision device within the time period corresponding to the acquisition time difference are pre-integrated to obtain the reference rotation parameters and reference translation parameters of the high-precision device; based on the reference rotation parameters and the reference translation parameters, the rotation parameters and translation parameters corresponding to the matching feature point pair are determined.

[0186] Optionally, the fingerprint library construction module further includes:

[0187] a segmentation unit configured to determine, for each high-definition image, texture repetitive elements and dynamic obstacle elements in the high-definition image using a segmentation model before performing intra-frame matching and inter-frame matching based on the feature points in the high-definition image to determine matching feature point pairs, and perform masking processing on the texture repetitive elements and the dynamic obstacle elements in the high-definition image;

[0188] The feature point matching unit is specifically used to:

[0189] Intra-frame matching and inter-frame matching are performed based on the feature points in the high-precision image after masking to determine the matching feature point pairs.

[0190] Optionally, the fingerprint library construction module further includes:

[0191] The error elimination unit is used to eliminate the accumulated error of the position and posture of the high-precision device determined by pre-integration based on the carrier phase difference technology at every preset time period.

[0192] Optionally, the fingerprint library construction module further includes:

[0193] A standard precision image acquisition unit, configured to acquire the standard precision image acquired by the common device;

[0194] A standard high-precision image matching unit, configured to determine a high-precision image to be updated that matches the standard high-precision image in the visual fingerprint library;

[0195] a correlation element determining unit, configured to determine, based on the standard precision image and the high-precision image to be updated, correlation elements existing in both the standard precision image and the high-precision image to be updated by using an epipolar line search technique;

[0196] The data updating unit is used to adjust the updating time of the three-dimensional position information of the feature points corresponding to the associated elements in the visual fingerprint library to the acquisition time of the standard precision image.

[0197] Optionally, the data updating unit is further configured to:

[0198] If it is determined that non-associated elements exist in the standard precision image, the three-dimensional position information of the non-associated elements in the world coordinate system is determined based on multiple standard precision images including the non-associated elements and the corresponding postures of the multiple standard precision images, and the non-associated elements are reconstructed in the high-precision image to be updated; the non-associated elements are elements that exist in the standard precision image and do not exist in the high-precision image to be updated, and the posture corresponding to the standard precision image is the posture when the standard precision image is collected by an ordinary device that collects the standard precision image.

[0199] The visual positioning device provided in the embodiment of the present application realizes high-precision positioning of outdoor scenes based on a visual fingerprint library that stores high-precision images corresponding to outdoor scenes and three-dimensional position information of feature points in the high-precision images in the world coordinate system. The data stored in the visual fingerprint library can be updated based on standard-precision images collected by ordinary equipment. Since the cost of collecting standard-precision images by ordinary equipment is relatively low, standard-precision images collected by ordinary equipment can be frequently obtained, and the obtained standard-precision images can be used to update the data stored in the visual fingerprint library. In this way, the data stored in the visual fingerprint library has both high precision and freshness, and can be better applied to positioning in complex and changeable outdoor scenes. When positioning is performed based on the visual fingerprint library, a reference high-precision image that matches the first image captured when the image acquisition device is in the low-precision position information can be first determined in the high-precision image corresponding to the low-precision position information stored in the visual fingerprint library according to the low-precision position information of the image acquisition device to be positioned; then, a target matching feature point pair is determined based on the feature points with a matching relationship in the first image and the reference high-precision image, and the high-precision positioning information of the image acquisition device is determined based on the three-dimensional position information of the feature points belonging to the reference high-precision image in the target matching feature point pair in the world coordinate system and the two-dimensional position information of the feature points belonging to the first image in the target matching feature point pair in the image coordinate system; in this way, high-precision, high-efficiency and high-reliability positioning of the image acquisition device is achieved in outdoor scenes based on the visual fingerprint library.

[0200] An embodiment of the present application also provides a computer device for realizing visual positioning, which may specifically be a terminal device or a server. The terminal device and server provided in the embodiment of the present application will be introduced below from the perspective of hardware instantiation.

[0201] See Figure 17, which is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. As shown in Figure 17, for ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of the present application. The terminal can be any terminal device including a mobile phone, tablet computer, personal digital assistant (PDA), car computer, etc., taking the car computer as an example:

[0202] FIG17 is a block diagram showing a partial structure of an on-board computer related to a terminal provided in an embodiment of the present application. Referring to FIG17 , the on-board computer includes components such as a radio frequency (RF) circuit 1710, a memory 1720, an input unit 1730 (including a touch panel 1731 and other input devices 1732), a display unit 1740 (including a display panel 1741), a sensor 1750, an audio circuit 1760 (which can be connected to a speaker 1761 and a microphone 1762), a wireless fidelity (WiFi) module 1770, a processor 1780, and a power supply 1790. Those skilled in the art will appreciate that the on-board computer structure shown in FIG17 does not limit the on-board computer and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0203] Memory 1720 can be used to store software programs and modules. Processor 1780 executes the various functional applications and data processing of the onboard computer by running the software programs and modules stored in memory 1720. Memory 1720 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as sound playback or image playback); the data storage area may store data generated based on the use of the onboard computer (such as audio data, a phone book, etc.). Furthermore, memory 1720 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0204] Processor 1780 is the control center of the onboard computer. It connects all components of the onboard computer using various interfaces and circuits. It executes software programs and / or modules stored in memory 1720 and accesses data stored in memory 1720 to perform various functions and process data. Optionally, processor 1780 may include one or more processing units. Preferably, processor 1780 integrates an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 1780.

[0205] In an embodiment of the present application, the processor 1780 included in the terminal is also used to execute the steps of any implementation method of the visual positioning method provided in the embodiment of the present application.

[0206] Referring to Figure 18, Figure 18 is a schematic diagram of the structure of a server 1800 provided in an embodiment of the present application. The server 1800 may have relatively large differences due to different configurations or performance, and may include one or more central processing units (CPU) 1822 (for example, one or more processors) and a memory 1832, and one or more storage media 1830 (for example, one or more mass storage devices) storing application programs 1842 or data 1844. Among them, the memory 1832 and the storage medium 1830 can be temporary storage or permanent storage. The program stored in the storage medium 1830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1822 can be configured to communicate with the storage medium 1830 to execute a series of instruction operations in the storage medium 1830 on the server 1800.

[0207] The server 1800 may also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858, and / or one or more operating systems, such as Windows Server 2003. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM etc.

[0208] The steps executed by the server in the above embodiment can be based on the server structure shown in Figure 18.

[0209] Among them, CPU 1822 can also be used to execute the steps of any implementation method of the visual positioning method provided in the embodiments of the present application.

[0210] An embodiment of the present application further provides a computer-readable storage medium for storing a computer program, which is used to execute any implementation of a visual positioning method described in the aforementioned embodiments.

[0211] The embodiments of the present application further provide a computer program product including a computer program, which, when executed on a computer, enables the computer device to execute any one of the implementations of the visual positioning method described in the aforementioned embodiments.

[0212] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0213] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0214] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0215] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0216] 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 this understanding, the technical solution of the present application is essentially or the part that contributes to the relevant technology 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 storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0217] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0218] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A visual positioning method, the method being executed by a computer device, the method comprising: Acquire a first image acquired when the image acquisition device is in a reference position; Determine a reference high-precision image that matches the first image in the pre-stored high-precision images corresponding to the reference position, wherein the positioning accuracy of the pre-stored high-precision image is higher than that of the first image; Determining a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image; The positioning result corresponding to the image acquisition device is determined according to the position information of the feature points belonging to the reference high-precision image in the target matching feature point pair and the position information of the feature points belonging to the first image in the target matching feature point pair.

2. According to the method of claim 1, determining a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image comprises: Constructing candidate matching feature point pairs based on feature points having a matching relationship between the first image and the reference high-precision image; Perform multiple first-level outlier filtering operations based on the candidate matching feature point pairs; The first-level outlier filtering operation includes: selecting a basic matching feature point pair from the candidate matching feature point pairs, determining a predicted position and posture of the image acquisition device according to the basic matching feature point pair, and determining a filtering result and filtering effect of the first-level outlier filtering operation according to the predicted position and posture and each of the candidate matching feature point pairs; A target primary outlier filtering operation with the best filtering effect is determined among the multiple primary outlier filtering operations, and the target matching feature point pair is determined according to the filtering result of the target primary outlier filtering operation.

3. The method according to claim 2, wherein determining the target matching feature point pairs according to the filtering result of the first-level outlier filtering operation of the target comprises: Determine candidate matching feature point pairs retained by the target primary outlier filtering operation as reference matching feature point pairs; Perform multiple secondary outlier filtering operations based on the reference matching feature point pairs; The secondary external point filtering operation includes: determining the two-dimensional position information of the feature points belonging to the reference high-precision image according to the assumed rotation parameters, the assumed translation parameters, and the three-dimensional position information of the feature points belonging to the reference high-precision image in the reference matching feature point pairs; determining the filtering result and filtering effect of the secondary external point filtering operation according to the two-dimensional position information of the feature points belonging to the reference high-precision image in each of the reference matching feature point pairs and the two-dimensional position information of the feature points belonging to the first image; A target secondary outlier filtering operation with the best filtering effect is determined among the multiple secondary outlier filtering operations, and the target matching feature point pair is determined according to the filtering result of the target secondary outlier filtering operation.

4. According to the method according to any one of claims 1 to 3, determining the positioning result corresponding to the image acquisition device according to the position information of the feature points in the target matching feature point pair belonging to the reference high-precision image and the position information of the feature points in the target matching feature point pair belonging to the first image, comprises: Determine the projection error according to the three-dimensional position information of the feature points belonging to the reference high-precision image in each of the target matching feature point pairs, the two-dimensional position information of the feature points belonging to the first image in each of the target matching feature point pairs, the camera intrinsic parameters of the image acquisition device, and the posture parameters and position parameters of the image acquisition device; The posture parameters and position parameters of the image acquisition device are optimized by minimizing the projection error, and the positioning result is determined according to the optimized posture parameters and position parameters of the image acquisition device.

5. According to the method according to any one of claims 1 to 4, the high-precision image is pre-stored in a visual fingerprint library, and the visual fingerprint library is constructed in the following manner: Acquire high-precision images collected by multiple cameras rigidly connected to high-precision equipment; Detecting feature points in the high-precision image, performing intra-frame matching and inter-frame matching based on the feature points in the high-precision image, and determining matching feature point pairs; Performing an external point filtering operation based on the matching feature point pairs to obtain internal matching feature point pairs; Perform triangulation calculation based on the inner matching feature point pair and the pose corresponding to the high-precision image to which the feature points in the inner matching feature point pair belong, to determine the three-dimensional position information of the feature points in the inner matching feature point pair in the world coordinate system; The posture corresponding to the high-precision image is the posture of the camera that captures the high-precision image when the high-precision image is captured.

6. The method according to claim 5, wherein the performing of an external point filtering operation based on the matching feature point pairs to obtain internal matching feature point pairs comprises: For each of the matching feature point pairs, determining a rotation parameter and a translation parameter corresponding to the matching feature point pair; According to the rotation parameters and the translation parameters, a universal camera model intrinsic matrix corresponding to the matching feature point pair is determined; according to the universal camera model intrinsic matrix and the light representation corresponding to each feature point in the matching feature point pair, it is detected whether the matching feature point pair belongs to the inner matching feature point pair.

7. The method according to claim 6, wherein determining the rotation parameters and translation parameters corresponding to the matching feature point pairs comprises: If the matching feature point pair is determined by intra-frame matching, then determining the acquisition camera of the high-precision image to which each feature point in the matching feature point pair belongs, and determining the rotation and translation parameters corresponding to the matching feature point pair according to the positional relationship parameters between the acquisition cameras; If the matching feature point pair is determined by inter-frame matching, the acquisition time difference between the high-precision images to which each feature point in the matching feature point pair belongs is determined, and the motion parameters of the high-precision device in the time period corresponding to the acquisition time difference are pre-integrated to obtain the reference rotation parameters and reference translation parameters of the high-precision device; based on the reference rotation parameters and the reference translation parameters, the rotation parameters and translation parameters corresponding to the matching feature point pair are determined.

8. The method according to claim 5, before performing intra-frame matching and inter-frame matching based on the feature points in the high-precision image to determine the matching feature point pairs, the method further comprises: For each of the high-precision images, determine the texture repetitive elements and the dynamic obstacle elements in the high-precision image through a segmentation model, and perform masking processing on the texture repetitive elements and the dynamic obstacle elements in the high-precision image; The performing intra-frame matching and inter-frame matching based on the feature points in the high-precision image to determine the matching feature point pairs includes: Intra-frame matching and inter-frame matching are performed based on the feature points in the high-precision image after masking to determine the matching feature point pairs.

9. The method according to claim 5, further comprising: At preset time intervals, based on carrier phase differential technology, the accumulated error of the position and posture of the high-precision device determined by pre-integration is eliminated.

10. The method according to claim 5, further comprising: Acquire the standard precision image collected by common equipment; Determining in the visual fingerprint library a high-precision image to be updated that matches the standard-precision image; Determine, by using an epipolar line search technique, the associated elements existing in both the standard precision image and the high precision image to be updated according to the standard precision image and the high precision image to be updated; The updating time of the three-dimensional position information of the feature points corresponding to the associated elements in the visual fingerprint library is adjusted to the acquisition time of the standard precision image.

11. The method according to claim 10, further comprising: If it is determined that there are non-associated elements in the standard precision image, the three-dimensional position information of the non-associated elements in the world coordinate system is determined based on multiple standard precision images including the non-associated elements and the corresponding postures of the multiple standard precision images, and the non-associated elements are reconstructed in the high-precision image to be updated; the non-associated elements are elements that exist in the standard precision image but do not exist in the high-precision image to be updated, and the posture corresponding to the standard precision image is the posture when the standard precision image is collected by an ordinary device that collects the standard precision image.

12. A visual positioning device, comprising: An image acquisition module, used to acquire a first image acquired when the image acquisition device is in a reference position; a matching image determination module, configured to determine a reference high-precision image that matches the first image from among pre-stored high-precision images corresponding to the reference position, wherein the positioning accuracy of the pre-stored high-precision image is higher than that of the first image; A matching feature point determination module, used to determine a target matching feature point pair based on feature points having a matching relationship between the first image and the reference high-precision image; The high-precision positioning module is used to determine the positioning result corresponding to the image acquisition device based on the position information of the feature points belonging to the reference high-precision image in the target matching feature point pair and the position information of the feature points belonging to the first image in the target matching feature point pair.

13. A computer device, the device comprising a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the visual positioning method according to any one of claims 1 to 11 according to the computer program.

14. A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is used to execute the visual positioning method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the visual positioning method according to any one of claims 1 to 11 is implemented.