Ultra-wide-angle camera device distortion correction method, system and shooting device including the same

By obtaining the calibration images and corner point coordinates of multiple sample camera devices, and using the calibration algorithm model to optimize internal parameters and distortion parameters, the problem of complex and inefficient distortion correction operations of ultra-wide-angle camera devices in the existing technology is solved, and more efficient images are achieved. Distortion correction effect.

CN112907462BActive Publication Date: 2024-10-15BLACK SESAME TECH (SHANGHAI) CO LTD
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202110117411.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-28
Publication Date
2024-10-15
Estimated Expiration
2041-01-28

AI Technical Summary

Technical Problem

The existing distortion correction method of ultra-wide-angle camera devices requires separate calibration for each mobile phone module, resulting in complex operations and inefficiency.

Method used

By acquiring calibration images of multiple sample camera devices, the corner point coordinates are measured using a corner detection algorithm and input into the calibration algorithm model. Internal parameters and distortion parameters are obtained through iterative optimization to improve the distortion correction effect.

Benefits of technology

The correction process is simplified, the efficiency is improved, the internal reference and distortion parameters obtained can be applied to the entire batch of products, and the image distortion correction effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112907462B_ABST
    Figure CN112907462B_ABST
Patent Text Reader

Abstract

A method for correcting distortion of an ultra-wide-angle camera device is provided, comprising: obtaining calibration images in each sample camera device respectively, wherein the sample camera devices have a predetermined number; for each calibration image, using a corner point detection algorithm to measure the corner point coordinates, thereby obtaining the predetermined number of groups of corner point coordinates; inputting the obtained predetermined number of groups of corner point coordinates into a selected calibration algorithm model, thereby obtaining a group of internal parameters and distortion parameters; and using the obtained predetermined number of groups of corner point coordinates as input, using the obtained group of internal parameters and distortion parameters as initial values ​​of optimization variables, and using an index for evaluating the quality of distortion correction effect as a minimum to perform iterative optimization through the selected calibration algorithm, thereby obtaining desired internal parameters and distortion parameters, so that the ultra-wide-angle camera device to be corrected can be used to correct images. A system for correcting distortion of an ultra-wide-angle camera device is also provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image acquisition technology, and more specifically, to a distortion correction technology for an ultra-wide-angle camera device. Background Art

[0002] Currently, more and more mobile phones are integrated with ultra-wide-angle camera modules. The field of view (FOV) of this module is generally greater than 100°, which helps to obtain a wider field of view for photographing. However, the ultra-wide-angle camera module also introduces image distortion. In order to eliminate this type of distortion in the image, the camera module is usually calibrated to obtain the internal parameters and distortion parameters, and then the input image is calibrated to eliminate the distortion in the original image.

[0003] The conventional distortion correction method is to perform it on each module of the mobile phone. Due to the differences between each module, its internal parameters and distortion parameters are different. Each module needs to be calibrated separately to obtain the above information in order to obtain a better distortion correction effect, which makes the operation complicated and inefficient. Summary of the invention

[0004] In view of this, the present application provides a method for distortion correction of ultra-wide-angle camera devices that improves the existing process of obtaining internal parameters and distortion parameters. The method according to the present application includes: respectively obtaining calibration images in each sample camera device, wherein the sample camera devices have a predetermined number; for each calibration image, using a corner point detection algorithm to measure the corner point coordinates, thereby obtaining the predetermined number of groups of corner point coordinates; inputting the obtained predetermined number of groups of corner point coordinates into a selected calibration algorithm model, thereby obtaining a set of internal parameters and distortion parameters; and using the obtained predetermined number of groups of corner point coordinates as input, using the obtained set of internal parameters and distortion parameters as the initial value of the optimization variable, and using the index for evaluating the quality of the distortion correction effect as the minimum to perform iterative optimization through the selected calibration algorithm, to obtain the desired internal parameters and distortion parameters, so that the ultra-wide-angle camera device to be corrected can be used to correct the image.

[0005] As an example, in the ultra-wide-angle camera device distortion correction method, the selected calibration algorithm model is the Zhang Zhengyou calibration algorithm model.

[0006] As an example, in the distortion correction method of the ultra-wide-angle camera device, the indicator for evaluating the quality of the distortion correction effect is obtained by the following steps: transforming each group of the predetermined number of groups of corner point coordinates using the obtained set of internal parameters and distortion parameters to obtain a predetermined number of groups of corner point coordinates after distortion correction; using a straight line fitting algorithm for the corner points of each group of the predetermined number of groups of corner point coordinates after distortion correction to obtain an image in which a predetermined number of rows and columns are arranged in a straight line; for each of the images in which a predetermined number of rows and columns are arranged in a straight line, using the coordinates of the intersection of the rows and columns as the updated predetermined number of groups of corner point coordinates; calculating the average value of the pixel Euclidean distance between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates, and using it as an indicator for evaluating the quality of the distortion correction effect.

[0007] According to another aspect of the present application, a shooting device including an ultra-wide-angle camera device is also provided, wherein the ultra-wide-angle camera device is configured to correct the image it shoots with desired internal parameters and distortion parameters, wherein the desired internal parameters and distortion parameters are obtained according to the following process: respectively obtaining calibration images in each sample camera device, wherein the sample camera device and the ultra-wide-angle camera device are products of the same batch and there are a predetermined number of sample cameras; for each calibration image, using a corner point detection algorithm to measure the coordinates of the corner points, thereby obtaining the predetermined number of groups of corner point coordinates; inputting the obtained predetermined number of groups of corner point coordinates into a selected calibration algorithm model, thereby obtaining a group of internal parameters and distortion parameters; and using the obtained predetermined number of groups of corner point coordinates as input, taking the obtained set of internal parameters and distortion parameters as the initial value of the optimization variable, and taking the index for evaluating the quality of the distortion correction effect as the minimum to perform iterative optimization through the selected calibration algorithm, thereby obtaining the desired internal parameters and distortion parameters.

[0008] As an example, in the shooting device of the ultra-wide-angle camera device, the selected calibration algorithm model is the Zhang Zhengyou calibration algorithm model. In addition, as an example, the index for evaluating the quality of the distortion correction effect is obtained by the following process: transforming each group of the predetermined number of groups of corner point coordinates with the obtained set of internal parameters and distortion parameters to obtain a predetermined number of groups of distortion-corrected corner point coordinates; using a straight line fitting algorithm for each group of corner points in the predetermined number of groups of distortion-corrected corner point coordinates to obtain a predetermined number of rows and columns of images arranged in a straight line; for each of the predetermined number of rows and columns of the images arranged in a straight line, using the coordinates of the intersection of the row and column as the updated predetermined number of groups of corner point coordinates; calculating the average value of the pixel Euclidean distance between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates, and using it as an index for evaluating the quality of the distortion correction effect.

[0009] The present application also provides an ultra-wide-angle camera device distortion correction device, including a processor and a memory, characterized in that instructions are stored in the memory, and when the instructions are executed by the processor, the ultra-wide-angle camera device distortion correction method described in the present application is implemented.

[0010] The present application also provides an ultra-wide-angle camera device distortion correction system, which includes an acquisition unit, a detection unit, and a selected model. The acquisition unit is used to respectively acquire calibration images in each sample camera device, wherein the sample camera device has a predetermined number. The detection unit is used to measure the corner point coordinates of each calibration image using a corner point detection algorithm, thereby obtaining the predetermined number of groups of corner point coordinates. The selected model is configured to receive the predetermined number of groups of corner point coordinates from the detection unit, and output a set of internal parameters and distortion parameters; using the obtained predetermined number of groups of corner point coordinates as input, using the obtained set of internal parameters and distortion parameters as the initial value of the optimization variable, and using the index for evaluating the quality of the distortion correction effect as the minimum to perform iterative optimization through the selected calibration algorithm, thereby obtaining the desired internal parameters and distortion parameters.

[0011] For example, in the ultra-wide-angle camera device distortion correction system, the selected model is the Zhang Zhengyou calibration algorithm model.

[0012] By way of example, in the distortion correction system of the ultra-wide-angle camera device, the selected model is configured as follows: transforming each of the predetermined number of groups of corner point coordinates using the obtained set of internal parameters and distortion parameters to obtain a predetermined number of groups of distortion-corrected corner point coordinates; using a straight line fitting algorithm for the corner points of each of the predetermined number of groups of distortion-corrected corner point coordinates to obtain images with a predetermined number of rows and columns arranged in a straight line; for each of the predetermined number of rows and columns arranged in a straight line, using the coordinates of the intersection of the rows and columns as the updated predetermined number of groups of corner point coordinates; calculating the average value of the pixel Euclidean distance between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates, and using it as an indicator for evaluating the quality of the distortion correction effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flowchart of a method for correcting distortion of an ultra-wide-angle camera device according to an example of the present application.

[0014] Figure 2 A calibration image of an exemplary ultra-wide-angle camera device is shown.

[0015] Figure 3 It includes Figure 2 An image of the corner points in the calibration image shown.

[0016] Figure 4 The distortion-corrected image is shown.

[0017] Figure 5 This is a flowchart obtained based on the indicators for evaluating the quality of the distortion correction effect of the example of this application.

[0018] Figure 6 yes Figure 5 A specific example of the execution process, where M=2, N=3.

[0019] Figure 7 It is a structural schematic diagram of a shooting device according to an embodiment of the present application.

[0020] Figure 8 It is a schematic diagram of the structure of an ultra-wide-angle camera device correction device according to an embodiment of the present application.

[0021] Fig. 9 It is a schematic structural diagram of a distortion correction system for an ultra-wide-angle camera device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] The specific implementation of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be understood that the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.

[0023] Figure 1 It is a flowchart of a method for correcting distortion of an ultra-wide-angle camera device according to an example of the present application. According to the method, in step S100, calibration images in each sample camera device are obtained respectively, wherein there are a predetermined number of sample cameras. The predetermined number is, for example, 15, 20, etc. The present application does not limit the number of sample cameras to be used. Each sample camera device refers to an ultra-wide-angle camera device as a sample, and these ultra-wide-angle camera devices can be devices set in a mobile phone, a camera, a tablet computer such as an IPAD, a car camera, etc., which can be used for imaging or imaging, but the present application does not exclude ultra-wide-angle camera devices implemented as independent devices. In this step, for example, 20 mobile phones are selected, and calibration images of the ultra-wide-angle camera devices of each of the 20 mobile phones are obtained respectively, thereby obtaining 20 calibration images corresponding to the mobile phones one by one. This step can be processed, for example, by a data processing device independent of the batch of sample cameras. The data processing device obtains calibration images from multiple sample cameras respectively.

[0024] In step S102, for each calibration image obtained in step S100, the corner point coordinates are measured using a corner point detection algorithm, thereby obtaining the predetermined number of groups of corner point coordinates. For example, after obtaining the calibration image, the data processing device uses a corner point detection algorithm to measure the corner point coordinates of each of the 20 calibration images, thereby obtaining 20 groups of data, that is, 20 groups of corner point coordinates.

[0025] In step S104, the obtained predetermined number of groups of corner point coordinates are input into the selected calibration algorithm model, thereby obtaining a group of internal parameters and distortion parameters. As an example, the selected calibration algorithm model is the Zhang Zhengyou calibration algorithm model. In the case where the selected calibration algorithm model is the Zhang Zhengyou calibration algorithm model, continuing to refer to the above-mentioned example, the data processing device inputs the 20 groups of corner point coordinates as input into the Zhang Zhengyou calibration algorithm model already set in the data processing device, thereby generating a group of internal parameters and distortion parameters.

[0026] In step S106, the predetermined number of groups of corner point coordinates obtained in step S102 are used as input, the group of internal parameters and distortion parameters obtained in step S104 are used as initial values ​​of optimization variables, and the index for evaluating the quality of distortion correction effect is minimized, and the selected calibration algorithm model is used for iterative optimization, thereby obtaining the desired internal parameters and distortion parameters. Continuing to refer to the above-mentioned example, the data processing device inputs 20 groups of corner point coordinates as input into the Zhang Zhengyou calibration algorithm model, obtains the group of internal parameters and distortion parameters mentioned in step S104, and uses the obtained group of internal parameters and distortion parameters as initial values ​​of optimization variables, and the index for evaluating the quality of distortion correction effect is minimized, and then iterative optimization is performed through the Zhang Zhengyou calibration algorithm model, and finally the Zhang Zhengyou calibration algorithm model outputs the desired group of internal parameters and distortion parameters. Among them, there is a group of indicators for evaluating the quality of distortion correction effect for each calibration image, so in this example, there are a total of 20 groups of indicators for evaluating the quality of distortion correction effect. The desired set of internal parameters and distortion parameters obtained in step S106 are provided to the ultra-wide-angle camera device to be corrected to correct the image captured by the ultra-wide-angle camera device. For example, the data processing device transmits the desired set of internal parameters and distortion parameters to the ultra-wide-angle camera device to be corrected. It should be noted that the predetermined number of sample camera devices is only a part of the ultra-wide-angle camera device to be corrected.

[0027] The data processing device mentioned above can be a laptop, tablet computer, mobile phone, desktop computer, cloud server, etc., which can communicate with the ultra-wide-angle camera device. Such data processing devices usually have a memory and a processor. The calibration algorithm model is stored in the memory, and the processor executes it. Figure 1In some examples, the data processing device may not include a memory, but may use an external storage device, such as a cloud storage or a mobile storage device.

[0028] Figure 2 An exemplary calibration image of an ultra-wide-angle camera device, i.e., an original chessboard image, is shown. As shown, there are distortions around the edges of the image, such as distortion 10 at the upper left corner, distortion 12 at the upper right corner, distortion 11 at the lower left corner, and distortion 13 at the lower right corner.

[0029] The distortion in ultra-wide-angle camera devices or ultra-wide-angle camera modules is generally caused by radial distortion caused by lens shape and tangential distortion caused by camera assembly deviation. Assuming that the coordinates of a point in the camera coordinate system are (X, Y, Z), and it is projected into the pixel coordinate system to become a point (u, v), then these two corresponding points satisfy the following calculation formula (1):

[0030]

[0031] Among them, the camera's internal parameters and distortion parameters are unknown, that is, [f x ,f y ,c x ,c y ] and [k 1 ,k 2 ,k 3 ,k 4 ,k 5 ,k 6 ,p 1 ,p 2 ] can be obtained through calibration. Taking Zhang Zhengyou's camera calibration method as an example, during the calibration process, the calibration image of the ultra-wide-angle camera module is first collected, that is, Figure 2 The image shown. Then use the corner detection algorithm to detect and obtain multiple corner coordinates, such as Figure 3 The bold points in the figure indicate multiple corner points. Using these corner point coordinates, the Zhang Zhengyou calibration algorithm is used to calibrate a single module to obtain the intrinsic distortion parameters of the module. Then, the intrinsic parameters and distortion parameters are used to correct the distortion of the calibration image to obtain the corrected result, as shown in the figure. Figure 4 As shown. Figure 4 It can be seen that the corrected image restores the "straight" features of the object in the original image and eliminates image distortion.

[0032] Combined with this Figure 2 to Figure 3 The conventional process of distortion correction for calibration images is briefly described. This process is a known correction process, which generates intrinsic distortion parameters for each ultra-wide-angle camera module and uses them to correct the image.

[0033] Return to this application and continue to refer to Figure 1 In the present invention, a mobile phone is used as a device using an ultra-wide-angle camera device. For example, 20 mobile phones are selected from the same batch of mobile phones as prototypes, and the ultra-wide-angle camera devices in each of the 20 mobile phones, that is, the ultra-wide-angle camera modules, become the sample camera devices of the present application example. The calibration images of the 20 sample camera devices are obtained (step S100), thereby obtaining 20 samples such as Figure 1 For each calibration image, the corner point coordinates are measured by using the corner point detection algorithm (step S102), thereby obtaining 20 sets of corner point coordinates. For each image, the measured corner points are Figure 2 The points indicated by circles in the figure may have different numbers and / or positions of corner points in each image. The 20 sets of corner point coordinates obtained are used as inputs of the Zhang Zhengyou calibration algorithm model to obtain a set of internal parameters and distortion parameters (step S104). The 20 sets of corner point coordinates obtained are used as inputs, a set of internal parameters and distortion parameters obtained in step S104 are used as initial values ​​of optimization variables, and the index for evaluating the quality of the distortion correction effect is minimized. Iterative optimization is performed through the selected calibration algorithm model to obtain the desired internal parameters and distortion parameters.

[0034] Combined with this Figure 5 The following is an example of the process of obtaining the index for evaluating the distortion correction effect. Figure 5 As shown, in step 500, in step S104 (see Figure 1 ) obtain the group of internal parameters and distortion parameters to transform each group of the predetermined number of groups of corner point coordinates to obtain a predetermined number of groups of distortion-corrected corner point coordinates. In step S502, a straight line fitting algorithm is used for the corner points of each group of the predetermined number of groups of distortion-corrected corner point coordinates to obtain an image in which a predetermined number of rows and columns are arranged in a straight line. In step S504, for each of the images in which a predetermined number of rows and columns are arranged in a straight line, the coordinates of the intersection of the obtained rows and columns are used as the updated predetermined number of groups of corner point coordinates. In step S506, the average value of the pixel Euclidean distance between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates is calculated, and used as an indicator for evaluating the quality of the distortion correction effect.

[0035] The mobile phone is still used as the device using the ultra-wide-angle camera device, and the Zhang Zhengyou calibration algorithm model is used as the selected punctuation algorithm model. In addition, similarly, 20 mobile phones produced in the same batch are selected as prototypes, and the ultra-wide-angle camera devices in each of these 20 mobile phones, that is, the ultra-wide-angle camera modules, become the sample camera devices of the examples of this application. Furthermore, the corner point coordinates detected in the calibration image of one of the sample camera devices are arranged as M rows and N columns ( Figure 1 Step S102). Using Figure 1The set of internal parameters and distortion parameters obtained in step S104 are used to transform the M rows and N columns of corner point coordinate arrangement to obtain (step S500) the corner point coordinates after distortion correction, that is, the distortion-corrected corner point coordinate arrangement. The corrected M rows and N columns of corner point coordinate arrangement obtained in step S500 are fitted with a straight line fitting algorithm (step S502) to obtain M rows of straight lines and N columns that intersect each other. The corner point detection algorithm is used again to obtain new M rows and N columns of corner point coordinates (step S504), that is, the updated corner point coordinates. Figure 1 The coordinates of the corner points of M rows and N columns are obtained in step S102 and the updated corner point coordinates obtained in step S504, and the average pixel Euclidean distance of the corresponding corner points is calculated (step S506), and the value is used as an evaluation index of the quality of the distortion correction. Generally, the smaller the average pixel Euclidean distance, the better the distortion correction effect.

[0036] Take M=2, N=3 as an example, and use Figure 2 The six points A, B, C, D, E, and F in are used as examples of corner points. Figure 6 A schematic diagram of this example is given, in which the corner points are distributed in 2 rows and 3 columns, that is, a 2*3 distribution. Figure 5 After the processing from step S500 to step S504 shown, new corner point coordinates are obtained, that is, the 2*3 corner point arrangement is updated, and the updated 6 corner points are a, b, c, d, e, f, corresponding to the 6 points A, B, C, D, E, F respectively. The Euclidean distances between a and A, b and B, c and C, d and D, e and E, f and F are calculated respectively, and then their average values ​​are calculated to obtain an index for evaluating the distortion correction effect. It should be noted that the index for evaluating the distortion correction effect obtained in combination with the example of M rows and N columns mentioned in the single article is an index for evaluating the distortion correction effect for a sample camera device. For 20 mobile phones or 20 calibration images, there are 20 corresponding indexes for evaluating the distortion correction effect.

[0037] As described in the examples of this application, the calibration images of 20 sample camera devices are used as the basis, and each of them is detected to obtain 20 predetermined number of groups of corner point coordinates, and then the 20 predetermined number of groups of corner point coordinates are input into, for example, the Zhang Zhengyou calibration algorithm model to obtain a set of internal parameters and distortion parameters. Compared with the prior art that only inputs the corner point coordinates based on one calibration image, this takes into account the overall distortion effect of the 20 samples, rather than only considering the distortion effect of a single sample.

[0038] Furthermore, compared with the conventional calibration algorithm, a set of internal parameters and distortion parameters obtained based on the corner point coordinates of the 20 calibration images are used as the initial values ​​of the optimization variables, and the index for evaluating the quality of the distortion correction effect is taken as the minimum, and the 20 sets of focus coordinates detected above are used as input, and the Zhang Zhengyou calibration algorithm model is used for iterative optimization to obtain the desired internal parameters and distortion parameters. The setting of this step optimizes the set of internal parameters and distortion parameters calculated previously, so as to achieve better distortion correction effect. It should be noted that, considering that external parameters will not be used in the camera distortion correction process, compared with the Zhang Zhengyou calibration algorithm that considers the camera external parameters in the optimization process, the optimization step in this application does not introduce external parameters, but only takes the internal parameters and distortion parameters as variables to be optimized.

[0039] Furthermore, the intrinsic parameters and distortion parameters obtained through the examples of the present application take into account a predetermined number of samples (for example, 20), that is, a more holistic consideration is given to the product to be corrected. This makes the final intrinsic parameters and distortion parameters applicable to the entire batch of products in which the sample imaging device is located, greatly improving the correction efficiency.

[0040] According to an example of the present application, a photographing device including an ultra-wide-angle camera is also provided. Figure 7 70 and 72. It should be noted that the shooting device may also include more components, and only the components related to the present application are shown here. As shown in the figure, the ultra-wide-angle camera device 72 can receive the desired internal parameters and distortion parameters through the input and output interface 70. Here, the desired internal parameters and distortion parameters are obtained by combining the above Figure 1 and / or Figure 5 The ultra-wide-angle camera device 72 corrects the distortion parameters based on the received desired internal parameters and distortion parameters. The camera device can be a mobile phone, a tablet computer such as an IPDA, a camera, or a vehicle-mounted image camera device, or a combination thereof. The vehicle-mounted image camera device is, for example, a vehicle-mounted camera.

[0041] According to an example of the present application, an ultra-wide-angle camera device correction device is also provided, such as Figure 8As shown. The correction device includes a processor 80 and a memory 82. Instructions are stored in the memory 82. The processor 80 can execute the instructions in the memory 82, and when executing these instructions, the ultra-wide-angle camera device distortion correction method described above in combination with the examples can be implemented. The ultra-wide-angle camera device correction device can be implemented as a separate component. The component can communicate with the device to be corrected to obtain the final internal parameters and distortion parameters through the method implemented by the instructions, and transmit them to the device to be corrected. The ultra-wide-angle camera device correction device can also be implemented in an existing computer device, and the computer device here should be understood in a broad sense, and can be a device with data processing capabilities such as a computer, a mobile phone, and a tablet.

[0042] According to an example of the present application, a distortion correction system for an ultra-wide-angle camera device is also provided. Fig. 9 : is a structural schematic diagram of the ultra-wide-angle camera device distortion correction system. As shown in the figure, the ultra-wide-angle camera device distortion correction system includes an acquisition unit 90, a detection unit 92 and a selected model 94. The acquisition unit 90 is configured to respectively acquire calibration images in each sample camera device, wherein the sample camera device has a predetermined number. The detection unit 92 is configured to use a corner point detection algorithm to measure the corner point coordinates for each calibration image, thereby obtaining the predetermined number of groups of corner point coordinates. The selected model 94 is configured to receive the predetermined number of groups of corner point coordinates from the detection unit, and output a group of internal parameters and distortion parameters. The selected model 94 is configured to also use the obtained predetermined number of groups of corner point coordinates as input, use the obtained group of internal parameters and distortion parameters as the initial value of the optimization variable, and use the index for evaluating the quality of the distortion correction effect as the minimum to perform iterative optimization through the selected calibration algorithm, thereby obtaining the desired internal parameters and distortion parameters.

[0043] According to some examples of the present application, the selected model 94 is the Zhang Zhengyou calibration algorithm model.

[0044] According to some examples of the present application, the selected model is also configured to perform the following Figure 5 The method shown is used to obtain an indicator for evaluating the quality of the distortion correction effect.

[0045] Fig. 9 The ultra-wide-angle camera device distortion correction system shown can perform, for example, the above combined Figure 1 In some other examples, the combination may be performed Figure 1 and Figure 5 The method shown.

[0046] In some cases, it is also possible not to adopt, for example Figure 5 The method shown does not obtain an index for evaluating the quality of the distortion correction effect, but adopts a preset value.

[0047] In summary, each example of the present application is based on the arrangement of the corner point coordinates of multiple samples as the input item of the calibration algorithm model, thereby obtaining a set of internal parameters and distortion parameters that are applicable to the entire batch of products in which the samples are located, thereby improving the efficiency of obtaining the correction parameters. Moreover, according to the examples of the present application, the initial set of internal parameters and distortion parameters are optimized again, thereby obtaining internal parameters and distortion parameters that provide better correction effects, thereby improving the correction effect of the camera to be corrected.

[0048] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for correcting distortion of an ultra-wide-angle camera device, characterized in that: The method comprises: respectively acquiring calibration images in each sample imaging device, wherein there is a predetermined number of the sample imaging devices; For each calibration image, using a corner point detection algorithm to measure the coordinates of the corner points, thereby obtaining the predetermined number of groups of corner point coordinates; Inputting the obtained predetermined number of groups of corner point coordinates into a selected calibration algorithm model to obtain a group of internal parameters and distortion parameters; and Taking the obtained predetermined number of groups of corner point coordinates as input, taking the obtained group of internal parameters and distortion parameters as initial values ​​of optimization variables, taking the index for evaluating the quality of distortion correction effect as minimum, performing iterative optimization through the selected calibration algorithm, and obtaining the desired internal parameters and distortion parameters, so that the ultra-wide-angle camera devices to be calibrated in the whole batch of products where the sample camera devices are located can be used to calibrate images; The index for evaluating the distortion correction effect is obtained by the following steps: Transforming each of the predetermined number of groups of corner point coordinates using the obtained set of internal parameters and distortion parameters to obtain a predetermined number of groups of corner point coordinates after distortion correction; Using a straight line fitting algorithm for each of the predetermined number of groups of distortion-corrected corner point coordinates to obtain an image with a predetermined number of rows and columns arranged in straight lines; For each of the images in which the predetermined number of rows and columns are arranged in a straight line, taking the coordinates of the intersections of the rows and columns as the updated predetermined number of groups of corner point coordinates; The average value of the pixel Euclidean distances between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates is calculated and used as an indicator for evaluating the quality of the distortion correction effect.

2. The method for correcting distortion of an ultra-wide-angle camera device according to claim 1, wherein: The selected calibration algorithm model is Zhang Zhengyou calibration algorithm model.

3. A photographing device including an ultra-wide-angle camera device, characterized in that: The ultra-wide-angle camera device is configured to correct the image captured by it with desired intrinsic parameters and distortion parameters, wherein the desired intrinsic parameters and distortion parameters are obtained according to the following steps: Acquire calibration images of each sample imaging device respectively, wherein the sample imaging devices and the ultra-wide-angle imaging device are products of the same batch and there are a predetermined number of the sample imaging devices; For each calibration image, using a corner point detection algorithm to measure the coordinates of the corner points, thereby obtaining the predetermined number of groups of corner point coordinates; Inputting the obtained predetermined number of groups of corner point coordinates into a selected calibration algorithm model to obtain a group of internal parameters and distortion parameters; and Taking the obtained predetermined number of groups of corner point coordinates as input, taking the obtained group of internal parameters and distortion parameters as initial values ​​of optimization variables, taking the index for evaluating the quality of distortion correction effect as minimum, performing iterative optimization through the selected calibration algorithm, thereby obtaining the desired internal parameters and distortion parameters; The index for evaluating the distortion correction effect is obtained by the following steps: Transforming each of the predetermined number of groups of corner point coordinates using the obtained set of internal parameters and distortion parameters to obtain a predetermined number of groups of corner point coordinates after distortion correction; Using a straight line fitting algorithm for each of the predetermined number of groups of distortion-corrected corner point coordinates to obtain an image with a predetermined number of rows and columns arranged in straight lines; For each of the images in which the predetermined number of rows and columns are arranged in a straight line, taking the coordinates of the intersections of the rows and columns as the updated predetermined number of groups of corner point coordinates; The average value of the pixel Euclidean distances between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates is calculated and used as an indicator for evaluating the quality of the distortion correction effect.

4. The shooting device of the ultra-wide-angle camera device according to claim 3, characterized in that: The selected calibration algorithm model is Zhang Zhengyou calibration algorithm model.

5. A distortion correction device for an ultra-wide-angle camera device, comprising a processor and a memory, characterized in that: Instructions are stored in the memory, and when the instructions are executed by the processor, the method described in claim 1 or 2 is implemented.

6. A distortion correction system for an ultra-wide-angle camera device, characterized in that: The system comprises: An acquisition unit, used to respectively acquire calibration images from each sample imaging device, wherein there is a predetermined number of the sample imaging devices; A detection unit, configured to measure the coordinates of corner points of each calibration image using a corner point detection algorithm, thereby obtaining the predetermined number of groups of corner point coordinates; The selected model is configured as: receiving the predetermined number of groups of corner point coordinates from the detection unit, and outputting a group of internal parameters and distortion parameters; Taking the obtained predetermined number of groups of corner point coordinates as input, taking the obtained group of internal parameters and distortion parameters as initial values ​​of optimization variables, and taking the index for evaluating the quality of distortion correction effect as minimum, performing iterative optimization through the selected calibration algorithm, thereby obtaining the desired internal parameters and distortion parameters, so that the ultra-wide-angle camera devices to be corrected in the whole batch of products where the sample camera devices are located can be used to correct images; Wherein, the selected model is configured as follows: Transforming each of the predetermined number of groups of corner point coordinates using the obtained set of internal parameters and distortion parameters to obtain a predetermined number of groups of corner point coordinates after distortion correction; Using a straight line fitting algorithm for each of the predetermined number of groups of distortion-corrected corner point coordinates to obtain an image with a predetermined number of rows and columns arranged in straight lines; For each of the images in which the predetermined number of rows and columns are arranged in a straight line, taking the intersection of the rows and columns as the updated predetermined number of groups of corner point coordinates; The average value of the pixel Euclidean distances between the predetermined number of groups of corner point coordinates and the updated predetermined number of groups of corner point coordinates is calculated and used as an indicator for evaluating the quality of the distortion correction effect.

7. The ultra-wide-angle camera device distortion correction system according to claim 6, characterized in that: The selected model is based on Zhang Zhengyou's calibration algorithm model.

Citation Information

Patent Citations

  • Parameter calibration method and device

    CN102750697A

  • High-precision projector and camera calibration system and method

    CN103942796A

  • Method for accurately correcting ultra-wide-angle lens

    CN105096329A

  • Fisheye camera calibration algorithm evaluation method

    CN106960456A

  • Two-step optimization method for camera parameter calibration

    CN108269289A