Image distortion correction method based on convolutional neural network
By constructing an IDCNetM convolutional neural network and combining different mathematical models to distort the image, the problem of low accuracy of distortion correction for unknown types of images in the prior art is solved, and the accuracy of correcting images of different distortion types is achieved, which improves the accuracy of correction.
Patent Information
- Application Number
- CN202510061087.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to effectively correct unknown types of image distortions from multiple different scenarios, and the correction accuracy is low.
The image distortion correction method based on convolutional neural network is adopted, and the IDCNetM convolutional neural network is constructed, and the encoder-decoder architecture and attention mechanism are used to distort the initial distortion-free image combined with different mathematical models (division model, rotation model and perspective model) are used to distort the initial distortion-free image data sets are generated, and the distortion images to be tested are corrected through the training network.
Accurate correction of images of different distortion types is achieved, the correction accuracy is improved, and correction can be performed in the absence of a distortion type, without special judgment on the distortion type, making it more convenient to use.
Smart Images

Figure CN120013827A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image distortion correction method based on a convolutional neural network. Background Art
[0002] With the rapid development of industrial technology, digital images have been widely used in various fields. However, in digital imaging systems, due to the influence of the manufacturing quality of the shooting equipment, the shooting angle, etc., when shooting a real scene image, it will inevitably introduce geometric distortion of the image, thereby obtaining a distorted image due to the camera shooting. These distorted images directly affect the reliability of the information obtained. At the same time, due to problems such as camera rotation, the image has a certain degree of tilt, which is inconsistent with the preset structure of the human visual system. Therefore, it is very meaningful to correct the distortion of the camera distorted image so that it can accurately express the real information of the object.
[0003] In recent years, researchers have done a lot of research on image distortion. Traditional distortion correction algorithms are mainly based on some manual calibration, using multiple perspectives to extract features and establish specific camera distortion mathematical models. This method generally depends on the parameters of a specific camera lens, and the established mathematical model cannot be used universally between different camera devices. Deep learning-based methods generally do not rely on the characteristics of the physical device itself, and can directly learn the features of distorted images from images for prediction of image correction, which is more widely used.
[0004] However, most existing methods are based on image correction of a known type of distortion. When processing images, they still rely on a specific distortion model and corresponding distortion parameters, and can only correct images of one type of distortion. When it is necessary to process distorted images from multiple different scenes, the images will produce different types of distortion due to the influence of factors such as unknown scenes and shooting equipment. In this case, it is necessary to consider how to achieve unknown types of image distortion correction and how to uniformly correct different types of distorted images. Summary of the invention
[0005] The embodiment of the present invention provides an image distortion correction method based on a convolutional neural network, so as to at least solve the technical problem in the prior art of correcting a distorted image with unclear distortion type and having low correction accuracy.
[0006] According to one aspect of an embodiment of the present invention, a method for image distortion correction based on a convolutional neural network is provided. The method may include: obtaining an initial image data set, screening the initial image data set to obtain an initial distortion-free image data set; using different mathematical models to perform distortion processing on the initial distortion-free image data set to obtain different types of distortion image data sets, wherein the different mathematical models are a division model, a rotation model and a perspective model, and the different types of distortion image data sets include: a barrel distortion image data set, a pincushion distortion image data set, a rotation distortion image data set and a perspective distortion image data set, and each distorted image carries a pixel coordinate transformation stream; constructing an IDCNetM convolutional neural network, wherein the IDCNetM convolutional neural network includes an encoder part, a decoder part, a classification part and a resampling part; using distorted image data sets of different distortion types to train the IDCNetM convolutional neural network to obtain a trained IDCNetM convolutional neural network; inputting a distorted image to be tested into the trained IDCNetM convolutional neural network to obtain a pixel coordinate transformation stream of the distorted image to be tested and a distortion type of the image to be tested; based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested, a corrected image of the distorted image to be tested is obtained.
[0007] Optionally, the initial distortion-free image data set is distorted by using a division model to obtain a barrel-shaped distorted image data set and a first pixel coordinate transformation stream and a pincushion-shaped distorted image data set and a second pixel coordinate transformation stream.
[0008] Optionally, the initial distortion-free image data set is distorted by using a rotation model to obtain a rotationally distorted image data set and a third pixel coordinate transformation stream.
[0009] Optionally, the perspective model is used to perform distortion processing on the initial distortion-free image data set to obtain a perspective-distorted image data set and a fourth pixel coordinate transformation stream.
[0010] Optionally, the loss function of the IDCNetM convolutional neural network is expressed as:
[0011] in, is the total loss of the IDCNetM convolutional neural network, is the endpoint error loss between the pixel coordinate transformation flow of the distorted image that has not been processed by the IDCNetM convolutional neural network and the pixel coordinate transformation flow of the distorted image that has been processed by the IDCNetM convolutional neural network. is the cross entropy loss between the distortion type of the distorted image that has not been processed by the IDCNetM convolutional neural network and the distortion type of the distorted image that has been processed by the IDCNetM convolutional neural network. is the weight of the classification part in the IDCNetM convolutional neural network.
[0012] Optionally, obtaining the corrected image of the distorted image to be tested based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested includes: resampling the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested to obtain the corrected image of the distorted image to be tested.
[0013] Beneficial effects of the present invention: (1) The present invention constructs a convolutional neural network with an encoder-decoder architecture, uses residual blocks to alleviate gradient vanishing, and uses an attention mechanism to improve the network's feature selection ability, thereby improving the network's learning and expression capabilities, making the corrected image more accurate.
[0014] (2) The present invention provides a framework that can correct images with different distortion types. It can process different distortion types at the same time and can still perform correction when the distortion type is unknown. There is no need to specifically judge the distortion type, which makes it more convenient to use. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flow chart of an image distortion correction method based on a convolutional neural network according to an embodiment of the present invention; Figure 2 is a structural block diagram of an image distortion correction method based on a convolutional neural network according to an embodiment of the present invention; Figure 3 is a structural block diagram of an IDCNetM convolutional neural network according to an embodiment of the present invention; Figure 4 is a schematic diagram of different types of distorted images and corrected images according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0018] Example 1 According to an embodiment of the present invention, a method for image distortion correction based on a convolutional neural network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system comprising at least one set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0019] Figure 1 is a flow chart of an image distortion correction method based on a convolutional neural network according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps: Step S101, obtaining an initial image data set, screening the initial image data set, and obtaining an initial distortion-free image data set.
[0020] In the technical solution provided in step S101 of the present invention, an initial image data set is obtained, and each image in the initial image data set is processed. In the process of screening the images, a selection factor of the line segments in the image is defined. , assuming the average pixel size of the image is , is the height of the image, is the width of the image, where the length is not less than The average length of a line segment is , then the selection formula is as follows:
[0021] For each line segment exist ,in, The value of is determined by the number of initial images in the initial image dataset. The larger the value, the more line segments need to appear in the image, the fewer images will be screened, and finally The value range is [0.5~1].
[0022] Step S102, using different mathematical models to perform distortion processing on the initial distortion-free image data set to obtain different types of distorted image data sets, wherein the different mathematical models are a division model, a rotation model and a perspective model, and the different types of distorted image data sets include: a barrel distortion image data set, a pincushion distortion image data set, a rotation distortion image data set and a perspective distortion image data set, and each distorted image carries a pixel coordinate transformation stream.
[0023] In the technical solution provided in the above step S102 of the present invention, Figure 2 is a structural block diagram of an image distortion correction method based on a convolutional neural network according to an embodiment of the present invention. Figure 2 As shown, the initial distortion-free image dataset is processed by the division model, the rotation model and the perspective model respectively to obtain the barrel distortion image dataset, the pincushion distortion image dataset, the rotation distortion image dataset and the perspective distortion image dataset, and each distorted image has a corresponding pixel coordinate transformation flow, wherein a distorted image I and the corresponding pixel coordinate transformation flow are designed. The data pair format is used as a data set, where for each data, and are matched to each other, and for each distortion type , select the corresponding distortion model Perform distortion processing and generate the required pixel coordinate transformation flow , Indicates the corresponding distortion type The initial undistorted image coordinates, the corresponding relationship between the initial undistorted image and the synthesized distorted image is as follows:
[0024] in, The vectors are exist Axis and The deviation of the axis in the corresponding direction, is the initial undistorted image, is the distorted image, Indicates the coordinate position of the pixel in the distorted image. and They are the initial undistorted images and distorted image The coordinate position of the pixel point is the pixel coordinate.
[0025] Step S103, constructing an IDCNetM convolutional neural network, wherein the IDCNetM convolutional neural network includes an encoder part, a decoder part, a classification part and a resampling part.
[0026] In the technical solution provided in the above step S103 of the present invention, Figure 3 is a structural block diagram of an IDCNetM convolutional neural network according to an embodiment of the present invention, such as Figure 3 As shown in Figure 1, the IDCNetM convolutional neural network includes an encoder part, a decoder part, a classification part, and a resampling part. Figure 3 As shown in the figure, IDCNetM includes an encoder part, a decoder part for predicting pixel coordinate transformation flow, a classification branch and a resampling part. The input distorted image is extracted and processed by the encoder features, and then enters two branches after passing through an EMA attention mechanism to classify the transformation flow and distortion type respectively. In the encoder part, a convolutional network with residual blocks is used to gradually extract image features; an EMA attention mechanism is added between the encoder and the decoder, so that the network can dynamically adjust the degree of attention to different parts of the encoder and better handle complex data; in the decoder part of predicting the pixel coordinate transformation flow, a structure that is basically symmetrical with the encoder is adopted, and the c2f structure in the decoder is replaced by two convolutional layers to finally generate the final output; for the distortion type classification branch, it is mainly used to constrain the features, solve the problem of excessive feature differences between different distortion types, and help the network better learn to reduce the loss of the predicted transformation flow. In the resampling part, the distorted image and the pixel transformation flow corresponding to the distorted image are processed to obtain the corrected image corresponding to the distorted image.
[0027] Step S104, using distorted image data sets of different distortion types to train the IDCNetM convolutional neural network to obtain a trained IDCNetM convolutional neural network.
[0028] In the technical solution provided in the above step S104 of the present invention, the IDCNetM convolutional neural network is trained by using distorted image data sets of different distortion types to obtain a trained IDCNetM convolutional neural network.
[0029] Step S105: input the distorted image to be tested into the trained IDCNetM convolutional neural network to obtain a pixel coordinate transformation flow of the distorted image to be tested and a distortion type of the image to be tested.
[0030] In the technical solution provided in the above step S105 of the present invention, the distorted image of unknown type (distorted image to be tested) is input into the trained IDCNetM convolutional neural network to obtain the pixel coordinate transformation stream of the distorted image to be tested and the distortion type of the image to be tested.
[0031] Step S106, obtaining a corrected image of the distorted image to be tested based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested.
[0032] In the technical solution provided in the above step S106 of the present invention, the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested are processed to obtain a corrected image of the distorted image to be tested.
[0033] The above method of this embodiment is further introduced below.
[0034] As an optional implementation manner, step S102, the initial distortion-free image data set is distorted using a division model to obtain a barrel-distorted image data set and a first pixel coordinate transformation stream and a pincushion-distorted image data set and a second pixel coordinate transformation stream.
[0035] In this embodiment, the conversion formula between the barrel distortion and pincushion distortion image coordinates and the corresponding initial distortion-free image coordinate system is:
[0036] in, is the initial undistorted image corresponding to Axis and Axis coordinates, The corresponding image of barrel distortion and pincushion distortion is Axis and Axis coordinates, is the pixel center of the barrel distorted image and the pincushion distorted image, is the distortion parameter, are the coordinates of the barrel distorted image and the pincushion distorted image To the center of the barrel distortion image and pincushion distortion image The expression of the Euclidean distance is:
[0037] in, is the Euclidean distance, and the first pixel coordinate transformation stream and the second pixel coordinate transformation stream are used as labels.
[0038] As an optional implementation manner, in step S102, the initial distortion-free image data set is distorted using a rotation model to obtain a rotationally distorted image data set and a third pixel coordinate transformation stream.
[0039] In this embodiment, the initial distortion-free image is rotated along the center of the image to obtain a conversion formula between the rotationally distorted image and the initial distortion-free image:
[0040] in, is the initial undistorted image corresponding to Axis and Axis coordinates, Corresponding to the rotation distortion image Axis and Axis coordinates, is the pixel center of the rotationally distorted image, is the center of rotation The angle of counterclockwise rotation, where the third pixel coordinate transformation stream is used as the label.
[0041] As an optional implementation manner, in step S102, the initial distortion-free image data set is distorted using a perspective model to obtain a perspective-distorted image data set and a fourth pixel coordinate transformation stream.
[0042] In this embodiment, the conversion relationship between the perspective distorted image and the initial undistorted image is:
[0043] when ,but:
[0044]
[0045] in, is the initial undistorted image corresponding to Axis and Axis coordinates, Corresponding to the perspective distortion image Axis and Axis coordinates, and The shrinkage degree of the initial undistorted image can be controlled. and When the initial undistorted image increases, Axis and The axis direction will shrink, making the perspective effect of the initial distortion-free image more obvious, thus simulating the shrinking effect of distant objects. Used to process the scale of the initial undistorted image, which can change the height and width of the initial undistorted image; Control the initial undistorted image in The ratio of the axis, when When the initial undistorted image is The axis is enlarged when When the initial undistorted image is The axis is reduced when When the initial undistorted image is The axis is flipped; Control the initial undistorted image in The ratio of the axis, when When the initial undistorted image is The axis is enlarged when When the initial undistorted image is The axis is reduced when When the initial undistorted image is The axis is flipped; where Since the normalized perspective transformation matrix is usually used in practical applications, and the setting , so it does not need to be input. The initial undistorted image can be made along Axis and Axis shearing, Controls the initial undistorted image along The shear degree of the axis, when When , the initial undistorted image is clipped to the upper right. When , the initial undistorted image is sheared to the upper left; Controls the initial undistorted image along The shear degree of the axis, when When , the initial undistorted image is clipped to the lower right. When , the initial undistorted image is clipped to the lower left, and the remaining items It is to adjust the displacement of the image to reduce the image pixel loss caused by the transformation. Control the initial undistorted image in The displacement in the axial direction is When , the initial undistorted image moves to the right. When , the initial undistorted image moves to the left; Control the initial undistorted image in The displacement in the axial direction is When , the initial undistorted image moves downward, When , the initial undistorted image moves upward, Refers to the determinant of A, where the fourth pixel coordinate transformation stream is used as the label.
[0046] As an optional implementation manner, in step S103, the loss function of the IDCNetM convolutional neural network is expressed as:
[0047] in, is the total loss of the IDCNetM convolutional neural network, is the endpoint error loss between the pixel coordinate transformation flow of the distorted image that has not been processed by the IDCNetM convolutional neural network and the pixel coordinate transformation flow of the distorted image that has been processed by the IDCNetM convolutional neural network. is the cross entropy loss between the distortion type of the distorted image that has not been processed by the IDCNetM convolutional neural network and the distortion type of the distorted image that has been processed by the IDCNetM convolutional neural network. is the weight of the classification part in the IDCNetM convolutional neural network.
[0048] In this embodiment, The value range is [0~1].
[0049] As an optional implementation method, step S106, obtaining the corrected image of the distorted image to be tested based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested, includes: resampling the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested to obtain the corrected image of the distorted image to be tested.
[0050] In this embodiment, resampling mainly uses iterative search to invert the pixel coordinate transformation flow of the distorted image to be tested, that is, iterative search is performed using the offset of the distorted image to be tested relative to each pixel point in the corrected image, and the pixel coordinates of the corrected image are gradually calculated, and then the distorted image to be tested is corrected. The formula is:
[0051] in, It is calculated from the pixel points of the distorted image to be tested To the corrected image pixel of the distorted image to be tested The backward mapping transformation flow is from the coordinates of the distorted image to be tested Start iterating, when the iteration accuracy reaches a certain threshold, that is When the iteration ends, the current That is the pixel coordinates of the corrected image.
[0052] Experimental part: Images with obvious geometric structures are screened from the public dataset place365. While obtaining undistorted images, the network can better learn the features of distorted images. The original undistorted image dataset is constructed using the screened 6,400 images.
[0053] The image is distorted using the mathematical model of image distortion. The 6400 images after screening are subjected to four types of distortion processing: barrel distortion, pincushion distortion, rotation distortion, and perspective distortion. A distorted image dataset with four types of distortion is obtained, and the pixel coordinate transformation flow during distortion is recorded as the data label, such as Figure 2 The detailed information of the dataset is shown in Table 1 below: Table 1. Detailed division of mixed type distorted image dataset
[0054] A convolutional neural network structure with an encoder-decoder architecture is used to build a multi-type image distortion correction network IDCNetM. A parallel classification branch is added to the decoder part to constrain the distorted image features, such as Figure 3 As shown in the figure, for the decoder part, at the beginning of the network, a conv layer is used to convert the image into a form that the network can understand. Then, the c2f structure in YOLOv8 is used in the first layer to further extract the features of the network. Five residual blocks are included in the middle to gradually reduce the input image and extract features. At the same time, an EMA attention mechanism is added between the encoder and the decoder.
[0055] Since the parameter values between different distortion types vary greatly, in order to allow the network to better distinguish different types of distorted images and learn the corresponding distortion features, a classifier is used to further constrain the model. When training the network, two tasks are jointly learned at the same time. The first task is used to learn the mapping relationship between the distorted image and the original undistorted image, and predict the pixel coordinate transformation flow of the distorted image. The structure is basically symmetrical with the encoder. The difference is that the original c2f structure of the encoder is replaced with two conv2 layers, and the features are further processed and extracted to produce the final output. The second task classifies the distortion type, which is complementary to the first task. It consists of two conv layers and 1 fc layer, and finally outputs a 1D vector classification result for prediction.
[0056] Figure 4 is a schematic diagram of different types of distorted images and corrected images according to an embodiment of the present invention. A distorted image of different types with a pixel size of 256×256 is selected as a source image for correction. The distorted image is input into a multi-type image distortion correction network IDCNetM. The network analyzes the input image according to its features, determines the distortion type to which it belongs, and predicts the pixel coordinate transformation stream corresponding to the distorted image, that is, the backward mapping from the distorted image to the corrected image. The image is resampled using the distorted image and the predicted pixel coordinate transformation stream, and the acquired pixel coordinate transformation stream is inverted using iterative search to obtain a corrected image.
[0057] In an embodiment of the present invention, an initial image data set is obtained and screened to obtain an initial distortion-free image data set; different mathematical models are used to distort the initial distortion-free image data set to obtain different types of distorted image data sets, wherein the different mathematical models are a division model, a rotation model, and a perspective model, and the different types of distorted image data sets include: a barrel distorted image data set, a pincushion distorted image data set, a rotational distortion image data set, and a perspective distortion image data set, and each distorted image carries a pixel coordinate transformation stream; an IDCNetM convolutional neural network is constructed, wherein the IDCNetM convolutional neural network includes an encoder part, a decoder part, a classification part, and a re-encoding part. Sampling part: using distorted image data sets with different distortion types to train the IDCNetM convolutional neural network to obtain a trained IDCNetM convolutional neural network; inputting the distorted image to be tested into the trained IDCNetM convolutional neural network to obtain the pixel coordinate transformation stream of the distorted image to be tested and the distortion type of the image to be tested; based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested, obtaining a corrected image of the distorted image to be tested, solving the technical problem of low correction accuracy for correcting distorted images with unclear distortion types in the prior art, and achieving the technical effect of correcting images with unclear distortion types through the constructed convolutional neural network and improving the correction accuracy.
[0058] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0059] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0060] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0061] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0062] In addition, each functional unit in each embodiment of the present invention may be integrated into a first processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0063] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for image distortion correction based on convolutional neural network, characterized in that: include: Acquire an initial image data set, filter the initial image data set, and obtain an initial distortion-free image data set; The initial distortion-free image dataset is distorted using different mathematical models to obtain different types of distorted image datasets, where the different mathematical models are a division model, a rotation model, and a perspective model. The different types of distorted image datasets include: a barrel distorted image dataset, a pincushion distorted image dataset, a rotation distorted image dataset, and a perspective distorted image dataset. Each distorted image carries a pixel coordinate transformation stream. Construct an IDCNetM convolutional neural network, where the IDCNetM convolutional neural network includes an encoder part, a decoder part, a classification part, and a resampling part; The IDCNetM convolutional neural network is trained using distorted image datasets of different distortion types to obtain a trained IDCNetM convolutional neural network. Input the distorted image to be tested into the trained IDCNetM convolutional neural network to obtain the pixel coordinate transformation flow of the distorted image to be tested and the distortion type of the image to be tested; Based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested, a corrected image of the distorted image to be tested is obtained.
2. The method according to claim 1, characterized in that The division model is used to perform distortion processing on the initial distortion-free image data set to obtain a barrel-shaped distortion image data set and a first pixel coordinate transformation stream as well as a pincushion-shaped distortion image data set and a second pixel coordinate transformation stream.
3. The method according to claim 1, characterized in that The rotation model is used to perform distortion processing on the initial distortion-free image data set to obtain a rotationally distorted image data set and a third pixel coordinate transformation stream.
4. The method according to claim 1, characterized in that: The perspective model is used to perform distortion processing on the initial distortion-free image data set to obtain a perspective-distorted image data set and a fourth pixel coordinate transformation stream.
5. The method according to claim 1, characterized in that The loss function of the IDCNetM convolutional neural network is expressed as: in, is the total loss of the IDCNetM convolutional neural network, is the endpoint error loss between the pixel coordinate transformation flow of the distorted image that has not been processed by the IDCNetM convolutional neural network and the pixel coordinate transformation flow of the distorted image that has been processed by the IDCNetM convolutional neural network. is the cross entropy loss between the distortion type of the distorted image that has not been processed by the IDCNetM convolutional neural network and the distortion type of the distorted image that has been processed by the IDCNetM convolutional neural network. is the weight of the classification part in the IDCNetM convolutional neural network.
6. The method according to claim 1, characterized in that The method of obtaining a corrected image of the distorted image to be tested based on the pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested comprises: The pixel coordinate transformation stream of the distorted image to be tested and the distorted image to be tested are resampled to obtain a corrected image of the distorted image to be tested.
7. A computer system, characterized in that include: One or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method of claim 1.
8. A computer-readable storage medium, characterized in that Computer executable instructions are stored, and when the instructions are executed, they are used to implement the method of claim 1.
9. A computer program product, characterized in that The invention comprises computer executable instructions, which are used to implement the method of claim 1 when being executed.
Citation Information
Patent Citations
Distortion correction method, device and equipment and computer readable storage medium
CN116757950A