A low-altitude photography image rectification method based on computer vision
By constructing a distortion correction model with feature extraction, regression, and comparison units and cross-attention color modulation, the problems of radial distortion and uneven illumination in low-altitude photography images were solved, achieving high-quality image correction results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KUNMING UNIV OF SCI & TECH
- Filing Date
- 2026-06-25
- Publication Date
- 2026-07-24
AI Technical Summary
Low-altitude photography images suffer from radial distortion and uneven lighting. Traditional methods struggle to accurately describe the nonlinear distortion caused by lens characteristics, shooting angle, and distance variations. Furthermore, color correction methods are ill-suited to adapting to complex lighting changes, leading to color shifts and loss of detail.
A distortion correction model is constructed that includes feature extraction, regression, and comparison units. Radial distortion is simulated by a two-parameter polynomial and the correction coordinate mapping is generated by inverse transformation. Global color modulation is achieved by combining cross-attention and a two-stage loss function is used to optimize color correction.
It accurately corrects distortion parameters, improves color reproduction and visual quality of images, evens out lighting, suppresses noise interference, and fully preserves high-frequency details of images.
Smart Images

Figure CN122453598A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image correction, specifically to a method for correcting low-altitude photographic images based on computer vision. Background Technology
[0002] When aircraft conduct aerial photography at low altitudes, perspective distortion is easily generated due to the large changes in the angle between the camera and the subject. Even high-quality lenses can produce lens distortion. Different materials have different reflectivities, leading to uneven lighting or blurry images due to shadows. Corrected images eliminate geometric distortion and uneven lighting, resulting in a more natural and aesthetically pleasing image. Distortion in low-altitude photography is primarily radial distortion. Traditional distortion correction methods rely on fixed-parameter models, which struggle to accurately describe the nonlinear distortion caused by lens characteristics, shooting angle, and distance variations during actual shooting. Color correction also often uses manually designed or preset rules, which are ill-suited to complex lighting conditions, noise interference, and dynamic shooting conditions, and are prone to color shifts, uneven exposure, and loss of detail. Summary of the Invention
[0003] To address the above issues and overcome the shortcomings of existing technologies, this invention provides a computer vision-based method for low-altitude photography image correction. Since the distortion in low-altitude photography images is primarily radial distortion, and traditional distortion correction methods often rely on fixed-parameter models, it is difficult to accurately describe the nonlinear distortion caused by lens characteristics, shooting angle, and distance variations during actual shooting. This invention constructs a distortion correction model including feature extraction, regression, and comparison units. It simulates radial distortion using a two-parameter polynomial and generates a correction coordinate mapping using inverse transformation. It introduces average distortion level error, distortion level contrast loss, and distortion level penalty function to optimize distortion correction from three dimensions: parameter estimation accuracy, feature contrast, and small distortion compensation. The variable correction model ensures accurate prediction of distortion parameters. Addressing the technical problems of color correction in low-altitude photography, which often relies on manual design or preset rules, struggles to adapt to complex lighting changes, noise interference, and dynamic shooting conditions, and is prone to color shift, uneven exposure, and loss of detail, this invention extracts underexposed and overexposed features from inverted color images, fuses them to generate pseudo-normal exposure features, and estimates color shift. It then uses cross-attention to achieve global color modulation, combined with a two-stage loss function for joint constraint. This allows for precise correction of color deviation, uniform image lighting, and effective suppression of noise interference, while fully preserving high-frequency details and texture structure of the image. This significantly improves the color reproduction, exposure consistency, and overall visual quality of low-altitude photography images.
[0004] The technical solution adopted by this invention is as follows: This invention provides a method for correcting low-altitude photographic images based on computer vision, which specifically includes the following steps:
[0005] Step S1: Image collection. Collect low-altitude photographic images, which are images taken by the UAV during low-altitude flight. Collect a low-altitude panoramic image set and a color-corrected image set. Add radial distortion to the low-altitude panoramic images in the low-altitude panoramic image set to obtain distorted images.
[0006] Step S2: Image distortion correction. A distortion correction model is constructed, which includes a feature extraction unit, a regression module unit, and a comparison unit. The distorted image and the low-altitude panoramic image are input into the distortion correction model. The feature extraction unit extracts the features of the distorted image and the low-altitude panoramic image. The regression unit predicts the distortion parameters to obtain the predicted distortion parameters. The inverse transformation of the two-parameter polynomial is used to generate the distortion correction coordinate mapping. The distorted image is mapped to the correction coordinates using bilinear interpolation to obtain the distortion-corrected image.
[0007] Step S3: Image color correction. Using a convolutional neural network, an inverted color image is calculated based on the distortion-corrected image to generate correction features that adapt to the bright and dark areas. After estimating the color shift, global color modulation is completed through cross-attention. A two-stage loss function is used for joint optimization to achieve image color correction.
[0008] Step S4: Image correction application. The low-altitude photography image correction model is composed of a distortion correction model and a convolutional neural network. The low-altitude photography image is input into the low-altitude photography image correction model to perform distortion correction and color correction in sequence to obtain the corrected image.
[0009] Further, step S2, image distortion correction, specifically includes the following steps:
[0010] Step S21: Collect a set of low-altitude panoramic images, construct a two-parameter polynomial, and use the two-parameter polynomial to add radial distortion to the low-altitude panoramic images in the set of low-altitude panoramic images. The two parameters are two distortion parameters, and the distorted image is obtained. The distortion parameters, the distorted image and the low-altitude panoramic image are merged to form a distortion correction training set.
[0011] Step S22: Create and initialize a regression model as a distortion correction model. The distortion correction model includes a feature extraction unit, a regression module unit, and a comparison unit. The distorted image and the low-altitude panoramic image are input into the distortion correction model. The feature extraction unit extracts features from the distorted image and the low-altitude panoramic image. The regression unit predicts the distortion parameters to obtain the predicted distortion parameters. The inverse transformation of a two-parameter polynomial is used to generate the distortion correction coordinate mapping. Bilinear interpolation is used to map the distorted image to the correction coordinates, and the distortion-corrected image is output. The relationship between the two distortion parameters in the two-parameter polynomial is defined using the following formula: ;
[0012] In the formula, and These are the first and second order distortion parameters of the two-parameter polynomial, respectively. Determine the type of distortion. Resolve distortion details;
[0013] Step S23: The regression unit predicts the distortion parameters, outputs the predicted distortion parameters, and calculates the average distortion level error using the following formula: ;
[0014] In the formula, It is the average distortion level error. It predicts distortion parameters. It is the distortion intensity function. and These are the width and height of the distorted image and the low-altitude panoramic image, respectively. and These are the pixel coordinates of distorted images and low-altitude panoramic images;
[0015] The single-parameter distortion level error is calculated from the average distortion level error.
[0016] Step S24: The feature extraction unit extracts feature vectors from the distortion correction training set and randomly generates feature vector pairs. The comparison unit uses regularization techniques to compare the two feature vectors in the feature vector pairs and defines the distortion level contrast loss function, using the following formula: ;
[0017] In the formula, It is a distortion level contrast loss function. It is a binary cross-entropy loss. Represents the set of binary cross-entropy losses. It is a set of eigenvectors. It contains all the distortion correction training materials. The set, This represents a comparison function. and These are the first two chapters in the distortion correction training series. The first sample and the first The feature vector of each sample and These are the first two chapters in the distortion correction training series. The first sample and the first one sample value, It is the true probability;
[0018] Step S25: Define a distortion level penalty function to accurately estimate small distortions. The distortion level penalty function is a combination of mean squared error loss and weight penalty function, and the formula used is as follows: ;
[0019] In the formula, It is a distortion level penalty function. It is all predicted by the regression unit. The set, It is the mean squared error loss. yes The penalty weight function, It is the scaling factor;
[0020] Step S26: Define the training objective function of the distortion correction model as the sum of the single-parameter distortion level error, the distortion level contrast loss function, and the distortion level penalty function, using the following formula: ;
[0021] In the formula, It is the training objective function of the distortion correction model. and It is a single-parameter distortion level error. and These are the weights of the distortion level contrast loss and the distortion level penalty, respectively.
[0022] Further, step S3, image color correction, specifically includes the following steps:
[0023] Step S31: Illumination feature extraction. Calculate the inverted color image of the distortion-corrected image. Input the distortion-corrected image and the inverted color image into the UNet feature extractor to obtain a 1-channel underexposed image and a 1-channel overexposed image, which are marked as underexposed and overexposed regions, respectively.
[0024] Step S32: Calculate illumination features and generate features to adapt to the correction of underexposed and overexposed areas, namely brightening features and darkening features, respectively;
[0025] Step S33: Pseudo-normal feature generation, fusing brightening features, darkening features and distortion correction image to obtain pseudo-normal exposure features;
[0026] Step S34: Color shift estimation. Estimate the color shift from the brightening feature to the pseudo-normal exposure feature and from the darkening feature to the pseudo-normal exposure feature, respectively, to obtain the brightening shift and the darkening shift.
[0027] Step S35: Color modulation output, through cross attention, the distortion-corrected image, brightness shift, and darkening shift are merged into global color;
[0028] Step S36: Two-stage loss training, using pseudo-normal exposure features and L1 loss of normal exposure images as pseudo-normal feature loss, and fusing L1 loss, color cosine similarity loss, SSIM loss and VGG perceptual loss as output loss function to obtain color modulated image.
[0029] The beneficial effects achieved by adopting the above solution are as follows:
[0030] (1) Since the distortion in low-altitude photography images is mainly radial distortion, and traditional distortion correction mostly relies on fixed parameter models, it is difficult to accurately describe the technical problem of nonlinear distortion caused by lens characteristics, shooting angle and distance changes in actual shooting. This invention constructs a distortion correction model that includes feature extraction, regression and comparison units. It simulates radial distortion through a two-parameter polynomial and uses inverse transformation to generate a correction coordinate mapping. It introduces average distortion level error, distortion level contrast loss and distortion level penalty function to optimize the distortion correction model from three dimensions: parameter estimation accuracy, feature contrast and small distortion compensation, to ensure accurate prediction of distortion parameters.
[0031] (2) In view of the technical problems that low-altitude photography image color correction often adopts manual design or preset rules, which is difficult to adapt to complex scene lighting changes, noise interference and dynamic shooting conditions, and is prone to color shift, uneven exposure and loss of details, this invention extracts underexposed and overexposed photo features by inverting color images, fuses them to generate pseudo normal exposure features and estimates color shift, achieves global color modulation by using cross attention, and combines with dual-stage loss function joint constraints, which can accurately correct color deviation, homogenize image lighting, effectively suppress noise interference, and completely preserve the high-frequency details and texture structure of the image, greatly improving the color reproduction, exposure consistency and overall visual quality of low-altitude photography images. Attached Figure Description
[0032] Figure 1 The flowchart illustrates the steps of a low-altitude photography image correction method based on computer vision provided by this invention.
[0033] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0035] Example 1: See Figure 1 This embodiment provides a computer vision-based method for correcting low-altitude photographic images. The method specifically includes the following steps:
[0036] Step S1: Image collection. Collect low-altitude photographic images, which are images taken by the UAV during low-altitude flight. Collect a low-altitude panoramic image set and a color-corrected image set. Add radial distortion to the low-altitude panoramic images in the low-altitude panoramic image set to obtain distorted images.
[0037] Step S2: Image distortion correction. A distortion correction model is constructed, which includes a feature extraction unit, a regression module unit, and a comparison unit. The distorted image and the low-altitude panoramic image are input into the distortion correction model. The feature extraction unit extracts the features of the distorted image and the low-altitude panoramic image. The regression unit predicts the distortion parameters to obtain the predicted distortion parameters. The inverse transformation of the two-parameter polynomial is used to generate the distortion correction coordinate mapping. The distorted image is mapped to the correction coordinates using bilinear interpolation to obtain the distortion-corrected image.
[0038] Step S3: Image color correction. Using a convolutional neural network, an inverted color image is calculated based on the distortion-corrected image to generate correction features that adapt to the bright and dark areas. After estimating the color shift, global color modulation is completed through cross-attention. A two-stage loss function is used for joint optimization to achieve image color correction.
[0039] Step S4: Image correction application. The low-altitude photography image correction model is composed of a distortion correction model and a convolutional neural network. The low-altitude photography image is input into the low-altitude photography image correction model to perform distortion correction and color correction in sequence to obtain the corrected image.
[0040] Example 2: See Figure 1 This embodiment is based on the above embodiment. Step S2, image distortion correction, specifically includes the following steps:
[0041] Step S21: Collect a set of low-altitude panoramic images, construct a two-parameter polynomial, and use the two-parameter polynomial to add radial distortion to the low-altitude panoramic images in the set of low-altitude panoramic images. The two parameters are two distortion parameters, and the distorted image is obtained. The distortion parameters, the distorted image and the low-altitude panoramic image are merged to form a distortion correction training set.
[0042] Step S22: Create and initialize a regression model as a distortion correction model. The distortion correction model includes a feature extraction unit, a regression module unit, and a comparison unit. The distorted image and the low-altitude panoramic image are input into the distortion correction model. The feature extraction unit extracts features from the distorted image and the low-altitude panoramic image. The regression unit predicts the distortion parameters to obtain the predicted distortion parameters. The inverse transformation of a two-parameter polynomial is used to generate the distortion correction coordinate mapping. Bilinear interpolation is used to map the distorted image to the correction coordinates, and the distortion-corrected image is output. The relationship between the two distortion parameters in the two-parameter polynomial is defined using the following formula: ;
[0043] In the formula, and These are the first and second order distortion parameters of the two-parameter polynomial, respectively. Determine the type of distortion. Resolve distortion details;
[0044] Step S23: The regression unit predicts the distortion parameters, outputs the predicted distortion parameters, and calculates the average distortion level error using the following formula: ;
[0045] In the formula, It is the average distortion level error. It predicts distortion parameters. It is the distortion intensity function. and These are the width and height of the distorted image and the low-altitude panoramic image, respectively. and These are the pixel coordinates of distorted images and low-altitude panoramic images;
[0046] The single-parameter distortion level error is calculated from the average distortion level error.
[0047] Step S24: The feature extraction unit extracts feature vectors from the distortion correction training set and randomly generates feature vector pairs. The comparison unit uses regularization techniques to compare the two feature vectors in the feature vector pairs and defines the distortion level contrast loss function, using the following formula: ;
[0048] In the formula, It is a distortion level contrast loss function. It is a binary cross-entropy loss. Represents the set of binary cross-entropy losses. It is a set of eigenvectors. It contains all the distortion correction training materials. The set, This represents a comparison function. and These are the first two chapters in the distortion correction training series. The first sample and the first The feature vector of each sample and These are the first two chapters in the distortion correction training series. The first sample and the first one sample value, It is the true probability;
[0049] Step S25: Define a distortion level penalty function to accurately estimate small distortions. The distortion level penalty function is a combination of mean squared error loss and weight penalty function, and the formula used is as follows: ;
[0050] In the formula, It is a distortion level penalty function. It is all predicted by the regression unit. The set, It is the mean squared error loss. yes The penalty weight function, It is the scaling factor;
[0051] Step S26: Define the training objective function of the distortion correction model as the sum of the single-parameter distortion level error, the distortion level contrast loss function, and the distortion level penalty function, using the following formula: ;
[0052] In the formula, It is the training objective function of the distortion correction model. and It is a single-parameter distortion level error. and These are the weights of the distortion level contrast loss and the distortion level penalty, respectively.
[0053] Example 3: See Figure 1 This embodiment is based on the above embodiment. Step S3, image color correction, specifically includes the following steps:
[0054] Step S31: Illumination feature extraction. Calculate the inverted color image of the distortion-corrected image. Input the distortion-corrected image and the inverted color image into the UNet feature extractor to obtain a 1-channel underexposed image and a 1-channel overexposed image, which are marked as underexposed and overexposed regions, respectively.
[0055] Step S32: Calculate illumination features and generate features to adapt to the correction of underexposed and overexposed areas, namely brightening features and darkening features, respectively;
[0056] Step S33: Pseudo-normal feature generation, fusing brightening features, darkening features and distortion correction image to obtain pseudo-normal exposure features;
[0057] Step S34: Color shift estimation. Estimate the color shift from the brightening feature to the pseudo-normal exposure feature and from the darkening feature to the pseudo-normal exposure feature, respectively, to obtain the brightening shift and the darkening shift.
[0058] Step S35: Color modulation output, through cross attention, the distortion-corrected image, brightness shift, and darkening shift are merged into global color;
[0059] Step S36: Two-stage loss training, using pseudo-normal exposure features and L1 loss of normal exposure images as pseudo-normal feature loss, and fusing L1 loss, color cosine similarity loss, SSIM loss and VGG perceptual loss as output loss function to obtain color modulated image.
[0060] Example 4 is based on the above examples. In Example 2, the distortion intensity function is defined as follows: ;
[0061] In the formula, It is the distortion intensity function. yes The vector, It is an orthodontic center.
[0062] Example 5 is based on the above examples. In Example 2, the formula used to calculate the single-parameter distortion level error from the average distortion level error is as follows: ; ;
[0063] In the formula, and It is a single-parameter distortion level error. It is the average distortion level error. and These are the first and second order distortion parameters of the two-parameter polynomial, respectively. It is used to predict distortion parameters.
[0064] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0065] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0066] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A method for correcting low-altitude photographic images based on computer vision, characterized in that, Specifically, the following steps are included: Step S1: Image collection. Collect low-altitude photography images, acquire a set of low-altitude panoramic images and a set of color-corrected images, and add radial distortion to the low-altitude panoramic images to obtain distorted images. Step S2: Image distortion correction. A distortion correction model is constructed, which includes a feature extraction unit, a regression module unit, and a comparison unit. The distorted image and the low-altitude panoramic image are input into the distortion correction model. The feature extraction unit extracts the features of the distorted image and the low-altitude panoramic image. The regression unit predicts the distortion parameters to obtain the predicted distortion parameters. The inverse transformation of the two-parameter polynomial is used to generate the distortion correction coordinate mapping. The distorted image is mapped to the correction coordinates using bilinear interpolation to obtain the distortion-corrected image. Step S3: Image color correction. Using a convolutional neural network, an inverted color image is calculated based on the distortion-corrected image to generate correction features that adapt to the bright and dark areas. After estimating the color shift, global color modulation is completed through cross-attention. A two-stage loss function is used for joint optimization to achieve image color correction. Step S4: Image correction application. The low-altitude photography image correction model is composed of a distortion correction model and a convolutional neural network. The low-altitude photography image is input into the low-altitude photography image correction model to perform distortion correction and color correction in sequence to obtain the corrected image.
2. The low-altitude photography image correction method based on computer vision according to claim 1, characterized in that, Step S2, image distortion correction, specifically includes the following steps: Step S21: Collect a set of low-altitude panoramic images, construct a two-parameter polynomial, and use the two-parameter polynomial to add radial distortion to the low-altitude panoramic images in the set of low-altitude panoramic images. The two parameters are two distortion parameters, and the distorted image is obtained. The distortion parameters, the distorted image and the low-altitude panoramic image are merged to form a distortion correction training set. Step S22: Create and initialize a regression model as a distortion correction model. The distortion correction model includes a feature extraction unit, a regression module unit, and a comparison unit. The distorted image and the low-altitude panoramic image are input into the distortion correction model. The feature extraction unit extracts features from the distorted image and the low-altitude panoramic image. The regression unit predicts the distortion parameters to obtain the predicted distortion parameters. The inverse transformation of a two-parameter polynomial is used to generate the distortion correction coordinate mapping. Bilinear interpolation is used to map the distorted image to the correction coordinates, and the distortion-corrected image is output. The relationship between the two distortion parameters in the two-parameter polynomial is defined using the following formula: ; In the formula, and These are the first and second order distortion parameters of the two-parameter polynomial, respectively. Determine the type of distortion. Resolve distortion details; Step S23: The regression unit predicts the distortion parameters, outputs the predicted distortion parameters, calculates the average distortion level error, and calculates the single-parameter distortion level error from the average distortion level error. Step S24: The feature extraction unit extracts feature vectors from the distortion correction training set and randomly generates feature vector pairs. The comparison unit uses regularization techniques to compare the two feature vectors in the feature vector pair and defines the distortion level contrast loss function. Step S25: Define a distortion level penalty function to accurately estimate small distortions; Step S26: Define the training objective function of the distortion correction model as the sum of the single-parameter distortion level error, the distortion level contrast loss function, and the distortion level penalty function.
3. The low-altitude photography image correction method based on computer vision according to claim 2, characterized in that, Step S3, image color correction, specifically includes the following steps: Step S31: Illumination feature extraction. Calculate the inverted color image of the distortion-corrected image. Input the distortion-corrected image and the inverted color image into the UNet feature extractor to obtain a 1-channel underexposed image and a 1-channel overexposed image, which are marked as underexposed and overexposed regions, respectively. Step S32: Calculate illumination features and generate features to adapt to the correction of underexposed and overexposed areas, namely brightening features and darkening features, respectively; Step S33: Pseudo-normal feature generation, fusing brightening features, darkening features and distortion correction image to obtain pseudo-normal exposure features; Step S34: Color shift estimation. Estimate the color shift from the brightening feature to the pseudo-normal exposure feature and from the darkening feature to the pseudo-normal exposure feature, respectively, to obtain the brightening shift and the darkening shift. Step S35: Color modulation output, through cross attention, the distortion-corrected image, brightness shift, and darkening shift are merged into global color; Step S36: Two-stage loss training, using pseudo-normal exposure features and L1 loss of normal exposure images as pseudo-normal feature loss, and fusing L1 loss, color cosine similarity loss, SSIM loss and VGG perceptual loss as output loss function to obtain color modulated image.