Image distortion correction enhancement method based on deep learning
The image distortion correction enhancement technology is constructed through deep learning methods, which solves the problem of insufficient adaptability of the existing technology in unknown devices or dynamic scenarios, and achieves high-precision image distortion correction and enhancement, improving image quality and visual effects.
Patent Information
- Application Number
- CN202510462484.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-25
AI Technical Summary
The existing image distortion correction methods are insufficient in adaptability and flexibility in unknown equipment or dynamically changing distortion scenarios, and cannot fully capture prediction errors at different scales, ignore key areas, resulting in a decrease in image clarity and detail expressiveness after correction, and fail to effectively eliminate artifacts or distortion.
The image distortion correction enhancement method based on deep learning is used to evaluate prediction errors by constructing image data sets, preprocessing, convolutional neural network model training, feature map adaptive weighting and composite metric formulas, construct distortion correction transformation matrix, and perform image enhancement and post-processing to optimize model parameters.
It improves the accuracy of distortion parameter prediction and the applicability of the model, can maintain image details integrity in complex scenes, significantly improve image quality and visual effects, avoid overfitting, and enhance the generalization ability of the model.
Smart Images

Figure CN120374464A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image distortion correction and enhancement, and specifically refers to an image distortion correction and enhancement method based on deep learning. Background Art
[0002] Traditional image distortion correction methods usually rely on camera calibration parameters, such as distortion coefficients. This method performs well in known devices and fixed scenes, but its adaptability and flexibility are obviously insufficient when facing unknown devices or dynamically changing distortion scenes.
[0003] However, there are still some defects in the existing image distortion correction. The existing image distortion correction relies on the traditional error measurement method, which cannot fully capture the prediction errors at different scales. Especially for images with large differences in distortion, a single error measurement method may lead to insufficient model training or overfitting. A unified processing strategy is adopted for the entire image, which fails to effectively distinguish and emphasize the key areas in the image that are crucial for distortion correction. When constructing the distortion correction transformation matrix, the predicted distortion parameters are not fully utilized, or an overly simplified mathematical model is used, resulting in a certain amount of residual distortion in the corrected image, which affects the final image quality. In the process of distortion correction, the existing methods sometimes ignore the protection of image details, resulting in the correction of the image. Although the distortion is reduced, the clarity and detail expression are reduced. There is a lack of systematic post-processing steps, and the artifacts or distortions generated in the processing process cannot be effectively eliminated, which affects the quality of the final output image. Therefore, an image distortion correction enhancement method based on deep learning is proposed. Summary of the invention
[0004] The purpose of the present invention is to provide an image distortion correction and enhancement method based on deep learning to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: an image distortion correction and enhancement method based on deep learning, comprising the following steps:
[0006] S1. Obtain different types of image distortion data to construct an image dataset, and compare and annotate the image dataset;
[0007] S2, preprocessing the images in the acquired image data set;
[0008] S3, constructing an image distortion parameter prediction model through a convolutional neural network;
[0009] S4, performing model training on the image distortion parameter prediction model constructed according to the preprocessed image data set input, minimizing the error between the output distortion image correction parameter and the accurate numerical value of the image distortion;
[0010] S5. Construct a distortion correction transformation matrix based on the image distortion correction parameters output by the image distortion parameter prediction model, and apply the distortion correction transformation matrix to the distorted image to obtain the corrected image;
[0011] S6. Obtain the corrected image for enhancement;
[0012] S7. Perform post-processing and image quality assessment on the enhanced image, and provide feedback for optimization.
[0013] Among them, in S1, obtain different types of image distortion data to construct an image data set, and perform ratio annotation on the image data set; collect images containing various distortion types from public data sets, network resources, and captured pictures; organize the obtained images into a structured data set as the image data set, and perform distortion type annotation and distortion parameter annotation on the constructed image data set. For distortion type annotation, according to the distortion characteristics of the image, judge the distortion type of each image one by one. For images that are obviously distorted in a certain type, directly mark the corresponding distortion type; for distortion parameter annotation, for images with simulated distortion, directly record the distortion parameters used during simulation. For real-distortion images, obtain the distortion parameters through a distortion measurement tool and perform annotation, and find the corresponding non-distorted version for each distorted image, and identify the corresponding relationship between each pair of distorted and non-distorted images.
[0014] Among them, in S2, preprocess the images in the obtained image data set; obtain the annotated image data set, and perform data preprocessing on the annotated image data set, including image format standardization, normalization, data augmentation, denoising, correction of tilt and distortion, and format conversion. Data augmentation includes cropping, flipping, rotating, scaling, translation, and color jitter, and perform format conversion on the preprocessed image data set.
[0015] Among them, in S3, construct an image distortion parameter prediction model through a convolutional neural network; set a prediction error metric to evaluate the difference between the predicted distortion parameters and the true values. Let K represent the true distortion coefficient, represent the predicted distortion coefficient, and it is realized through a composite metric that combines the absolute difference and the relative difference. The implementation formula is:
[0016]
[0017] In the formula, E pd represents the prediction error metric, which evaluates the difference between the predicted distortion parameters and the true values. K represents the true distortion coefficient, which is a two-dimensional vector [k1, k2], where k1 and k2 are the first and second distortion coefficients respectively, represents the predicted distortion coefficient, which is a two-dimensional vector α represents a balance factor, which adjusts the weight between the absolute value and the relative difference;
[0018] According to different distortion correction weights in different regions, the influence of key regions is emphasized through feature adaptive weighting. Let the feature map be F, and adaptive weighting is performed on the feature map. The implementation formula is:
[0019] F′ = F · W(F),
[0020] In the formula, F represents the feature map, W(F) represents the weight matrix dynamically generated according to the characteristics of the feature map, and F′ represents the feature map after adaptive weighting.
[0021] Among them, in step S3, a comprehensive loss function is constructed based on the prediction error metric value and the feature map after adaptive weighting. The implementation formula is:
[0022]
[0023] In the formula, L tl represents the total loss function, represents the prediction error metric value of the distortion parameter, represents the translation parameter and the predicted value of the prediction error metric, L reg represents the regularization term, β represents the hyperparameter for adjusting the regularization strength, D(F′, F * ) represents the distance metric, quantifying the difference between the feature map F′ after adaptive weighting and the ideal feature map F, and γ represents the hyperparameter for controlling the weight in the total loss.
[0024] By evaluating the prediction error through the composite metric formula and introducing the feature map adaptive weighting mechanism, the key information in the image can be captured more accurately, thereby improving the accuracy of distortion parameter prediction. The composite metric formula combines the absolute difference and the relative difference, and can measure the prediction error at different scales, which is applicable to images with various distortion degrees. The feature map adaptive weighting emphasizes the information in the important regions, making the model perform better when dealing with complex scenes and improving the applicability and flexibility in practical applications.
[0025] Among them, in S4, model training is carried out according to the image distortion parameter prediction model constructed based on the input of the preprocessed image data set, and the output distortion correction parameters of the image minimize the error with the accurate value of the image distortion; the preprocessed image data set is divided into a training set, a validation set and a test set, the divided training set is input into the image distortion parameter prediction model for training to obtain the error between the predicted value and the true value of the current training set, the output result of the image distortion parameter prediction model is verified according to the validation set, the hyperparameters of the image distortion parameter prediction model are adjusted according to the verification result, the final performance of the image distortion parameter prediction model is evaluated through the test set, a detailed error analysis is carried out on the test result, and the hyperparameters of the image distortion parameter prediction model are optimized according to the analysis result, and finally the distortion correction parameters are output.
[0026] Among them, in S5, a distortion correction transformation matrix is constructed according to the image distortion correction parameters output by the image distortion parameter prediction model, and the distortion correction transformation matrix is applied to the distorted image to obtain the corrected image; the distortion correction parameters output by the image distortion parameter prediction model are obtained, a transformation matrix for correcting distortion is constructed, and each pixel point (x u , y u ) is normalized to (x′, y′), the distance r from the normalized coordinates to the origin is calculated, and it is reflected to the undistorted coordinates through radial distortion correction. The implementation formula is:
[0027] x u = x′·(1 + k1r 2 + k2r 4 )
[0028] y u = y′·(1 + k1r 2 + k2r 4 ),
[0029] In the formula, x′ and y′ represent the pixel coordinates in the normalized coordinate system, r represents the distance from the normalized coordinates to the origin, k1 and k2 represent the radial distortion coefficients, x u and y u represent the undistorted coordinates after radial distortion correction;
[0030] According to the undistorted coordinates after radial distortion correction, tangential distortion correction is carried out. The implementation formula is:
[0031] x u = x u + [2p1x′y′ + p2(r 2 + 2x ′2 )]
[0032] y u = y u + [p1(r 2 + 2y′2 ) + 2p2x′y′],
[0033] In the formula, x u and y u represent the coordinates after final corrected distortion correction. p1 and p2 represent the tangential distortion coefficients. Combine all the corrected pixel values into a new image, which is the corrected undistorted image.
[0034] Construct a correction transformation matrix through the predicted distortion parameters and apply it to the distorted image to obtain the corrected image. Directly correct the actual distortion of the image, which has high accuracy and practicability. Through the radial and tangential distortion correction formulas, it can comprehensively compensate for the image deformation caused by the lens and other factors, restore the true geometric structure of the image, not only effectively remove the distortion, but also maintain the integrity of the image details, significantly improving the image quality and visual effect.
[0035] Among them, in S6, enhance the obtained corrected image; obtain the corrected undistorted image, and perform image enhancement through contrast adjustment, brightness adjustment, sharpness enhancement, noise suppression, color correction, and image fusion. Sharpness enhancement identifies the edge information in the image through an edge detection algorithm and optimizes the clarity of the image by enhancing the edges.
[0036] Among them, in S7, perform post-processing and image quality evaluation on the enhanced image and feedback for optimization; obtain the enhanced image for post-processing. The post-processing includes edge smoothing, color adjustment, cropping, and filling. Edge smoothing smooths the image through an edge-preserving filter while keeping the edges clear. After post-processing, the image is subjected to quality evaluation. By measuring the similarity between the enhanced image and the original undistorted image, the higher the value, the smaller the distortion. Adjust the hyperparameters during training the model according to the evaluation results for optimization.
[0037] Compared with the prior art, the beneficial effects of the present invention are:
[0038] 1. The present invention evaluates the prediction error through a composite metric formula and introduces a feature map adaptive weighting mechanism, which can more accurately capture the key information in the image, thereby improving the accuracy of distortion parameter prediction. The composite metric formula combines the absolute difference and the relative difference, which can measure the prediction error at different scales and is applicable to images with various distortion degrees. The feature map adaptive weighting emphasizes the information in the important regions, making the model perform better when dealing with complex scenes and improving the applicability and flexibility in practical applications;
[0039] 2. By dividing the dataset into a training set, a validation set, and a test set, and adjusting the hyperparameters according to the results of the validation set, this method can effectively monitor the training process of the model and avoid overfitting. At the same time, by evaluating the test set and analyzing the error sources in detail, the model structure and parameter settings can be optimized targeted, further improving the model performance, ensuring that the model not only performs well on the training set but also maintains a high prediction accuracy on unseen data, thus enhancing the generalization ability of the model;
[0040] 3. By constructing a correction transformation matrix with the predicted distortion parameters and applying it to the distorted image to obtain the corrected image, the method directly corrects the actual distortion of the image, with high accuracy and practicality. Through the radial and tangential distortion correction formulas, it can comprehensively compensate for the image deformation caused by the lens and other factors, restoring the true geometric structure of the image. It can not only effectively remove distortion but also maintain the integrity of image details, significantly improving the image quality and visual effect;
[0041] 4. Through post-processing operations, the quality of the image can be further optimized, and artifacts or distortions that may occur during the processing can be eliminated. Quality assessment comprehensively measures the effect of the enhanced image to ensure that it meets the expected standards. According to the evaluation results, the entire process is optimized by feedback, and the model and algorithm parameters are continuously adjusted. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is the operation flow of the image distortion correction and enhancement method based on deep learning of the present invention Figure 1 ;
[0043] Figure 2 is the operation flow of the image distortion correction and enhancement method based on deep learning of the present invention Figure 2 ;
[0044] Figure 3 is the operation flow of the image distortion correction and enhancement method based on deep learning of the present invention Figure 3 ;
[0045] Figure 4 is the operation flow of the image distortion correction and enhancement method based on deep learning of the present invention Figure 4 。 DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0047] Embodiment
[0048] Please refer to Figures 1-4 As shown, the present invention provides a technical solution, including the following steps:
[0049] S1. Obtain different types of image distortion data to construct an image data set, and perform ratio annotation on the image data set;
[0050] S2. Preprocess the images in the obtained image data set;
[0051] S3. Construct an image distortion parameter prediction model through a convolutional neural network;
[0052] S4. Input the preprocessed image data set into the constructed image distortion parameter prediction model for model training, and minimize the error between the output image distortion correction parameter and the accurate value of the image distortion;
[0053] S5. Construct a distortion correction transformation matrix according to the image distortion correction parameter output by the image distortion parameter prediction model, and apply the distortion correction transformation matrix to the distorted image to obtain a corrected image;
[0054] S6. Obtain the corrected image for enhancement;
[0055] S7. Perform post-processing and image quality evaluation on the enhanced image, and provide feedback for optimization.
[0056] Among them, in S1, to obtain different types of image distortion data to construct an image data set and perform ratio annotation on the image data set; collect images containing various distortion types from public data sets, network resources, and captured pictures; organize the obtained images into a structured data set as the image data set, and perform distortion type annotation and distortion parameter annotation on the constructed image data set. The distortion type annotation is based on the distortion characteristics of the image, and each image's distortion type is judged one by one. For images that are clearly of a certain type of distortion, directly mark the corresponding distortion type; for the distortion parameter annotation of simulated distortion images, directly record the distortion parameters used during simulation. For real distortion images, obtain the distortion parameters through a distortion measurement tool and perform annotation, and find the corresponding non-distorted version for each distorted image, and identify the corresponding relationship between each pair of distorted and non-distorted images.
[0057] Among them, in S2, to preprocess the images in the obtained image data set; obtain the annotated image data set, and perform data preprocessing on the annotated image data set, including image format standardization, normalization, data augmentation, denoising, correction of tilt and distortion, and format conversion. Data augmentation includes cropping, flipping, rotating, scaling, translation, and color jitter, and perform format conversion on the preprocessed image data set.
[0058] Among them, in S3, an image distortion parameter prediction model is constructed through a convolutional neural network; a prediction error metric is set
[0059] to evaluate the difference between the predicted distortion parameter and the true value. K represents the true distortion coefficient, represents the predicted distortion coefficient, and is implemented through a composite metric that combines the absolute difference and the relative difference. The implementation formula is:
[0060]
[0061] In the formula, E pd represents the prediction error metric value, which evaluates the difference between the predicted distortion parameter and the true value. K represents the true distortion coefficient, which is a two-dimensional vector [k1, k2], where k1 and k2 are the first and second distortion coefficients respectively, represents the predicted distortion coefficient, which is a two-dimensional vector α represents the balance factor, which adjusts the weight between the absolute value and the relative difference;
[0062] According to the different distortion correction weights in different regions, the key region influence is emphasized through feature adaptive weighting. Let the feature map be F, and the feature map is adaptively weighted. The implementation formula is:
[0063] F′ = F · W(F),
[0064] In the formula, F represents the feature map, W(F) represents the weight matrix dynamically generated according to the characteristics of the feature map, and F′ represents the feature map after adaptive weighting.
[0065] Among them, in S3, a comprehensive loss function is constructed based on the prediction error metric value and the feature map after adaptive weighting. The implementation formula is:
[0066]
[0067] In the formula, L tl represents the total loss function, represents the prediction error metric value of the distortion parameter, represents the prediction error metric of the translation parameter P = [p x , p y and the predicted value of, L reg represents the regularization term, β represents the hyperparameter that adjusts the regularization strength, D(F′, F * ) represents the distance metric, which quantifies the difference between the feature map F′ after adaptive weighting and the ideal feature map F, and γ represents the hyperparameter that controls the weight in the total loss.
[0068] The prediction error is evaluated through a composite metric formula, and a feature map adaptive weighting mechanism is introduced, which can capture the key information in the image more accurately, thereby improving the accuracy of distortion parameter prediction. The composite metric formula combines the absolute difference and the relative difference, which can measure the prediction error at different scales and is applicable to images with various distortion degrees. The feature map adaptive weighting emphasizes the information in important regions, enabling the model to perform better when dealing with complex scenarios and improving the applicability and flexibility in practical applications.
[0069] Among them, in step S4, model training is carried out according to the image distortion parameter prediction model constructed based on the input of the preprocessed image data set, and the output distortion correction parameters of the image are minimized with the accurate numerical error of the image distortion; the preprocessed image data set is divided into a training set, a validation set and a test set. The divided training set is input into the image distortion parameter prediction model for training to obtain the error between the predicted value and the true value of the current training set. The output result of the image distortion parameter prediction model is verified according to the validation set, the hyperparameters of the image distortion parameter prediction model are adjusted according to the verification result, the final performance of the image distortion parameter prediction model is evaluated through the test set, a detailed error analysis is carried out on the test result, and the hyperparameters of the image distortion parameter prediction model are optimized according to the analysis result, and finally the distortion correction parameters are output.
[0070] Among them, in step S5, a distortion correction transformation matrix is constructed according to the image distortion correction parameters output by the image distortion parameter prediction model, and the distortion correction transformation matrix is applied to the distorted image to obtain the corrected image; the distortion correction parameters output by the image distortion parameter prediction model are obtained, a transformation matrix for correcting distortion is constructed, and each pixel point (x u , y u ) is normalized to (x′, y′), the distance r from the normalized coordinate to the origin is calculated, and it is reflected to the undistorted coordinate through radial distortion correction. The implementation formula is:
[0071] x u = x′·(1 + k1r 2 + k2r 4 )
[0072] y u = y′·(1 + k1r 2 + k2r 4 ),
[0073] In the formula, x′ and y′ represent the pixel coordinates in the normalized coordinate system, r represents the distance from the normalized coordinate to the origin, k1 and k2 represent the radial distortion coefficients, x u and y u represent the undistorted coordinates after radial distortion correction;
[0074] Perform tangential distortion correction based on the undistorted coordinates after radial distortion correction. The implementation formula is as follows:
[0075] x u = x u + [2p1x′y′ + p2(r 2 + 2x ′2 )]
[0076] y u = y u + [p1(r 2 + 2y ′2 ) + 2p2x′y′],
[0077] In the formula, x u and y u represent the coordinates after final distortion correction. p1 and p2 represent the tangential distortion coefficients. Combine all the corrected pixel values into a new image, which is the corrected undistorted image.
[0078] Construct a correction transformation matrix through the predicted distortion parameters and apply it to the distorted image to obtain the corrected image. Directly correct the actual distortion of the image, which has high accuracy and practicality. Through the radial and tangential distortion correction formulas, it can comprehensively compensate for the image deformation caused by the lens and other factors, restore the true geometric structure of the image, not only effectively remove the distortion, but also maintain the integrity of the image details, significantly improving the image quality and visual effect.
[0079] Among them, for S6, enhance the corrected image; obtain the corrected undistorted image, and perform image enhancement through contrast adjustment, brightness adjustment, sharpness enhancement, noise suppression, color correction, and image fusion. Sharpness enhancement identifies the edge information in the image through an edge detection algorithm and optimizes the clarity of the image by enhancing the edges.
[0080] Among them, for S7, perform post-processing and image quality assessment on the enhanced image and provide feedback for optimization; obtain the enhanced image for post-processing. The post-processing includes edge smoothing, color adjustment, cropping, and filling. Edge smoothing smooths the image through an edge-preserving filter while keeping the edges clear. After post-processing, the image is subjected to quality assessment. By measuring the similarity between the enhanced image and the original undistorted image, the higher the value, the smaller the distortion. Adjust the hyperparameters during training the model according to the evaluation results for optimization.
[0081] Working principle: Images containing various types of distortions are collected from multiple sources. These images are organized into a structured dataset, and each image is labeled with the distortion type and distortion parameters. The distortion type labeling determines the distortion type of each image one by one based on the distortion characteristics of the image, while the distortion parameter labeling records the parameters used when simulating the distortion or obtains the real distortion parameters through a distortion measurement tool. The undistorted version corresponding to each distorted image is found, and the corresponding relationship between the distorted and undistorted images is identified;
[0082] Through data preprocessing of the labeled image dataset to ensure data consistency and quality. The preprocessing steps include image format standardization, normalization, data augmentation, denoising, correction of tilt and distortion, and format conversion. An image distortion parameter prediction model is constructed through a convolutional neural network, the difference between the predicted distortion parameters and the real values is evaluated, a prediction error metric is designed, and the influence of key regions on distortion correction is emphasized through feature adaptive weighting. Combining the prediction error metric and the feature map after adaptive weighting, a comprehensive loss function is constructed. The preprocessed image dataset is divided into a training set, a validation set, and a test set. The training set is used to train the image distortion parameter prediction model, and the hyperparameters of the model are adjusted according to the results of the validation set. The final performance of the model is evaluated through the test set, and a detailed error analysis is carried out. Through the distortion correction parameters output by the image distortion parameter prediction model, a distortion correction transformation matrix is constructed, and the distortion correction transformation matrix is applied to correct the distorted image to obtain the corrected undistorted image. Enhancement processing is performed on the corrected undistorted image, and the enhancement steps include contrast adjustment, brightness adjustment, sharpness enhancement, noise suppression, color correction, and image fusion. Post-processing is performed on the enhanced image, and the quality of the post-processed image is evaluated. The degree of distortion is evaluated by measuring the similarity between the enhanced image and the original undistorted image. According to the evaluation results, the hyperparameters during model training are adjusted to optimize the performance of the model.
[0083] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
[0084] The above has described the present invention and its embodiments. This description is not restrictive, and what is shown in the drawings is only one of the embodiments of the present invention. The actual structure is not limited thereto. Generally speaking, if those of ordinary skill in the art are inspired by it and design similar structural methods and embodiments without creative efforts without departing from the purpose of the present invention, they should all fall within the protection scope of the present invention.
Claims
1. An image distortion correction and enhancement method based on deep learning, characterized in that It includes the following steps: S1. Obtain different types of image distortion data to construct an image dataset, and perform ratio annotation on the image dataset; S2. Preprocess the images in the obtained image dataset; S3. Construct an image distortion parameter prediction model through a convolutional neural network; S4. Input the preprocessed image dataset into the constructed image distortion parameter prediction model for model training, and minimize the error between the output image distortion correction parameters and the accurate values of the image distortion; S5. Construct a distortion correction transformation matrix according to the image distortion correction parameters output by the image distortion parameter prediction model, and apply the distortion correction transformation matrix to the distorted image to obtain a corrected image; S6. Obtain the corrected image for enhancement; S7. Perform post-processing and image quality evaluation on the enhanced image, and provide feedback for optimization.
2. The method for enhancing image distortion correction based on deep learning according to claim 1, wherein: In S1, to obtain different types of image distortion data to construct an image dataset and perform ratio annotation on the image dataset: collect images containing various distortion types from public datasets, network resources, and captured pictures; organize the obtained images into a structured dataset as the image dataset, and perform distortion type annotation and distortion parameter annotation on the constructed image dataset. For distortion type annotation, based on the distortion characteristics of the images, judge the distortion type of each image one by one. For images that clearly belong to a certain type of distortion, directly mark the corresponding distortion type; for distortion parameter annotation, for images with simulated distortion, directly record the distortion parameters used during simulation. For real distortion images, obtain the distortion parameters through a distortion measurement tool and perform annotation, and find the corresponding undistorted version for each distorted image, and identify the corresponding relationship between each pair of distorted and undistorted images.
3. The method for enhancing image distortion correction based on deep learning according to claim 1, characterized in that: In S2, to preprocess the images in the obtained image dataset: obtain the annotated image dataset, and perform data preprocessing on the annotated image dataset, including image format standardization, normalization, data augmentation, denoising, correction of tilt and distortion, and format conversion. Data augmentation includes cropping, flipping, rotating, scaling, translation, and color jittering, and perform format conversion on the preprocessed image dataset.
4. The method for enhancing image distortion correction based on deep learning according to claim 1, wherein: In step S3, an image distortion parameter prediction model is constructed by means of a convolutional neural network. A prediction error metric is set to evaluate the difference between the predicted distortion parameter and the true value. Let K denote the true distortion coefficient, denote the predicted distortion coefficient, which is realized by a composite metric combining the absolute difference and the relative difference. The realization formula is as follows: In the formula, E pd represents a prediction error metric that evaluates the difference between the predicted distortion parameter and the true value. K represents the true distortion coefficient, which is a two-dimensional vector [k1, k2], where k1 and k2 are the first and second distortion coefficients respectively. represents the predicted distortion coefficient, which is a two-dimensional vector α represents a balance factor that adjusts the weight between the absolute value and the relative difference; According to different distortion correction weights in different regions, emphasize the influence of key regions through feature adaptive weighting. Let the feature map be F, and perform adaptive weighting on the feature map. The implementation formula is: F′ = F · W(F), In the formula, F represents the feature map, W(F) represents the weight matrix dynamically generated according to the characteristics of the feature map, and F′ represents the feature map after adaptive weighting.
5. The method for enhancing image distortion correction based on deep learning according to claim 4, wherein: In S3, construct a comprehensive loss function according to the prediction error metric value and the feature map after adaptive weighting. The implementation formula is: In the formula, L tl represents the total loss function, represents the prediction error degree value of the distortion parameter, represents the translation parameter and the prediction error metric of the predicted value . L reg represents the regularization term, β represents the hyperparameter that adjusts the regularization strength, D(F′, F * ) represents the distance metric, quantifying the difference between the feature map F′ after adaptive weighting and the ideal feature map F, and γ represents the hyperparameter that controls the weight in the total loss.
6. The method for enhancing image distortion correction based on deep learning according to claim 1, wherein: In S4, input the preprocessed image dataset into the constructed image distortion parameter prediction model for model training, and minimize the error between the output image distortion correction parameters and the accurate values of the image distortion; Divide the preprocessed image dataset into a training set, a validation set, and a test set. Input the divided training set into the image distortion parameter prediction model for training to obtain the error between the predicted value and the true value of the current training set. Verify the output result of the image distortion parameter prediction model according to the validation set. Adjust the hyperparameters of the image distortion parameter prediction model according to the verification result. Evaluate the final performance of the image distortion parameter prediction model through the test set, conduct a detailed error analysis on the test results, optimize the hyperparameters of the image distortion parameter prediction model according to the analysis results, and finally output the distortion correction parameters.
7. The method for enhancing image distortion correction based on deep learning according to claim 1, wherein: The S5 constructs a distortion correction transformation matrix according to the image distortion correction parameters output by the image distortion parameter prediction model, and applies the distortion correction transformation matrix to the distorted image to obtain the corrected image; obtains the distortion correction parameters output by the image distortion parameter prediction model, constructs a transformation matrix for correcting distortion, and normalizes each pixel point (x u , y u ) to (x′, y′), calculates the distance r from the normalized coordinates to the origin, and reflects it to the undistorted coordinates through radial distortion correction. The implementation formula is: In the formula, x′ and y′ represent pixel coordinates in the normalized coordinate system, r represents the distance from the normalized coordinate to the origin, k1 and k2 represent radial distortion coefficients, and x u and y u represent the undistorted coordinates after radial distortion correction; Perform tangential distortion correction according to the undistorted coordinates after radial distortion correction. The implementation formula is: In the formula, x u and y u represent the coordinates after final corrected distortion correction. p1 and p2 represent the tangential distortion coefficients. Combine all the corrected pixel values into a new image, which is the undistorted image after correction.
8. The method for enhancing image distortion correction based on deep learning according to claim 1, wherein: In step S6, obtain the corrected image for enhancement; obtain the corrected undistorted image, and perform image enhancement through contrast adjustment, brightness adjustment, sharpness enhancement, noise suppression, color correction, and image fusion. For sharpness enhancement, identify the edge information in the image through an edge detection algorithm, and optimize the clarity of the image by enhancing the edges.
9. The method for enhancing image distortion correction based on deep learning according to claim 1, characterized in that: In step S7, perform post-processing and image quality evaluation on the enhanced image, and provide feedback for optimization; obtain the enhanced image for post-processing. The post-processing includes edge smoothing, color adjustment, cropping, and filling. For edge smoothing, smooth the image through an edge-preserving filter while keeping the edges clear. After post-processing, evaluate the quality of the image. By measuring the similarity between the enhanced image and the original undistorted image, the higher the value, the less distortion. Adjust the hyperparameters during training the model for optimization according to the evaluation results.
Citation Information
Cited By
Distortion correction method, device, equipment and medium for inspection image of railway communication base station
CN120655550A
Method for correcting and enhancing distortion of flue-cured tobacco leaf image
CN120953141A
Pixel-level edge enhancement and denoising method for fish-eye lens image
CN121998860A
A fisheye lens image pixel-level edge enhancement and denoising method
CN121998860B