A cross-scale unmanned aerial vehicle image splicing method and system and a storage medium
By acquiring panoramic and detailed images, and utilizing feature point matching and geometric transformation matrices for cross-scale UAV image stitching, combined with deep learning and RANSAC algorithms, the problems of low information utilization and low accuracy in UAV image stitching are solved, achieving efficient and accurate image stitching.
Patent Information
- Application Number
- CN202311626413.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-11-29
AI Technical Summary
Existing UAV image stitching methods cannot efficiently utilize image information, and parallax during the stitching process leads to low accuracy.
By acquiring a panoramic image and multiple detailed images, feature point matching and geometric transformation matrices are used for mapping and stitching. Deep learning algorithms and RANSAC algorithms are combined to filter out incorrect matching relationships, and multi-level cross-scale image stitching is performed.
It improves image utilization and stitching accuracy, can determine positional information without overlapping detail images, reduces ghosting, and improves the efficiency and accuracy of image stitching.
Smart Images

Figure CN117670670B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of aerial image processing technology, and more specifically, relates to a method, system and storage medium for cross-scale UAV image stitching. Background Technology
[0002] Currently, drones need to fly to high altitudes to acquire aerial video information to obtain wide-angle images. However, due to limitations in camera performance, the resulting images have relatively low resolution. When drones fly at low altitudes, although the images they capture have higher resolution, the field of view is narrow, limiting the information obtained. By stitching together multiple drone images, a wider field of view can be presented in a single image, thus obtaining high-resolution aerial images.
[0003] Existing UAV image stitching methods typically stitch together images of different scales, requiring a sufficiently large overlap between these scales. This approach fails to efficiently utilize all the information captured by the UAV, resulting in low image utilization efficiency. Furthermore, when the UAV flies over buildings, tall plants, or other undulating objects, the viewpoint changes, leading to significant parallax between images. This can cause errors in feature point detection and matching, resulting in low stitching accuracy. Summary of the Invention
[0004] To address the shortcomings and improvement needs of existing technologies, this invention provides a cross-scale UAV image stitching method, system, and storage medium, with the aim of improving image utilization during UAV image stitching.
[0005] To achieve the above objectives, according to a first aspect of the present invention, a method for cross-scale unmanned aerial vehicle (UAV) image stitching is provided, comprising: S1. The drone acquires a panoramic image of the target scene and multiple corresponding detail images, wherein the panoramic image and the multiple detail images are acquired at different scales, and the panoramic image contains all the scenes in the multiple detail images; S2. Extract the feature point coordinates of the panoramic image and each detail image to construct a feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image; S3. Calculate the geometric transformation matrix of each detail image in the panoramic coordinate system based on the matching relationship of the features; based on the geometric transformation matrix, using the panoramic image as a reference, map the scene content in each detail image to the panoramic coordinate system to obtain the detail image after the first mapping. S4. The detailed images after the first mapping are stitched together to obtain the stitched aerial image.
[0006] Furthermore, S3 also includes: Extract the feature point coordinates of the detail image after the first mapping to construct the feature pair matching relationship between the feature points of the detail image after the first mapping and the feature points of the panoramic image; For each feature pair matching relationship, calculate the corresponding dissimilarity. Screening out dissimilarity Feature pairs exceeding preset values are matched. Based on the filtered features, calculate the geometric transformation matrix of the detail image after the first mapping in the panoramic coordinate system; based on the geometric transformation matrix, using the panoramic image as a reference, map the scene content in the detail image after the first mapping to the panoramic coordinate system to obtain the detail image after the second mapping. In S4, the detailed images after the second mapping are stitched together to obtain the stitched aerial image; Wherein, the dissimilarity for:
[0007] in, This represents the sum of distance errors between feature points in the detail image after geometric transformation following the first mapping and the corresponding feature points in the panoramic image; This represents the photometric error between the detail image and the panoramic image after the first mapping following geometric transformation. This represents the sum of photometric errors between the feature points in the detail image after geometric transformation following the first mapping and the corresponding feature points in the panoramic image; and For parameters.
[0008] Further, in S2, based on the extracted feature point coordinates of the panoramic image and each detail image, a feature pair matching relationship is constructed between the feature points of each detail image and the feature points of the panoramic image, including: Based on the extracted panoramic image and the feature point coordinates of each detail image, calculate the Euclidean distance between each detail image and the feature points in the panoramic image; Based on the Euclidean distance, a matching algorithm is used to obtain the feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image.
[0009] Furthermore, in S2, the SIFT algorithm is used to extract the feature point coordinates of the panoramic image and each detail image to construct a feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image. In S3, a deep learning algorithm is used to extract the feature point coordinates of the detail image after the first mapping and the feature point coordinates of the panoramic image, so as to construct the feature pair matching relationship between the feature points of the detail image after the first mapping and the feature points of the panoramic image.
[0010] Furthermore, before S3, it also includes: using the RANSAC algorithm to remove erroneous feature pair matching relationships in the feature pair matching relationships.
[0011] Furthermore, S4 also includes: After the second mapping, the overlapping portion between two adjacent detail images is determined. The stitching seam between the two adjacent detail images is then determined within the overlapping portion. The detail images are stitched together according to the stitching seam to obtain the stitched aerial image.
[0012] Furthermore, there are four detailed images; these images are taken by four drones arranged in a square at the same height above the ground. The drone that takes the panoramic view is positioned at the center of the four drones, at a height twice the height of the four drones above the ground.
[0013] According to a second aspect of the present invention, a multi-layer cross-scale UAV image stitching method is provided, wherein the first layer of the multi-layer cross-scale UAV image includes a panoramic image of a target scene and multiple corresponding detail images; the method includes: Each detail image from the previous layer is used as a panoramic image for the next layer, and multiple detail images corresponding to that panoramic image are collected. For each layer's panoramic image and corresponding multiple detail images, the method described in any one of the first aspects is used to obtain the corresponding stitched image; The stitched image obtained from the next layer is used as a detail image, and the corresponding stitched image from the previous layer is used as a panoramic image. The method described in any one of the first aspects is used again to obtain the corresponding stitched image, until the desired aerial image is obtained.
[0014] According to a third aspect of the present invention, a cross-scale unmanned aerial vehicle (UAV) image stitching system is provided, including a computer-readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method described in any of the first aspects, or / and, execute the method described in the second aspect.
[0015] According to a fourth aspect of the invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the first aspects, or / and implements the method as described in the second aspect.
[0016] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects: (1) The cross-scale UAV image stitching method of the present invention constructs a cross-scale UAV image by acquiring a panoramic image of a target scene and multiple corresponding detail images. By utilizing the overlap information between the detail images and the panoramic image, a geometric transformation is performed on each detail image to map the scene content in each detail image to the coordinate system of the panoramic image, and the corresponding position of the detail image in the panoramic image is found. The position information of the detail image can be determined without the overlap between detail images, and the information in each detail image can be fully utilized for stitching, thereby improving the image utilization rate when stitching UAV images.
[0017] (2) The cross-scale UAV image stitching method of the present invention uses the features extracted in S2 as coarse-grained features, the first mapping as a coarse mapping, and extracts more fine-grained features from the detail image after the first mapping to construct a more refined feature pair matching relationship; and based on the designed dissimilarity Incorrect feature pair matching relationships are filtered out. In the filtering process, in addition to the distance error between feature pairs, the global photometric error between the detail image and the panoramic image, as well as the local photometric error between the corresponding feature pairs in the detail image and the panoramic image are also considered. This can ensure that there is no ghosting between the corresponding positions of the detail image and the panoramic image after the second mapping, thereby improving the image stitching accuracy.
[0018] (3) As a preferred option, in the coarse matching process, S2 uses the SIFT algorithm to extract the feature point coordinates of the panoramic image and each detail image, which can realize the rapid extraction of feature points and improve the execution efficiency; in the fine-grained matching process, in S3, the deep learning algorithm is used to extract the feature point coordinates of the detail image and the panoramic image after the first mapping, so as to construct the feature pair matching relationship between the feature points of the detail image and the feature points of the panoramic image after the first mapping, which can extract more accurate features, construct a more accurate feature pair matching relationship, and further improve the stitching accuracy.
[0019] (4) As a preferred option, before S3, it also includes: removing erroneous feature pair matching relationships in the feature pair matching relationship to further improve the splicing accuracy.
[0020] (5) Furthermore, considering the partial overlap between detail images caused by errors such as drone shaking during the shooting process, S4 also includes splicing based on the splicing seam between two adjacent detail images.
[0021] (6) Preferably, four drones are arranged in a square at the same height above the ground to take pictures and obtain corresponding detail pictures with the same resolution. The drone responsible for taking the panoramic picture is located in the center of the four drones responsible for taking the detail picture, and its height is twice the height of the drone responsible for taking the detail picture above the ground. This ensures that the panoramic picture taken contains all the scene content of the four detail pictures.
[0022] (7) The multi-layer cross-scale UAV image stitching method of the present invention can improve the resolution of the panoramic image by multi-layer cross-scale UAV image stitching, and also make the detail image contain richer details, thereby further improving the accuracy of image stitching. Attached Figure Description
[0023] Figure 1 This is a flowchart of the cross-scale UAV image stitching method of the present invention.
[0024] Figure 2 This is a schematic diagram of the drone layout in an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0026] In this invention, the terms "first," "second," etc., used in the invention and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0027] like Figure 1 As shown, the present invention provides a cross-scale UAV image stitching method, which mainly includes: S1. The drone captures a panoramic image of the target scene and multiple detailed images corresponding to the target scene. The panoramic image and the detailed images are captured at different scales, and the panoramic image contains all the scenes in the multiple detailed images. S2. Extract the feature point coordinates of the panoramic image and each detail image to construct the feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image; S3. Calculate the geometric transformation matrix of each detail image in the panoramic coordinate system based on the feature pair matching relationship; based on the geometric transformation matrix, using the panoramic image as the reference object, map the scene content in each detail image to the panoramic coordinate system to obtain the detail image after the first mapping. S4. Stitch together the detailed images after the first mapping to obtain the stitched aerial image.
[0028] As a preferred option, in S1, there are four detail images, which are taken by four drones arranged in a square at the same height above the ground to obtain detail images with the same resolution.
[0029] To ensure that the panoramic image precisely captures all the scene content from the four detail images, the drone responsible for capturing the panoramic image is positioned at the exact center of the four drones responsible for capturing the detail images, and at a height twice the height of the drones responsible for capturing the detail images above the ground.
[0030] Preferably, in S2, the SIFT algorithm is used to extract the coordinates of feature points in the panoramic image and each detail image, which can achieve rapid feature point extraction and improve execution efficiency; in other embodiments, other feature point extraction algorithms can also be used.
[0031] In S2, based on the extracted panoramic image and the feature point coordinates of each detail image, a feature pair matching relationship is constructed between the feature points of each detail image and the feature points of the panoramic image, including: Based on the extracted panoramic image and the feature point coordinates of each detail image, calculate the Euclidean distance between the feature points in each detail image and the panoramic image. Based on Euclidean distance, a matching algorithm is used to obtain the feature pair matching relationship between feature points in each detail image and feature points in the panoramic image. In this embodiment of the invention, a brute-force matching algorithm is used to obtain the feature pair matching relationship between feature points in each detail image and feature points in the panoramic image.
[0032] Preferably, step S3 further includes: removing erroneous feature pair matching relationships in the feature pair matching relationships; in this embodiment of the invention, the RANSAC algorithm is used to remove erroneous feature pair matching relationships.
[0033] The cross-scale UAV image stitching method of the present invention constructs a cross-scale UAV image by acquiring a panoramic image of a target scene and multiple corresponding detail images. By utilizing the overlap information between the detail images and the panoramic image, a geometric transformation is performed on each detail image, mapping the scene content in each detail image to the coordinate system of the panoramic image, and finding the corresponding position of the detail image in the panoramic image. The position information of the detail images can be determined without overlapping between detail images, which can make full use of the information in each detail image for stitching and improve the image utilization rate during UAV image stitching.
[0034] As a further design of the present invention, in order to further improve the splicing accuracy, S3 also includes: Extract the feature point coordinates of the detail image after the first mapping to construct the feature pair matching relationship between the feature points of the detail image after the first mapping and the feature points of the panoramic image; For each feature pair matching relationship, calculate the corresponding dissimilarity. Screening out dissimilarity Feature pairs exceeding preset values are matched. Based on the filtered features, calculate the geometric transformation matrix of the detail image after the first mapping in the panoramic coordinate system; based on the geometric transformation matrix, using the panoramic image as a reference, map the scene content in each detail image to the panoramic coordinate system to obtain the detail image after the second mapping. In S4, the detailed images after the second mapping are stitched together to obtain the stitched aerial image.
[0035] Among them, the dissimilarity designed in this invention for:
[0036] in, This represents the sum of distance errors between all feature points in the detail map after the first mapping, the feature points obtained after geometric transformation, and the corresponding feature points in the panoramic map; This represents the photometric error between the detail image and the panoramic image after the first mapping following geometric transformation. This represents the sum of local photometric errors between the feature points obtained after geometric transformation in the detail map after the first mapping and the corresponding feature points in the panoramic map; and These are parameters, selected based on experience.
[0037] In this embodiment of the invention, ZNCC (zero mean normalized cross-correlation) is preferably used to calculate the corresponding photometric error.
[0038] Preferably, a deep learning algorithm is used to extract the feature point coordinates of the detail image and the panoramic image after the first mapping. This allows for the construction of a feature pair matching relationship between the feature points of the detail image and the panoramic image after the first mapping. This approach can extract more accurate features, construct a more precise feature pair matching relationship, and thus improve the stitching accuracy. In this embodiment of the invention, the deep learning algorithm is Superpoint.
[0039] Considering the partial overlap between detail images due to errors such as drone shake during the shooting process, S4 also includes: The overlapping portion between two adjacent detail images after the second mapping is determined. Within this overlapping portion, the stitching seam between the two adjacent detail images is identified. The images are then stitched together according to this seam to obtain the stitched aerial image. In this embodiment of the invention, a graph-based minimum cut algorithm is used to determine the stitching seam between two adjacent detail images within the overlapping portion.
[0040] The cross-scale UAV image stitching method of this invention uses the features extracted in S2 as coarse-grained features, the first mapping as a coarse mapping, and then extracts more fine-grained features from the detail image after the first mapping to construct a more refined feature pair matching relationship; and based on the designed dissimilarity... Incorrect feature pair matching relationships are filtered out. In the filtering process, in addition to the distance error between feature pairs, the global photometric error between the detail image and the panoramic image, as well as the local photometric error between the corresponding feature pairs in the detail image and the panoramic image are also considered. This can ensure that there is no ghosting between the corresponding positions of the detail image and the panoramic image after the second mapping, thereby improving the image stitching accuracy.
[0041] like Figure 2 As shown in this embodiment of the invention, four drones responsible for capturing detailed scenes are located 50m above the ground, arranged in a square at the four corners, with a 50m spacing between adjacent drones. To ensure that the panoramic image precisely includes all the scenes captured in the four detailed images, the drone responsible for capturing the panoramic image is positioned at the exact center of the four cameras responsible for capturing detailed scenes, at a height of 100m above the ground. The cross-scale drone image stitching method of this invention can output aerial images with high image utilization and high stitching accuracy.
[0042] Example 2 Based on the cross-scale UAV image stitching method in Example 1, this embodiment of the invention provides a multi-layer cross-scale UAV image stitching method, including: Multi-layered multi-scale UAV imagery: The first layer of multi-scale UAV imagery includes a panoramic view of the target scene and multiple corresponding detail images; Each detail image from the previous layer is used as a panoramic image for the next layer, and multiple detail images corresponding to that panoramic image are collected. The cross-scale UAV image stitching method described in Example 1 above is used to stitch together the panoramic image and the corresponding multiple detail images in each layer to obtain the corresponding stitched image. The stitched image obtained from the next layer is used as a detail image, and the corresponding stitched image from the previous layer is used as a panoramic image. The cross-scale UAV image stitching method in Example 1 above is used again to obtain the corresponding stitched image until the desired aerial image is obtained.
[0043] The multi-layer cross-scale UAV image stitching method of the present invention can improve the resolution of panoramic images by stitching multi-layer cross-scale UAV images, and also make the detail images contain richer details, thereby further improving the accuracy of image stitching.
[0044] Example 3 This invention provides a cross-scale UAV image stitching system, comprising: a computer-readable storage medium and a processor; Computer-readable storage media are used to store executable instructions; The processor is used to read executable instructions stored in a computer-readable storage medium to execute the multi-scale UAV image stitching method in Embodiment 1, and / or execute the multi-layer multi-scale UAV image stitching method in Embodiment 2.
[0045] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cross-scale UAV image stitching method as in Embodiment 1, or / and the multi-layer cross-scale UAV image stitching method as in Embodiment 2.
[0046] The specific implementation of each step in the method can be found in the corresponding embodiment, and will not be repeated here.
[0047] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for cross-scale UAV image stitching, characterized in that, include: S1. The drone acquires a panoramic image of the target scene and multiple corresponding detail images, wherein the panoramic image and the multiple detail images are acquired at different scales, and the panoramic image contains all the scenes in the multiple detail images; S2. Extract the feature point coordinates of the panoramic image and each detail image to construct a feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image; S3. Calculate the geometric transformation matrix of each detail image in the panoramic coordinate system based on the matching relationship of the features; based on the geometric transformation matrix, using the panoramic image as a reference, map the scene content in each detail image to the panoramic coordinate system to obtain the detail image after the first mapping. S4. The detailed images after the first mapping are stitched together to obtain the stitched aerial image; S3 also includes: Extract the feature point coordinates of the detail image after the first mapping to construct the feature pair matching relationship between the feature points of the detail image after the first mapping and the feature points of the panoramic image; For each feature pair matching relationship, calculate the corresponding dissimilarity. Screening out dissimilarity Feature pairs exceeding preset values are matched. Based on the filtered features, calculate the geometric transformation matrix of the detail image after the first mapping in the panoramic coordinate system; based on the geometric transformation matrix, using the panoramic image as a reference, map the scene content in the detail image after the first mapping to the panoramic coordinate system to obtain the detail image after the second mapping. In S4, the detailed images after the second mapping are stitched together to obtain the stitched aerial image; Wherein, the dissimilarity for: in, This represents the sum of distance errors between feature points in the detail image after geometric transformation following the first mapping and the corresponding feature points in the panoramic image; This represents the photometric error between the detail image and the panoramic image after the first mapping following geometric transformation. This represents the sum of photometric errors between the feature points in the detail image after geometric transformation following the first mapping and the corresponding feature points in the panoramic image; and For parameters; The multiple detailed images consist of four images; each image was taken by four drones arranged in a square at the same height above the ground, with the corresponding detailed images captured by each drone. The drone that takes the panoramic view is positioned at the center of the four drones, at a height twice the height of the four drones above the ground.
2. The method according to claim 1, characterized in that, In S2, based on the extracted feature point coordinates of the panoramic image and each detail image, a feature pair matching relationship is constructed between the feature points of each detail image and the feature points of the panoramic image, including: Based on the extracted panoramic image and the feature point coordinates of each detail image, calculate the Euclidean distance between each detail image and the feature points in the panoramic image; Based on the Euclidean distance, a matching algorithm is used to obtain the feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image.
3. The method according to claim 1, characterized in that, In S2, the SIFT algorithm is used to extract the feature point coordinates of the panoramic image and each detail image in order to construct the feature pair matching relationship between the feature points of each detail image and the feature points of the panoramic image. In S3, a deep learning algorithm is used to extract the feature point coordinates of the detail image after the first mapping and the feature point coordinates of the panoramic image, so as to construct the feature pair matching relationship between the feature points of the detail image after the first mapping and the feature points of the panoramic image.
4. The method according to claim 1, characterized in that, Before S3, it also includes: using the RANSAC algorithm to remove erroneous feature pair matching relationships in the feature pair matching relationships.
5. The method according to claim 1, characterized in that, S4 also includes: After the second mapping, the overlapping portion between two adjacent detail images is determined. The stitching seam between the two adjacent detail images is then determined within the overlapping portion. The detail images are stitched together according to the stitching seam to obtain the stitched aerial image.
6. A multi-layer, multi-scale UAV image stitching method, characterized in that, In the multi-layer cross-scale UAV imagery, the first layer of cross-scale UAV imagery includes a panoramic view of the target scene and multiple corresponding detail images; the method includes: Each detail image from the previous layer is used as a panoramic image for the next layer, and multiple detail images corresponding to that panoramic image are collected. The method described in any one of claims 1-5 is used to obtain the corresponding stitched image for the panoramic image and the corresponding multiple detail images in each layer; The stitched image obtained from the next layer is used as a detail image, and the corresponding stitched image from the previous layer is used as a panoramic image. The method described in any one of claims 1-5 is used again to obtain the corresponding stitched image until the desired aerial image is obtained.
7. A cross-scale UAV image stitching system, characterized in that, Includes computer-readable storage media and processors; The computer-readable storage medium is used to store executable instructions; The processor is configured to read executable instructions stored in the computer-readable storage medium to execute the method of any one of claims 1-5, or / and to execute the method of claim 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5, or / and the method as described in claim 6.
