A distortion processing method and device applied to an image collected by an image collection device, an electronic device, a storage medium and a program product

By dividing the distorted image into multiple calibration regions and determining the distortion coefficients based on the curvature information of the arc, the problems of block effect and large computational load in traditional lens distortion correction are solved, achieving a more efficient distortion correction effect.

CN121660941BActive Publication Date: 2026-07-10SHANGHAI INTEGRATED CIRCUIT RESEARCH & DEVELOPMENT CENTER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI INTEGRATED CIRCUIT RESEARCH & DEVELOPMENT CENTER CO LTD
Filing Date
2024-09-12
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional lens distortion correction methods, such as the Zhang Zhengyou calibration method, are prone to block effects, resulting in unsatisfactory image correction results and large computational load.

Method used

By dividing the distorted image into multiple calibration regions outward from the brightness center, the distortion coefficients are determined based on the curvature information of the arc lines in each region. The candidate coefficients from multiple distorted images are then used for comprehensive correction, thereby improving the accuracy of distortion coefficient calibration.

Benefits of technology

It improves the accuracy of distortion coefficient calibration results, reduces computational resource consumption, improves image correction effect, and avoids block artifacts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660941B_ABST
    Figure CN121660941B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a distortion processing method and device applied to images collected by an image collection device, electronic equipment, a storage medium and a program product. The method comprises: acquiring a plurality of distorted images; determining a first calibration region of the distorted image based on the luminance information of the distorted image and a preset first division rule; dividing the image region outside the first calibration region of the distorted image into a plurality of second calibration regions located in the periphery of the first calibration region; determining the candidate distortion coefficient corresponding to the pixel points contained in each calibration region of the distorted image based on the curvature information of the arc line contained in the calibration region; and determining the distortion coefficient corresponding to the imaging pixel points of the image collection device based on the candidate distortion coefficient corresponding to the pixel points generated by the imaging pixel points of the image collection device on the plurality of distorted images. The method is used to improve the accuracy of distortion coefficient calibration, thereby improving the effect of distortion correction of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a distortion processing method, apparatus, electronic device, storage medium, and program product for images acquired by an image acquisition device. Background Technology

[0002] Wide-angle lenses produce images with obvious lens distortion, which does not conform to people's visual habits, and the distortion will have a very serious impact on algorithms that rely on image-related information for spatial positioning, target tracking, etc.

[0003] Traditional lens distortion correction mainly uses the Zhang Zhengyou calibration method, which divides the image to be corrected into blocks according to a grid. This division method is inconsistent with the optical characteristics of lens distortion and is prone to block effect (discontinuities appear at the boundaries of blocks, resulting in obvious defects in the reconstructed image and unnatural transitions between blocks).

[0004] It is evident that traditional lens distortion correction methods are ineffective at correcting lens distortion in images. Summary of the Invention

[0005] This application provides a distortion processing method, apparatus, electronic device, storage medium, and program product for images acquired by an image acquisition device, which aims to improve the accuracy of distortion coefficient calibration and thus enhance the distortion correction effect of the image.

[0006] In a first aspect, embodiments of this application provide a distortion processing method for images acquired by an image acquisition device, comprising:

[0007] Multiple distorted images are acquired; wherein the distorted images are obtained by acquiring images of a preset calibration pattern multiple times using an image acquisition device, the image acquisition device includes multiple imaging pixels, and the imaging pixels generate pixels on the distorted images one-to-one.

[0008] For each distorted image, a first calibration region of the distorted image is determined based on the brightness information of the distorted image and a preset first division rule; wherein, the first calibration region includes a sub-pixel matrix divided from the pixel matrix of the distorted image, and the first division rule is used to indicate the position information of the pixel with the highest brightness in the distorted image in the first calibration region of the distorted image, and to indicate the number of pixel rows and the number of pixel columns contained in the first calibration region of the distorted image;

[0009] For each distorted image, based on the first calibration region and the second division rule of the distorted image, the image region outside the first calibration region of the distorted image is divided into multiple layers of second calibration regions located outside the first calibration region; wherein, each layer of second calibration region of the distorted image includes an inner boundary of a rectangle and an outer boundary of a rectangle located outside the inner boundary, and the second division rule is used to indicate the number of pixel rows and the number of pixel columns located between the inner boundary and the outer boundary of each layer of second calibration region;

[0010] For each distorted image, based on the curvature information of the arc contained in each calibration region of the distorted image, candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined; wherein, the arc is the line connecting the first feature points in the calibration region or is obtained by fitting the first feature points in the calibration region to an arc, and the line connecting the first feature points on the calibration pattern is a straight line.

[0011] Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on multiple distorted images, the distortion coefficients corresponding to the imaging pixels of the image acquisition device are determined.

[0012] In one possible implementation, determining the first labeled region of each distorted image based on the brightness information of the distorted image and a preset first segmentation rule includes:

[0013] Determine the image coordinates of the brightest pixel in the distorted image in a preset image coordinate system; wherein the origin of the image coordinate system coincides with the upper left corner of the distorted image, the x-axis of the image coordinate system is parallel to the arrangement direction of the pixel column of the distorted image, and the y-axis of the image coordinate system is parallel to the arrangement direction of the pixel row of the distorted image.

[0014] Based on the image coordinates of the brightest pixel and the first division rule, the first calibration region of the distorted image is determined.

[0015] In one possible implementation, determining the first calibration region of the distorted image based on the image coordinates of the brightest pixel and the first partitioning rule includes:

[0016] Based on the image coordinates of the brightest pixel, determine the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region of the distorted image;

[0017] Based on the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region and the first division rule, the image coordinates of the boundary of the first calibration region are determined.

[0018] In one possible implementation, the curvature information of the arc in the calibration region includes the image coordinates of the center of the arc and its radius;

[0019] For each distorted image, based on the curvature information of the arcs contained in each calibration region of the distorted image, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined, including:

[0020] Based on the curvature information of the arc in the calibration area, the mapped coordinates corresponding to the first feature point on the arc are obtained; wherein, the mapped coordinates are used to indicate the image coordinates of the first feature point on the arc on the straight line mapped by the arc.

[0021] Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc of the calibration region, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined.

[0022] In one possible implementation, obtaining the mapped coordinates corresponding to the first feature point on the arc based on the curvature information of the arc in the calibration region of the distorted image includes:

[0023] Based on the curvature information of the arc in the calibration area and the image coordinates of the first feature point on the arc, the offset ratio corresponding to the first feature point is obtained.

[0024] Based on the image coordinates of the center of the arc, the image coordinates of the first feature point on the arc, the image coordinates of the endpoints of the arc, and the offset ratio corresponding to the first feature point on the arc, the mapped coordinates corresponding to the first feature point on the arc are obtained.

[0025] In one possible implementation, obtaining the offset ratio corresponding to the first feature point based on the curvature information of the arc in the calibration region and the image coordinates of the first feature point on the arc includes:

[0026] The length of the hypotenuse of the first right triangle is calculated using the radius of the arc as the side length of the first right triangle, and the distance between the first feature point on the arc and the center of the arc as the side length of one right-angled side of the first right triangle. The length of the other right-angled side of the first right triangle is then calculated, and the calculated length of the other right-angled side of the first right triangle is used as the y-axis offset ratio corresponding to the first feature point. The first axial distance is the distance between the image coordinates of the first feature point on the arc and the image coordinates of the center of the arc on the x-axis.

[0027] And / or, using the radius of the arc as the side length of the hypotenuse of the second right triangle, using the second axial distance between the first feature point on the arc and the center of the arc as the side length of one leg of the second right triangle, calculating the side length of the other leg of the second right triangle, and using the calculated side length of the other leg of the second right triangle as the x-axis offset ratio corresponding to the first feature point; wherein, the second axial distance is the distance on the y-axis between the image coordinates of the first feature point on the arc and the center of the arc.

[0028] In one possible implementation, obtaining the mapped coordinates corresponding to the first feature point on the arc based on the image coordinates of the center of the arc, the image coordinates of the first feature point on the arc, the image coordinates of the endpoints of the arc, and the offset ratio corresponding to the first feature point on the arc includes:

[0029] Based on the x-axis offset ratio corresponding to the first feature point on the arc, the first axis coordinate distance between the first feature point and the center of the arc, and the third axis distance between the two endpoints of the arc, the x-axis coordinate value of the mapped coordinates corresponding to the first feature point is obtained; wherein, the third axis distance is the distance between the two endpoints of the arc on the x-axis.

[0030] And / or, 511b obtains the coordinate value on the y-axis corresponding to the first feature point based on the y-axis offset ratio corresponding to the first feature point on the arc, the second axis coordinate distance between the first feature point and the center of the arc, and the fourth axis distance between the two endpoints of the arc; wherein, the fourth axis distance is the distance between the two endpoints of the arc on the y-axis.

[0031] Based on the image coordinates corresponding to the first feature point on the arc, the x-axis coordinates of the mapped coordinates corresponding to the first feature point, and / or the y-axis coordinates of the mapped coordinates corresponding to the first feature point, the mapped coordinates corresponding to the first feature point are obtained.

[0032] In one possible implementation, after determining the candidate distortion coefficients corresponding to the pixels contained in the calibration region based on the offset of the image coordinates of the arc of the calibration region, the method further includes...

[0033] If the error value of the candidate distortion coefficient corresponding to the pixel point contained in the calibration area is greater than the preset error threshold, the curvature information of the arc line in the calibration area is updated.

[0034] Based on the updated curvature information of the arc in the calibration area, the mapped coordinates corresponding to the first feature point on the arc are obtained;

[0035] Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc, the offset of the image coordinates of the arc is determined;

[0036] Based on the offset of the image coordinates of the arc line in the calibration region, candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined.

[0037] In one possible implementation, after determining the distortion coefficients corresponding to the imaging pixels of the image acquisition device, the method further includes:

[0038] Based on the distortion coefficients corresponding to each imaging pixel of the image acquisition device, the pixel is distorted using the distortion correction coefficients corresponding to the pixel in the image to be distorted; wherein, the image to be distorted is an image acquired by the image acquisition device.

[0039] In one possible implementation, the first partitioning rule includes: M rows of pixels are arranged on the positive y-axis side of the row containing the brightest pixel, N rows of pixels are arranged on the negative y-axis side of the row containing the brightest pixel, P columns of pixels are arranged on the positive x-axis side of the column containing the brightest pixel, and Q columns of pixels are arranged on the negative x-axis side of the column containing the brightest pixel; wherein M, N, P, and Q are all positive integers greater than 1, and M is equal to N or the difference between M and N is 1, and P is equal to Q or the difference between P and Q is 1.

[0040] In one possible implementation, the second partitioning rule includes: for any second calibration region located in the inner layer, the pixel columns arranged in the positive x-axis direction are H columns, the pixel columns arranged in the negative x-axis direction are H columns, the pixel columns arranged in the positive y-axis direction are K rows, and the pixel columns arranged in the negative y-axis direction are K rows; wherein, the second calibration region located in the inner layer is used to indicate that there is a second calibration region outside the second calibration region, and H and K are both positive integers greater than 1.

[0041] Secondly, embodiments of this application provide a distortion processing apparatus for images acquired by an image acquisition device, comprising:

[0042] An acquisition module is used to acquire multiple distorted images; wherein, the distorted images are obtained by using an image acquisition device to acquire images of a preset calibration pattern multiple times, the image acquisition device includes multiple imaging pixels, and the imaging pixels generate pixels on the distorted images one-to-one.

[0043] The first segmentation module is used to determine a first calibration region of each distorted image based on the brightness information of the distorted image and a preset first segmentation rule. The first calibration region includes a sub-pixel matrix divided from the pixel matrix of the distorted image. The first segmentation rule is used to indicate the position information of the pixel with the highest brightness in the distorted image in the first calibration region of the distorted image, and to indicate the number of pixel rows and the number of pixel columns contained in the first calibration region of the distorted image.

[0044] The second partitioning module is used to partition the image region outside the first calibration region of the distorted image into multiple layers of second calibration regions located outside the first calibration region for each distorted image, based on the first calibration region and the second partitioning rule of the distorted image; wherein, each layer of second calibration region of the distorted image includes an inner boundary of a rectangle and an outer boundary of a rectangle located outside the inner boundary, and the second partitioning rule is used to indicate the number of pixel rows and the number of pixel columns located between the inner boundary and the outer boundary of each layer of second calibration region;

[0045] The candidate calibration module is used to determine the candidate distortion coefficients corresponding to the pixels contained in each calibration region for each distorted image, based on the curvature information of the arc contained in each calibration region of the distorted image; wherein, the arc is the line connecting the first feature points in the calibration region or is obtained by fitting the first feature points in the calibration region to an arc, and the line connecting the first feature points on the calibration pattern is a straight line.

[0046] The calibration output module is used to determine the distortion coefficients corresponding to the imaging pixels of the image acquisition device based on the candidate distortion coefficients corresponding to the imaging pixels of the image acquisition device generated on multiple distorted images.

[0047] Thirdly, embodiments of this application provide a distortion processing device for images acquired by an image acquisition device, comprising: a memory and a processor;

[0048] The memory stores computer-executed instructions;

[0049] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0050] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0051] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0052] The distortion processing method, apparatus, electronic device, storage medium, and program product for images acquired by an image acquisition device provided in this application embodiment acquire multiple distorted images. For each distorted image, the distorted image is divided into a first calibration region containing the brightest pixel and multiple second calibration regions located around the first calibration region. Based on the curvature information of the arc lines contained in each calibration region of the distorted image, candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined. The distortion in the image is the distortion of the axis extending outward from the center of the lens. The distortion patterns and degrees of the images located in the same calibration region are similar. Therefore, by using the distortion coefficients of the specific arc lines in the calibration region, the distortion coefficients corresponding to the pixels in the calibration region where the arc lines are located can be obtained, so that each calibration region has its own corresponding distortion coefficients. Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on the multiple distorted images, the distortion coefficients corresponding to the imaging pixels of the image acquisition device are determined. The image acquisition device generates multiple distorted images, with each pixel in the distorted image corresponding one-to-one with the imaging pixels of the image acquisition device. Therefore, each imaging pixel in the image acquisition device corresponds to multiple candidate distortion coefficients. By comprehensively considering these multiple candidate calibration coefficients corresponding to the imaging pixels, the multiple candidate calibration coefficients can correct errors to a certain extent, thereby improving the accuracy of the distortion coefficients of the imaging pixels. The technical solution described in this invention divides the distorted image into multiple calibration regions, each calibration region corresponding to its own distortion coefficient, thereby improving the accuracy of the distortion coefficient calibration results for the entire image. Attached Figure Description

[0053] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0054] Figure 1 A flowchart illustrating the distortion processing method for images acquired by an image acquisition device provided in this application. Figure 1 ;

[0055] Figure 2 An image of a normal, undistorted grid pattern;

[0056] Figure 3 for Figure 2 The grid pattern in the image undergoes barrel distortion on the distorted image;

[0057] Figure 4 for Figure 2 The grid pattern in the image undergoes pincushion distortion on the distorted image;

[0058] Figure 5 A flowchart illustrating the distortion processing method for images acquired by an image acquisition device provided in this application. Figure 2 ;

[0059] Figure 6 A schematic diagram of the distortion processing device for images acquired by an image acquisition device, as provided in this application;

[0060] Figure 7 A schematic diagram of the structure of the electronic device provided in this application.

[0061] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0063] First, let me explain the terms used in this application:

[0064] Lens distortion refers to image distortion caused by the non-ideal characteristics of an optical system, particularly the inhomogeneity of the lens's shape and material. This distortion typically manifests as straight lines in the image bending during propagation, creating a mirror-like reflection effect. In photography and computer vision, lens distortion affects the geometric accuracy of images and therefore requires correction in many applications.

[0065] Computer vision has become one of the hottest topics in the field of computer science. As people demand greater coverage from cameras, wide-angle lenses will inevitably appear more and more frequently in real life. However, images captured by wide-angle lenses exhibit significant distortion, which does not conform to human visual habits. Therefore, research on image distortion correction techniques is an important research topic in the field of computer vision.

[0066] Image distortion correction involves applying an appropriate distortion model to distorted images acquired by a camera, calculating the model's parameters, and then using the model to remove distortions generated during camera imaging, facilitating subsequent processing in the field of computer vision. However, current methods for distortion calibration of distorted images acquired by a camera involve photographing a calibration board at different angles and positions to obtain multi-view geometric information. Camera calibration algorithms, such as Zhang's algorithm, are then used to calculate the camera's intrinsic parameters (e.g., focal length, principal point coordinates) and distortion coefficients (radial and tangential distortion). Computer vision algorithms are then used to detect corner points on the calibration board and perform sub-pixel refinement. While camera calibration algorithms simplify the mapping relationship to a first-order linear relationship based on lens characteristics, the distortion is more pronounced far from the lens center than near it, making it difficult to match global accuracy using a first-order linear model. Zhang Zhengyou's calibration method divides the image into grid blocks for calibration. However, this division method is inconsistent with the optical characteristics of the lens, easily causing block artifacts (discontinuities appear at the boundaries of blocks, resulting in obvious defects in the reconstructed image and unnatural transitions between blocks). Therefore, to achieve a good correction effect, a large amount of resources / computation is required.

[0067] Based on the above, it can be seen that the Zhang Zhengyou calibration method in the prior art has the technical problem of easily causing block effect (unnatural transition between blocks), resulting in unsatisfactory correction effect of the distortion correction pattern.

[0068] The distortion processing method for images acquired by an image acquisition device provided in this application is based on the distortion model (spherical model / circular model) of lens distortion. It divides the distorted image into multiple calibration regions by correcting it concentrically outward from the brightness center (replacing the block calibration of traditional distortion correction methods). This conforms to the optical characteristics of lens distortion, where the distortion center is located near the center of the image, and the distortion phenomenon occurs symmetrically around the distortion center, consistent with the characteristics of the distortion model. The images in each calibration region exhibit distortion consistency, meaning the distortion patterns and degrees are similar. Therefore, based on the distortion coefficients corresponding to specific distortion patterns within the calibration region, the distortion coefficients of all pixels in that region can be determined. Specifically, by determining the offset of the image coordinate position of the arc contained in each calibration region relative to the straight line mapped from that arc, the distortion coefficients corresponding to the pixels within each calibration region can be determined, thereby improving the block effect. Furthermore, the distortion correction process can be carried out by correcting outwards from the brightness center in concentric circles, which is equivalent to performing outer circle correction on the basis of inner circle correction. In terms of algorithm implementation, the correlation with the inner circle can also be considered to reduce the convergence time. Thus, under the premise of achieving the same correction effect, this application requires less resources / computation compared to traditional strategies. Further, each pixel in the distorted image corresponds to a distortion coefficient, which is the distortion coefficient corresponding to the imaging pixel of the image acquisition device that generated the pixel in the distorted image. Since there are multiple distorted images, each imaging pixel of the image acquisition device corresponds to multiple distortion coefficients. Therefore, the distortion coefficient of each imaging pixel can be determined based on the multiple distortion coefficients corresponding to each imaging pixel. Using the above process, the distortion coefficients corresponding to each imaging pixel of the image acquisition device can be obtained. This completes the calibration of the distortion coefficients of the imaging pixels of the image acquisition device, that is, the calibration of the distortion coefficients of the image to be distorted (the image acquired by the image acquisition device) is completed. Therefore, the corresponding image distortion correction can be performed on the image to be distorted based on the calibrated distortion coefficients. This solves the technical problem that the calibration results of the distortion coefficients are not accurate enough, which leads to unsatisfactory correction effects on the distortion correction pattern.

[0069] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0070] Figure 1 A flowchart illustrating the distortion processing method for images acquired by an image acquisition device provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:

[0071] S101. Obtain multiple distorted images.

[0072] The distorted image is obtained by using an image acquisition device to acquire images of a preset calibration pattern multiple times. The image acquisition device contains multiple imaging pixels, and the imaging pixels generate the pixels on the distorted image one-to-one.

[0073] For example, the executing entity of this embodiment may be an electronic device, a terminal device, a server, or a device or apparatus capable of executing the scheme of this embodiment, and there are no limitations on this.

[0074] Understandably, the distorted image generated by the image acquisition device from the calibration pattern is an image after the calibration pattern has been distorted. Distortion is a shift in the projection of a straight line; that is, a straight line in the calibration pattern should also remain a straight line when projected onto the image. However, due to the existence of distortion, this straight line cannot remain a straight line when projected onto the image. In other words, a straight line in the calibration pattern appears unnaturally deformed in the distorted image, including a straight line being distorted into a curve. Therefore, in this embodiment, the calibration pattern needs to include multiple straight line patterns.

[0075] For example, a calibration pattern refers to a standardized pattern used for distortion correction calibration of an image acquisition device. The calibration pattern can be a checkerboard pattern or a dot matrix pattern. A checkerboard pattern has uniformly distributed corner points, which can contain more distortion variation trends. A checkerboard pattern can be composed of alternating black and white squares, or it can be a grid pattern without color variation (such as all white squares). A dot matrix pattern is composed of regularly arranged dots, and the dots in a dot matrix pattern are arranged in a matrix, which can be used for high-precision calibration.

[0076] Understandably, in digital image processing, pixels on an image (image pixels) are the basic units of a digital image, while the imaging pixels of an image acquisition device (imaging pixels) are the basic units that generate the pixels in the image. Pixels on an image are usually represented as a pixel matrix because the two-dimensional nature of images is suitable for organization and processing using matrices. The imaging pixels of an image acquisition device are closely related to the pixel matrix of its output image; the imaging pixels determine the size of the image matrix, that is, the number of rows and columns of pixels. For example, an image acquisition device with 640x480 pixels can capture an image with 640 rows and 480 columns, which is represented in a computer as a 640x480 matrix.

[0077] In this embodiment, multiple distorted images are acquired. These can be multiple calibration patterns obtained by acquiring images of the same calibration pattern from different angles, or multiple calibration patterns obtained by acquiring images of different calibration patterns from different angles. Thus, multiple distorted images can provide more data samples. By acquiring images under different angles, distances, and lighting conditions, calibration errors can be reduced and calibration accuracy can be improved.

[0078] S102. For each distorted image, determine the first calibration region of the distorted image based on the brightness information of the distorted image and the preset first division rule.

[0079] The first calibration region includes a sub-pixel matrix divided from the pixel matrix of the distorted image. The first division rule is used to indicate the position information of the brightest pixel in the distorted image in the first calibration region of the distorted image, and to indicate the number of pixel rows and the number of pixel columns contained in the first calibration region of the distorted image.

[0080] For example, a distorted image is a raw data file obtained directly from an image acquisition device without image processing; for instance, a distorted image might be in RAW format. The brightest pixel in the distorted image is the pixel with the highest brightness value. For RAW format distorted images, brightness is directly related to the DN (Digital Number) value. Therefore, in RAW image processing, the DN value is a general term for pixel values, typically used to describe pixel values ​​not calibrated to meaningful units. The DN value is directly related to the image's brightness; higher DN values ​​generally correspond to brighter areas, while lower DN values ​​correspond to darker areas. DN values ​​can be converted into quantifiable and analyzable brightness values. Of course, for distorted images in other image formats, a method corresponding to the distorted image format can be used to determine the brightest pixel in the image.

[0081] In the first partitioning rule, the position information of the brightest pixel in the first calibration region of the distorted image can be the row and column positions of the brightest pixel in the sub-pixel matrix. For example, the brightest pixel might be in row 5 and column 5 of the sub-pixel matrix. After determining the brightest pixel in the image, based on the position of the brightest pixel in the sub-pixel matrix and the number of rows and columns of the sub-pixel matrix in the first partitioning rule, pixels in the same row and column as the brightest pixel are determined. Then, based on the row and column of the brightest pixel, the starting row, ending row, starting column, and ending column of the sub-pixel matrix are determined, thereby defining the boundary of the first calibration region.

[0082] S103. For each distorted image, based on the first calibration region and the second division rule of the distorted image, the image region outside the first calibration region of the distorted image is divided into multiple layers of second calibration regions located outside the first calibration region.

[0083] The second calibration region of each layer of the distorted image includes an inner boundary of a rectangle and an outer boundary of a rectangle located outside the inner boundary. The second division rule is used to indicate the number of pixel rows and the number of pixel columns located between the inner and outer boundaries of the second calibration region of each layer.

[0084] For example, multiple nested rectangular boundaries are divided on the distorted image. The boundary of the first calibration region is the inner boundary of the second calibration region of the first layer. The inner boundary of the outer second calibration region of each pair of adjacent second calibration regions is the outer boundary of the inner calibration region. That is to say, the first rectangular boundary of the innermost layer defines the pixels of the first calibration region. The first rectangular boundary and the second rectangular boundary define the second calibration region of the first layer. The second rectangular boundary and the third rectangular boundary define the second calibration region of the second layer, and so on. Of course, there are no real boundaries here, only the regions divided in the distorted image are recorded.

[0085] The pixel rows of the pixel matrix in the distorted image are arranged in a left-right direction, and the pixel columns are arranged in a top-bottom direction. The number of pixel rows and columns between the boundary and outer boundary of each second calibration region refers to the number of pixel columns located to the left, right, top, and bottom of the first calibration region within each calibration region. For example, for a distorted image with 1920×1080 pixels (1920 rows × 1080 columns), the first calibration region of this distorted image can include 100×100 pixels, and the second calibration region can also divide the pixels of the distorted image into 100 rows × 100 columns, until all pixels on the distorted image are divided.

[0086] Understandably, such as Figures 2 to 4 As shown, Figure 2 Image 20 shows a normal, distortion-free mesh pattern. Figure 3 The left-hand side of the attached image shows image 21 of a grid pattern with barrel distortion, and the right-hand side shows image 22 of a grid pattern with pincushion distortion. Pincushion distortion, also known as saddle distortion, has a magnification of the edge region in the field of view that is much greater than that of the central region of the optical axis. In barrel distortion, the magnification of the central region of the optical axis in the field of view is much greater than that of the edge region. Figure 4 The attached figure on the left shows 21A of the middle left side. Figure 3 A schematic diagram of the calibration region in the distorted image 21 showing barrel distortion, with the attached diagram on the right illustrating the division of the calibration region. Figure 3 The diagram 22A illustrates the division of calibration regions in a distorted image 22 exhibiting pincushion distortion, with the rectangular dashed frame representing the boundary of the calibration region. Since the distortion in the image originates along an axis extending outward from the lens center, it is more curved further away from the lens center than closer to it. The degree of distortion on the same ring of the lens is not significantly different; that is, the distortion pattern in the distorted image spreads from the pixel with the highest brightness as the distortion center (distortion initiation position) outwards to pixels surrounding the highest brightness pixel. Therefore, in this embodiment, each distorted image is divided into a first calibration region containing the highest brightness pixel and multiple second calibration regions located outside the first calibration region. Images located within the same calibration region exhibit distortion consistency, meaning the distortion pattern and degree are similar. Thus, based on the distortion coefficients corresponding to a specific distortion pattern within the calibration region, the distortion coefficients of all pixels in that calibration region can be determined without individually identifying each pixel.

[0087] S104. For each distorted image, based on the curvature information of the arc contained in each calibration region of the distorted image, determine the candidate distortion coefficients corresponding to the pixels contained in the calibration region.

[0088] Among them, the arc is the line connecting the first feature points in the calibration area or the arc fitting of the first feature points in the calibration area. The line connecting the first feature points on the calibration pattern is a straight line.

[0089] For example, the calibration pattern can be a checkerboard pattern, where the first feature point can be a feature point located at a corner of the checkerboard, and the arcs contained in the calibration region can be arcs fitted by connecting the edges of the corner checkerboard points in the same row or column. The calibration pattern can also be a dot plot array, where the first feature point can be a point in the dot plot array, and a subset of feature points are selected from the dot plot array and connected to form arcs in each calibration region. The calibration region can contain multiple arcs, and one or more arcs can be selected from these to participate in the calculation of candidate distortion coefficients. Figure 4 As shown, the distorted image 21 is divided into multiple calibration regions. Taking the second calibration regions located in the first layer and the second calibration regions located in the second layer as examples, the arcs in the second calibration region of the first layer are thickened arcs a, and the arcs in the second calibration region of the second layer are thickened arcs b. That is, one or more relatively complete arcs can be selected from each calibration region, and the selected arcs should contain as many pixels as possible within the calibration region. It is worth noting that the thickening is only for indicating arcs a and b; in the actual correction pattern, the thickness of each straight line is as uniform as possible.

[0090] Here, the distortion coefficient is used to indicate the offset of the distorted pattern on the image relative to the normal pattern. The distortion coefficient of a pixel refers to the offset (image coordinate deviation) of the current image position (image coordinates) of a pixel in the image relative to the correct image position (mapped coordinates).

[0091] The current image position of the first feature point in the distorted image is offset from its correct image position, resulting in an arc instead of a straight line connecting multiple first feature points. The curvature information of the arc reflects the offset of the arc relative to a straight line. Therefore, based on the curvature information of the arc, the offset of the current image position of the first feature point on the arc relative to its correct image position can be obtained. Thus, based on the offset of one or more first feature points on the arc, the offset of the arc (its pixel value) can be obtained. Images located in the same calibration region have consistent distortion; the offset of the arc within the same calibration region is the offset of the pixel value within that calibration region, which is also the candidate calibration coefficient for the pixel value contained in that calibration region. It is understood that this embodiment includes multiple distorted images; therefore, the calibration coefficient obtained through the calibration region of one distorted image is a candidate calibration coefficient for that calibration region, not the final candidate calibration coefficient.

[0092] S105. Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on multiple distorted images, determine the distortion coefficients corresponding to the imaging pixels of the image acquisition device.

[0093] It is understandable that the imaging pixels of the image acquisition device correspond one-to-one with the pixels of each distorted image. Each pixel of a distorted image corresponds to a candidate distortion coefficient. Therefore, the number of candidate distortion coefficients corresponds to the number of imaging pixels of the image acquisition device. The distortion coefficient of each imaging pixel is determined based on the multiple candidate calibration coefficients corresponding to each imaging pixel. This comprehensively considers multiple candidate calibration coefficients, which can correct errors to a certain extent and improve the accuracy of the distortion coefficients of the imaging pixels.

[0094] For example, the average calibration coefficient of multiple candidate calibration coefficients corresponding to each imaging pixel can be determined as the calibration coefficient of each imaging pixel.

[0095] The distortion processing method for images acquired by an image acquisition device provided in this application involves acquiring multiple distorted images. For each distorted image, it is divided into a first calibration region containing the brightest pixel and multiple second calibration regions located around the first calibration regions. Based on the curvature information of the arcs contained in each calibration region of the distorted image, candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined. The distortion in the image is the distortion of the axis extending outward from the center of the lens. Images located in the same calibration region have similar distortion patterns and degrees. Therefore, by using the distortion coefficients of the specific arcs in the calibration region, the distortion coefficients corresponding to the pixels in the calibration region where the arcs are located can be obtained, so that each calibration region has its own corresponding distortion coefficients. Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on the multiple distorted images, the distortion coefficients corresponding to the imaging pixels of the image acquisition device are determined. The image acquisition device generates multiple distorted images, with each pixel in the distorted image corresponding one-to-one with the imaging pixels of the image acquisition device. Therefore, each imaging pixel in the image acquisition device corresponds to multiple candidate distortion coefficients. By comprehensively considering these multiple candidate calibration coefficients corresponding to the imaging pixels, the multiple candidate calibration coefficients can correct errors to a certain extent, thereby improving the accuracy of the distortion coefficients of the imaging pixels. The technical solution of this invention improves the accuracy of the distortion coefficient calibration results of the entire image by dividing the distorted image into multiple calibration regions, each calibration region corresponding to its own distortion coefficient.

[0096] Figure 5 The flowchart provided in this application illustrates the distortion processing of images acquired by an image acquisition device. Figure 2 ,like Figure 5 As shown, in this embodiment... Figure 5 Based on the embodiments, the method includes:

[0097] S501, Acquire multiple distorted images.

[0098] For example, the executing entity of this embodiment may be an electronic device, a terminal device, a server, or a device or apparatus capable of executing the scheme of this embodiment, and there are no limitations on this.

[0099] For example, this step is a subset of step S101 described above, and will not be repeated here.

[0100] S502. Determine the image coordinates of the brightest pixel in the distorted image in the preset image coordinate system.

[0101] In this system, the origin of the image coordinate system coincides with the top-left corner of the distorted image; the x-axis of the image coordinate system is parallel to the direction of the pixel column arrangement in the distorted image; and the y-axis of the image coordinate system is parallel to the direction of the pixel row arrangement in the distorted image. (See attached image.) Figure 3 For example, the x-axis can be parallel to the attached axis. Figure 3 The left and right directions of 21 represent the arrangement direction of the pixel array in the distorted image, and the y-axis can be an auxiliary axis. Figure 3 The vertical direction of 21 indicates the arrangement direction of the pixel rows in the distorted image.

[0102] Gradient search is a technique in image processing used to calculate the gradient of brightness changes in an image. The image gradient describes the direction and magnitude of the brightness change at each pixel in the image. The larger the gradient value, the more drastic the brightness change. Therefore, the gradient search algorithm can be used to find the pixel with the highest brightness in the distorted image.

[0103] S503. For each distorted image, based on the brightness information of the distorted image and the preset first division rule, determine the first calibration region of the distorted image.

[0104] The boundary of the first calibration region is defined by the image coordinates of the pixels located on the boundary of the first calibration region.

[0105] In one example, the first partitioning rule described in step S503 above may include: M rows of pixels are arranged on the positive y-axis side of the row containing the brightest pixel, N rows of pixels are arranged on the negative y-axis side of the row containing the brightest pixel, P columns of pixels are arranged on the positive x-axis side of the column containing the brightest pixel, and Q columns of pixels are arranged on the negative x-axis side of the column containing the brightest pixel; wherein M, N, P, and Q are all positive integers greater than 1, and M is equal to N or the difference between M and N is 1, and P is equal to Q or the difference between P and Q is 1;

[0106] It is understandable that, in terms of the distorted image acquisition method of this embodiment, the brightest pixel in the distorted image is likely located near (or coincides with) the distortion start point of the distorted image. Generally, it is also located at or near the center of the distorted image. In this embodiment, the row where the brightest pixel is located is taken as the middle row or the row above or below the middle row, and the column where the brightest pixel is located is taken as the middle column or the left or right column of the middle column of the first calibration area. That is, the brightest pixel is set at the center (near the center) of the distorted image to ensure that the first calibration area is the central area (starting area) of the image distortion and to ensure that the distortion patterns and degrees of the pixels in the first calibration area are similar.

[0107] Step S503 above may include the following process:

[0108] Based on the image coordinates of the brightest pixel, determine the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region of the distorted image;

[0109] Based on the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region and the first division rule, the image coordinates of the boundary of the first calibration region are determined.

[0110] Understandably, given the image coordinates of the brightest pixel, the image coordinates of pixels located on the boundary of the first distorted image can be determined based on the pixel's side length, the number of pixel rows, the number of pixel columns, and the unit length on the coordinate axes of the image coordinate system. This also allows for the determination of the image coordinates of pixels within the first calibration region, and the recording of the relationship between the image coordinates of pixels in the first calibration region and the first calibration region itself.

[0111] S504. For each distorted image, based on the first calibration region and the second division rule of the distorted image, the image region outside the first calibration region of the distorted image is divided into multiple layers of second calibration regions located outside the first calibration region.

[0112] In one example, step S504 above may include the following process:

[0113] Based on the image coordinates of the boundary of the first calibration region in the distorted image and the second division rule, the image coordinates of the outer boundary of the second calibration region of the first layer in the distorted image are determined; wherein, the second calibration region of the first layer of the distorted image is adjacent to the first calibration region, and the image coordinates of the outer boundary of the second calibration region are the image coordinates of the pixel located at the outer boundary of the second calibration region;

[0114] Based on the image coordinates of the outer boundary of the second calibration region of the first layer and the second division rule, the image coordinates of the outer boundary of the second calibration region of the second layer are determined; wherein, the second calibration region of the second layer is located outside the second calibration region of the first layer and is adjacent to the second calibration region of the first layer;

[0115] For the second calibration region of the (i+1)th layer, the image coordinates of the outer boundary of the second calibration region of the i-th layer are determined based on the image coordinates of the outer boundary of the second calibration region of the i-th layer and the second division rule; where i is a positive integer greater than or equal to 2, and the second calibration region of the (i+1)th layer is located outside the second calibration region of the i-th layer and is adjacent to the second calibration region of the i-th layer.

[0116] Similar to the first calibration region mentioned above, the inner and outer boundaries of the second calibration region are defined by the image coordinates of the pixels located at the boundaries of the second calibration region.

[0117] In one example, the second partitioning rule in step S504 above may include: for any second calibration region located in the inner layer, the column of pixels arranged in the positive x-axis direction is H columns, the column of pixels arranged in the negative x-axis direction is H columns, the column of pixels arranged in the positive y-axis direction is K rows, and the column of pixels arranged in the negative y-axis direction is K rows; wherein, the second calibration region located in the inner layer is used to indicate that there is a second calibration region outside the second calibration region, and H and K are both positive integers greater than 1.

[0118] It is understood that in this embodiment, the second calibration regions of each layer are referred to as symmetrical structures to ensure that the distortion patterns and degrees of pixels within the first calibration region are similar. Of course, since the first calibration region may not be located in the middle of the distorted image, the outermost second image calibration region can be an asymmetrical structure.

[0119] S505. For each distorted image, based on the curvature information of the arc contained in each calibration region of the distorted image, determine the candidate distortion coefficients corresponding to the pixels contained in the calibration region.

[0120] The mapped coordinates are used to indicate the mapped coordinates of the first feature point on the straight line mapped from the arc, where the straight line is the straight line mapped from the arc.

[0121] It is understandable that the first feature point is a feature point on the arc of the calibration area of ​​the distorted image. The image coordinates of this feature point are the image coordinates of the feature point in the preset image coordinate system. The mapped coordinates are the image coordinates of the first feature point on the straight line when the arc is mapped to a straight line. The offset of the mapped coordinates from the image coordinates reflects the positional relationship between the arc and the straight line. This positional relationship reflects the curvature information of the arc in the calibration area, and the curvature information of the arc reflects the degree of distortion in the calibration area.

[0122] In one example, step S505 above may include the following process:

[0123] Step 511: Based on the curvature information of the arc in the calibration area, obtain the mapped coordinates corresponding to the first feature point on the arc. The mapped coordinates indicate the image coordinates of the first feature point on the arc on the straight line mapped from the arc.

[0124] Understandably, the first feature point on the arc is a feature point on the calibration pattern. These first feature points should be straight lines in the image, but in the actual distorted image, these first feature points are not on the same straight line. Therefore, the mapping coordinates of the first feature points are estimated here based on the curvature information of the arc. These mapping coordinates are the image coordinates of the feature points on the calibration pattern when no distortion occurs.

[0125] Step 512: Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc of the calibration region, determine the candidate distortion coefficients corresponding to the pixels contained in the calibration region.

[0126] Understandably, the coordinate offset of the first feature point can be determined based on the image coordinates and mapped coordinates corresponding to the first feature point, and the candidate distortion coefficients corresponding to the pixels contained in each calibration region can be determined based on the coordinate offset of the first feature point in each calibration region of each distorted image.

[0127] In one example, step 511 above may include the following process:

[0128] Based on the curvature information of the arc in the calibration area and the image coordinates of the first feature point on the arc, the offset ratio corresponding to the first feature point is obtained.

[0129] Based on the image coordinates of the center of the arc, the image coordinates of the first feature point on the arc, the image coordinates of the endpoints of the arc, and the offset ratio corresponding to the first feature point on the arc, the mapped coordinates corresponding to the first feature point on the arc are obtained.

[0130] Understandably, in this example, the curvature information of the arc and the image coordinates of the first feature point on the arc are used to construct a mathematical model of the image coordinates and mapped coordinates of the first feature point. Based on the constructed mathematical model, the mapped coordinates corresponding to the first feature point of the arc are estimated.

[0131] For example, the distortion processing methods applied to images acquired by the image acquisition device include three modes: single-constraint x-axis mode, single-constraint y-axis mode, and double-constraint mode. The single-constraint x-axis mode involves updating (correcting) the x-axis coordinates of each pixel in the image generated by the image acquisition device while maintaining the y-axis coordinates. Therefore, for the single-constraint x-axis mode, the updated x-axis coordinates of the first feature point can be obtained based on the curvature information of the arc in the calibration region of the distorted image. Correspondingly, when correcting the imaging pixels in the calibration region, only the x-axis coordinates are corrected, not the y-axis coordinates. Single-constraint y-axis mode refers to a method of distorting the image generated by the image acquisition device by updating (correcting) the y-axis coordinates of each pixel while keeping the x-axis coordinates unchanged. Therefore, for single-constraint y-axis mode, the updated y-axis coordinates of the first feature point are obtained based on the curvature information of the arc in the calibration region of the distorted image. Correspondingly, when correcting the imaging pixels in this calibration region, only the y-axis coordinates are corrected, not the x-axis coordinates. Double-constraint mode refers to updating both the x-axis and y-axis coordinates of each pixel in the image generated by the image acquisition device. For double-constraint mode, the updated x-axis and y-axis coordinates of the first feature point are obtained based on the curvature information of the arc in the calibration region of the distorted image. Correspondingly, when correcting the imaging pixels in this calibration region, both the x-axis and y-axis coordinates are corrected.

[0132] In one example, the image distortion is handled in a single-constraint x-axis mode. The distortion coefficient indicates the offset of the x-axis coordinate value of a pixel in the distorted image. Determining the mapped coordinates of the first feature point on the arc involves updating the x-axis coordinate value of the first feature point while keeping the y-axis coordinate value unchanged; that is, determining the x-axis coordinate value of the mapped coordinates corresponding to the first feature point on the arc.

[0133] In this example, the offset ratio corresponding to the first feature point on the arc is the x-axis offset ratio corresponding to the first feature point on the arc. In step 511 above, obtaining the offset ratio corresponding to the first feature point can include:

[0134] The radius of the arc is taken as the hypotenuse of the second right triangle. The distance between the first feature point on the arc and the center of the arc along the second axis is taken as the length of one leg of the second right triangle. The length of the other leg of the second right triangle is calculated. The length of the other leg of the second right triangle is taken as the x-axis offset ratio corresponding to the first feature point. The distance along the second axis is the distance between the image coordinates of the first feature point on the arc and the center of the arc on the y-axis.

[0135] For example, the offset ratio corresponding to the first feature point can be expressed by the following formula:

[0136]

[0137] In the formula:

[0138] x _new This represents the x-axis offset ratio corresponding to the first feature point;

[0139] R is the radius of the arc;

[0140] h is the distance between the first feature point and the center of the circle on the y-axis.

[0141] Furthermore, in this example, obtaining the mapped coordinates corresponding to the first feature point on the arc in step 511 above can include:

[0142] Based on the x-axis offset ratio corresponding to the first feature point on the arc, the first-axis coordinate distance between the first feature point and the center of the arc, and the third-axis distance between the two endpoints of the arc, the x-axis coordinate value of the mapped coordinates corresponding to the first feature point is obtained; where the third-axis distance is the distance between the two endpoints of the arc on the x-axis.

[0143] Based on the image coordinates of the first feature point on the arc and the x-axis coordinates of the mapped coordinates of the first feature point, the mapped coordinates of the first feature point on the arc are obtained.

[0144] For example, the x-axis coordinates of the mapped coordinates corresponding to the first feature point can be expressed by the following formula:

[0145]

[0146] In the formula:

[0147] x _new The x-coordinate value of the mapped coordinates corresponding to the first feature point;

[0148] x _max The offset ratio of the first feature point on the x-axis;

[0149] x _diseThe distance between the image coordinates of the first feature point and the center of the arc on the y-axis (the distance on the second axis);

[0150] ROI _x The distance between the two endpoints of the arc on the x-axis (third axis distance).

[0151] In another example, the image distortion is handled using a single-constraint y-axis mode. The distortion coefficient indicates the offset of the y-axis coordinate value of a pixel in the distorted image. Determining the mapped coordinates of the first feature point on the arc involves updating the y-axis coordinate value of the first feature point while keeping the x-axis coordinate value unchanged; that is, determining the y-axis coordinate value in the mapped coordinates of the first feature point on the arc.

[0152] In this example, the offset ratio corresponding to the first feature point on the arc is the y-axis offset ratio corresponding to the first feature point on the arc. In step 511 above, obtaining the offset ratio corresponding to the first feature point can include:

[0153] The length of the hypotenuse of the first right triangle is calculated using the radius of the arc as the side length, and the distance between the first feature point on the arc and the center of the arc as the side length of one leg of the first right triangle. The length of the other leg of the first right triangle is then calculated, and the calculated length of the other leg of the first right triangle is used as the y-axis offset ratio corresponding to the first feature point. Here, the distance along the first axis is the distance between the image coordinates of the first feature point on the arc and the image coordinates of the center of the arc on the x-axis.

[0154] For example, the offset ratio corresponding to the first feature point can be expressed by the following formula:

[0155]

[0156] In the formula:

[0157] y _max This represents the y-axis offset ratio corresponding to the first feature point;

[0158] R is the radius of the arc;

[0159] w is the distance on the x-axis (first axis distance) between the image coordinates of the first feature point on the arc and the image coordinates of the center of the circle.

[0160] Furthermore, in this example, obtaining the mapped coordinates corresponding to the first feature point on the arc in step 511 above can include:

[0161] Based on the x-axis offset ratio corresponding to the first feature point on the arc, the first-axis coordinate distance between the first feature point and the center of the arc, and the third-axis distance between the two endpoints of the arc, the x-axis coordinate value of the mapped coordinates corresponding to the first feature point is obtained; where the third-axis distance is the distance between the two endpoints of the arc on the x-axis.

[0162] Based on the image coordinates of the first feature point on the arc and the x-axis coordinates of the mapped coordinates of the first feature point, the mapped coordinates of the first feature point on the arc are obtained.

[0163] For example, the y-axis coordinates of the mapped coordinates corresponding to the first feature point can be expressed by the following formula:

[0164]

[0165] In the formula:

[0166] y _new The y-coordinate value of the mapped coordinates corresponding to the first feature point;

[0167] y _max The offset ratio of the first feature point on the y-axis;

[0168] y _dise The distance between the image coordinates of the first feature point and the center of the arc on the y-axis (the distance on the second axis);

[0169] ROI _y This is the distance between the two endpoints of the arc on the y-axis (fourth axis distance).

[0170] In another example, the image distortion is handled in a double-constraint mode. The distortion coefficients indicate the x-axis and y-axis coordinates of the pixels in the distorted image. Determining the mapped coordinates of the first feature point on the arc involves updating the x-axis and y-axis coordinates of that first feature point in the image coordinates; that is, determining the x-axis and y-axis coordinates of the mapped coordinates of the first feature point on the arc.

[0171] In this example, the offset ratio corresponding to the first feature point on the arc is the x-axis and y-axis offset ratio corresponding to the first feature point on the arc. Since the process of determining the offset ratios corresponding to the x-axis and y-axis coordinate values ​​in the image coordinate system is the same as the calculation process in the example above, it will not be repeated here.

[0172] Furthermore, in this example, obtaining the mapped coordinates corresponding to the first feature point on the arc in step 511 above can include:

[0173] Based on the x-axis offset ratio corresponding to the first feature point on the arc, the distance between the first feature point and the center of the arc on the x-axis, and the distance between the two endpoints of the arc on the x-axis, the x-axis coordinate value of the first feature point on the arc is obtained in the mapped coordinate system. Since the process of determining the x-axis coordinate value of the first feature point is the same as the calculation process in the example above, it will not be repeated here.

[0174] Based on the y-axis offset ratio corresponding to the first feature point on the arc, the distance between the first feature point and the center of the arc on the y-axis, and the distance between the two endpoints of the arc on the y-axis, the y-axis coordinate value of the first feature point on the arc is obtained in the mapped coordinate system. Since the process of determining the y-axis coordinate value of the first feature point is the same as the calculation process in the example above, it will not be repeated here.

[0175] Based on the updated x-axis and y-axis coordinates of the first feature point on the arc, the mapped coordinates of the first feature point on the arc are obtained.

[0176] In this way, we will get two mapped coordinates. The x-axis coordinate of one mapped coordinate remains unchanged, while the y-axis coordinate is updated. The y-axis coordinate of the other mapped coordinate remains unchanged, while the x-axis coordinate is updated. Here, the coordinates of the two mapped coordinates are averaged to obtain the mapped coordinates corresponding to the first feature point.

[0177] S506. Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on multiple distorted images, determine the distortion coefficients corresponding to the imaging pixels of the image acquisition device.

[0178] For example, this step is a subset of step S105 described above, and will not be repeated here.

[0179] S507. Based on the distortion coefficients corresponding to each imaging pixel of the image acquisition device, the distortion correction coefficients corresponding to the pixel in the image to be distorted are used to correct the distortion of the pixel; wherein, the image to be distorted is an image acquired by the image acquisition device.

[0180] It is understood that in this embodiment, the distorted image is divided into multiple calibration regions. The distortion coefficients corresponding to the pixels in each calibration region are determined by the arcs contained in each calibration region. In other words, the distortion coefficients corresponding to each pixel in the distorted image are determined. Since each pixel in the distorted image corresponds one-to-one with the imaging pixels of the image acquisition device, the distortion coefficients corresponding to the pixels in the distorted image are the same as the distortion coefficients corresponding to the imaging pixels of the image acquisition device. The accuracy of the distortion coefficients corresponding to the pixels in each calibration region is high, thereby improving the accuracy of distortion correction of the image to be distorted.

[0181] The distortion processing method for images acquired by an image acquisition device provided in this application involves acquiring multiple distorted images. For each distorted image, it is divided into a first calibration region containing the brightest pixel and multiple second calibration regions located around the periphery of the first calibration regions. The brightest pixel is located at the center (near the center) of the first calibration region, which serves as the central region of image distortion. Each layer of the second calibration regions is symmetrical in both rows and columns. Based on the curvature information of the arcs contained in each calibration region of the distorted image, candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined. The distortion in the image is the distortion of the axis extending outward from the center of the lens. The distortion patterns and degrees of the images located in the same calibration region are similar. Therefore, by using the distortion coefficients of the specific arcs in the calibration region, the distortion coefficients corresponding to the pixels in the calibration region where the arcs are located can be obtained, so that each calibration region has its own corresponding distortion coefficient. Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on the multiple distorted images, the distortion coefficients corresponding to the imaging pixels of the image acquisition device are determined. The image acquisition device generates multiple distorted images, with each pixel in the distorted image corresponding one-to-one with the imaging pixels of the image acquisition device. Therefore, each imaging pixel in the image acquisition device corresponds to multiple candidate distortion coefficients. By comprehensively considering these multiple candidate calibration coefficients corresponding to the imaging pixels, the multiple candidate calibration coefficients can correct errors to a certain extent, thereby improving the accuracy of the distortion coefficients of the imaging pixels. The technical solution of this invention divides the distorted image into multiple calibration regions, each calibration region corresponding to its own distortion coefficient, thus improving the accuracy of the distortion coefficient calibration results for the entire image. Using the obtained distortion coefficients corresponding to each imaging pixel of the image acquisition device, the pixels on the image to be distorted and corrected generated by each imaging pixel are corrected one-to-one, thereby improving the accuracy of the correction results.

[0182] Figure 6 A schematic diagram of the distortion processing device for images acquired by an image acquisition device provided in this application is shown below. Figure 6 As shown, the image distortion correction processing device 60 provided in this embodiment includes:

[0183] The acquisition module 601 is used to acquire multiple distorted images; wherein, the distorted images are obtained by using an image acquisition device to acquire images of a preset calibration pattern multiple times, and the image acquisition device contains multiple imaging pixels, and the imaging pixels generate pixels on the distorted images one-to-one.

[0184] The first segmentation module 602 is used to determine a first calibration region of the distorted image for each distorted image based on the brightness information of the distorted image and a preset first segmentation rule; wherein, the first calibration region includes a sub-pixel matrix divided from the pixel matrix of the distorted image, and the first segmentation rule is used to indicate the position information of the pixel with the highest brightness in the distorted image in the first calibration region of the distorted image, and to indicate the number of pixel rows and the number of pixel columns contained in the first calibration region of the distorted image;

[0185] The second partitioning module 603 is used to partition the image region outside the first calibration region of the distorted image into multiple layers of second calibration regions located outside the first calibration region for each distorted image, based on the first calibration region and the second partitioning rule of the distorted image; wherein, each layer of second calibration region of the distorted image includes an inner boundary of a rectangle and an outer boundary of a rectangle located outside the inner boundary, and the second partitioning rule is used to indicate the number of pixel rows and the number of pixel columns located between the inner boundary and the outer boundary of each layer of second calibration region;

[0186] The candidate calibration module 604 is used to determine the candidate distortion coefficients corresponding to the pixels contained in the calibration region for each distorted image based on the curvature information of the arc contained in each calibration region of the distorted image; wherein, the arc is the line connecting the first feature points in the calibration region or is obtained by fitting the first feature points in the calibration region to an arc, and the line connecting the first feature points on the calibration pattern is a straight line.

[0187] The calibration output module 605 is used to determine the distortion coefficients corresponding to the imaging pixels of the image acquisition device based on the candidate distortion coefficients corresponding to the imaging pixels of the image acquisition device generated on multiple distorted images.

[0188] In one possible implementation, the first partitioning module 602 is used to determine the brightest pixel in the distorted image using a gradient search algorithm, and to determine the image coordinates of the brightest pixel in a preset image coordinate system; wherein the origin of the image coordinate system coincides with the upper left corner of the distorted image, the x-axis of the image coordinate system is parallel to the arrangement direction of the pixel column of the distorted image, and the y-axis of the image coordinate system is parallel to the arrangement direction of the pixel row of the distorted image.

[0189] Based on the image coordinates of the brightest pixel and the first division rule, the image coordinates of the boundary of the first calibration region are determined to determine the first calibration region of the distorted image; wherein, the image coordinates of the boundary of the first calibration region are the image coordinates of the pixel located on the boundary of the first calibration region.

[0190] In one possible implementation, the first partitioning module 602 is used to determine the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region of the distorted image, based on the image coordinates of the brightest pixel.

[0191] Based on the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region and the first division rule, the image coordinates of the boundary of the first calibration region are determined.

[0192] In one possible implementation, the first partitioning rule includes: M rows of pixels are arranged on the positive y-axis side of the row containing the brightest pixel, N rows of pixels are arranged on the negative y-axis side of the row containing the brightest pixel, P columns of pixels are arranged on the positive x-axis side of the column containing the brightest pixel, and Q columns of pixels are arranged on the negative x-axis side of the column containing the brightest pixel; wherein M, N, P, and Q are all positive integers greater than 1, and M is equal to N or the difference between M and N is 1, and P is equal to Q or the difference between P and Q is 1.

[0193] In one possible implementation, the second partitioning rule includes: for any second calibration region located in the inner layer, the column of pixels arranged in the positive x-axis direction is H columns, the column of pixels arranged in the negative x-axis direction is H columns, the column of pixels arranged in the positive y-axis direction is K rows, and the column of pixels arranged in the negative y-axis direction is K rows; wherein, the second calibration region located in the inner layer is used to indicate that there is a second calibration region outside the second calibration region, and H and K are both positive integers greater than 1.

[0194] In one possible implementation, the candidate calibration module 604 is used to determine, for each distorted image, candidate distortion coefficients corresponding to pixels in the calibration region based on the curvature information of the arcs contained in each calibration region of the distorted image, including:

[0195] Based on the curvature information of the arc line in the calibration region of the distorted image, the mapped coordinates corresponding to the first feature point on the arc line are obtained; wherein, the mapped coordinates are used to indicate the mapped coordinates of the first feature point on the straight line mapped by the arc line.

[0196] Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc, the offset of the image coordinates of the arc is determined.

[0197] Based on the offset of the image coordinates of the arc in the calibration region, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined.

[0198] In one possible implementation, the candidate calibration module 604 is used to obtain the offset ratio corresponding to the first feature point based on the curvature information of the arc of the calibration region and the image coordinates of the first feature point on the arc.

[0199] Based on the image coordinates of the center of the arc, the image coordinates of the first feature point on the arc, the image coordinates of the endpoints of the arc, and the offset ratio corresponding to the first feature point on the arc, the mapped coordinates corresponding to the first feature point on the arc are obtained.

[0200] In one possible implementation, the candidate calibration module 604 is used to calculate the length of the other leg of the first right triangle by taking the radius of the arc as the side length of the hypotenuse of the first right triangle, taking the distance between the first feature point on the arc and the center of the arc as the side length of the first leg of the first right triangle, and taking the calculated side length of the other leg as the y-axis offset ratio corresponding to the first feature point.

[0201] Using the radius of the arc as the side length of the hypotenuse of the first right triangle, and the distance between the first feature point on the arc and the center of the arc as the side length of one leg of the first right triangle, the side length of the other leg of the second right triangle is calculated. The side length of the other leg is then used as the x-axis offset ratio corresponding to the first feature point.

[0202] In one possible implementation, the candidate calibration module 604 is used to obtain the x-axis coordinate value of the mapped coordinates corresponding to the first feature point based on the x-axis offset ratio corresponding to the first feature point on the arc, the first axis coordinate distance between the first feature point and the center of the arc, and the third axis distance between the two endpoints of the arc; wherein, the first axis coordinate distance is the distance between the first feature point and the center of the arc on the x-axis, and the second axis coordinate distance is the distance between the two endpoints of the arc on the x-axis;

[0203] Based on the y-axis offset ratio of the first feature point on the arc, the second-axis coordinate distance between the first feature point and the center of the arc, and the fourth-axis distance between the two endpoints of the arc, the coordinate value on the y-axis corresponding to the first feature point is obtained; where the third-axis distance is the distance between the first feature point and the center of the arc on the y-axis, and the fourth-axis distance is the distance between the two endpoints of the arc on the y-axis.

[0204] Based on the x-axis and y-axis coordinates of the first feature point on the arc, the mapped coordinates of the first feature point on the arc are obtained.

[0205] In one possible implementation, the candidate calibration module 604 is used to update the curvature information of the arc line in the calibration region when the error value corresponding to the candidate distortion coefficient of the pixel point contained in the calibration region is greater than a preset error threshold.

[0206] Based on the updated curvature information of the arc in the calibration region, the mapped coordinates corresponding to the first feature point on the arc are obtained; wherein, the mapped coordinates are used to indicate the mapped coordinates of the first feature point on the straight line mapped by the arc.

[0207] Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc, the offset of the image coordinates of the arc is determined.

[0208] Based on the offset of the image coordinates of the arc in the calibration region, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined.

[0209] In one possible implementation, the distortion processing applied to the image acquired by the image acquisition device further includes a correction module. The correction module is used to correct the distortion of the pixels based on the distortion coefficients corresponding to each imaging pixel of the image acquisition device, using the distortion correction coefficients corresponding to the pixels in the image to be distorted; wherein, the image to be distorted is an image acquired by the image acquisition device.

[0210] The distortion processing device for images acquired by the image acquisition device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0211] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.

[0212] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.

[0213] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0214] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0215] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0216] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0217] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0218] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0219] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0220] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0221] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0222] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0223] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0224] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0225] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0226] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A distortion processing method for images acquired by an image acquisition device, characterized in that, include: Multiple distorted images are acquired; wherein the distorted images are obtained by acquiring images of a preset calibration pattern multiple times using an image acquisition device, the image acquisition device includes multiple imaging pixels, and the imaging pixels generate pixels on the distorted images one-to-one. For each distorted image, a first calibration region of the distorted image is determined based on the brightness information of the distorted image and a preset first division rule; wherein, the first calibration region includes a sub-pixel matrix divided from the pixel matrix of the distorted image, and the first division rule is used to indicate the position information of the pixel with the highest brightness in the distorted image in the first calibration region of the distorted image, and to indicate the number of pixel rows and the number of pixel columns contained in the first calibration region of the distorted image; For each distorted image, based on the first calibration region and the second division rule of the distorted image, the image region outside the first calibration region of the distorted image is divided into multiple layers of second calibration regions located outside the first calibration region; wherein, each layer of second calibration region of the distorted image includes an inner boundary of a rectangle and an outer boundary of a rectangle located outside the inner boundary, and the second division rule is used to indicate the number of pixel rows and the number of pixel columns located between the inner boundary and the outer boundary of each layer of second calibration region; For each distorted image, based on the curvature information of the arc contained in each calibration region of the distorted image, candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined; wherein, the arc is the line connecting the first feature points in the calibration region or is obtained by fitting the first feature points in the calibration region to an arc, and the line connecting the first feature points on the calibration pattern is a straight line. Based on the candidate distortion coefficients corresponding to the pixels generated by the imaging pixels of the image acquisition device on multiple distorted images, the distortion coefficients corresponding to the imaging pixels of the image acquisition device are determined.

2. The method according to claim 1, characterized in that, For each distorted image, based on the brightness information of the distorted image and a preset first segmentation rule, the first calibration region of the distorted image is determined, including: Determine the image coordinates of the brightest pixel in the distorted image in a preset image coordinate system; wherein the origin of the image coordinate system coincides with the upper left corner of the distorted image, the x-axis of the image coordinate system is parallel to the arrangement direction of the pixel column of the distorted image, and the y-axis of the image coordinate system is parallel to the arrangement direction of the pixel row of the distorted image. Based on the image coordinates of the brightest pixel and the first division rule, the first calibration region of the distorted image is determined.

3. The method according to claim 2, characterized in that, The determination of the first calibration region of the distorted image based on the image coordinates of the brightest pixel and the first division rule includes: Based on the image coordinates of the brightest pixel, determine the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region of the distorted image; Based on the image coordinates of pixels in the same row and column as the brightest pixel in the first calibration region and the first division rule, the image coordinates of the boundary of the first calibration region are determined.

4. The method according to claim 1, characterized in that, The curvature information of the arc in the calibration area includes the image coordinates of the center of the arc and its radius; For each distorted image, based on the curvature information of the arcs contained in each calibration region of the distorted image, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined, including: Based on the curvature information of the arc in the calibration area, the mapped coordinates corresponding to the first feature point on the arc are obtained; wherein, the mapped coordinates are used to indicate the image coordinates of the first feature point on the arc on the straight line mapped by the arc. Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc of the calibration region, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined.

5. The method according to claim 4, characterized in that, The method of obtaining the mapped coordinates corresponding to the first feature point on the arc based on the curvature information of the calibrated region of the distorted image includes: Based on the curvature information of the arc in the calibration area and the image coordinates of the first feature point on the arc, the offset ratio corresponding to the first feature point is obtained. Based on the image coordinates of the center of the arc, the image coordinates of the first feature point on the arc, the image coordinates of the endpoints of the arc, and the offset ratio corresponding to the first feature point on the arc, the mapped coordinates corresponding to the first feature point on the arc are obtained.

6. The method according to claim 5, characterized in that, The process of obtaining the offset ratio corresponding to the first feature point based on the curvature information of the arc in the calibration region and the image coordinates of the first feature point on the arc includes: The length of the hypotenuse of the first right triangle is calculated using the radius of the arc as the side length of the first right triangle, and the distance between the first feature point on the arc and the center of the arc as the side length of one right-angled side of the first right triangle. The length of the other right-angled side of the first right triangle is then calculated, and the calculated length of the other right-angled side of the first right triangle is used as the y-axis offset ratio corresponding to the first feature point. The first axial distance is the distance between the image coordinates of the first feature point on the arc and the image coordinates of the center of the arc on the x-axis. And / or, using the radius of the arc as the side length of the hypotenuse of the second right triangle, using the second axial distance between the first feature point on the arc and the center of the arc as the side length of one leg of the second right triangle, calculating the side length of the other leg of the second right triangle, and using the calculated side length of the other leg of the second right triangle as the x-axis offset ratio corresponding to the first feature point; wherein, the second axial distance is the distance on the y-axis between the image coordinates of the first feature point on the arc and the center of the arc.

7. The method according to claim 6, characterized in that, The mapping coordinates corresponding to the first feature point on the arc are obtained based on the image coordinates of the center of the arc, the image coordinates of the first feature point on the arc, the image coordinates of the endpoints of the arc, and the offset ratio corresponding to the first feature point on the arc, including: Based on the x-axis offset ratio corresponding to the first feature point on the arc, the first axis coordinate distance between the first feature point and the center of the arc, and the third axis distance between the two endpoints of the arc, the x-axis coordinate value of the mapped coordinates corresponding to the first feature point is obtained; wherein, the third axis distance is the distance between the two endpoints of the arc on the x-axis. And / or, based on the y-axis offset ratio corresponding to the first feature point on the arc, the second-axis coordinate distance between the first feature point and the center of the arc, and the fourth-axis distance between the two endpoints of the arc, the coordinate value on the y-axis corresponding to the first feature point is obtained; wherein, the fourth-axis distance is the distance between the two endpoints of the arc on the y-axis. Based on the image coordinates corresponding to the first feature point on the arc, the x-axis coordinates of the mapped coordinates corresponding to the first feature point, and / or the y-axis coordinates of the mapped coordinates corresponding to the first feature point, the mapped coordinates corresponding to the first feature point are obtained.

8. The method according to claim 4, characterized in that, After determining the candidate distortion coefficients corresponding to the pixels contained in the calibration region based on the offset of the image coordinates of the arc line of the calibration region, the process further includes: If the error value of the candidate distortion coefficient corresponding to the pixel point contained in the calibration area is greater than the preset error threshold, the curvature information of the arc line in the calibration area is updated. Based on the updated curvature information of the arc in the calibration area, the mapped coordinates corresponding to the first feature point on the arc are obtained; Based on the image coordinates and mapped coordinates corresponding to the first feature point on the arc of the calibration region, the candidate distortion coefficients corresponding to the pixels contained in the calibration region are determined.

9. The method according to claim 1, characterized in that, After determining the distortion coefficients corresponding to the imaging pixels of the image acquisition device, the method further includes: Based on the distortion coefficients corresponding to each imaging pixel of the image acquisition device, the pixel is distorted using the distortion correction coefficients corresponding to the pixel in the image to be distorted; wherein, the image to be distorted is an image acquired by the image acquisition device.

10. The method according to any one of claims 1 to 9, characterized in that, The first partitioning rule includes: M rows of pixels are arranged on the positive y-axis side of the row containing the brightest pixel, N rows of pixels are arranged on the negative y-axis side of the row containing the brightest pixel, P columns of pixels are arranged on the positive x-axis side of the column containing the brightest pixel, and Q columns of pixels are arranged on the negative x-axis side of the column containing the brightest pixel; wherein M, N, P, and Q are all positive integers greater than 1, and M and N are equal or the difference between M and N is 1, and P and Q are equal or the difference between P and Q is 1.

11. The method according to any one of claims 1 to 9, characterized in that, The second division rule includes: for any second calibration region located in the inner layer, the column of pixels arranged in the positive x-axis direction is H columns, the column of pixels arranged in the negative x-axis direction is H columns, the column of pixels arranged in the positive y-axis direction is K rows, and the column of pixels arranged in the negative y-axis direction is K rows; wherein, the second calibration region located in the inner layer is used to indicate that there is a second calibration region outside the second calibration region, and H and K are both positive integers greater than 1.

12. A distortion processing device for images acquired by an image acquisition device, characterized in that, include: An acquisition module is used to acquire multiple distorted images; wherein, the distorted images are obtained by using an image acquisition device to acquire images of a preset calibration pattern multiple times, the image acquisition device includes multiple imaging pixels, and the imaging pixels generate pixels on the distorted images one-to-one. The first segmentation module is used to determine a first calibration region of each distorted image based on the brightness information of the distorted image and a preset first segmentation rule. The first calibration region includes a sub-pixel matrix divided from the pixel matrix of the distorted image. The first segmentation rule is used to indicate the position information of the pixel with the highest brightness in the distorted image in the first calibration region of the distorted image, and to indicate the number of pixel rows and the number of pixel columns contained in the first calibration region of the distorted image. The second partitioning module is used to partition the image region outside the first calibration region of the distorted image into multiple layers of second calibration regions located outside the first calibration region for each distorted image, based on the first calibration region and the second partitioning rule of the distorted image; wherein, each layer of second calibration region of the distorted image includes an inner boundary of a rectangle and an outer boundary of a rectangle located outside the inner boundary, and the second partitioning rule is used to indicate the number of pixel rows and the number of pixel columns located between the inner boundary and the outer boundary of each layer of second calibration region; The candidate calibration module is used to determine the candidate distortion coefficients corresponding to the pixels contained in each calibration region for each distorted image, based on the curvature information of the arc contained in each calibration region of the distorted image; wherein, the arc is the line connecting the first feature points in the calibration region or is obtained by fitting the first feature points in the calibration region to an arc, and the line connecting the first feature points on the calibration pattern is a straight line. The calibration output module is used to determine the distortion coefficients corresponding to the imaging pixels of the image acquisition device based on the candidate distortion coefficients corresponding to the imaging pixels of the image acquisition device generated on multiple distorted images.

13. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1-11.