Fisheye lens camera de-warping method and apparatus, computer device, and medium

By employing a distortion correction method involving multiple rotations at different angles, the problem of achieving good distortion correction while maintaining a large field of view in fisheye lenses has been solved, thus improving distortion correction efficiency and effectiveness, and making it suitable for target detection.

CN117876277BActive Publication Date: 2026-11-27WUHAN JIMU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311763762.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2026-11-27
Estimated Expiration
2043-12-19

AI Technical Summary

Technical Problem

Existing distortion correction methods for fisheye lenses cannot achieve good distortion correction while maintaining a large field of view, resulting in poor target detection performance.

Method used

The distortion correction method employs multiple rotation angles. By obtaining the intrinsic parameters and rotation matrix of the fisheye lens, the width and height of the distortion correction output image are set, the image is divided into pixel units, multiple distortion correction back projection calculations are performed, a distortion correction lookup table is generated, and finally, a complete distortion correction output image is synthesized.

Benefits of technology

It effectively preserves a large field of view, avoids edge distortion, and improves distortion removal efficiency and effectiveness, making it suitable for subsequent target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117876277B_ABST
    Figure CN117876277B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a fisheye lens camera de-distortion method and device, computer equipment and medium, relating to the technical field of image processing, including obtaining internal parameters, rotation matrix and pixel unit in the first coordinate of de-distortion output image; setting w times de-distortion back projection calculation is carried out on de-distortion output image, different yaw angle adjustment angle is used in each calculation, and a new rotation matrix is obtained according to the yaw angle adjustment angle; in each calculation, the second coordinate of the pixel unit back projection to the original image is obtained according to the internal parameters, the new internal parameter matrix and the new rotation matrix, and a de-distortion lookup sub-table is generated based on the projection relationship between the first coordinate and the second coordinate; the middle column of the de-distortion lookup sub-table generated in the nth time is assigned to the nth column of the de-distortion lookup total table, the de-distortion lookup total table is formed, and the de-distortion of the image is carried out by using the de-distortion lookup total table. The scheme improves the de-distortion effect and de-distortion efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, computer equipment, and medium for distortion correction of a fisheye lens camera. Background Technology

[0002] Compared to narrow-angle cameras, fisheye cameras, with their ultra-wide field of view, can provide more information in a single frame, making them widely used in automotive products. However, fisheye lenses refract light significantly to achieve this wide field of view, resulting in substantial image distortion. In practical applications, distortion correction is often necessary. Current target detection tasks using fisheye lenses suffer from distortion, leading to lower performance on distorted fisheye images compared to conventional narrow-angle lenses. This is because narrow-angle lenses have a large amount of labeled data, while labeling samples on distorted fisheye images is inconvenient. Therefore, there is an urgent need for a better fisheye distortion correction method that preserves a large field of view after distortion correction while achieving similar results to narrow-angle lenses. This would allow for direct target recognition using a deep learning model trained on narrow-angle lens samples from the distorted image.

[0003] Existing distortion correction methods mainly include perspective distortion correction, latitude and longitude distortion correction, and multi-view distortion correction. Perspective distortion correction primarily involves backprojecting the original image onto a normalized world coordinate plane, then removing the influence of distortion parameters based on distortion coefficients, resulting in a completely distortion-free image. Latitude and longitude distortion correction involves mapping the image to a unit sphere based on longitude and latitude, then normalizing it to the world coordinate plane to remove distortion, producing a less distorted effect while preserving a larger field of view. Multi-view distortion correction divides the fisheye view into multiple perspectives, performs perspective distortion correction, then extracts features, matches and stitches them together, ultimately creating a stitched image after multi-view distortion correction.

[0004] Existing perspective distortion correction methods, due to the inherent characteristics of perspective changes, can only produce good distortion correction effects within a relatively small central field of view. Significant stretching occurs at the edges after distortion correction, so generally only images from the central view are used, resulting in the loss of information from other perspectives. While latitude and longitude distortion correction can suppress edge stretching to some extent, compression distortion still exists, with the compression becoming more severe towards the edges. The nonlinear latitude and longitude correction proposed in patent CN110197466 also suffers from compression distortion at the edges. Patents CN110276716 and CN112116530 both propose dividing the fisheye image into multiple perspectives, then correcting distortion at each perspective, and finally stitching them together to form a large-view image with less distortion. However, these methods all require fusing the distorted images from multiple perspectives and extracting feature points for matching and fusion, which is not only time-consuming but also prone to problems such as overlap and poor fusion results.

[0005] Therefore, there is an urgent need for a better fisheye distortion correction method that can preserve a large field of view and ensure good results in fisheye lens images after distortion correction, so as to facilitate subsequent target detection. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a fisheye lens camera distortion correction method to solve the technical problem in the prior art where fisheye lens distortion correction cannot achieve a good distortion correction effect while maintaining a large field of view. The method includes:

[0007] Obtain the intrinsic parameters and rotation matrix R of the fisheye lens camera, and represent the rotation matrix R using Euler angles α, β and γ, where α is the first pitch angle, β is the first rotation angle, and γ is the first yaw angle;

[0008] The width of the distorted output image of the fisheye lens is set to w, the height to h, and the viewing angle to π. The distorted output image is divided into w×h pixel units, and the first coordinates (i,j) of each pixel unit in the distorted output image are obtained, where i = 0, 1, 2...h and j = 0, 1, 2...w.

[0009] The distortion-corrected output image is subjected to w distortion-corrected back-projection calculations, with a different yaw angle adjustment angle used in each calculation. The yaw angle adjustment angle used in the nth distortion-corrected back-projection calculation is... Where n = 1, 2, ..., w;

[0010] Based on the yaw angle adjustment, obtain the new rotation matrix R used for each distortion correction back projection calculation. new n R new n The expression is:

[0011] R new n =R pitch n ×R word ,

[0012] Among them, R word =R T R T Let R be the inverse of the rotation matrix R. pitch n Represented by Euler angles β p =0 and The angle transformation matrix formed, α p For the second pitch angle, β p The second rotation angle, This is the second yaw angle used in the nth distortion-free backprojection calculation;

[0013] Obtain the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method;

[0014] For each distortion correction backprojection calculation, the second coordinates of the pixel unit on the distortion correction output image backprojected onto the original image are obtained based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix;

[0015] For each distortion correction back projection calculation, a distortion correction lookup table is generated based on the projection relationship between the first coordinate of each pixel unit on the distortion correction output image and the second coordinate on the original image.

[0016] The value of the middle column in the distortion lookup sub-table generated by the nth distortion-reversal back projection calculation is assigned to the nth column of the distortion-reversal lookup master table to form the distortion-reversal lookup master table.

[0017] The distortion lookup table is used to distort the image to be distorted, resulting in a distortion-corrected output image corresponding to the image to be distorted.

[0018] This invention also provides a fisheye lens camera distortion correction device to solve the technical problem in the prior art where fisheye lens distortion correction cannot achieve a good distortion correction effect while maintaining a large field of view. The device includes:

[0019] The first acquisition module is used to acquire the intrinsic parameters and rotation matrix R of the fisheye lens, and to represent the rotation matrix R using Euler angles α, β and γ, where α is the first pitch angle, β is the first rotation angle and γ is the first yaw angle.

[0020] The second acquisition module is used to set the width of the distorted output image of the fisheye lens to w, the height to h, and the viewing angle to π, divide the distorted output image into w×h pixel units, and obtain the first coordinates (i,j) of each pixel unit in the distorted output image, i=0,1,2...h, j=0,1,2...w;

[0021] The yaw angle adjustment module is used to set the yaw angle adjustment angle for performing w distortion-corrected back-projection calculations on the distorted output image. Each distortion-corrected back-projection calculation uses a different yaw angle adjustment angle, and the yaw angle adjustment angle used in the nth distortion-corrected back-projection calculation is... Where n = 1, 2, ..., w;

[0022] The new rotation matrix acquisition module is used to obtain the new rotation matrix R for each distortion-corrected backprojection calculation based on the yaw angle adjustment angle. new n R new n The expression is:

[0023] R new n =R pitch n ×R word ,

[0024] Among them, R word =R T R T Let R be the inverse of the rotation matrix R. pitch n Represented by Euler angles β p =0 and The angle transformation matrix formed, α p For the second pitch angle, β p The second rotation angle, This is the second yaw angle used in the nth distortion-free backprojection calculation;

[0025] The new intrinsic parameter matrix acquisition module is used to obtain the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method;

[0026] The distortion correction backprojection calculation module is used to obtain the second coordinates of the pixel unit on the distortion correction output image backprojected onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix for each distortion correction backprojection calculation.

[0027] The distortion correction lookup table generation module is used to generate a distortion correction lookup table for each distortion correction back projection calculation based on the projection relationship between the first coordinate of each pixel unit on the distortion correction output image and the second coordinate on the original image.

[0028] The distortion removal lookup master table generation module is used to assign the value of the middle column of the distortion removal lookup sub-table generated by the nth distortion removal back projection calculation to the nth column of the distortion removal lookup master table to form the distortion removal lookup master table.

[0029] The distortion correction module is used to perform distortion correction on the image to be distorted using the distortion correction lookup table, and obtain a distortion correction output image corresponding to the image to be distorted.

[0030] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned fisheye lens distortion correction methods to solve the technical problem in the prior art where fisheye lens distortion correction cannot achieve a good distortion correction effect while maintaining a large field of view.

[0031] This invention also provides a computer-readable storage medium storing a computer program that executes any of the above-described fisheye lens distortion correction methods, in order to solve the technical problem in the prior art that fisheye lens distortion correction cannot achieve a good distortion correction effect while maintaining a large field of view.

[0032] Compared with the prior art, the beneficial effects that at least one of the above-mentioned technical solutions adopted in the embodiments of this specification can achieve include at least the following: obtaining the intrinsic parameters and rotation matrix R of the fisheye lens camera; setting the width of the distortion-corrected output image of the fisheye lens to w, the height to h, and the viewing angle to π, dividing the distortion-corrected output image into w×h pixel units, where w is the number of columns and h is the number of rows, and obtaining the first coordinate of each pixel unit in the distortion-corrected output image; setting w distortion-corrected back-projection calculations to be performed on the distortion-corrected output image, with a different yaw angle adjustment angle used for each distortion-corrected back-projection calculation; obtaining a new rotation matrix used for each distortion-corrected back-projection calculation based on the yaw angle adjustment angle; obtaining the distortion correction matrix corresponding to the distortion correction method. A new intrinsic parameter matrix is ​​used for backprojection calculation. For each distortion correction backprojection calculation, the second coordinates of the pixel units in the distortion correction output image are obtained by backprojecting them onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix. For each distortion correction backprojection calculation, a distortion correction lookup table is generated based on the projection relationship between the first coordinate of each pixel unit in the distortion correction output image and the second coordinate in the original image. The value of the middle column of the distortion correction lookup table generated by the nth distortion correction backprojection calculation is assigned to the nth column of the total distortion correction lookup table to form the total distortion correction lookup table. The total distortion correction lookup table is used to perform distortion correction on the image to be distorted, resulting in the distortion correction output image corresponding to the image to be distorted. This application employs multiple distortion corrections at different rotation angles to synthesize a complete distortion-corrected output image. Compared to existing projection distortion correction and latitude / longitude distortion correction, this application can better preserve a larger field of view and avoid severe deformation at the edges, effectively improving the distortion correction effect and meeting the distortion correction requirements of subsequent target detection. Furthermore, during operation, the distortion-corrected image can be generated simply by traversing the distortion lookup table, eliminating the need for feature extraction and matching for multi-view image stitching and fusion. This avoids ghosting and errors that can easily occur during stitching, effectively improving distortion correction efficiency and effect. Attached Figure Description

[0033] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart of the distortion correction method for a fisheye lens camera provided in an embodiment of the present invention;

[0035] Figure 2 These are before-and-after distortion correction images from existing technologies;

[0036] Figure 3This is a comparison chart of projection distortion correction and latitude / longitude distortion correction in existing technologies;

[0037] Figure 4 These are distortion correction comparison images using different rotation angles provided in the embodiments of the present invention;

[0038] Figure 5 The distortion correction image provided in this embodiment of the invention is obtained by rotating 1920 angles for projection distortion correction and latitude and longitude distortion correction.

[0039] Figure 6 This is a structural block diagram of a computer device provided in an embodiment of the present invention;

[0040] Figure 7 This is a structural block diagram of a fisheye lens camera distortion correction device provided in an embodiment of the present invention. Detailed Implementation

[0041] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0042] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] In this embodiment of the invention, a distortion correction method for a fisheye lens camera is provided, such as... Figure 1 As shown, the method includes:

[0044] Step S101: Obtain the intrinsic parameters and rotation matrix R of the fisheye lens camera, and represent the rotation matrix R using Euler angles α, β and γ, where α is the first pitch angle, β is the first rotation angle and γ is the first yaw angle.

[0045] Step S102: Set the width of the distorted output image of the fisheye lens to w, the height to h, and the viewing angle to π. Divide the distorted output image into w×h pixel units and obtain the first coordinates (i,j) of each pixel unit in the distorted output image, i=0,1,2...h, j=0,1,2...w;

[0046] Step S103: Set the distortion-free output image to undergo w distortion-free back-projection calculations. Each distortion-free back-projection calculation uses a different yaw angle adjustment angle. The yaw angle adjustment angle used in the nth distortion-free back-projection calculation is... Where n = 1, 2, ..., w;

[0047] Step S104: Based on the yaw angle adjustment angle, obtain the new rotation matrix R used for each distortion correction back projection calculation. new n R new n The expression is:

[0048] R new n =R pitch n ×R word ,

[0049] Among them, R word =R T R T Let R be the inverse of the rotation matrix R. pitch n Represented by Euler angles β p =0 and The angle transformation matrix formed, α p For the second pitch angle, β p The second rotation angle, This is the second yaw angle used in the nth distortion-free backprojection calculation;

[0050] Step S105: Obtain the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method;

[0051] Step S106: For each distortion correction backprojection calculation, obtain the second coordinates of the pixel unit on the distortion correction output image backprojected onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix;

[0052] Step S107: For each distortion correction back projection calculation, a distortion correction lookup table is generated based on the projection relationship between the first coordinate of each pixel unit on the distortion correction output image and the second coordinate on the original image.

[0053] Step S108: Assign the value of the middle column of the distortion lookup sub-table generated by the nth distortion correction back projection calculation to the nth column of the distortion correction lookup master table to form the distortion correction lookup master table.

[0054] Step S109: Use the distortion lookup table to distort the image to be distorted, and obtain the distortion-corrected output image corresponding to the image to be distorted.

[0055] In this embodiment, distortion correction is performed multiple times at different rotation angles to synthesize a complete distortion-corrected output image. Compared with existing projection distortion correction and latitude-longitude distortion correction, this application can better preserve a larger field of view and avoid severe deformation at the edges, effectively improving the distortion correction effect and meeting the distortion correction requirements of subsequent target detection. At the same time, during the operation, the distortion correction image can be generated simply by traversing the distortion lookup table, without the need for feature extraction and matching for multi-view image stitching and fusion. This avoids ghosting and errors that are easily caused by stitching, effectively improving the distortion correction efficiency and effect.

[0056] In practice, the process of acquiring the intrinsic and extrinsic parameters of the fisheye lens camera is as follows:

[0057] The fisheye lens uses a planar checkerboard pattern to calibrate the camera's internal parameters, and then the camera is fixed on the vehicle to calibrate its external parameters.

[0058] The intrinsic parameters are determined at the camera's factory and mainly include the intrinsic parameter matrix K, distortion coefficients D, and omnidirectional model bias factor ε. Among them, f x c is the lateral focal length of the vehicle-mounted camera. x f represents the lateral pixel coordinates of the intersection of the optical axis of the vehicle camera and the image sensor. y c is the longitudinal focal length of the vehicle-mounted camera. y Let be the vertical pixel coordinate of the intersection of the optical axis of the vehicle camera and the image sensor, and s be the horizontal and vertical tilt factors of the pixel. x ,c y The center point of the image can also be referred to as the center point of the image; the distortion coefficient D = (k1,k2,p1,p2), where k1 and k2 are the radial distortion coefficients of the lens, and p1 and p2 are the tangential distortion coefficients of the lens; ε represents the center point offset factor in the omnidirectional model.

[0059] The extrinsic parameters represent the relationship between the camera coordinate system and the vehicle coordinate system, and are generally represented by the rotation matrix R and the translation vector T, where... R represents the rotation from the world coordinate system to the camera coordinate system, and T represents the translation from the world coordinate system to the camera coordinate system.

[0060] The rotation matrix R can also be represented by Euler angles. Assuming the Euler angles for the rotation sequence around the XYZ axes are represented as α, β, γ, it means that first rotate around the X axis by α (pitch angle), then around the Y axis by β (rotation angle), and then around the Z axis by γ (yaw angle).

[0061] In practice, the input parameters for distortion correction need to be prepared. The following parameter descriptions illustrate the process of distortion correction without using yaw angle adjustment. When distortion correction uses yaw angle adjustment, the parameters can be adjusted adaptively, including the following:

[0062] Distortion correction requires inputting the camera's intrinsic parameter matrix K, distortion coefficients D, omnidirectional model bias factor ε, and a new intrinsic parameter matrix K for distortion correction. new And the new rotation matrix R used for distortion correction new ;

[0063] New internal parameter matrix K new Different styles will be set for different distortion correction methods. Let the width and height of the output image after distortion correction be w and h, respectively.

[0064] If projection distortion correction is used, it is generally set as follows:

[0065] If latitude and longitude distortion correction is used, it is generally set as follows:

[0066] The new rotation matrix R used for distortion correction new The pitch angle, roll angle, and yaw angle can be combined to form R as needed. new To accurately transfer images from lenses mounted at different viewpoints to a better viewpoint suitable for target detection after distortion correction, a suitable new rotation matrix R needs to be set based on the extrinsic rotation matrix. new R new R can be divided into two parts. new =R pitch ×R word , where R word =R T R word Let R be the inverse of the rotation matrix R. Since the rotation matrix R is orthogonal, the transpose of the rotation matrix R is the inverse of the rotation matrix R. word This indicates that the perspective will be based on R. word Shifting from the camera's original perspective to a perspective within the world coordinate system. pitch To represent a shift from a viewpoint in world coordinates to a horizontal, unrotated viewpoint, Euler angles can be synthesized as follows: α p =π / 2, β p =0,γ p =γ.

[0067] New rotation matrix R newIts function is to rotate the camera viewpoint to a new camera viewpoint that can largely cover the original camera's field of view, while ensuring that the viewpoint is horizontal and unrotated. This prevents the object detection bounding boxes on the image from appearing tilted, and the direction is perpendicular to the image's horizontal axis. This is beneficial for object 2D bounding box annotation and object detection tasks. For specific effects, please refer to [link to documentation / reference]. Figure 2 , Figure 2 The left-hand diagram uses the new rotation matrix R. new The distortion correction effect of projection when set as an identity matrix. Figure 2 The right-hand diagram uses the new rotation matrix R. new =R pitch ×R word The distortion correction effect shows that the target vehicle on the left is tilted, while the target vehicle on the right is basically horizontal with the image.

[0068] In practical implementation, let the new intrinsic parameter matrix K be... new The inverse matrix is ​​IK.

[0069]

[0070] Let the new rotation matrix R new The inverse matrix is ​​IR.

[0071]

[0072] Let the projection transformation matrix be KR,

[0073] KR=(K new ×R new );

[0074] Let the inverse projection transformation matrix be IKR, IKR = (KR).inv, which is a 3x3 matrix. Assume that it can be specifically represented as:

[0075]

[0076] Let the lookup table after image distortion correction be: mapx, mapy, which are two h×w images.

[0077] In one embodiment, obtaining the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method includes:

[0078] When the distortion correction method is projection distortion correction, the new intrinsic parameter matrix K new1 for:

[0079]

[0080] When the distortion correction method is latitude and longitude distortion correction, the new intrinsic parameter matrix K new2 for:

[0081]

[0082] In one embodiment, obtaining the second coordinates of the pixel units in the distorted output image projected onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix includes:

[0083] Based on the new intrinsic parameter matrix and the new rotation matrix, the first coordinate is back-projected onto the world coordinate system to obtain the third coordinate of the pixel unit in the world coordinate system;

[0084] The intrinsic parameters include the intrinsic parameter matrix K, the distortion coefficients D, and the omnidirectional model bias factor ε.

[0085] The third coordinate is normalized to the unit plane based on the omnidirectional model bias factor to obtain the fourth coordinate of the pixel unit on the unit plane.

[0086] The fourth coordinate is distorted according to the distortion coefficient to obtain the fifth coordinate after distortion.

[0087] The fifth coordinate is projected onto the original image based on the intrinsic parameter matrix to obtain the second coordinate of the pixel unit on the original image.

[0088] In one embodiment, the step of back-projecting the first coordinates onto the world coordinate system based on the new intrinsic parameter matrix and the new rotation matrix to obtain the third coordinates of the pixel unit in the world coordinate system includes:

[0089] When the distortion correction method is projection distortion correction, the inverse projection transformation matrix IKR is obtained, and the expression for IKR is:

[0090] IKR = (KR).inv;

[0091] KR=(K new1 ×R new n );

[0092] Where KR is the projection transformation matrix;

[0093] The first coordinate of the pixel unit is back-projected onto the world coordinate system according to the inverse projection transformation matrix IKR, and the third coordinate of the pixel unit on the world coordinate system is obtained.

[0094] In one embodiment, the step of back-projecting the first coordinates onto the world coordinate system based on the new intrinsic parameter matrix and the new rotation matrix to obtain the third coordinates of the pixel unit in the world coordinate system includes:

[0095] When the distortion correction method is latitude and longitude distortion correction, the new intrinsic parameter matrix K is obtained. new2 The inverse matrix IK and the new rotation matrix R new n The inverse matrix IR n ;

[0096] The first coordinates are back-projected onto the sphere based on the inverse matrix IK to obtain the sixth coordinate of the pixel unit on the sphere;

[0097] The sixth coordinate is determined according to the inverse matrix IR. n Rotate the pixel unit to obtain its third coordinate in the world coordinate system.

[0098] In one embodiment, the step of normalizing the third coordinate to the unit plane according to the omnidirectional model bias factor to obtain the fourth coordinate of the pixel unit on the unit plane includes:

[0099] The third coordinate is normalized to the unit sphere to obtain the seventh coordinate of the pixel unit on the unit sphere;

[0100] The seventh coordinate is biased according to the omnidirectional model bias factor to obtain the eighth coordinate after the pixel unit is biased;

[0101] The eighth coordinate is normalized to the unit plane to obtain the fourth coordinate of the pixel unit on the unit plane.

[0102] In one embodiment, the method further includes:

[0103] The intrinsic and extrinsic parameters of the fisheye lens camera are calibrated using a planar checkerboard grid.

[0104] The following detailed explanation of the distortion correction back projection calculation process uses a specific example. Since each distortion correction back projection calculation yields a new rotation matrix R... new n Then a new I KR will also be obtained. n To simplify the formula, the following example uses a formula for distortion calculation without adjusting the yaw angle during rotation. Each time the yaw angle is adjusted, the corresponding... β p =0 and Simply substitute the relevant formulas to calculate.

[0105] For each row i, i = 0, 1, 2…h of the distorted output image, and each column j, j = 0, 1, 2…w of the i-th row, the first coordinate of the pixel unit in the distorted output image is (i, j), and its coordinates projected onto the world coordinate system are (x, y, z).

[0106] Step 1: Calculate the first coordinate (i,j) of the pixel unit and back-project it to (x,y,z) in the world coordinate system.

[0107] For the projection distortion correction method, I KR is set as follows: According to IKR, the first coordinate (i,j) is back-projected onto the world coordinate system to obtain the third coordinate (x,y,z) of the pixel unit in the world coordinate system. The formula for calculating the third coordinate (x,y,z) is as follows:

[0108] x=j×ikr 00 +i×ikr 01 +ikr 02 ,

[0109] y=j×ikr 10 +i×ikr 11 +ikr 12 ,

[0110] z=j×ikr 20 +i×ikr 21 +ikr 22 .

[0111] When the distortion correction method is latitude and longitude distortion correction, let the first coordinate (i, j) pass through the new intrinsic parameter matrix K. new2 The inverse matrix IK is projected onto the sphere at the sixth coordinate (x1, y1, z1), with the following angles theta and alpha:

[0112] theta=j×ik 00 +i×ik 01 +ik 02 ,

[0113] alpha = j × ik 10 +i×ik 11 +ik 12 ,

[0114] x1 = -cos(theta),

[0115] y1=-sin(theta)×cos(alpha),

[0116] z1=sin(theta)×sin(alpha),

[0117] The sixth coordinate (x1, y1, z1) is rotated by the new rotation matrix R. new n The third coordinate of the inverse matrix IRn after rotation is (x, y, z), and the formula for calculating the third coordinate (x, y, z) is:

[0118] x=x1×ir 00 +y1×ir 01 +z1×ir 02 ,

[0119] y = x1 × ir 10 +y1×ir 11 +z1×ir 12 ,

[0120] z = x1 × ir 20 +y1×ir 21 +z1×ir 22 .

[0121] Step 2: Normalize the third coordinate (x, y, z) of the pixel unit in the world coordinate system to the unit sphere to obtain the seventh coordinate (x, y, z) of the pixel unit on the unit sphere. s Y s Z s ), seventh coordinate (X) s Y s Z s The expression for ) is:

[0122]

[0123]

[0124]

[0125] Step 3: Assign the pixel unit to the seventh coordinate (X) on the unit sphere. s Y s Z s The omnidirectional model bias factor ε is used to bias the pixel unit, and the eighth coordinate (X) after biasing is obtained. s Y s Z s +ε); then the eighth coordinate (X) s Y s Z s Normalizing (+ε) to the unit plane yields the fourth coordinate (xu, yu, 1) of the pixel unit on the unit plane. The expression for the fourth coordinate (xu, yu, 1) is:

[0126] xu = X s / (Z s +ε),

[0127]

[0128] Step 4: Add distortion to the fourth coordinate (xu, yu, 1) normalized to the unit plane according to the camera's distortion coefficient D to obtain the fifth coordinate (xd, yd, 1) after distortion. Assuming r2 = xu × xu + yu × yu, r4 = r2 × r2, then:

[0129] xd=(1+k1×r2+k2×r4)×xu+2×p1×xu×yu+p2×(r2+2×xu×xu),

[0130] yd=(1+k1×r2+k2×r4)×yu+p1×(r2+2×yu×yu)+2×p2×xu×yu.

[0131] Step 5: Project the fifth coordinate (xd, yd, 1) onto the original image based on the intrinsic parameter matrix K to obtain the second coordinate (u, v) of the pixel unit on the original image. The expression for the second coordinate (u, v) is:

[0132] u = f x ×xd+s×yd+c x ,

[0133] v = f y ×yd+c y .

[0134] Step 6: Generate the distortion correction lookup table. For each pixel unit's coordinates (i, j) in the distortion correction output image, the corresponding pixel unit coordinates in the original image are (u, v). Therefore, the distortion correction lookup table is assigned the following values:

[0135] mapx [i,j] =u,

[0136] mapy [i,j] =v,

[0137] By iterating through each pixel unit (i, j) in the distortion-reduced output image and repeating the above process, the distortion-reduced lookup tables mapx and mapy can be generated.

[0138] Existing distortion correction methods for fisheye lenses, including projection distortion correction and latitude / longitude distortion correction, both have shortcomings. Figure 3The image on the left is the original image, the image in the middle is the image after projection distortion correction, and the image on the right is the distortion-corrected image after latitude and longitude correction. Projection distortion correction stretches the image significantly at the edges, and in practical applications, it only preserves the central field of view, losing information from the larger field of view. While latitude and longitude correction preserves a larger field of view, it causes compression and distortion at the edges, also resulting in a loss of some field of view. Therefore, it is necessary to find a better distortion correction method that can both preserve a larger field of view and achieve a better distortion correction effect.

[0139] Depend on Figure 3 It can be observed that the distortion-corrected images exhibit deformation at the edges of the field of view, while showing better distortion correction in the center. Therefore, to ensure that all images appear in the center of the field of view of the distortion-corrected image, distortion-correction rotation matrices with different angles can be used, so that each column in the original image appears in the center of the distortion-corrected image. Then, the pixels of that column are filled into the corresponding column of the final distortion-corrected image. (Refer to...) Figure 4 As shown, the left image is the distortion-free image generated by a smaller rotation angle, and the right image is the distortion-free image generated by a larger rotation angle. The distortion-free images of latitude and longitude are obtained by using different angles (yaw angles) to form distortion-free rotation matrices. The larger the angle, the more the image at the edge of the original image will appear in the center of the image after distortion-freeing, and the better the distortion-free effect will be.

[0140] In one embodiment, the distortion correction process involving rotations of multiple angles is described in detail. Multiple different new rotation matrices R are employed. new n The process of performing multiple distortion corrections and obtaining the distortion-corrected lookup table is represented as follows:

[0141] Let the width and height of the distorted output image be w and h, and the viewing angle of the distorted output image be π. Divide this viewing angle into π / w equal parts according to the pixel width. Then, a total of w distortion corrections are required. Let R be the new rotation matrix used for the nth distortion correction. new n Its corresponding division can be R new n =R pitch n ×R word , where R pitch n This can be expressed as the Euler angle α p =π / 2, β p =0,γ p n =γ+γ adjust It is formed by changing the angle of composition;

[0142] Based on the distortion removal process in the above embodiments, w distortion removal lookup tables (mapx) are obtained. nmapy n n = 0, 1, 2…w;

[0143] Assign the value of the middle column of the distortion lookup sub-table generated by the nth distortion-corrected backprojection calculation to the nth column of the overall distortion-corrected lookup table, forming the overall distortion-corrected lookup table. Let the overall distortion-corrected lookup table be... and Then we have the following formula:

[0144]

[0145]

[0146] The distortion correction process involves multiple rotations at different angles, and the final composite image shows the complete distortion correction process. Figure 5 The image on the left is a distortion-corrected image obtained by projection distortion correction using 1920 different rotation angles, while the image on the right is a distortion-corrected image obtained by latitude and longitude distortion correction using 1920 different rotation angles. Compared to the original projection distortion correction and latitude and longitude distortion correction, they both preserve a larger field of view and have better distortion correction results, which is beneficial for subsequent target detection tasks.

[0147] In the above embodiments, distortion correction is performed multiple times at different rotation angles, and finally a complete distortion-corrected output image is synthesized. Compared with existing projection distortion correction and latitude and longitude distortion correction, this application can better preserve a larger field of view and there is no severe deformation at the edges, effectively improving the distortion correction effect and meeting the distortion correction effect requirements of subsequent target detection. At the same time, during the operation, the distortion correction image can be generated simply by traversing the distortion lookup table, without the need for feature extraction and matching for multi-view image stitching and fusion. This avoids ghosting and errors that are easily caused by stitching, effectively improving the distortion correction efficiency and effect.

[0148] In this embodiment, a computer device is provided, such as... Figure 6 As shown, it includes a memory 601, a processor 602, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-described fisheye lens camera distortion correction methods.

[0149] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.

[0150] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that performs any of the above-described fisheye lens camera distortion correction methods.

[0151] Specifically, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.

[0152] Based on the same inventive concept, this invention also provides a fisheye lens camera distortion correction device, as described in the following embodiments. Since the principle of the fisheye lens camera distortion correction device in solving the problem is similar to that of the fisheye lens camera distortion correction method, the implementation of the fisheye lens camera distortion correction device can refer to the implementation of the fisheye lens camera distortion correction method, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0153] Figure 7 This is a structural block diagram of a fisheye lens camera distortion correction device according to an embodiment of the present invention, such as... Figure 7 As shown, it includes: a first acquisition module 701, a second acquisition module 702, a yaw angle adjustment setting module 703, a new rotation matrix acquisition module 704, a new intrinsic parameter matrix acquisition module 705, a distortion removal back projection calculation module 706, a distortion removal lookup sub-table generation module 707, a distortion removal lookup master table generation module 708, and a distortion removal module 709. The structure is described below.

[0154] The first acquisition module 701 is used to acquire the intrinsic parameters and rotation matrix R of the fisheye lens, and to represent the rotation matrix R using Euler angles α, β and γ, where α is the first pitch angle, β is the first rotation angle and γ is the first yaw angle.

[0155] The second acquisition module 702 is used to set the width of the distortion-reduced output image of the fisheye lens to w, the height to h, and the viewing angle to π, divide the distortion-reduced output image into w×h pixel units, and obtain the first coordinates (i,j) of each pixel unit in the distortion-reduced output image, i=0,1,2...h, j=0,1,2...w;

[0156] The yaw angle adjustment setting module 703 is used to set the yaw angle adjustment angle for w distortion-corrected back-projection calculations on the distortion-corrected output image. Each distortion-corrected back-projection calculation uses a different yaw angle adjustment angle, and the yaw angle adjustment angle used in the nth distortion-corrected back-projection calculation is... Where n = 1, 2, ..., w;

[0157] The new rotation matrix acquisition module 704 is used to adjust the angle based on the yaw angle to acquire the new rotation matrix R used for each distortion correction back projection calculation. new n R new n The expression is:

[0158] R new n =R pitch n ×R word ,

[0159] Among them, R word =R T R T Let R be the inverse of the rotation matrix R. pitch n Represented by Euler angles β p =0 and The angle transformation matrix formed, α p For the second pitch angle, β p The second rotation angle, This is the second yaw angle used in the nth distortion-free backprojection calculation;

[0160] The new intrinsic parameter matrix acquisition module 705 is used to acquire the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method;

[0161] The distortion correction back projection calculation module 706 is used to obtain the second coordinates of the pixel unit on the distortion correction output image back projected onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix and the new rotation matrix for each distortion correction back projection calculation.

[0162] The distortion lookup table generation module 707 is used to generate a distortion lookup table for each distortion back projection calculation based on the projection relationship between the first coordinate of each pixel unit on the distortion-reduced output image and the second coordinate on the original image.

[0163] The distortion removal lookup master table generation module 708 is used to assign the value of the middle column of the distortion removal lookup sub-table generated by the nth distortion removal back projection calculation to the nth column of the distortion removal lookup master table to form the distortion removal lookup master table.

[0164] The distortion correction module 709 is used to perform distortion correction on the image to be distorted using the distortion correction lookup table, and obtain a distortion correction output image corresponding to the image to be distorted.

[0165] In one embodiment, the new intrinsic parameter matrix acquisition module 705 is further configured to:

[0166] When the distortion correction method is projection distortion correction, the new intrinsic parameter matrix K new1 for:

[0167]

[0168] When the distortion correction method is latitude and longitude distortion correction, the new intrinsic parameter matrix K new2 for:

[0169]

[0170] In one embodiment, the distortion correction back projection calculation module 706 is further configured to:

[0171] Based on the new intrinsic parameter matrix and the new rotation matrix, the first coordinate is back-projected onto the world coordinate system to obtain the third coordinate of the pixel unit in the world coordinate system;

[0172] The intrinsic parameters include the intrinsic parameter matrix, distortion coefficients, and omnidirectional model bias factor;

[0173] The third coordinate is normalized to the unit plane based on the omnidirectional model bias factor to obtain the fourth coordinate of the pixel unit on the unit plane.

[0174] The fourth coordinate is distorted according to the distortion coefficient to obtain the fifth coordinate after distortion.

[0175] The fifth coordinate is projected onto the original image based on the intrinsic parameter matrix to obtain the second coordinate of the pixel unit on the original image.

[0176] In one embodiment, the distortion correction back projection calculation module 706 is further configured to:

[0177] When the distortion correction method is projection distortion correction, the inverse projection transformation matrix IKR is obtained, and the expression for IKR is:

[0178] IKR = (KR).inv;

[0179] KR=(K new1 ×R new n );

[0180] Where KR is the projection transformation matrix;

[0181] The first coordinate of the pixel unit is back-projected onto the world coordinate system according to the inverse projection transformation matrix I KR, and the third coordinate of the pixel unit on the world coordinate system is obtained.

[0182] In one embodiment, the distortion correction back projection calculation module 706 is further configured to:

[0183] When the distortion correction method is latitude and longitude distortion correction, the new intrinsic parameter matrix K is obtained. new2 The inverse matrix IK and the new rotation matrix R new n The inverse matrix IR n ;

[0184] The first coordinates are back-projected onto the sphere based on the inverse matrix IK to obtain the sixth coordinate of the pixel unit on the sphere;

[0185] The sixth coordinate is determined according to the inverse matrix IR. n Perform rotation to obtain the third coordinate of the pixel unit in the world coordinate system.

[0186] In one embodiment, the distortion correction back projection calculation module 706 is further configured to:

[0187] The third coordinate is normalized to the unit sphere to obtain the seventh coordinate of the pixel unit on the unit sphere;

[0188] The seventh coordinate is biased according to the omnidirectional model bias factor to obtain the eighth coordinate after the pixel unit is biased;

[0189] The eighth coordinate is normalized to the unit plane to obtain the fourth coordinate of the pixel unit on the unit plane.

[0190] In one embodiment, the fisheye lens camera distortion correction device further includes:

[0191] The calibration module is used to calibrate the intrinsic and extrinsic parameters of the fisheye lens camera using a planar checkerboard grid.

[0192] The embodiments of this invention achieve the following technical effects: The intrinsic parameters and rotation matrix R of the fisheye lens camera are obtained; the width, height, and viewing angle of the distorted output image of the fisheye lens are set to w, h, and π, respectively; the distorted output image is divided into w×h pixel units, where w is the number of columns and h is the number of rows; the first coordinate of each pixel unit in the distorted output image is obtained; w distortion-reversal back-projection calculations are performed on the distorted output image, with different yaw angles used for each calculation; based on the yaw angle adjustment, a new rotation matrix is ​​obtained for each distortion-reversal back-projection calculation; a new intrinsic parameter matrix for distortion-reversal back-projection calculation corresponding to the distortion-reversal method is obtained. For each distortion correction backprojection calculation, the second coordinates of the pixel units in the distortion correction output image projected onto the original image are obtained based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix. For each distortion correction backprojection calculation, a distortion correction lookup table is generated based on the projection relationship between the first coordinate of each pixel unit in the distortion correction output image and the second coordinate in the original image. The value of the middle column of the distortion correction lookup table generated by the nth distortion correction backprojection calculation is assigned to the nth column of the total distortion correction lookup table to form the total distortion correction lookup table. The total distortion correction lookup table is used to perform distortion correction on the image to be distorted, resulting in the distortion correction output image corresponding to the image to be distorted. This application employs multiple distortion corrections at different rotation angles to synthesize a complete distortion-corrected output image. Compared to existing projection distortion correction and latitude / longitude distortion correction, this application can better preserve a larger field of view and avoid severe deformation at the edges, effectively improving the distortion correction effect and meeting the distortion correction requirements of subsequent target detection. Furthermore, during operation, the distortion-corrected image can be generated simply by traversing the distortion lookup table, eliminating the need for feature extraction and matching for multi-view image stitching and fusion. This avoids ghosting and errors that can easily occur during stitching, effectively improving distortion correction efficiency and effect.

[0193] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.

[0194] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for distortion correction in a fisheye lens camera, characterized in that, include: Obtain the intrinsic parameters and rotation matrix R of the fisheye lens camera, and represent the rotation matrix R using Euler angles α, β and γ, where α is the first pitch angle, β is the first rotation angle, and γ is the first yaw angle; The width of the distorted output image of the fisheye lens is set to w, the height to h, and the viewing angle to π. The distorted output image is divided into w×h pixel units, and the first coordinates (i, j) of each pixel unit in the distorted output image are obtained, where i = 0, 1, 2...h, j = 0, 1, 2...w. The distortion-corrected output image is subjected to w distortion-corrected back-projection calculations, with a different yaw angle adjustment angle used in each calculation. The yaw angle adjustment angle used in the nth distortion-corrected back-projection calculation is... Where n = 1, 2, ..., w; Based on the yaw angle adjustment, obtain the new rotation matrix R used for each distortion correction back projection calculation. new n R new n The expression is: R new n =R pitch n ×R word , Among them, R word =R T R T Let R be the inverse of the rotation matrix R. pitch n Represented by Euler angles β p =0 and The angle transformation matrix formed, α p For the second pitch angle, β p The second rotation angle, This is the second yaw angle used in the nth distortion-free backprojection calculation; Obtain the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method; For each distortion correction backprojection calculation, the second coordinates of the pixel unit on the distortion correction output image backprojected onto the original image are obtained based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix; For each distortion correction back projection calculation, a distortion correction lookup table is generated based on the projection relationship between the first coordinate of each pixel unit on the distortion correction output image and the second coordinate on the original image. The value of the middle column in the distortion lookup sub-table generated by the nth distortion-reversal back projection calculation is assigned to the nth column of the distortion-reversal lookup master table to form the distortion-reversal lookup master table. The distortion lookup table is used to distort the image to be distorted, resulting in a distortion-corrected output image corresponding to the image to be distorted.

2. The distortion correction method for a fisheye lens camera as described in claim 1, characterized in that, The process of obtaining the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method includes: When the distortion correction method is projection distortion correction, the new intrinsic parameter matrix K new1 for: When the distortion correction method is latitude and longitude distortion correction, the new intrinsic parameter matrix K new2 for:

3. The distortion correction method for a fisheye lens camera as described in claim 2, characterized in that, The step of obtaining the second coordinates of the pixel units in the distorted output image projected onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix includes: Based on the new intrinsic parameter matrix and the new rotation matrix, the first coordinate is back-projected onto the world coordinate system to obtain the third coordinate of the pixel unit in the world coordinate system; The intrinsic parameters include the intrinsic parameter matrix, distortion coefficients, and omnidirectional model bias factor; The third coordinate is normalized to the unit plane based on the omnidirectional model bias factor to obtain the fourth coordinate of the pixel unit on the unit plane. The fourth coordinate is distorted according to the distortion coefficient to obtain the fifth coordinate after distortion. The fifth coordinate is projected onto the original image based on the intrinsic parameter matrix to obtain the second coordinate of the pixel unit on the original image.

4. The distortion correction method for a fisheye lens camera as described in claim 3, characterized in that, The step of back-projecting the first coordinates onto the world coordinate system based on the new intrinsic parameter matrix and the new rotation matrix to obtain the third coordinates of the pixel unit in the world coordinate system includes: When the distortion correction method is projection distortion correction, the inverse projection transformation matrix lKR is obtained, and the expression for lKR is: IKR = (KR).inv; KR=(K new1 ×R new n ); Where KR is the projection transformation matrix; The first coordinate of the pixel unit is back-projected onto the world coordinate system according to the inverse projection transformation matrix IKR, and the third coordinate of the pixel unit on the world coordinate system is obtained.

5. The distortion correction method for a fisheye lens camera as described in claim 3, characterized in that, The step of back-projecting the first coordinates onto the world coordinate system based on the new intrinsic parameter matrix and the new rotation matrix to obtain the third coordinates of the pixel unit in the world coordinate system includes: When the distortion correction method is latitude and longitude distortion correction, the new intrinsic parameter matrix K is obtained. new2 The inverse matrix IK and the new rotation matrix R new n The inverse matrix IR n ; The first coordinates are back-projected onto the sphere based on the inverse matrix IK to obtain the sixth coordinate of the pixel unit on the sphere; The sixth coordinate is determined according to the inverse matrix IR. n Perform rotation to obtain the third coordinate of the pixel unit in the world coordinate system.

6. The distortion correction method for a fisheye lens camera as described in claim 3, characterized in that, The step of normalizing the third coordinate to the unit plane according to the omnidirectional model bias factor to obtain the fourth coordinate of the pixel unit on the unit plane includes: The third coordinate is normalized to the unit sphere to obtain the seventh coordinate of the pixel unit on the unit sphere; The seventh coordinate is biased according to the omnidirectional model bias factor to obtain the eighth coordinate of the pixel unit after biasing; The eighth coordinate is normalized to the unit plane to obtain the fourth coordinate of the pixel unit on the unit plane.

7. The distortion correction method for a fisheye lens camera as described in any one of claims 1-6, characterized in that, The method further includes: The intrinsic and extrinsic parameters of the fisheye lens camera are calibrated using a planar checkerboard grid.

8. A distortion correction device for a fisheye lens camera, characterized in that, include: The first acquisition module is used to acquire the intrinsic parameters and rotation matrix R of the fisheye lens, and to represent the rotation matrix R using Euler angles α, β and γ, where α is the first pitch angle, β is the first rotation angle and γ is the first yaw angle. The second acquisition module is used to set the width of the distorted output image of the fisheye lens to w, the height to h, and the viewing angle to π, divide the distorted output image into w×h pixel units, and obtain the first coordinates (i, j) of each pixel unit in the distorted output image, i = 0, 1, 2...h, j = 0, 1, 2...w; The yaw angle adjustment module is used to set the yaw angle adjustment angle for performing w distortion-corrected back-projection calculations on the distorted output image. Each distortion-corrected back-projection calculation uses a different yaw angle adjustment angle, and the yaw angle adjustment angle used in the nth distortion-corrected back-projection calculation is... Where n = 1, 2, ..., w; The new rotation matrix acquisition module is used to obtain the new rotation matrix R for each distortion-corrected backprojection calculation based on the yaw angle adjustment angle. new n R new n The expression is: R new n =R pitch n ×R word , Among them, R word =R T R T Let R be the inverse of the rotation matrix R. pitch n Represented by Euler angles and The angle transformation matrix formed, α p For the second pitch angle, β p The second rotation angle, This is the second yaw angle used in the nth distortion-free backprojection calculation; The new intrinsic parameter matrix acquisition module is used to obtain the new intrinsic parameter matrix used for distortion correction back projection calculation corresponding to the distortion correction method; The distortion correction backprojection calculation module is used to obtain the second coordinates of the pixel unit on the distortion correction output image backprojected onto the original image based on the intrinsic parameters, the new intrinsic parameter matrix, and the new rotation matrix for each distortion correction backprojection calculation. The distortion correction lookup table generation module is used to generate a distortion correction lookup table for each distortion correction back projection calculation based on the projection relationship between the first coordinate of each pixel unit on the distortion correction output image and the second coordinate on the original image. The distortion removal lookup master table generation module is used to assign the value of the middle column of the distortion removal lookup sub-table generated by the nth distortion removal back projection calculation to the nth column of the distortion removal lookup master table to form the distortion removal lookup master table. The distortion correction module is used to perform distortion correction on the image to be distorted using the distortion correction lookup table, and obtain a distortion correction output image corresponding to the image to be distorted.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the fisheye lens camera distortion correction method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the fisheye lens camera distortion correction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Real-time elimination method for distortion of large-wide-angle fisheye panoramic lens camera

    CN108335273A

  • Distortion correction method for images shot by redundant fisheye cameras

    CN113538283A