A method and device for positioning unmanned aerial vehicle based on image feature matching
By generating and matching generalized subgraphs of UAV maps to extract robust feature groups, the problem of poor positioning accuracy of UAVs in complex environments is solved, more reliable image matching and positioning is achieved, and the reliability of autonomous flight is ensured. .
Patent Information
- Application Number
- CN202411123523.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-15
AI Technical Summary
In complex outdoor scenes, changes in environmental conditions make it difficult to match UAV real-time images with map reference images, affecting positioning accuracy and reliability, making it difficult to achieve autonomous flight and mission execution.
By obtaining several original sub-images of the target map, performing style changes to generate generalized sub-images, extracting robust feature groups and storing them in the database, using real-time images and database matching to determine the real-time positioning of the UAV, improving the robustness and accuracy of matching. .
When environmental conditions are poor or camera accuracy is poor, more reliable image matching is provided to ensure more accurate real-time positioning of drones and improve the image matching system's ability to cope with extreme environments.
Smart Images

Figure CN118644556B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for positioning a drone based on image feature matching. Background Art
[0002] The visual navigation system is one of the important navigation systems of UAVs. In the visual navigation system of UAVs, image feature matching technology has been widely used. By comparing the current image collected by the UAV in real time with the pre-stored map image, the UAV can use image matching technology to estimate its current position.
[0003] However, in actual applications, in complex outdoor scenes, the types of terrain involved are complex, and environmental conditions change dynamically, such as changes in lighting and climate conditions, making it difficult to achieve reliable image matching. It is difficult to obtain accurate matching results by matching the real-time image of the drone with a specific map reference image at a certain moment, which seriously affects the accuracy and reliability of the drone's positioning, and thus makes it impossible to complete long-duration autonomous flight and mission execution in the wild.
[0004] Therefore, the present invention provides a method and device for unmanned aerial vehicle positioning based on image feature matching. Summary of the invention
[0005] This specification provides a method and device for drone positioning based on image feature matching to solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This manual provides a method for positioning a drone, including:
[0008] Obtain several original sub-maps of the target map;
[0009] For any original sub-image, the style of the original sub-image is changed to obtain several generalized sub-images corresponding to the original sub-image;
[0010] The original subgraph and each generalized subgraph of the original subgraph are taken as subgraphs to be extracted, and for each subgraph to be extracted, a preset feature extraction method is used to perform feature extraction to obtain a number of initial features corresponding to the subgraph to be extracted;
[0011] Among the initial features corresponding to the sub-images to be extracted, determining a number of common features that at least some of the sub-images to be extracted have, as a robust feature group corresponding to the original sub-image;
[0012] The robust feature set and map coordinates of each original sub-map are stored in a database;
[0013] When the drone is positioning, the real-time positioning of the drone is determined based on the real-time image collected by the drone and the database.
[0014] Optionally, among the initial features corresponding to the sub-graphs to be extracted, several common features that are possessed by at least some of the sub-graphs to be extracted are determined, specifically including:
[0015] For any initial feature among the initial features respectively corresponding to each sub-image to be extracted, other sub-images to be extracted except the sub-image to be extracted corresponding to the initial feature are taken as sub-images to be matched, and each initial feature of each sub-image to be matched is taken as a feature to be matched;
[0016] The feature to be matched, whose difference with the initial feature is less than a preset feature difference threshold, is used as a similar feature to the initial feature;
[0017] Determine a robustness score of the initial feature according to the number of similar features of the initial feature, wherein the value of the robustness score is positively correlated with the number of similar features;
[0018] Several initial features with the highest robustness scores are determined as common features.
[0019] Optionally, the feature to be matched, the difference between which and the initial feature is less than a preset feature difference threshold, is used as the matching feature of the initial feature, specifically including:
[0020] For any sub-graph to be matched, determining a feature to be matched in the sub-graph to be matched that is closest to the initial feature as a quasi-similar feature;
[0021] If the difference between the quasi-similar feature and the initial feature is less than a preset feature difference threshold, the quasi-similar feature is used as a similar feature of the initial feature.
[0022] Optionally, determining the real-time positioning of the drone based on the real-time image collected by the drone and the database specifically includes:
[0023] Using the feature extraction method, feature extraction is performed on the real-time image collected by the drone to obtain a number of real-time features corresponding to the real-time image as a real-time feature group of the real-time image;
[0024] Determining a feature group difference between any robust feature group in the database and the real-time feature group;
[0025] When the difference is less than a preset feature group difference threshold, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone, and a transformation matrix is determined based on the difference. The real-time coordinates of the drone are determined based on the basic coordinates and the transformation matrix. Otherwise, the difference between other robust feature groups in the database and the real-time feature group continues to be determined until the difference between any robust feature group and the real-time feature group is less than the preset feature group difference threshold.
[0026] Optionally, the feature group difference threshold specifically includes: a feature group difference threshold corresponding to each terrain type;
[0027] After obtaining several original sub-maps of the target map, it also includes:
[0028] Determine the terrain type corresponding to each original sub-image;
[0029] The robust feature set and map coordinates of each original sub-image are stored in the database, including:
[0030] storing the robust feature set, map coordinates, and terrain type of each original sub-map in a database;
[0031] When the difference is less than a preset feature group difference threshold, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone, specifically including:
[0032] Determine a feature group difference threshold corresponding to the robust feature group according to the terrain type corresponding to the robust feature group;
[0033] When the difference is less than the feature group difference threshold corresponding to the robust feature group, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone.
[0034] Optionally, a feature group difference threshold corresponding to each terrain type is preset, specifically including:
[0035] Use any terrain type as the target terrain;
[0036] For each original sub-image of the target terrain, each initial feature corresponding to the original sub-image is used as a to-be-matched feature group corresponding to the original sub-image, and each to-be-matched feature group of the target terrain is matched with each robust feature group of the target terrain without replacement according to a preset feature group difference standard to obtain a plurality of feature group matching pairs;
[0037] Determine the proportion of correct matching pairs in all feature group matching pairs under different feature group difference standards, wherein the feature group to be matched and the robust feature group in the correct matching pairs belong to the same original subgraph;
[0038] The feature group difference standard corresponding to the highest correct matching pair ratio is used as the feature group difference threshold corresponding to the target terrain.
[0039] Optionally, feature extraction is performed on the real-time images collected by the drone, including:
[0040] Downsampling the real-time image collected by the drone to obtain a downsampled image corresponding to the real-time image;
[0041] Perform feature extraction on the downsampled image.
[0042] This specification provides a device for positioning a drone, including:
[0043] An acquisition module obtains several original sub-maps of the target map;
[0044] A change module, for any original sub-image, performs style changes on the original sub-image to obtain several generalized sub-images corresponding to the original sub-image;
[0045] The extraction module uses the original subgraph and each generalized subgraph of the original subgraph as the subgraph to be extracted, and performs feature extraction on each subgraph to be extracted using a preset feature extraction method to obtain a number of initial features corresponding to the subgraph to be extracted;
[0046] A determination module, which determines, from among the initial features corresponding to the sub-images to be extracted, a number of common features that are possessed by at least some of the sub-images to be extracted, as a robust feature group corresponding to the original sub-image;
[0047] A storage module stores the robust feature group and map coordinates of each original sub-map into a database;
[0048] The positioning module determines the real-time positioning of the drone based on the real-time image collected by the drone and the database when the drone is positioned.
[0049] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for positioning a drone based on image feature matching is implemented.
[0050] The present specification provides a drone positioning device based on image feature matching, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned drone positioning method based on image feature matching is implemented.
[0051] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0052] This method can provide more reliable image matching when the environmental conditions are poor or the camera accuracy is poor, thereby more accurately determining the real-time positioning of the drone. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0054] Figure 1 A flowchart of a method for positioning a UAV based on image feature matching in this specification;
[0055] Figure 2 A schematic diagram of common features in this specification;
[0056] Figure 3 This is a flow chart of matching without replacement in this manual;
[0057] Figure 4 A schematic diagram of a drone positioning device provided in this specification;
[0058] Figure 5 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0061] Figure 1 The following is a flow chart of a method for positioning a UAV based on image feature matching in this specification. The method for positioning a UAV based on image feature matching specifically includes the following steps:
[0062] S100: Acquire several original sub-maps of the target map.
[0063] In the existing technical solutions, it is difficult to obtain accurate matching results when the environmental conditions are poor when using image matching technology to locate the UAV. Therefore, this specification provides a method for locating the UAV based on image feature matching, so that when the environmental conditions are poor and the quality of the real-time images collected by the UAV is poor, the image matching system in the UAV can still be used to complete the positioning of the UAV.
[0064] The method provided in this specification includes a database storage stage and an image matching stage. The database storage stage includes steps S100-S108, and the image matching stage includes step S110. The execution subject of the database storage stage can be a server and an electronic device with computing capabilities, and the execution subject of the image matching stage can be an image matching system of a drone. In the following steps S100-S108, the method provided in this specification is described only with the server as the execution subject.
[0065] First, obtain several original sub-maps of the target map.
[0066] Among them, the target map can be an aerial map of the flight area of the drone, and the aerial map can be accompanied by geographic coordinate information; the original sub-map can be obtained by segmenting the complete target map; according to the geographic coordinate information of the target map, the geographic coordinates corresponding to each original sub-map can be determined according to the position of each original sub-map in the target map. Specifically, each original sub-map can be of a unified specification.
[0067] S102: For any original sub-image, perform style changes on the original sub-image to obtain a plurality of generalized sub-images corresponding to the original sub-image.
[0068] After obtaining each original sub-image, the style of each original sub-image can be changed. Specifically, for any original sub-image, the style of the original sub-image is changed according to several preset style change methods to obtain several generalized sub-images of the original sub-image, that is, one style change method corresponds to a generalized sub-image of the original sub-image.
[0069] In one or more embodiments of the present specification, the style change method may include adding noise, scaling, rotation, brightness change, perspective, downsampling, etc. For each style change method, several style change degrees may be preset, so that when the style of the original sub-image is changed, the style of the original sub-image is changed once using each preset style change degree of each preset style change method, that is, when n style change methods are preset and each style change method has m preset style change degrees, the original sub-image needs to be changed in style (n*m) times.
[0070] For example, with respect to brightness changes, different brightness value changes may be preset as the degree of change of each style corresponding to the brightness change.
[0071] By using the above-mentioned style change method, each generalized sub-image corresponding to the original sub-image can simulate the distortion of the image collected by the drone under poor environmental conditions.
[0072] S104: The original subgraph and each generalized subgraph of the original subgraph are taken as subgraphs to be extracted, and for each subgraph to be extracted, a preset feature extraction method is used to perform feature extraction to obtain a number of initial features corresponding to the subgraph to be extracted.
[0073] After obtaining the generalized subgraphs of an original subgraph, the original subgraph and the generalized subgraphs of the original subgraph can be used as subgraphs to be extracted. For each subgraph to be extracted, the same feature extraction method is used to extract features to obtain several initial features corresponding to the subgraph to be extracted.
[0074] Among them, the preset feature extraction method can be a feature point extraction algorithm, such as the Scale-Invariant Feature Transform (SIFT) algorithm, the Speeded-Up Robust Features (SURF) algorithm, etc. Using the above feature extraction method, a number of feature points of the sub-image to be extracted and the feature information corresponding to each feature point can be obtained, and each feature information is used as an initial feature of the sub-image to be extracted; for different original sub-images, the same feature extraction method is used, and the number of initial features extracted using the feature extraction method may be different.
[0075] Thus, for each original subgraph, several initial features of the original subgraph and several initial features of each generalized subgraph of the original subgraph can be obtained. Since the same feature extraction method is used, the differences between the initial features can be measured by conventional numerical calculation methods.
[0076] S106: Determine, from among the initial features corresponding to the sub-graphs to be extracted, a number of common features that are possessed by at least some of the sub-graphs to be extracted as a robust feature group corresponding to the original sub-graphs.
[0077] After determining the initial features of an original subgraph and each generalized subgraph of the original subgraph, the robust feature group of the original subgraph can be determined.
[0078] Specifically, for an original subgraph, the original subgraph and the generalized subgraphs of the original subgraph are the subgraphs to be extracted corresponding to the original subgraph. For the subgraphs to be extracted of the original subgraph, if any two subgraphs to be extracted have the same initial feature X, then the same initial feature X is the common feature, that is, the common feature is the initial feature that all the different subgraphs to be extracted corresponding to an original subgraph have. Figure 2As shown, sub-image A, sub-image B, and sub-image C are all sub-images to be extracted corresponding to the same original sub-image. The initial features of sub-image A are feature A, feature B, and feature C; the initial features of sub-image B are feature A, feature D, and feature E; the initial features of sub-image C are feature A, feature D, and feature F, then feature A and feature D are common features.
[0079] It should be noted that, in the actual application of the method provided in this specification, there may be dozens of generalized sub-images corresponding to the same original sub-image (for each style change method such as adding noise, scaling, rotation, brightness change, perspective, downsampling, etc., each style change method can preset multiple style change degrees, and then the style of the original sub-image can be changed using any style change degree of each style change method, and a corresponding generalized sub-image can be obtained). At the same time, using the above-mentioned feature extraction method, the number of initial features extracted for each sub-image to be extracted may be different, and the number of initial features of a sub-image to be extracted can reach hundreds.
[0080] After determining the common features of the original sub-graph, the top N common features with the most identical initial features can be determined as robust features based on the number N of robust features in the preset robust feature group and the number of identical initial features of each common feature. The robust features are then used to form a robust feature group, i.e., the number of robust features in each robust feature group is the same.
[0081] In one or more embodiments of the present specification, for an initial sub-graph, the mean number of initial features of each sub-graph to be extracted of the initial sub-graph can be determined according to the number of initial features of each sub-graph to be extracted corresponding to the initial sub-graph, and the mean number can be used as the number N of robust features in the robust feature group corresponding to the initial sub-graph.
[0082] From the above, it can be seen that the generalized sub-image of an original sub-image is obtained by changing the style of the original sub-image. If for the same original sub-image, the coordinates corresponding to the original sub-image are referred to as coordinates A below, after different style changes, the generalized sub-images and the original sub-image can extract the same feature information, feature A, using the same feature extraction method, then the feature A can be considered to be robust, representing the geographic information of the ground in the area of part of the coordinate A that is not easily affected by distortion. Furthermore, in actual applications, if a drone collects images of the coordinate A and obtains a real-time image for image matching, even if the real-time image is distorted by environmental factors, the same feature A should be able to be extracted for the real-time image using the same feature extraction method. This feature A is a robust feature, and a vector composed of several robust features of each sub-image to be extracted corresponding to the same original sub-image is a robust feature group.
[0083] Therefore, the determined robust feature group contains most of the geographical information of each original sub-image that is relatively stable and not easily affected by distortion. For the same coordinate, even real-time images acquired under extreme environmental conditions should be able to extract features similar to the robust feature group, while the usual matching method cannot have the same effect. Using the robust feature group to match the real-time image can increase the matching success rate under extreme environmental conditions and improve the ability of the UAV's image matching system to cope with extreme environmental conditions.
[0084] S108: Storing the robust feature group, scene identifier, and map coordinates of each original sub-image into a database.
[0085] After obtaining the robust feature group of each original sub-image, the robust feature group of each original sub-image can be associated with the map coordinates and stored in a database. The database can be deployed in the image matching system of the UAV so that in the subsequent image matching stage, the UAV can use the image matching system to complete positioning.
[0086] S110: When the drone is positioning, the real-time positioning of the drone is determined according to the real-time image collected by the drone and the database.
[0087] When a drone equipped with the above-mentioned image matching system is positioned, it first uses the onboard camera to collect real-time images of the ground, then extracts features from the collected real-time images, and matches the features of the real-time images with the robust feature groups stored in the database, so that the map coordinates corresponding to the successfully matched robust feature groups are used as the real-time positioning of the drone.
[0088] like Figure 1 The method for positioning a UAV shown can provide more accurate image matching when the environmental conditions are poor or the camera accuracy is poor, thereby more accurately determining the real-time positioning of the UAV.
[0089] In addition, in Figure 1 In step S106 shown, for any initial feature among the initial features corresponding to each sub-graph to be extracted, other sub-graphs to be extracted other than the sub-graph to be extracted corresponding to the initial feature are taken as sub-graphs to be matched, and each initial feature of each sub-graph to be matched is taken as a feature to be matched, and the feature to be matched whose difference with the initial feature is less than a preset feature difference threshold is taken as a similar feature of the initial feature, and the robustness score of the initial feature is determined according to the number of similar features of the initial feature, wherein the value of the robustness score is positively correlated with the number of similar features, and several initial features with the highest robustness score are determined as common features. Therefore, the method provided in this specification proposes a scoring index for evaluating the robustness of each initial feature of the sub-graph to be extracted, which can more intuitively demonstrate the abstract concept of robustness.
[0090] Specifically, when performing feature extraction on different extraction subgraphs, the extracted initial features cannot be completely identical in value. Therefore, a feature difference threshold can be preset, and any two initial features whose difference is less than the feature difference threshold can be regarded as the same initial features.
[0091] Furthermore, in Figure 1 In step S106 shown, the feature to be matched that is closest to the initial feature in the subgraph to be matched is determined as a quasi-similar feature. If the difference between the quasi-similar feature and the initial feature is less than a preset feature difference threshold, the quasi-similar feature is used as a similar feature to the initial feature.
[0092] When determining the similarity feature of an initial feature, first, among the features to be matched possessed by each sub-graph to be matched of the initial feature, the feature to be matched that is closest to the initial feature can be determined as a quasi-similar feature, that is, each sub-graph to be matched has a quasi-similar feature of the initial feature, and then the difference between each quasi-similar feature and the initial feature is determined. If the difference between any quasi-similar feature and the initial feature is less than a preset feature difference threshold, the quasi-similar feature is used as a similarity feature of the initial feature.
[0093] It should be noted that when the method provided in this specification determines the difference between various physical quantities, the difference can be represented by commonly used difference representation methods such as Euclidean distance and cosine distance. However, the same difference representation method is used for different steps of the method provided in this specification.
[0094] In one or more embodiments of the present specification, for any subgraph to be matched, the Fast Library for Approximate Nearest Neighbors (FLANN) algorithm can be used to determine the matching feature that is closest to the initial feature in the subgraph to be matched as a quasi-similar feature; the Random Sample Consensus (RANSAC) algorithm can be used to determine whether the difference between the quasi-similar feature and the initial feature is less than a preset feature difference threshold.
[0095] In addition, in Figure 1In the step S110 shown, the feature extraction method is used to perform feature extraction on the real-time image collected by the drone to obtain a number of real-time features corresponding to the real-time image as the real-time feature group of the real-time image, and the feature group difference between any robust feature group in the database and the real-time feature group is determined. When the difference is less than a preset feature group difference threshold, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone, and a transformation matrix is determined based on the difference. The real-time coordinates of the drone are determined based on the basic coordinates and the transformation matrix. Otherwise, the difference between other robust feature groups in the database and the real-time feature group is continued to be determined until the difference between any robust feature group and the real-time feature group is less than the preset feature group difference threshold.
[0096] In the image matching stage, the feature extraction method used in the database storage stage can be used to extract features from the real-time images collected by the UAV to obtain a real-time feature group composed of the real-time features of the real-time image.
[0097] It should be noted that the real-time feature group is a vector composed of real-time features, and the number of real-time features in the real-time feature group may be different from the number of robust features in the robust feature group; the feature group difference threshold can be set by the user according to the needs of the actual scenario, and this manual does not limit it here.
[0098] Specifically, the possible current coordinate range of the drone can be determined based on the historical coordinates determined at the past moment closest to the current moment of the drone and the time interval for determining the coordinates of the drone. Furthermore, the map coordinates corresponding to the current coordinate range of the drone are determined as the coordinates to be matched, and the differences between the robust feature groups corresponding to the coordinates to be matched and the real-time feature group are determined. Then, the coordinates corresponding to the real-time image of the drone are determined in the coordinates to be matched as the basic coordinates corresponding to the drone. Furthermore, the real-time coordinates of the drone are determined by transforming the basic coordinates using the transformation matrix.
[0099] It should be noted that the coordinates corresponding to an original sub-image are the coordinates corresponding to the center point of the original sub-image. Even if the feature difference between the real-time image and an original sub-image is less than a threshold, the real-time image does not completely overlap with the original sub-image. Therefore, the basic coordinates can be corrected using the transformation matrix to obtain more accurate real-time coordinates of the drone. In the above process of determining the difference between the real-time feature group and the robust feature group, the transformation matrix from real-time features to robust features can be determined. The transformation matrix corresponds to the conversion process of converting the real-time image collected by the drone into the original sub-image corresponding to the basic coordinates (the conversion process may involve conversion operations such as translation and rotation).
[0100] In one or more embodiments of the present specification, if the number of real-time features in a real-time feature group is different from the number of robust features in a robust feature group, when determining the feature group difference between any robust feature group and the real-time feature group, for each real-time feature in the real-time feature group, a robust feature in the robust feature group whose difference with the real-time feature is less than a preset feature difference threshold is used as the nearest neighbor feature corresponding to the real-time feature, and the difference between the nearest neighbor feature and the real-time feature is determined as the difference corresponding to the real-time feature, and the difference between the robust feature group and the real-time feature group is determined according to the differences corresponding to each real-time feature in the real-time feature group.
[0101] Further, in one or more embodiments of the present specification, the feature group difference threshold specifically includes: a feature group difference threshold corresponding to each terrain type; Figure 1 In step S100 shown in FIG. 1 , the terrain type corresponding to each original sub-image is determined; Figure 1 In step S108 shown in FIG. 1 , the robust feature set, map coordinates and terrain type of each original sub-image are stored in the database; Figure 1 In step S110 shown, a feature group difference threshold corresponding to the robust feature group is determined according to the terrain type corresponding to the robust feature group. When the difference is less than the feature group difference threshold corresponding to the robust feature group, the map coordinates corresponding to the robust feature group are used as the basic coordinates of the drone.
[0102] From the above process of determining the basic coordinates based on the difference between the real-time feature group and the robust feature group, it can be seen that if the feature group difference threshold is set too strictly, the difference between all robust feature groups and the real-time feature group may not be less than the strict feature group difference threshold, which ultimately leads to positioning failure. Similarly, if the feature group difference threshold is set too loosely, the difference between the robust feature group that is not the optimal matching object and the real-time feature group may be less than the loose feature group difference threshold, which ultimately leads to deviation in the positioning of the drone.
[0103] Therefore, in order to have a more accurate positioning effect for different terrain types, different feature group difference thresholds can be preset for each terrain type. For terrain types with more complex terrain conditions, a looser feature group difference threshold can be set, and for terrain types with simpler terrain conditions, a stricter feature group difference threshold can be set, thereby ensuring the accuracy of positioning.
[0104] In one or more embodiments of the present specification, the terrain types may include: forest, countryside, city, and farmland.
[0105] In one or more embodiments of the present specification, the terrain type corresponding to each original sub-map can be determined by evenly distributing sampling in different scenes on different continents, screening and producing a number of terrain sub-maps of each terrain type, using each terrain sub-map and the terrain corresponding to each qualitative sub-map as annotations to establish a terrain sub-map dataset, using the terrain sub-map dataset as input samples to perform training using a convolutional neural network (CNN) (such as a ResNet, VGG, or MobileNet model) to obtain a trained map scene intelligent recognition model, and using the trained map scene intelligent recognition model to determine the terrain type corresponding to each original sub-map.
[0106] In the method provided in the present specification, presetting the feature group difference threshold corresponding to each terrain type may include taking any terrain type as the target terrain, and for each original sub-image of the target terrain, taking each initial feature corresponding to the original sub-image as the to-be-matched feature group corresponding to the original sub-image, and matching each to-be-matched feature group of the target terrain with each robust feature group of the target terrain without replacement according to a preset feature group difference standard to obtain a number of feature group matching pairs, determining the proportion of correct matching pairs in all feature group matching pairs under different feature group difference standards, the to-be-matched feature group and the robust feature group in the correct matching pair belong to the same original sub-image, and taking the feature group difference standard with the highest proportion of corresponding correct matching pairs as the feature group difference threshold corresponding to the target terrain.
[0107] Each feature group to be matched is matched with each robust feature group of the target terrain without replacement, such as Figure 3 As shown in the figure, there are 100 feature groups to be matched and 100 robust feature groups in the initial state. Each feature group to be matched is taken as set A, and each robust feature group is taken as set B. For any feature group to be matched in set A, each robust feature group in set B is matched with the feature group to be matched in sequence. If the difference between the feature group to be matched and any robust feature group is less than the preset feature group difference standard, the feature group to be matched and the robust feature group are a pair of feature group matching pairs. The feature group to be matched and the robust feature group in the feature group matching pair are taken out of set A and set B respectively, and then the feature group matching pair of any feature to be matched in set A (at this time, there are 99 feature groups to be matched in set A and 99 robust feature groups in set B) is re-determined until the matching process of all feature groups to be matched in set A is completed.
[0108] It should be noted that if the feature group to be matched and the robust feature group in a feature group matching pair belong to the same original subgraph, then the feature group matching pair is a correct matching pair; if a feature group to be matched and all the robust feature groups in set B cannot form a feature group matching pair, then it is considered that the feature group to be matched and the empty feature group form an incorrect feature group matching pair.
[0109] Therefore, for each feature group difference standard, the correct matching rate of the target terrain under the feature group difference standard is determined, and the feature group difference standard with the highest correct matching rate is determined as the feature group difference threshold of the target terrain.
[0110] The above-mentioned process of determining the feature group difference threshold simulates the process of matching the real-time image collected by the drone with the robust feature group in the database under actual circumstances. The feature group difference threshold determined thereby is more suitable for applications in actual scenarios.
[0111] Moreover, in Figure 1 In step S110 shown, the real-time image collected by the drone is downsampled to obtain a downsampled image corresponding to the real-time image, and feature extraction is performed on the downsampled image.
[0112] As can be seen from the above, the method provided in this specification can still use the file feature group and the real-time feature group of the drone image stored in the database to complete accurate drone positioning when the drone-collected image is distorted. The above-mentioned feature extraction method (SIFT, SURF) can extract the extreme points in the real-time image as feature points for a real-time image, and further determine the gradient information of each extreme point as the real-time feature in the real-time image. This feature extraction process may determine a large number of feature points (more than 1000) for a real-time image, which has high requirements for computing power and computing time. Therefore, in order to reduce the computing power requirements of the drone image matching system and accelerate positioning, the real-time image collected by the drone can be downsampled to obtain a downsampled image, and the downsampled image can be feature extracted to obtain the real-time feature group of the downsampled image, and then matched with the robust feature group in the database. Since the method provided in this specification has strong anti-interference, matching using the downsampled image can still have a high matching accuracy.
[0113] The above is a method for positioning a UAV based on image feature matching provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding device for positioning a UAV based on image feature matching, such as Figure 4 shown.
[0114] Figure 4 A schematic diagram of a device for positioning a drone based on image feature matching provided in this specification specifically includes:
[0115] An acquisition module 400 acquires several original sub-maps of a target map;
[0116] A change module 402, for any original sub-image, performs a style change on the original sub-image to obtain a plurality of generalized sub-images corresponding to the original sub-image;
[0117] Extraction module 404, taking the original subgraph and each generalized subgraph of the original subgraph as subgraphs to be extracted, and performing feature extraction on each subgraph to be extracted using a preset feature extraction method to obtain a number of initial features corresponding to the subgraph to be extracted;
[0118] A determination module 406, determining, from the initial features corresponding to the sub-images to be extracted, a number of common features that are shared by at least some of the sub-images to be extracted as a robust feature group corresponding to the original sub-image;
[0119] A storage module 408 stores the robust feature group and map coordinates of each original sub-image into a database;
[0120] The positioning module 410 determines the real-time positioning of the drone according to the real-time image collected by the drone and the database when the drone is positioned.
[0121] Determination module 406 is specifically used for: for any initial feature among the initial features corresponding to each sub-graph to be extracted, taking other sub-graphs to be extracted other than the sub-graph to be extracted corresponding to the initial feature as sub-graphs to be matched, taking each initial feature of each sub-graph to be matched as a feature to be matched, taking a feature to be matched whose difference with the initial feature is less than a preset feature difference threshold as a similar feature of the initial feature, determining a robustness score of the initial feature according to the number of similar features of the initial feature, wherein the value of the robustness score is positively correlated with the number of similar features, and determining several initial features with the highest robustness scores as common features.
[0122] The determination module 406 is specifically used to: for any sub-graph to be matched, determine the feature to be matched that is closest to the initial feature in the sub-graph to be matched as a quasi-similar feature; if the difference between the quasi-similar feature and the initial feature is less than a preset feature difference threshold, use the quasi-similar feature as a similar feature of the initial feature.
[0123] The positioning module 410 is specifically used to: use the feature extraction method to perform feature extraction on the real-time image collected by the drone, obtain a number of real-time features corresponding to the real-time image, use them as the real-time feature group of the real-time image, determine the feature group difference between any robust feature group in the database and the real-time feature group, when the difference is less than a preset feature group difference threshold, use the map coordinates corresponding to the robust feature group as the basic coordinates corresponding to the drone, determine the transformation matrix according to the difference, determine the real-time coordinates of the drone according to the basic coordinates and the transformation matrix, otherwise, continue to determine the difference between other robust feature groups in the database and the real-time feature group until the difference between any robust feature group and the real-time feature group is less than the preset feature group difference threshold.
[0124] Optionally, the feature group difference threshold specifically includes: a feature group difference threshold corresponding to each terrain type;
[0125] The acquisition module 400 is further used to: determine the terrain type corresponding to each original sub-image;
[0126] The storage module 408 is specifically used to: store the robust feature group, map coordinates and terrain type of each original sub-image into a database;
[0127] The positioning module 410 is specifically used to: determine the feature group difference threshold corresponding to the robust feature group according to the terrain type corresponding to the robust feature group, and when the difference is less than the feature group difference threshold corresponding to the robust feature group, use the map coordinates corresponding to the robust feature group as the basic coordinates corresponding to the drone.
[0128] Optionally, the determination module 406 is further used to: take any terrain type as the target terrain, for each original sub-image of the target terrain, take each initial feature corresponding to the original sub-image as the to-be-matched feature group corresponding to the original sub-image, and according to a preset feature group difference standard, perform a match without replacement on each to-be-matched feature group of the target terrain and each robust feature group of the target terrain to obtain a number of feature group matching pairs, determine the proportion of correct matching pairs in all feature group matching pairs under different feature group difference standards, the to-be-matched feature group and the robust feature group in the correct matching pairs belong to the same original sub-image, and take the feature group difference standard corresponding to the highest proportion of correct matching pairs as the feature group difference threshold corresponding to the target terrain.
[0129] The positioning module 410 is specifically used to: downsample the real-time image collected by the drone to obtain a downsampled image corresponding to the real-time image, and perform feature extraction on the downsampled image.
[0130] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A method for UAV positioning based on image feature matching is provided.
[0131] This manual also provides Figure 5 The schematic structure diagram of the electronic device shown in FIG. Figure 5 As mentioned above, at the hardware level, the drone positioning device based on image feature matching includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1The method for positioning a drone based on image feature matching. Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0132] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0133] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0134] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0135] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0136] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0140] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0141] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0142] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0143] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0144] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0146] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0147] The above description is only an embodiment of this specification and is not intended to limit this specification. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this application.
Claims
1. A method for positioning a UAV based on image feature matching, characterized in that: The method comprises: Obtain several original sub-maps of the target map; For any original sub-image, the style of the original sub-image is changed to obtain several generalized sub-images corresponding to the original sub-image; The original subgraph and each generalized subgraph of the original subgraph are taken as subgraphs to be extracted, and for each subgraph to be extracted, a preset feature extraction method is used to perform feature extraction to obtain a number of initial features corresponding to the subgraph to be extracted; Among the initial features corresponding to the sub-images to be extracted, determining a number of common features that at least some of the sub-images to be extracted have, as a robust feature group corresponding to the original sub-image; The robust feature set and map coordinates of each original sub-map are stored in a database; When the drone is positioning, the real-time positioning of the drone is determined based on the real-time image collected by the drone and the database.
2. The method according to claim 1, characterized in that Among the initial features corresponding to the sub-graphs to be extracted, several common features that at least some of the sub-graphs to be extracted have are determined, specifically including: For any initial feature among the initial features respectively corresponding to each sub-image to be extracted, other sub-images to be extracted except the sub-image to be extracted corresponding to the initial feature are taken as sub-images to be matched, and each initial feature of each sub-image to be matched is taken as a feature to be matched; The feature to be matched, whose difference with the initial feature is less than a preset feature difference threshold, is used as a similar feature to the initial feature; Determine a robustness score of the initial feature according to the number of similar features of the initial feature, wherein the value of the robustness score is positively correlated with the number of similar features; Several initial features with the highest robustness scores are determined as common features.
3. The method according to claim 2, characterized in that The feature to be matched, which has a difference with the initial feature less than a preset feature difference threshold, is used as the matching feature of the initial feature, specifically including: For any sub-graph to be matched, determining a feature to be matched in the sub-graph to be matched that is closest to the initial feature as a quasi-similar feature; If the difference between the quasi-similar feature and the initial feature is less than a preset feature difference threshold, the quasi-similar feature is used as a similar feature of the initial feature.
4. The method according to claim 1, characterized in that Determine the real-time positioning of the drone based on the real-time image collected by the drone and the database, specifically including: Using the feature extraction method, feature extraction is performed on the real-time image collected by the drone to obtain a number of real-time features corresponding to the real-time image as a real-time feature group of the real-time image; Determining a feature group difference between any robust feature group in the database and the real-time feature group; When the difference is less than a preset feature group difference threshold, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone, and a transformation matrix is determined based on the difference. The real-time coordinates of the drone are determined based on the basic coordinates and the transformation matrix. Otherwise, the difference between other robust feature groups in the database and the real-time feature group continues to be determined until the difference between any robust feature group and the real-time feature group is less than the preset feature group difference threshold.
5. The method according to claim 4, characterized in that The feature group difference threshold specifically includes: a feature group difference threshold corresponding to each terrain type; After obtaining several original sub-maps of the target map, it also includes: Determine the terrain type corresponding to each original sub-image; The robust feature set and map coordinates of each original sub-image are stored in the database, including: storing the robust feature set, map coordinates, and terrain type of each original sub-map in a database; When the difference is less than a preset feature group difference threshold, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone, specifically including: Determine a feature group difference threshold corresponding to the robust feature group according to the terrain type corresponding to the robust feature group; When the difference is smaller than the feature group difference threshold corresponding to the robust feature group, the map coordinates corresponding to the robust feature group are used as the basic coordinates corresponding to the drone.
6. The method according to claim 5, characterized in that The feature group difference threshold corresponding to each terrain type is preset, including: Use any terrain type as the target terrain; For each original sub-image of the target terrain, each initial feature corresponding to the original sub-image is used as a to-be-matched feature group corresponding to the original sub-image, and each to-be-matched feature group of the target terrain is matched with each robust feature group of the target terrain without replacement according to a preset feature group difference standard to obtain a plurality of feature group matching pairs; Determine the proportion of correct matching pairs in all feature group matching pairs under different feature group difference standards, wherein the feature group to be matched and the robust feature group in the correct matching pairs belong to the same original subgraph; The feature group difference standard corresponding to the highest correct matching pair ratio is used as the feature group difference threshold corresponding to the target terrain.
7. The method according to claim 4, characterized in that Feature extraction of real-time images collected by drones, including: Downsampling the real-time image collected by the drone to obtain a downsampled image corresponding to the real-time image; Perform feature extraction on the downsampled image.
8. A device for positioning a drone based on image feature matching, characterized in that: include: An acquisition module obtains several original sub-maps of the target map; A change module, for any original sub-image, performs style changes on the original sub-image to obtain several generalized sub-images corresponding to the original sub-image; The extraction module uses the original subgraph and each generalized subgraph of the original subgraph as the subgraph to be extracted, and performs feature extraction on each subgraph to be extracted using a preset feature extraction method to obtain a number of initial features corresponding to the subgraph to be extracted; A determination module, which determines, from among the initial features corresponding to the sub-images to be extracted, a number of common features that are possessed by at least some of the sub-images to be extracted, as a robust feature group corresponding to the original sub-image; A storage module stores the robust feature group and map coordinates of each original sub-image into a database; The positioning module determines the real-time positioning of the drone based on the real-time image collected by the drone and the database when the drone is positioned.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. A drone positioning device based on image feature matching, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Cross-view image matching method for unmanned aerial vehicle image and satellite image
CN112580546A
Equipment positioning method and device, electronic equipment and readable storage medium
CN113252045A
