Unmanned aerial vehicle aerial image splicing method based on visual angle self-adaption

By using dynamic perspective modeling and adaptive calibration, combined with improved ORB and RANSAC algorithms, the problem of offset distortion caused by attitude changes and altitude fluctuations in UAV aerial image stitching is solved, achieving high-quality panoramic image stitching suitable for applications such as surveying, monitoring, and scene display.

CN121660880APending Publication Date: 2026-03-13NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Traditional drone aerial image stitching methods do not combine drone flight logs and camera intrinsic parameters, and cannot accurately eliminate image offset and scaling distortion caused by attitude changes such as pitch, roll, and yaw, as well as altitude fluctuations. This results in problems such as misalignment and ghosting in the stitched image.

Method used

Through multi-dimensional image preprocessing and data association, dynamic viewpoint modeling and adaptive calibration, improved ORB and RANSAC algorithms are used for feature matching and calibration, and Retinex enhancement algorithm and Gaussian filtering are combined for image optimization to achieve accurate alignment and high-quality stitching of images on the same viewpoint plane.

Benefits of technology

It effectively eliminates image shifts and distortions caused by changes in drone attitude and altitude fluctuations, improves stitching stability and image quality, and ensures that panoramic images have neat edges, rich details and harmonious colors, adapting to the personalized needs of different aerial photography scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660880A_ABST
    Figure CN121660880A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an unmanned aerial vehicle aerial image splicing method based on visual angle self-adaption, which comprises the following steps: S1, multi-dimensional image preprocessing and data association: carrying out noise reduction and exposure equalization processing on unmanned aerial vehicle aerial sequence images, and synchronously analyzing unmanned aerial vehicle flight logs and camera internal parameters; according to the scheme, through the steps of dynamic view angle modeling and self-adaptive calibration, the mapping relation is constructed in combination with the flight log of the unmanned aerial vehicle and the internal reference of the camera, the image view angle parameter matrix is accurately calculated, and image offset and zoom distortion caused by attitude changes of pitching, rolling, yawing and the like of the unmanned aerial vehicle and height fluctuation can be specifically eliminated; meanwhile, through a multi-reference image screening and subsequence division strategy, accumulative errors caused by a single reference are avoided, it is ensured that all the images are accurately aligned in the same view angle plane, a high-precision basis is provided for follow-up splicing, and compared with a traditional splicing method, the method is more suitable for the dynamic aerial photography scene of the unmanned aerial vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to a method for stitching drone aerial images based on viewpoint adaptation. Background Technology

[0002] Drone aerial imagery captures scenes of the ground, buildings, and natural landscapes from an aerial perspective using unmanned aerial vehicles equipped with high-definition cameras, infrared sensors, and other equipment. It breaks through the spatial limitations of traditional photography, allowing for flexible adjustments to flight altitude, angle, and flight path. It can achieve panoramic coverage of wide-area scenes while also focusing on clear details, combining macroscopic vision with microscopic capture capabilities. Its applications are wide-ranging, providing precise data support for geographic surveying, urban planning, and agricultural monitoring, as well as for film and television production, tourism promotion, and emergency rescue. With its advantages of efficiency, flexibility, and low cost, it has become an important means of acquiring spatial imagery information, driving the visualization and digitalization development of multiple industries.

[0003] Current traditional UAV aerial image stitching methods mostly use a single transformation model with a fixed reference viewpoint. They do not combine UAV flight logs and camera intrinsic parameters to establish a correlation between the image and spatial attitude. This makes it impossible to accurately eliminate image offset and scaling distortion caused by attitude changes such as pitch, roll, and yaw, as well as altitude fluctuations. As a result, the stitched image is prone to problems such as misalignment and ghosting. To address this, we propose a UAV aerial image stitching method based on viewpoint adaptation. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a viewpoint-adaptive UAV aerial image stitching method. This method solves the problem that existing traditional UAV aerial image stitching methods often use a single transformation model with a fixed reference viewpoint, and fail to establish a correlation between the image and spatial attitude by combining UAV flight logs and camera intrinsic parameters. As a result, they cannot accurately eliminate image offset and scaling distortion caused by attitude changes such as pitch, roll, and yaw, as well as altitude fluctuations, leading to problems such as misalignment and ghosting in the stitched image.

[0005] To achieve the above objectives, the present invention provides a method for stitching UAV aerial images based on viewpoint adaptation, comprising the following steps: S1. Multi-dimensional image preprocessing and data association: Denoising and exposure equalization are performed on the drone aerial image sequence, and the drone flight log and camera intrinsic parameters are analyzed simultaneously to establish the mapping relationship between image frames, flight attitude and spatial position. S2. Dynamic viewpoint modeling and adaptive calibration: Calculate the image viewpoint parameter matrix based on the mapping data in step S1, select the reference image and divide the sequence image into subsequences, and use the projection transformation algorithm to uniformly map each subsequence image onto the reference viewpoint plane. S3. Multi-scale feature extraction and precise matching: Perform multi-scale feature detection and matching on the calibrated image, remove mismatched points and retain precise matching feature pairs; The effectiveness of precise matching feature pairs is quantified using the reprojection error formula, as follows:

[0006] Where e is the reprojection error of a single feature point, and (u, v) are the pixel coordinates of the feature point in the original image. , where is the predicted pixel coordinate of the feature point in the reference image after projection transformation; only feature pairs that satisfy e≤0.5 pixels are retained as exact matching feature pairs; S4. Image alignment effectiveness verification: Verify the alignment effect of adjacent images based on precise matching feature pairs. If the standard is not met, adjust the parameters and re-align. S5. Layered fusion and stitching with seam elimination: The overlapping and non-overlapping areas of the aligned effective images are processed separately, stitched together to obtain the initial panoramic image and the seams are eliminated. S6. Panoramic Image Optimization and Enhancement: The initial panoramic image is cropped, its details are enhanced, and noise is suppressed to obtain the final panoramic image.

[0007] Preferably, in step S1, the noise reduction process adopts a combined noise reduction algorithm of "Gaussian filtering + bilateral filtering"; the exposure equalization process is implemented through the Retinex enhancement algorithm, specifically by decomposing the illumination component and reflection component of the image, and unifying the brightness, contrast and color tone of the sequence images. This solution, through dynamic viewpoint modeling and adaptive calibration steps, combines the UAV flight log and camera intrinsic parameters to construct a mapping relationship, accurately calculates the image viewpoint parameter matrix, and can specifically eliminate image offset and scaling distortion caused by attitude changes such as pitch, roll, and yaw of the UAV and altitude fluctuations; at the same time, through multi-reference image screening and sub-sequence division strategy, it avoids the cumulative error caused by a single reference, ensuring that all images are accurately aligned on the same viewpoint plane, providing a high-precision foundation for subsequent stitching, and is more suitable for dynamic aerial photography scenarios of UAVs compared with traditional stitching methods.

[0008] Preferably, in step S1, the UAV flight log includes GPS latitude and longitude, flight altitude, and attitude angle time-series data; the camera intrinsic parameters include focal length, pixel size, and principal point coordinates.

[0009] Preferably, in step S2, the viewpoint parameter matrix includes the projection transformation relationship corresponding to pitch angle, roll angle, and yaw angle, as well as the scaling factor caused by flight altitude; the selection criterion for the reference image is that the attitude angle fluctuation amplitude is ≤0.5°, and the selection quantity is 1-3 frames.

[0010] Preferably, in step S2, the projection transformation algorithm is adaptively selected based on the type of viewpoint difference, which includes viewpoint offset and height fluctuation. Homography matrix transformation and affine transformation are selected accordingly. The layered fusion and stitching strategy uses pixel-level weighted fusion combined with histogram matching color correction for overlapping areas to achieve a natural transition between in-and-out areas and avoid seams and color breaks. Non-overlapping areas are stitched in an orderly manner according to GPS latitude and longitude, and morphological smoothing is used to eliminate transition traces. Subsequent cropping, adaptive sharpening, and noise suppression processing can further optimize the edges of the panoramic image, enhance the clarity of details, and suppress residual noise, ultimately resulting in a high-quality panoramic image with regular edges, rich details, and harmonious colors.

[0011] Preferably, in step S3, the multi-scale feature detection adopts an improved ORB algorithm, which is implemented by constructing an image pyramid. The extracted feature points have rotation invariance and scale invariance. The distance threshold of the K-nearest neighbor algorithm is set to 1.2-1.5 times the average distance of the feature descriptors. The improved ORB algorithm is used to construct an image pyramid to realize multi-scale feature detection. The extracted feature points have rotation invariance and scale invariance, which can adapt to different scaling ratios and shooting angles of targets in aerial images. The improved RANSAC algorithm combined with GPS spatial position constraints removes mismatched points and can accurately retain feature pairs with reprojection errors ≤ 0.5 pixels. With a dedicated alignment validity verification step, the alignment validity is verified in multiple dimensions through overlapping area ratio, average reprojection error, and contour similarity coefficient. If the standard is not met, the parameters can be dynamically adjusted to realign, effectively avoiding stitching failure caused by alignment deviation and improving stitching stability.

[0012] Preferably, in step S3, the feature matching first obtains candidate matching point pairs through the K-nearest neighbor algorithm, and then uses the improved RANSAC algorithm combined with GPS spatial location constraints to eliminate mismatched points; the reprojection error of the accurate matching feature pair is ≤0.5 pixels.

[0013] Preferably, in step S6, the detail enhancement is achieved through an adaptive sharpening algorithm. This algorithm dynamically adjusts the sharpening intensity based on the local sharpness of the image. When the local sharpness is below a set threshold, the sharpening intensity is increased; when it is above the threshold, the sharpening intensity is reduced. The solution constructs a complete technical chain, with each step closely connected and forming a logical closed loop. All technical means adopt mature and easy-to-implement algorithms, with clear key parameters, requiring no complex hardware support, which facilitates engineering implementation and promotion.

[0014] Preferably, in step S6, the noise suppression processing employs Gaussian filtering, with the filter kernel size adaptively selected as 3×3 or 5×5, specifically determined based on the noise intensity of the panoramic image. A combination of Gaussian filtering and bilateral filtering is used for noise reduction, which removes airflow disturbances and sensor noise while preserving image details. The Retinex enhancement algorithm decomposes the illumination and reflection components, unifying the brightness, contrast, and color tone of the sequence images. This effectively addresses uneven brightness issues in complex lighting scenarios such as backlighting and cloudy conditions, improving image quality from the source and laying a solid foundation for subsequent stitching.

[0015] Preferably, the sequence of images consists of images continuously captured by the UAV along a preset flight path, and the overlap between the images is ≥60%. The method is applicable to surveying, monitoring, or scene display scenarios. The solution supports the stitching of high overlap (≥60%) sequence images continuously captured by the UAV along a preset flight path, adapting to various application scenarios such as surveying, monitoring, and scene display. The parameters of each step can be adaptively adjusted according to the actual image conditions and requirements, such as the selection of projection transformation algorithm and the adaptation of filter kernel size, taking into account the personalized needs of different aerial photography scenarios, and has strong versatility and practicality.

[0016] In summary, the technical effects and advantages of this invention are as follows: 1. In this invention, the solution uses dynamic perspective modeling and adaptive calibration steps, combined with UAV flight logs and camera intrinsic parameters to construct a mapping relationship, and accurately calculates the image perspective parameter matrix. This can specifically eliminate image offset and scaling distortion caused by attitude changes such as pitch, roll, and yaw of the UAV and altitude fluctuations. At the same time, through multi-reference image screening and sub-sequence division strategies, it avoids the cumulative error caused by a single reference, ensuring that all images are accurately aligned on the same perspective plane, providing a high-precision foundation for subsequent stitching. Compared with traditional stitching methods, it is more suitable for UAV dynamic aerial photography scenarios.

[0017] 2. In this invention, an improved ORB algorithm is used to construct an image pyramid to achieve multi-scale feature detection. The extracted feature points have rotation invariance and scale invariance, which can adapt to different scaling ratios and shooting angles of targets in aerial images. An improved RANSAC algorithm with GPS spatial position constraints is used to remove mismatched points, which can accurately retain feature pairs with reprojection errors ≤ 0.5 pixels. With a dedicated alignment validity verification step, the overlapping area ratio, the mean reprojection error, and the contour similarity coefficient are checked in multiple dimensions. If the standard is not met, the parameters can be dynamically adjusted to realign, effectively avoiding stitching failures caused by alignment deviations and improving stitching stability.

[0018] 3. In this invention, a combination of Gaussian filtering and bilateral filtering is used to reduce noise while removing airflow disturbances and sensor noise, thus preserving image details. The Retinex enhancement algorithm is used to decompose the illumination and reflection components, unifying the brightness, contrast, and color tone of the sequence images. This effectively addresses the uneven brightness problem in complex lighting scenarios such as backlighting and cloudy conditions, improving image quality from the source and laying a good foundation for subsequent stitching.

[0019] 4. In this invention, the layered fusion and stitching strategy uses pixel-level weighted fusion combined with histogram matching color correction for overlapping areas to achieve a natural transition between in-and-out areas, avoiding seams and color breaks; non-overlapping areas are stitched in an orderly manner according to GPS latitude and longitude, and morphological smoothing is used to eliminate transition traces; subsequent cropping, adaptive sharpening and noise suppression processing can further optimize the edges of the panoramic image, enhance the clarity of details, and suppress residual noise, ultimately resulting in a high-quality panoramic image with regular edges, rich details and harmonious colors.

[0020] 5. In this invention, the solution supports the stitching of high-overlap (≥60%) sequence images continuously captured by UAVs along a preset route, which is suitable for various application scenarios such as surveying, monitoring, and scene display. The parameters of each step can be adaptively adjusted according to the actual image situation and needs, such as the selection of projection transformation algorithm and the adaptation of filter kernel size, taking into account the personalized needs of different aerial photography scenarios, and has strong versatility and practicality.

[0021] 6. In this invention, the solution constructs a complete technical chain, with each step closely connected and forming a logical closed loop; all technical means adopt mature and easy-to-implement algorithms, with clear key parameters, no need for complex hardware support, which facilitates engineering implementation and promotion. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating a method for stitching drone aerial images based on viewpoint adaptation according to the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] refer to Figure 1 The method for stitching UAV aerial images based on viewpoint adaptation includes the following steps: S1. Multi-dimensional image preprocessing and data association: Denoising and exposure equalization are performed on the drone aerial image sequence, and the drone flight log and camera intrinsic parameters are analyzed simultaneously to establish the mapping relationship between image frames, flight attitude and spatial position. S2. Dynamic viewpoint modeling and adaptive calibration: Calculate the image viewpoint parameter matrix based on the mapping data in step S1, select the reference image and divide the sequence image into subsequences, and use the projection transformation algorithm to uniformly map each subsequence image onto the reference viewpoint plane. S3. Multi-scale feature extraction and precise matching: Perform multi-scale feature detection and matching on the calibrated image, remove mismatched points and retain precise matching feature pairs; The effectiveness of precise matching feature pairs is quantified using the reprojection error formula, as follows:

[0025] Where e is the reprojection error of a single feature point, and (u, v) are the pixel coordinates of the feature point in the original image. , where is the predicted pixel coordinate of the feature point in the reference image after projection transformation; only feature pairs that satisfy e≤0.5 pixels are retained as exact matching feature pairs; S4. Image alignment effectiveness verification: Verify the alignment effect of adjacent images based on precise matching feature pairs. If the standard is not met, adjust the parameters and re-align. S5. Layered fusion and stitching with seam elimination: The overlapping and non-overlapping areas of the aligned effective images are processed separately, stitched together to obtain the initial panoramic image and the seams are eliminated. S6. Panoramic Image Optimization and Enhancement: The initial panoramic image is cropped, its details are enhanced, and noise is suppressed to obtain the final panoramic image.

[0026] In step S1, the noise reduction process employs a combination of Gaussian filtering and bilateral filtering. Exposure equalization is achieved through the Retinex enhancement algorithm, which specifically decomposes the illumination and reflection components of the image to unify the brightness, contrast, and color tone of the sequence images. This solution uses dynamic viewpoint modeling and adaptive calibration steps, combined with UAV flight logs and camera intrinsic parameters to construct a mapping relationship, accurately calculates the image viewpoint parameter matrix, and can specifically eliminate image offset and scaling distortion caused by UAV pitch, roll, yaw, and other attitude changes and altitude fluctuations. At the same time, through multi-reference image screening and sub-sequence division strategies, the cumulative error caused by a single reference is avoided, ensuring that all images are accurately aligned on the same viewpoint plane, providing a high-precision foundation for subsequent stitching. Compared with traditional stitching methods, this solution is more suitable for dynamic UAV aerial photography scenarios.

[0027] In step S1, the UAV flight log includes GPS latitude and longitude, flight altitude and attitude angle time series data; the camera intrinsic parameters include focal length, pixel size and principal point coordinates.

[0028] In step S2, the viewpoint parameter matrix includes the projection transformation relationship of pitch angle, roll angle, and yaw angle, as well as the scaling factor caused by flight altitude; the selection criteria for the reference image is that the attitude angle fluctuation range is ≤0.5°, and the number of frames selected is 1-3.

[0029] In step S2, the projection transformation algorithm is adaptively selected based on the type of viewpoint difference, which includes viewpoint offset and height fluctuation. The corresponding homography matrix transformation and affine transformation are selected. The layered fusion and stitching strategy uses pixel-level weighted fusion combined with histogram matching color correction for overlapping areas to achieve a natural transition between in-and-out areas and avoid seams and color breaks. Non-overlapping areas are stitched in an orderly manner according to GPS latitude and longitude, and morphological smoothing is used to eliminate transition traces. Subsequent cropping, adaptive sharpening and noise suppression processing can further optimize the edges of the panoramic image, enhance the clarity of details and suppress residual noise, and finally obtain a high-quality panoramic image with regular edges, rich details and harmonious colors.

[0030] In step S3, multi-scale feature detection employs an improved ORB algorithm, implemented by constructing an image pyramid. The extracted feature points possess rotation and scale invariance. The distance threshold of the K-nearest neighbor algorithm is set to 1.2-1.5 times the mean distance of the feature descriptors. The improved ORB algorithm is used to construct an image pyramid to achieve multi-scale feature detection. The extracted feature points possess rotation and scale invariance, adaptable to different scaling ratios and shooting angles of targets in aerial images. An improved RANSAC algorithm combined with GPS spatial position constraints eliminates mismatched points, accurately retaining feature pairs with reprojection errors ≤ 0.5 pixels. With a dedicated alignment validity verification step, multi-dimensional verification is performed through overlapping area ratio, mean reprojection error, and contour similarity coefficient. If the standard is not met, parameters can be dynamically adjusted for re-alignment, effectively avoiding stitching failures caused by alignment deviations and improving stitching stability.

[0031] In step S3, the feature matching first obtains candidate matching point pairs through the K-nearest neighbor algorithm, and then uses the improved RANSAC algorithm combined with GPS spatial location constraints to eliminate mismatched points; the reprojection error of the accurate matching feature pairs is ≤0.5 pixels.

[0032] In step S6, detail enhancement is achieved through an adaptive sharpening algorithm. This algorithm dynamically adjusts the sharpening intensity based on the local sharpness of the image. When the local sharpness is below a set threshold, the sharpening intensity is increased, and when it is above the threshold, the sharpening intensity is reduced. The solution constructs a complete technical chain, with each step closely connected and forming a logical closed loop. All technical means adopt mature and easy-to-implement algorithms, with clear key parameters, requiring no complex hardware support, which facilitates engineering implementation and promotion.

[0033] In step S6, noise suppression is achieved using Gaussian filtering, with the filter kernel size adaptively selected as 3×3 or 5×5, determined based on the noise intensity of the panoramic image. A combination of Gaussian filtering and bilateral filtering is used to reduce noise while removing airflow disturbances and sensor noise, thus preserving image details. The Retinex enhancement algorithm decomposes the illumination and reflection components, unifying the brightness, contrast, and color tone of the sequence images. This effectively addresses uneven brightness in complex lighting scenarios such as backlighting and cloudy conditions, improving image quality from the source and laying a solid foundation for subsequent stitching.

[0034] The sequence of images consists of images continuously captured by a UAV along a preset flight path, with an overlap of ≥60% between the images. The method is applicable to surveying, monitoring, or scene display scenarios. The solution supports the stitching of high-overlap (≥60%) sequence images continuously captured by a UAV along a preset flight path, adapting to various application scenarios such as surveying, monitoring, and scene display. The parameters of each step can be adaptively adjusted according to the actual image conditions and requirements, such as the selection of projection transformation algorithms and the adaptation of filter kernel size, taking into account the personalized needs of different aerial photography scenarios, and possessing strong versatility and practicality.

[0035] I. Preliminary Preparations The following detailed description of the viewpoint-adaptive UAV aerial image stitching method is provided with reference to specific embodiments. This embodiment takes UAV aerial image stitching in an urban surveying scenario as an example. The UAV model used is DJI Phantom 4 RTK, the camera intrinsic parameters have been pre-calibrated, the aerial flight path is a rectangular loop, the overlap of the sequence images is set to 65%, and a total of 120 frames of images are acquired. The specific implementation steps are as follows: Step S1: Multi-dimensional image preprocessing and data association Image preprocessing: Noise reduction processing: The "Gaussian filtering + bilateral filtering" combined noise reduction algorithm is applied to the 120 frames of aerial images in sequence. First, a 5×5 Gaussian filter kernel is used to initially remove sensor noise and high-frequency noise generated by airflow disturbance. Then, bilateral filtering is used to further suppress residual noise while preserving image edge details.

[0036] Exposure equalization processing: The Retinex enhancement algorithm is used to process the denoised image. The image is decomposed into illumination and reflection components through logarithmic transformation. The illumination component is adjusted by adaptive histogram equalization to unify the brightness, contrast and color tone of all image sequences and eliminate uneven brightness caused by backlighting and cloudy scenes.

[0037] Data association construction: Analyze the drone flight logs and extract the GPS latitude and longitude, flight altitude and attitude angle time series data corresponding to each frame of image; By calling the pre-calibrated camera intrinsic parameters and combining them with the flight data mentioned above, a one-to-one mapping relationship between each frame of image and flight attitude and spatial position is established through coordinate transformation, generating an associated data table containing image frame number, attitude parameters, and spatial coordinates.

[0038] Step S2: Dynamic View Modeling and Adaptive Calibration Reference image selection: Based on the attitude angle data in the associated data table, images with attitude angle fluctuation amplitude ≤ 0.5° are selected as reference images. In this embodiment, a total of 2 reference images (frame 30 and frame 75) are selected, which correspond to the stable flight phases of the first half and the second half of the flight path, respectively.

[0039] Subsequence partitioning and perspective parameter calculation: Using two reference frames as the dividing line, the 120-frame sequence of images was divided into three subsequences (frames 1-30, frames 31-75, and frames 76-120). For each subsequence, based on the mapping data from step S1, the viewpoint parameter matrix of each image is calculated. The matrix includes the projection transformation relationship corresponding to pitch angle, roll angle, and yaw angle, as well as the scaling factor caused by flight altitude.

[0040] Adaptive projection transformation: For each image in a subsequence, first determine the type of viewpoint difference: if there is only viewpoint shift caused by attitude angle changes, use homography matrix transformation; if there is scaling difference caused by flight altitude fluctuations, use affine transformation. Each subsequence image is mapped to the view plane of the corresponding reference image to achieve unified view calibration of all images and eliminate image offset and scaling distortion caused by pitch, roll, yaw and altitude fluctuations.

[0041] Step S3: Multi-scale feature extraction and precise matching Multi-scale feature detection: An improved ORB algorithm is used to construct a 6-layer image pyramid (scale factor 1.2) on the calibrated image, and feature points with rotation invariance and scale invariance are extracted. The number of feature points extracted per frame is controlled between 1500 and 2000.

[0042] Feature matching and mismatch removal: The K-nearest neighbor algorithm (k=2) is used to match the feature descriptors of adjacent images. The distance threshold is set to 1.3 times the mean distance of the feature descriptors to obtain candidate matching point pairs. GPS spatial location constraints are introduced, and an improved RANSAC algorithm is used to remove mismatched points. The reprojection error threshold is set to 0.5 pixels, and accurate matching feature pairs that meet the conditions are retained. Each pair of adjacent images has no less than 300 valid matching point pairs.

[0043] Step S4: Image alignment validity verification The alignment effect of adjacent images is verified in multiple dimensions: the proportion of overlapping areas, the average reprojection error, and the contour similarity coefficient are calculated. In this embodiment, the average reprojection error of the 45th-46th frame images is 0.35 pixels, which does not meet the requirements. The process returns to step S2 to readjust the viewpoint parameter matrix of the subsequence and performs projection transformation and feature matching again until the alignment effect of all adjacent images meets the standard.

[0044] Step S5: Layered fusion splicing and seam elimination Overlapping region processing: A pixel-level weight fusion algorithm is used for the overlapping regions of adjacent images. The weight coefficients are linearly transitioned from left to right with the center of the overlapping region as the boundary (the weight of the left image decreases from 1 to 0, and the weight of the right image increases from 0 to 1). At the same time, histogram matching is used for color correction to achieve a natural transition.

[0045] Non-overlapping area processing: Based on the GPS latitude and longitude correlation data established in step S1, the non-overlapping area images are stitched together in an orderly manner according to spatial coordinates. Morphological opening operation (3×3 rectangular structural element) is used to smooth the transition area to eliminate transition traces.

[0046] Seam elimination: For the initial panoramic image after stitching, a dynamic programming algorithm is used to detect the seam position, and residual seam lines and color breaks are eliminated by adjusting the local pixel grayscale.

[0047] Step S6: Panoramic Image Optimization and Enhancement Cropping process: Based on the effective pixel range of the initial panoramic image, the invalid black border areas are cropped to obtain a regular rectangular panoramic image (resolution 8192×4096).

[0048] Detail enhancement: An adaptive sharpening algorithm is adopted, which dynamically adjusts the sharpening intensity by calculating the local sharpness of the image (based on the variance of the Laplacian operator). When the local sharpness is below the threshold (variance ≤ 50), a 7×7 sharpening kernel is used for enhancement; when it is above the threshold, a 3×3 sharpening kernel is used for reduction, thereby enhancing the texture details of the image.

[0049] Noise suppression: The noise intensity of the panoramic image is detected. A 5×5 Gaussian filter is used for areas with high noise (grayscale standard deviation ≥15), and a 3×3 Gaussian filter is used for areas with low noise. Finally, a city surveying panoramic image with regular edges, rich details, and harmonious colors is obtained.

[0050] This embodiment completes the stitching of UAV aerial images through the above steps. The stitched panoramic image has no obvious seams or color breaks, the average reprojection error is ≤0.3 pixels, and the detail clarity is improved by 30% compared with traditional methods, which fully meets the accuracy requirements of urban surveying. At the same time, the implementation process can adjust key parameters according to actual application scenarios (such as monitoring and scene display), and has strong versatility and engineering implementation capabilities.

[0051] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for stitching UAV aerial images based on viewpoint adaptation, characterized in that, Includes the following steps: S1. Multi-dimensional image preprocessing and data association: Denoising and exposure equalization are performed on the drone aerial image sequence, and the drone flight log and camera intrinsic parameters are analyzed simultaneously to establish the mapping relationship between image frames, flight attitude and spatial position. S2. Dynamic viewpoint modeling and adaptive calibration: Calculate the image viewpoint parameter matrix based on the mapping data in step S1, select the reference image and divide the sequence image into subsequences, and use the projection transformation algorithm to uniformly map each subsequence image onto the reference viewpoint plane. S3. Multi-scale feature extraction and precise matching: Perform multi-scale feature detection and matching on the calibrated image, remove mismatched points and retain precise matching feature pairs; The effectiveness of precise matching feature pairs is quantified using the reprojection error formula, as follows: ; Where e is the reprojection error of a single feature point, and (u, v) are the pixel coordinates of the feature point in the original image. , where is the predicted pixel coordinate of the feature point in the reference image after projection transformation; only feature pairs that satisfy e≤0.5 pixels are retained as exact matching feature pairs; S4. Image alignment effectiveness verification: Verify the alignment effect of adjacent images based on precise matching feature pairs. If the standard is not met, adjust the parameters and re-align. S5. Layered fusion and stitching with seam elimination: The overlapping and non-overlapping areas of the aligned effective images are processed separately, stitched together to obtain the initial panoramic image and the seams are eliminated. S6. Panoramic Image Optimization and Enhancement: The initial panoramic image is cropped, its details are enhanced, and noise is suppressed to obtain the final panoramic image.

2. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S1, the noise reduction process adopts a combined noise reduction algorithm of "Gaussian filtering + bilateral filtering"; the exposure equalization process is implemented by the Retinex enhancement algorithm, which specifically decomposes the illumination component and reflection component of the image to unify the brightness, contrast and color tone of the sequence images.

3. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S1, the UAV flight log includes GPS latitude and longitude, flight altitude and attitude angle time series data; the camera intrinsic parameters include focal length, pixel size and principal point coordinates.

4. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S2, the viewpoint parameter matrix includes the projection transformation relationship corresponding to pitch angle, roll angle, and yaw angle, as well as the scaling factor caused by flight altitude; the selection criteria for the reference image is that the attitude angle fluctuation amplitude is ≤0.5°, and the selection quantity is 1-3 frames.

5. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S2, the projection transformation algorithm is adaptively selected according to the type of viewpoint difference, which includes viewpoint offset and height fluctuation, and homography matrix transformation and affine transformation are selected accordingly.

6. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S3, the multi-scale feature detection adopts an improved ORB algorithm, which is realized by constructing an image pyramid. The extracted feature points have rotation invariance and scale invariance. The distance threshold of the K-nearest neighbor algorithm is set to 1.2-1.5 times the mean distance of the feature descriptors.

7. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S3, the feature matching first obtains candidate matching point pairs through the K-nearest neighbor algorithm, and then uses the improved RANSAC algorithm combined with GPS spatial location constraints to eliminate mismatched points; the reprojection error of the accurate matching feature pair is ≤0.5 pixels.

8. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S6, the detail enhancement is achieved through an adaptive sharpening algorithm. This algorithm dynamically adjusts the sharpening intensity based on the local sharpness of the image. When the local sharpness is below a set threshold, the sharpening intensity is increased, and when it is above the threshold, the sharpening intensity is reduced.

9. The method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, In step S6, the noise suppression process uses Gaussian filtering, and the filter kernel size is adaptively selected as 3×3 or 5×5, depending on the noise intensity of the panoramic image.

10. A method for stitching UAV aerial images based on viewpoint adaptation according to claim 1, characterized in that, The sequence of images consists of images continuously captured by a drone along a preset flight path, with an overlap of ≥60% between the images; the method is applicable to surveying, monitoring, or scene display scenarios.