Lens distortion correction method, device, medium and electronic equipment

By sequentially displaying and shooting image sequences of the same object at different angles, the parameters of the target lens are determined and corrected, which solves the problem of image distortion caused by lens distortion and improves the accuracy and efficiency of lens distortion correction.

CN113837964BActive Publication Date: 2024-09-10SHENZHEN HUOLE TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, lens distortion causes distortion in collected or projected images, which cannot be effectively corrected, affecting the quality and use effect of the image.

Method used

By sequentially displaying and shooting image sequences of the same object at different angles, the correction parameters of the target lens are determined and corrected until the lens distortion is less than the preset threshold, thereby realizing automatic calibration and correction of lens distortion.

Benefits of technology

It eliminates the need for additional calibration plate production, improves the accuracy and efficiency of lens distortion correction, avoids manual errors, and achieves rapid lens distortion correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113837964B
    Figure CN113837964B
Patent Text Reader

Abstract

The present disclosure relates to a lens distortion correction method, device, medium and electronic device. The method comprises: according to each image frame in the first image sequence displayed in sequence, shooting the image frame displayed each time to obtain multiple first shot images; determining the target correction parameters of the target distortion lens according to the multiple first shot images; and saving the target correction parameters. In this way, the first image sequence pre-made and simulating the movement of the calibration plate in space is displayed in sequence, and the picture displayed each time is shot by a camera device, so that the distortion lens is automatically calibrated according to the shot picture, eliminating the process of making an additional calibration plate, saving manpower and material resources, and avoiding the error caused by manually making the calibration plate, thereby improving the accuracy of subsequent lens distortion correction. In addition, thanks to the high display playback speed and shooting speed, the calibration picture can be quickly acquired, thereby improving the efficiency of subsequent lens distortion correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a lens distortion correction method, device, medium and electronic device. Background Art

[0002] Since perfect lenses do not exist in reality, all devices involving lenses have lens distortion, such as projection devices, camera devices, etc. Lens distortion causes the collected or projected images to be more or less distorted, and the distorted images do not conform to the observation habits of the human eye, so lens distortion correction is required. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a lens distortion correction method, device, medium and electronic device.

[0004] In order to achieve the above objectives, in a first aspect, the present disclosure provides a lens distortion correction method, comprising:

[0005] According to each image frame in the first image sequence displayed in sequence, photographing each displayed image frame to obtain a plurality of first photographed images, wherein the first image sequence includes a plurality of image frames of the same object at different photographing angles;

[0006] determining target correction parameters of a target distortion lens according to the plurality of first captured images;

[0007] The target correction parameters are saved to correct the target distortion lens according to the target correction parameters.

[0008] Optionally, the target distortion lens comprises a lens of a camera device, and each image frame in the first image sequence is a calibration image;

[0009] Before the step of saving the target correction parameters, the method further includes:

[0010] Determining, according to the target correction parameter, whether the distortion of the target distortion lens is greater than a first preset distortion threshold;

[0011] If the distortion of the target distortion lens is greater than the first preset distortion threshold, updating the first image sequence to a new image sequence;

[0012] updating the target correction parameter according to the target correction parameter and the updated first image sequence;

[0013] Returning to the step of determining, according to the target correction parameter, whether the distortion of the target distortion lens is greater than a first preset distortion threshold, until the distortion of the target distortion lens is less than or equal to the first preset distortion threshold;

[0014] The step of saving the target correction parameters comprises:

[0015] If the distortion of the target distortion lens is less than or equal to the first preset distortion threshold, the target correction parameters obtained after the most recent update are saved.

[0016] Optionally, the target distortion lens includes a lens of the camera device and a lens of the projection device, wherein each image frame in the first image sequence is sequentially projected by the projection device to sequentially display each image frame in the first image sequence;

[0017] The step of determining target correction parameters of a target distortion lens according to the plurality of first captured images comprises:

[0018] Determine a first calibration parameter of a first lens according to the plurality of first captured images, wherein the first lens is one of a lens of the camera device and a lens of the projection device;

[0019] Determine second correction parameters of a second lens according to a second image sequence and the first correction parameters, wherein the second image sequence includes multiple image frames of the same object at different shooting angles, and the second lens is the other of the lens of the camera device and the lens of the projection device.

[0020] Optionally, the first lens is a lens of the camera device, and the second lens is a lens of the projection device;

[0021] The step of determining a second correction parameter of a second lens according to the second image sequence and the first correction parameter comprises:

[0022] sequentially projecting each image frame in the second image sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of second captured images;

[0023] Correct each of the second captured images according to the first correction parameters to obtain a plurality of first corrected images;

[0024] A second calibration parameter of the second lens is determined according to the plurality of first calibration images.

[0025] Optionally, the first lens is a lens of the projection device, and the second lens is a lens of the camera device;

[0026] The step of determining a second correction parameter of a second lens according to the second image sequence and the first correction parameter comprises:

[0027] Correcting each image frame in the second image sequence according to the first correction parameter to obtain a plurality of second corrected images;

[0028] Projecting each of the second calibrated images in sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of third captured images;

[0029] A second correction parameter of the second lens is determined according to the plurality of third photographed images.

[0030] Optionally, before the step of saving the target correction parameters, the method further includes:

[0031] Determining whether the distortion of the first lens is greater than a second preset distortion threshold according to the first correction parameter, and determining whether the distortion of the second lens is greater than a third preset distortion threshold according to the second correction parameter;

[0032] If the distortion of the first lens is greater than the second preset distortion threshold, and the distortion of the second lens is greater than a third preset distortion threshold, updating the first image sequence to a new image sequence, updating the second image sequence to another new image sequence, and updating the first correction parameter and the second correction parameter respectively according to the first correction parameter, the second correction parameter, the updated first image sequence, and the updated second image sequence;

[0033] If the distortion of the first lens is greater than the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold, updating the first image sequence to a new image sequence, and updating the first correction parameter according to the first correction parameter, the second correction parameter and the updated first image sequence;

[0034] If the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is greater than the third preset distortion threshold, updating the second image sequence to a new image sequence, and updating the second correction parameter according to the first correction parameter, the second correction parameter and the updated second image sequence;

[0035] Returning to the step of determining whether the distortion of the first lens is greater than a second preset distortion threshold according to the first correction parameter, and determining whether the distortion of the second lens is greater than a third preset distortion threshold according to the second correction parameter, until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold;

[0036] The step of saving the target correction parameters comprises:

[0037] If the distortion of the first lens is less than or equal to the second preset distortion threshold, saving the first correction parameter obtained after the most recent update;

[0038] If the distortion of the second lens is less than or equal to the third preset distortion threshold, the second correction parameter obtained after the most recent update is saved.

[0039] Optionally, updating the first correction parameter and the second correction parameter respectively according to the first correction parameter, the second correction parameter, the updated first image sequence, and the updated second image sequence includes:

[0040] According to a third correction parameter, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of third corrected images, wherein the third correction parameter is a correction parameter corresponding to the projection device among the first correction parameter and the second correction parameter;

[0041] Projecting each of the third calibrated images in sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of fourth captured images;

[0042] According to a fourth correction parameter, each of the fourth captured images is corrected to obtain a plurality of fourth corrected images, wherein the fourth correction parameter is a correction parameter corresponding to the camera device among the first correction parameter and the second correction parameter;

[0043] re-determining the first correction parameter according to the plurality of fourth correction images;

[0044] According to a fifth correction parameter, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of fifth corrected images, wherein the fifth correction parameter is a correction parameter corresponding to the projection device among the second correction parameter and the re-determined first correction parameter;

[0045] Projecting each of the fifth calibrated images in sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of fifth captured images;

[0046] Correcting each of the fifth captured images according to a sixth correction parameter to obtain a plurality of sixth corrected images, wherein the sixth correction parameter is a correction parameter corresponding to the camera device among the second correction parameter and the re-determined first correction parameter;

[0047] The second correction parameter is re-determined according to the plurality of sixth corrected images.

[0048] Optionally, determining a first correction parameter of a first lens according to the plurality of first captured images includes:

[0049] For each target captured image, determining the actual pixel coordinates of each characteristic pixel point in the target captured image, wherein the target captured image is an image in the plurality of first captured images, the number of characteristic pixel points included being equal to a preset number;

[0050] A first correction parameter of the first lens is determined according to the actual pixel coordinates of each of the characteristic pixel points in all the target captured images.

[0051] In a second aspect, the present disclosure provides a lens distortion correction device, comprising:

[0052] An acquisition module, configured to capture each image frame displayed in a first image sequence displayed in sequence, to obtain a plurality of first captured images, wherein the first image sequence includes a plurality of image frames of the same object at different shooting angles;

[0053] a determination module, configured to determine a target correction parameter of a target distortion lens according to the plurality of first captured images acquired by the acquisition module;

[0054] A saving module is used to save the target correction parameters determined by the determining module, so as to correct the target distortion lens according to the target correction parameters.

[0055] In a third aspect, the present disclosure provides a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned lens distortion correction method provided by the present disclosure.

[0056] In a fourth aspect, the present disclosure provides an electronic device, including:

[0057] a memory having a computer program stored thereon;

[0058] A processor is used to execute the computer program in the memory to implement the steps of the lens distortion correction method provided by the present disclosure.

[0059] In the above technical solution, first, according to each image frame in the first image sequence displayed in sequence, the image frame displayed each time is photographed to obtain multiple first photographed images; then, according to the multiple first photographed images, the target correction parameters of the target distortion lens are determined; finally, the target correction parameters are saved to correct the target distortion lens according to the target correction parameters. In this way, the pre-made first image sequence simulating the movement of the calibration plate in space is displayed in sequence, and the displayed picture each time is photographed by the camera device, so that the automatic calibration of the target distortion lens is realized according to the photographed picture, eliminating the process of additionally making the calibration plate for lens distortion correction, saving manpower and material resources, and avoiding the errors caused by manually making the calibration plate, thereby improving the accuracy of subsequent lens distortion correction. In addition, thanks to the high display playback speed and shooting speed, the calibration picture (i.e., multiple first photographed images) for lens distortion correction can be quickly collected, thereby improving the efficiency of subsequent lens distortion correction.

[0060] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0062] Figure 1 The figure is a flow chart of a lens distortion correction method according to an exemplary embodiment.

[0063] Figure 2 The diagram is a schematic diagram of a scenario in which a plurality of first captured images are collected by a terminal device according to an exemplary embodiment.

[0064] Figure 3 is a flowchart of a lens distortion correction method according to another exemplary embodiment.

[0065] Figure 4 is a flowchart of a lens distortion correction method according to another exemplary embodiment.

[0066] Figure 5 The invention is a block diagram of a lens distortion correction device according to an exemplary embodiment.

[0067] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0068] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0069] Figure 1 is a flowchart of a lens distortion correction method according to an exemplary embodiment. The method can be applied to a terminal device, wherein the terminal device includes a camera device, or Figure 2 As shown, the terminal device includes both a projection device and a camera device. For example, the terminal device may be a camera, a projector with a camera, a VR (Virtual Reality) device, an AR (Augmented Reality) device, etc. Specifically, Figure 1 As shown, the method includes S101 to S103.

[0070] In S101 , according to each image frame in the first image sequence displayed in sequence, each displayed image frame is photographed to obtain a plurality of first photographed images.

[0071] In the present disclosure, the first image sequence includes multiple image frames of the same object at different shooting angles, which are pre-made and used to simulate the movement of a calibration plate in space, wherein the object can be any object containing significant features, such as a checkerboard, so that each image frame in the first image sequence is a calibration image.

[0072] In one implementation, the first image sequence may be obtained by a user taking photos of the same object from different shooting angles in advance.

[0073] In another implementation manner, the first image sequence may be obtained through computer three-dimensional model simulation, so that there is no need to perform multiple manual shooting, saving manpower and time. In addition, the displacement transformation relationship between different image frames in the first image sequence is known, which can be added as an additional constraint (i.e., an external parameter of the target distortion lens) into the lens distortion correction process, thereby further improving the accuracy of the lens distortion correction.

[0074] In addition, when the terminal device includes a camera device, each image frame in the first image sequence can be displayed in sequence by any display device, and the image frame displayed each time can be captured by the camera device to obtain multiple first captured images. For example, each image frame in the first image sequence is displayed in sequence by a display screen of a television.

[0075] When the terminal device includes both a camera device and a projection device (such as Figure 2As shown), each image frame in the first image sequence can be projected in sequence by the projection device to display each image frame in the first image sequence in sequence, and at the same time, the image frame displayed each time can be captured by the shooting device to obtain multiple first captured images. Figure 2 As shown, the projection device is used to project each image frame in the first image sequence onto a plane such as a wall or a screen in sequence, and at the same time, the camera device is used to shoot the projection screen of the projection device, and the shooting range of the camera device is larger than the projection range of the projection device. In this way, the feature of the projection device that can project screens can be utilized, and the pre-made first image sequence simulating the movement of the calibration plate in space can be played through the projection device, and the projection screen is shot through the camera device, so as to realize the automatic calibration of the target distortion lens according to the shot projection screen.

[0076] In S102, target correction parameters of a target distortion lens are determined according to a plurality of first captured images.

[0077] In the present disclosure, when the terminal device includes a camera, the target distortion lens may include a lens of the camera; and when the terminal device includes both a projection device and a camera, the target distortion lens may include at least one of a lens of the camera and a lens of the projection device. The target correction parameters include the intrinsic and extrinsic parameters of the target distortion lens, wherein the intrinsic parameters include the focal length fx of the image acquisition unit (CMOS) on the x-axis, the focal length fy of the CMOS on the y-axis, and the optical center offset cx and cy of the CMOS; the extrinsic parameters describe the transformation relationship between the lens body coordinate system and the world coordinate system, which are described by the rotation matrix R and the translation vector t, and specifically include distortion parameters {k1, k2, k3, p1, p2}.

[0078] In S103, the target correction parameters are saved to correct the target distortion lens according to the target correction parameters.

[0079] In the above technical solution, first, according to each image frame in the first image sequence displayed in sequence, the image frame displayed each time is photographed to obtain multiple first photographed images; then, according to the multiple first photographed images, the target correction parameters of the target distortion lens are determined; finally, the target correction parameters are saved to correct the target distortion lens according to the target correction parameters. In this way, the pre-made first image sequence simulating the movement of the calibration plate in space is displayed in sequence, and the displayed picture each time is photographed by the camera device, so that the automatic calibration of the target distortion lens is realized according to the photographed picture, eliminating the process of additionally making the calibration plate for lens distortion correction, saving manpower and material resources, and avoiding the errors caused by manually making the calibration plate, thereby improving the accuracy of subsequent lens distortion correction. In addition, thanks to the high display playback speed and shooting speed, the calibration picture (i.e., multiple first photographed images) for lens distortion correction can be quickly collected, thereby improving the efficiency of subsequent lens distortion correction.

[0080] The following is a detailed description of a specific implementation of determining the target correction parameters of the target distortion lens according to the multiple first captured images in S102. In one implementation, the target distortion lens includes a lens of a camera device. In this case, the target correction parameters of the lens of the camera device can be determined according to the multiple first captured images by following the steps [1] and [2]:

[0081] [1] For each target captured image, determine the actual pixel coordinates of each feature pixel point in the target captured image.

[0082] In the present disclosure, the coordinates of the characteristic pixel points in the first captured image, ie, the actual pixel coordinates, may be acquired by using methods such as image detection.

[0083] [2] Determine the target correction parameters of the lens of the camera device based on the actual pixel coordinates of each characteristic pixel point in all target captured images.

[0084] In the present disclosure, the target captured image is an image in which the number of feature pixel points contained in a plurality of first captured images is equal to a preset number, wherein a preset number of feature pixel points (e.g., corner points) may be set in each image frame of the first image sequence, so that the first captured image obtained by displaying and capturing each image frame in the first image sequence should also contain a preset number of feature pixel points. If the number of feature pixel points contained in a certain first captured image is less than the above-mentioned preset number, it indicates that the first captured image may be missing feature pixel points due to incomplete shooting. It can be seen that the first captured image with missing feature pixel points cannot be used to determine the target correction parameters of the lens of the camera device. Therefore, in order to ensure the accuracy of lens distortion correction, the present disclosure only refers to the image in which the number of feature pixel points contained in a plurality of first captured images is equal to the preset number (i.e., the target captured image) when determining the target correction parameters of the lens of the camera device.

[0085] In addition, the target correction parameters of the lens of the camera device can be determined based on the actual pixel coordinates of each characteristic pixel point in all target captured images, based on the iterative optimization least squares method, with minimization of distortion error as the optimization criterion. Specifically, this can be achieved in the following ways:

[0086] ① Setting initial values ​​(usually very small random values) for each parameter (i.e., intrinsic parameters and extrinsic parameters) in the target correction parameters of the lens of the camera device.

[0087] ② According to the initial value of the target correction parameter, it is brought into the objective function of the least square method to obtain a target value;

[0088] For example, the objective function T* of the least squares method may be:

[0089]

[0090] Among them, P uvi is the actual pixel coordinate of the i-th feature pixel in all the target captured images, i = 1, 2, ..., n, n is the total number of feature pixels in all the target captured images; K is the internal reference matrix; T is the external reference matrix; P i is the coordinate of the real-world 3D point corresponding to the i-th feature pixel; KTP i is the theoretical pixel coordinate of the i-th feature pixel.

[0091] Since the theoretical pixel coordinates refer to those obtained by theoretical calculation rather than actual detection, in the absence of factors such as errors, the theoretical image attribute values ​​and the actual image attributes should be the same. Therefore, the difference between the actual pixel coordinates and the theoretical coordinates of each feature pixel point in the target captured image is used to determine the target correction parameters of the lens of the camera device.

[0092] ③Adjust the value of the target correction parameter;

[0093] Afterwards, the above steps ② and ③ are repeatedly performed until the target value is less than the preset threshold value, and then the parameter value that minimizes the target value is determined as the target correction parameter.

[0094] In another embodiment, the target distortion lens may include a lens of a camera device and a lens of a projection device. Accordingly, the target correction parameters of the target distortion lens may include correction parameters of the lens of the camera device and correction parameters of the lens of the projection device. In this case, the target distortion lens may include a correction parameter of the lens of the camera device and a correction parameter of the lens of the projection device. Figure 3 S1021 and S1022 shown in the figure are used to determine the target correction parameters of the target distortion lens, thereby realizing the lens distortion correction of the camera device and the lens distortion correction of the projection device at the same time.

[0095] In S1021, a first correction parameter of a first lens is determined according to a plurality of first captured images, where the first lens is one of a lens of a camera device and a lens of a projection device.

[0096] In the present disclosure, for each target captured image, the actual pixel coordinates of each characteristic pixel point in the target captured image can be determined, wherein the target captured image is an image in the plurality of first captured images, the number of characteristic pixel points contained being equal to the preset number; then, according to the actual pixel coordinates of each characteristic pixel point in all target captured images, the first correction parameter of the first lens is determined. Since the specific implementation of determining the first correction parameter of the first lens according to the plurality of first captured images is similar to the specific implementation of determining the target correction parameter of the lens of the camera device according to the plurality of first captured images, it will not be described in detail here.

[0097] In S1022, second correction parameters of a second lens are determined according to the second image sequence and the first correction parameters, where the second lens is the other of the lens of the camera device and the lens of the projection device.

[0098] In the present disclosure, the second image sequence includes multiple image frames of the same object at different shooting angles, wherein the second image sequence may be the same as or different from the above-mentioned first image sequence, and the present disclosure does not make any specific limitation on this.

[0099] In one embodiment, the first lens is a lens of a camera device, and the second lens is a lens of a projection device. In this case, the first correction parameters of the lens of the camera device can be determined based on multiple first captured images; then, the second correction parameters of the lens of the projection device can be determined based on the second image sequence and the first correction parameters.

[0100] In another embodiment, the first lens is a lens of a projection device, and the second lens is a lens of a camera device. In this case, the first correction parameters of the lens of the projection device can be determined based on multiple first captured images; then, the second correction parameters of the lens of the camera device can be determined based on the second image sequence and the first correction parameters.

[0101] In the above implementation, the lens of the camera device and the lens of the projection device are jointly subjected to distortion correction, which can not only improve the distortion correction accuracy but also increase the correction efficiency.

[0102] It should be noted that the first image sequence and the second image sequence may be generated in advance or in real time, and the present disclosure does not make any specific limitation on this.

[0103] The specific implementation of determining the second correction parameter of the second lens according to the second image sequence and the first correction parameter in S1022 is described in detail below.

[0104] In one implementation, the first lens is a lens of a camera device, and the second lens is a lens of a projection device. In this case, the second correction parameter of the second lens can be determined according to the second image sequence and the first correction parameter by the following steps:

[0105] First, each image frame in the second image sequence is projected in sequence by a projection device, and a projection image of each projected image frame is captured by a camera device to obtain a plurality of second captured images; then, each second captured image is corrected according to the first correction parameter to obtain a plurality of first corrected images; finally, the second correction parameter of the second lens is determined according to the plurality of first corrected images.

[0106] The specific method of determining the second correction parameter of the second lens according to the multiple first correction images is similar to the specific method of determining the target correction parameter of the lens of the camera device according to the multiple first captured images, which will not be repeated here.

[0107] In another embodiment, the first lens is a lens of a projection device, and the second lens is a lens of a camera device. In this case, the second correction parameter of the second lens can be determined according to the second image sequence and the first correction parameter by the following steps:

[0108] First, each image frame in the second image sequence is corrected according to the first correction parameter to obtain a plurality of second corrected images; then, each second corrected image is projected in sequence by a projection device, and a projection image of the image frame projected each time is captured by a camera device to obtain a plurality of third captured images; finally, the second correction parameter of the second lens is determined according to the plurality of third captured images.

[0109] The specific method of determining the second correction parameter of the second lens according to the plurality of third captured images is similar to the specific method of determining the target correction parameter of the lens of the camera device according to the plurality of first captured images, and will not be repeated here.

[0110] In addition, in order to further improve the accuracy of lens distortion correction, the first correction parameter and the second correction parameter may be corrected multiple times until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold. Figure 4 As shown, before the above S103, the above method also includes S104 to S107.

[0111] In S104, it is determined whether the distortion of the first lens is greater than a second preset distortion threshold according to the first correction parameter, and it is determined whether the distortion of the second lens is greater than a third preset distortion threshold according to the second correction parameter.

[0112] In S105, if the distortion of the first lens is greater than the second preset distortion threshold and the distortion of the second lens is greater than the third preset distortion threshold, the first image sequence is updated to a new image sequence, and the second image sequence is updated to another new image sequence, and the first correction parameter and the second correction parameter are updated respectively according to the first correction parameter, the second correction parameter, the updated first image sequence and the updated second image sequence.

[0113] In S106, if the distortion of the first lens is greater than the second preset distortion threshold and the distortion of the second lens is less than or equal to the third preset distortion threshold, the first image sequence is updated to a new image sequence, and the first correction parameter is updated according to the first correction parameter, the second correction parameter and the updated first image sequence.

[0114] In S107, if the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is greater than the third preset distortion threshold, the second image sequence is updated to a new image sequence, and the second correction parameter is updated according to the first correction parameter, the second correction parameter and the updated second image sequence.

[0115] In the present disclosure, if the distortion of the first lens is greater than the second preset distortion threshold, and the distortion of the second lens is greater than the third preset distortion threshold, it indicates that both the distortion of the first lens and the distortion of the second lens cannot meet the distortion correction accuracy requirement. At this time, two new image sequences (i.e., the updated first image sequence and the updated second image sequence), the current first correction parameters and the current second correction parameters can be used to continue the distortion correction, i.e., update the first correction parameters and the second correction parameters, that is, execute S105; thereafter, return to the above S104 until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold.

[0116] If the distortion of the first lens is greater than the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold, it indicates that the distortion of the first lens still cannot meet the distortion correction accuracy requirement, and the distortion of the second lens can already meet the distortion correction requirement. At this time, the distortion correction of the second lens is stopped, and then only the distortion correction of the first lens is performed, that is, a new image sequence (that is, the updated first image sequence), the current first correction parameters and the current second correction parameters are used to continue the distortion correction of the first lens, that is, update the first correction parameters, that is, execute S106; thereafter, return to the above S104 until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold.

[0117] If the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is greater than the third preset distortion threshold, it indicates that the distortion of the second lens has met the distortion correction accuracy requirement, but the distortion of the second lens still cannot meet the distortion correction requirement. At this time, the distortion correction of the first lens is stopped, and then only the distortion correction of the second lens is performed, that is, a new image sequence (that is, the updated second image sequence), the current first correction parameter and the current second correction parameter are used to continue the distortion correction of the second lens, that is, update the second correction parameter, that is, execute S107; thereafter, return to the above S104 until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold.

[0118] At this time, the above S103 may include: if the distortion of the first lens is less than or equal to the second preset distortion threshold, saving the first correction parameter obtained after the most recent update; if the distortion of the second lens is less than or equal to the third preset distortion threshold, saving the second correction parameter obtained after the most recent update.

[0119] The following is a detailed description of the specific implementation method of respectively updating the first correction parameter and the second correction parameter according to the first correction parameter, the second correction parameter, the updated first image sequence, and the updated second image sequence in the above S105. Specifically, it can be achieved by the following steps (1) to (8):

[0120] (1) Correcting each image frame in the updated first image sequence according to a third correction parameter to obtain a plurality of third corrected images, wherein the third correction parameter is a correction parameter corresponding to the projection device between the first correction parameter and the second correction parameter.

[0121] (2) Projecting each third calibrated image in sequence through a projection device, and photographing a projection image of each projected image frame through a camera device to obtain a plurality of fourth photographed images.

[0122] (3) Correcting each fourth captured image according to a fourth correction parameter to obtain a plurality of fourth corrected images, wherein the fourth correction parameter is a correction parameter corresponding to the camera device between the first correction parameter and the second correction parameter.

[0123] (4) Re-determine the first correction parameter based on the plurality of fourth correction images.

[0124] (5) Correcting each image frame in the updated second image sequence according to a fifth correction parameter to obtain a plurality of fifth corrected images, wherein the fifth correction parameter is a correction parameter corresponding to the projection device among the second correction parameter and the re-determined first correction parameter.

[0125] (6) Projecting each fifth calibrated image in sequence through a projection device, and photographing a projection image of each projected image frame through a camera device to obtain a plurality of fifth photographed images.

[0126] (7) Correcting each fifth captured image according to a sixth correction parameter to obtain a plurality of sixth corrected images, wherein the sixth correction parameter is a correction parameter corresponding to the camera device among the second correction parameter and the re-determined first correction parameter.

[0127] (8) Re-determine the second correction parameters based on the plurality of sixth corrected images.

[0128] Among them, the specific method of redetermining the first correction parameter based on multiple fourth correction images in the above step (4) and the specific method of redetermining the second correction parameter based on multiple sixth correction images in the above step (8) are similar to the specific method of determining the target correction parameter of the lens of the camera device based on multiple first captured images, and will not be repeated here.

[0129] In one implementation, the first lens is a lens of a camera device, and the second lens is a lens of a projection device. In this case, the third calibration parameter is a second calibration parameter of the lens of the projection device, the fourth calibration parameter is a first calibration parameter of the lens of the camera device, the fifth calibration parameter is a second calibration parameter of the lens of the projection device, and the sixth calibration parameter is a re-determined first calibration parameter of the lens of the camera device. In this case, the first calibration parameter and the second calibration parameter can be updated respectively by the following steps:

[0130] According to the second correction parameters of the lens of the projection device, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of third corrected images; each third corrected image is sequentially projected by the projection device, and a projection image of each projected image frame is captured by the camera device to obtain a plurality of fourth captured images; according to the first correction parameters of the lens of the camera device, each fourth captured image is corrected respectively to obtain a plurality of fourth corrected images; according to the plurality of fourth corrected images, the first correction parameters of the lens of the camera device are re-determined; according to the second correction parameters of the lens of the projection device, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of fifth corrected images; each fifth corrected image is sequentially projected by the projection device, and a projection image of each projected image frame is captured by the camera device to obtain a plurality of fifth captured images; according to the re-determined first correction parameters of the lens of the camera device, each fifth captured image is corrected to obtain a plurality of sixth corrected images; according to the plurality of sixth corrected images, the second correction parameters of the lens of the projection device are re-determined.

[0131] In another embodiment, the first lens is a lens of a projection device, and the second lens is a lens of a camera device. In this case, the third calibration parameter is a first calibration parameter of the lens of the projection device, the fourth calibration parameter is a second calibration parameter of the lens of the camera device, the fifth calibration parameter is a re-determined first calibration parameter of the lens of the projection device, and the sixth calibration parameter is a second calibration parameter of the lens of the camera device. In this case, the first calibration parameter and the second calibration parameter can be updated respectively by the following steps:

[0132] According to the first correction parameters of the lens of the projection device, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of third corrected images; each third corrected image is sequentially projected by the projection device, and the projection image of each projected image frame is captured by the camera device to obtain a plurality of fourth captured images; according to the second correction parameters of the lens of the camera device, each fourth captured image is corrected respectively to obtain a plurality of fourth corrected images; according to the plurality of fourth corrected images, the first correction parameters of the lens of the projection device are re-determined; according to the re-determined first correction parameters of the lens of the projection device, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of fifth corrected images; each fifth corrected image is sequentially projected by the projection device, and the projection image of each projected image frame is captured by the camera device to obtain a plurality of fifth captured images; according to the first correction parameters of the lens of the camera device, each fifth captured image is corrected to obtain a plurality of sixth corrected images; according to the plurality of sixth corrected images, the second correction parameters of the lens of the camera device are re-determined.

[0133] The following is a detailed description of the specific implementation of updating the first correction parameter according to the first correction parameter, the second correction parameter and the updated first image sequence in the above S106. Specifically, it can be achieved by the following steps 1) to 4):

[0134] 1) Correcting each image frame in the updated first image sequence according to the third correction parameter to obtain a plurality of third corrected images.

[0135] 2) Projecting each third calibrated image in sequence through a projection device, and photographing a projection image of each projected image frame through a camera device to obtain a plurality of fourth photographed images.

[0136] 3) Correct each fourth captured image according to the fourth correction parameter to obtain a plurality of fourth corrected images.

[0137] 4) Re-determining the first correction parameter according to the plurality of fourth correction images.

[0138] In one implementation, the first lens is a lens of a camera device, and the second lens is a lens of a projection device. In this case, the third calibration parameter is a second calibration parameter of the lens of the projection device, and the fourth calibration parameter is a first calibration parameter of the lens of the camera device. The first calibration parameter can be updated by the following steps:

[0139] According to the second correction parameters of the lens of the projection device, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of third corrected images; each third corrected image is projected in sequence by the projection device, and the projection image of each projected image frame is captured by the camera device to obtain a plurality of fourth captured images; according to the first correction parameters of the lens of the camera device, each fourth captured image is corrected respectively to obtain a plurality of fourth corrected images; according to the plurality of fourth correction images, the first correction parameters of the lens of the camera device are re-determined.

[0140] In another embodiment, the first lens is a lens of a projection device, and the second lens is a lens of a camera device. In this case, the third calibration parameter is a first calibration parameter of the lens of the projection device, and the fourth calibration parameter is a second calibration parameter of the lens of the camera device. The first calibration parameter can be updated by the following steps:

[0141] According to the first correction parameter of the lens of the projection device, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of third corrected images; each third corrected image is projected in sequence by the projection device, and the projection image of the image frame projected each time is captured by the camera device to obtain a plurality of fourth captured images; according to the second correction parameter of the lens of the camera device, each fourth captured image is corrected respectively to obtain a plurality of fourth corrected images; according to the plurality of fourth corrected images, the first correction parameter of the lens of the projection device is re-determined.

[0142] The following is a detailed description of the specific implementation of updating the second correction parameter according to the first correction parameter, the second correction parameter and the updated second image sequence in the above S107. Specifically, it can be achieved by the following steps 1] to 4]:

[0143] 1] According to the third correction parameter, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of seventh corrected images.

[0144] 2] Projecting each seventh calibrated image in sequence through a projection device, and capturing the projection image of each projected image frame through a camera device to obtain a plurality of sixth captured images.

[0145] 3] According to the fourth correction parameter, each sixth captured image is corrected respectively to obtain multiple eighth corrected images.

[0146] 4] Based on the plurality of eighth corrected images, the second correction parameters are re-determined.

[0147] In one implementation, the first lens is a lens of a camera device, and the second lens is a lens of a projection device. In this case, the third calibration parameter is a second calibration parameter of the lens of the projection device, and the fourth calibration parameter is a first calibration parameter of the lens of the camera device. The second calibration parameter can be updated by the following steps:

[0148] According to the second correction parameters of the lens of the projection device, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of seventh corrected images; each seventh corrected image is projected in sequence by the projection device, and the projection image of each projected image frame is captured by the camera device to obtain a plurality of sixth captured images; according to the first correction parameters of the lens of the camera device, each sixth captured image is corrected respectively to obtain a plurality of eighth corrected images; according to the plurality of eighth corrected images, the second correction parameters of the lens of the projection device are re-determined.

[0149] In another embodiment, the first lens is a lens of a projection device, and the second lens is a lens of a camera device. In this case, the third calibration parameter is a first calibration parameter of the lens of the projection device, and the fourth calibration parameter is a second calibration parameter of the lens of the camera device. The second calibration parameter can be updated by the following steps:

[0150] According to the first correction parameters of the lens of the projection device, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of seventh corrected images; each seventh corrected image is projected in sequence by the projection device, and the projection image of each projected image frame is captured by the camera device to obtain a plurality of sixth captured images; according to the second correction parameters of the lens of the camera device, each sixth captured image is corrected respectively to obtain a plurality of eighth corrected images; according to the plurality of eighth corrected images, the second correction parameters of the lens of the camera device are re-determined.

[0151] In addition, the target distortion lens includes a lens of a camera device or a projection device. In this case, before the step S103, the method further includes the following steps:

[0152] According to the target correction parameters, determine whether the distortion of the target distortion lens is greater than the first preset distortion threshold; if the distortion of the target distortion lens is greater than the first preset distortion threshold, update the first image sequence to a new image sequence, and update the target correction parameters according to the target correction parameters and the updated first image sequence, and then return to determine whether the distortion of the target distortion lens is greater than the first preset distortion threshold according to the target correction parameters, until the distortion of the target distortion lens is less than or equal to the first preset distortion threshold. At this time, the above S103 may include: if the distortion of the target distortion lens is less than or equal to the first preset distortion threshold, save the target correction parameters obtained after the most recent update. In this way, by calibrating the target correction parameters of the lens of the camera device multiple times, the accuracy of the lens distortion correction of the camera device can be further improved.

[0153] The following describes in detail a specific implementation method of updating the target correction parameter based on the target correction parameter and the updated first image sequence.

[0154] In one implementation, the target distortion lens is a lens of a camera device. In this case, the target correction parameters may be updated in the following manner:

[0155] sequentially projecting each image frame in the updated first image sequence by means of a projection device, and capturing a projection image of each projected image frame by means of a camera device, to obtain a plurality of seventh captured images;

[0156] According to the target correction parameter, each seventh captured image is corrected respectively to obtain a plurality of ninth corrected images;

[0157] The target correction parameters are re-determined based on the plurality of ninth correction images.

[0158] In another embodiment, the target distortion lens is a lens of a projection device. In this case, the target correction parameters can be updated in the following manner:

[0159] According to the target correction parameter, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of tenth corrected images;

[0160] Projecting each tenth calibrated image in sequence by a projection device, and capturing a projection image of each projected image frame by a camera device to obtain a plurality of eighth captured images;

[0161] The target correction parameter is re-determined based on the plurality of eighth captured images.

[0162] Based on the same inventive concept, the present disclosure also provides a lens distortion correction device. Figure 5As shown, the device 500 includes: an acquisition module 501, which is used to capture each image frame displayed in a first image sequence displayed in sequence, and obtain multiple first captured images, wherein the first image sequence includes multiple image frames of the same object at different shooting angles; a determination module 502, which is used to determine target correction parameters of a target distortion lens according to the multiple first captured images captured by the acquisition module 501; and a storage module 503, which is used to save the target correction parameters determined by the determination module 502, so as to correct the target distortion lens according to the target correction parameters.

[0163] In the above technical solution, first, according to each image frame in the first image sequence displayed in sequence, the image frame displayed each time is photographed to obtain multiple first photographed images; then, according to the multiple first photographed images, the target correction parameters of the target distortion lens are determined; finally, the target correction parameters are saved to correct the target distortion lens according to the target correction parameters. In this way, the pre-made first image sequence simulating the movement of the calibration plate in space is displayed in sequence, and the picture is photographed by the camera device, so that the automatic calibration of the target distortion lens is realized according to the photographed picture, eliminating the process of additionally making the calibration plate for lens distortion correction, saving manpower and material resources, and avoiding the error caused by manually making the calibration plate, thereby improving the accuracy of subsequent lens distortion correction. In addition, thanks to the high display playback speed and shooting speed, the calibration picture (i.e., multiple first photographed images) for lens distortion correction can be quickly collected, thereby improving the efficiency of subsequent lens distortion correction.

[0164] Optionally, the target distortion lens includes a lens of a camera device, and each image frame in the first image sequence is a calibration image, such as a checkerboard image; the device 500 further includes: a first judgment module, used to judge whether the distortion of the target distortion lens is greater than a first preset distortion threshold according to the target correction parameter before the saving module 503 saves the target correction parameter; a first updating module, used to update the first image sequence to a new image sequence if the distortion of the target distortion lens is greater than the first preset distortion threshold; a second updating module, used to update the target correction parameter according to the target correction parameter and the updated first image sequence; a first triggering module, used to trigger the first judgment module to judge whether the distortion of the target distortion lens is greater than the first preset distortion threshold according to the target correction parameter, until the distortion of the target distortion lens is less than or equal to the first preset distortion threshold; the saving module 503 is used to save the target correction parameter obtained after the latest update if the distortion of the target distortion lens is less than or equal to the first preset distortion threshold.

[0165] Optionally, the target distortion lens includes a lens of the camera device and a lens of the projection device, wherein each image frame in the first image sequence is sequentially projected by the projection device to sequentially display each image frame in the first image sequence;

[0166] The determination module 502 includes: a first determination submodule, used to determine a first correction parameter of a first lens according to the multiple first captured images, wherein the first lens is one of the lens of the camera device and the lens of the projection device; a second determination submodule, used to determine a second correction parameter of a second lens according to a second image sequence and the first correction parameter, wherein the second image sequence includes multiple image frames of the same object at different shooting angles, and the second lens is the other of the lens of the camera device and the lens of the projection device.

[0167] Optionally, the first lens is the lens of the camera device, and the second lens is the lens of the projection device; the second determination submodule includes: a first acquisition submodule, used to sequentially project each image frame in the second image sequence through the projection device, and capture the projection image of each projected image frame through the camera device to obtain multiple second captured images; a first correction submodule, used to correct each of the second captured images according to the first correction parameters, to obtain multiple first corrected images; a third determination submodule, used to determine the second correction parameters of the second lens according to the multiple first corrected images.

[0168] Optionally, the first lens is the lens of the projection device, and the second lens is the lens of the camera device; the second determination submodule includes: a second correction submodule, used to correct each image frame in the second image sequence according to the first correction parameter, so as to obtain multiple second corrected images; a second acquisition submodule, used to project each of the second corrected images in sequence through the projection device, and capture the projection image of each projected image frame through the camera device, so as to obtain multiple third captured images; and a fourth determination submodule, used to determine the second correction parameters of the second lens according to the multiple third captured images.

[0169] Optionally, the device 500 further includes: a second judgment module, used for judging whether the distortion of the first lens is greater than a second preset distortion threshold value according to the first correction parameter, and judging whether the distortion of the second lens is greater than a third preset distortion threshold value according to the second correction parameter, before the saving module 503 saves the target correction parameter; a third updating module, used for updating the first image sequence to a new image sequence and the second image sequence to another new image sequence if the distortion of the first lens is greater than the second preset distortion threshold value and the distortion of the second lens is greater than the third preset distortion threshold value, and respectively updating the first correction parameter and the second correction parameter according to the first correction parameter, the second correction parameter, the updated first image sequence and the updated second image sequence; a fourth updating module, used for updating the first image sequence to a new image sequence if the distortion of the first lens is greater than the second preset distortion threshold value and the distortion of the second lens is less than or equal to the third preset distortion threshold value, and updating the first correction parameter according to the first correction parameter, the second correction parameter and the updated first image sequence. a fifth updating module, for updating the second image sequence to a new image sequence if the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is greater than the third preset distortion threshold, and updating the second correction parameter according to the first correction parameter, the second correction parameter and the updated second image sequence; a second triggering module, for triggering the second judging module to judge whether the distortion of the first lens is greater than the second preset distortion threshold according to the first correction parameter, and to judge whether the distortion of the second lens is greater than the third preset distortion threshold according to the second correction parameter, until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold; the saving module 503 includes: a first saving submodule, for saving the first correction parameter obtained after the latest update if the distortion of the first lens is less than or equal to the second preset distortion threshold; and a second saving submodule, for saving the second correction parameter obtained after the latest update if the distortion of the second lens is less than or equal to the third preset distortion threshold.

[0170] Optionally, the third updating module includes: a third correction submodule, used to correct each image frame in the updated first image sequence according to a third correction parameter, so as to obtain a plurality of third corrected images, wherein the third correction parameter is a correction parameter corresponding to the projection device among the first correction parameter and the second correction parameter; a third acquisition submodule, used to project each of the third corrected images in sequence through the projection device, and capture the projection image of each projected image frame through the camera device, so as to obtain a plurality of fourth captured images; a fourth correction submodule, used to correct each of the fourth captured images according to a fourth correction parameter, so as to obtain a plurality of fourth corrected images, wherein the fourth correction parameter is a correction parameter corresponding to the camera device among the first correction parameter and the second correction parameter; and a fifth determination submodule, used to redetermine the first correction image according to the plurality of fourth corrected images. a correction parameter; a fifth correction submodule, used to correct each image frame in the updated second image sequence according to the fifth correction parameter, so as to obtain a plurality of fifth corrected images, wherein the fifth correction parameter is a correction parameter corresponding to the projection device among the second correction parameter and the re-determined first correction parameter; a fourth acquisition submodule, used to project each of the fifth corrected images in sequence through the projection device, and to capture the projection image of each projected image frame through the camera device, so as to obtain a plurality of fifth captured images; a sixth correction submodule, used to correct each of the fifth captured images according to the sixth correction parameter, so as to obtain a plurality of sixth corrected images, wherein the sixth correction parameter is a correction parameter corresponding to the camera device among the second correction parameter and the re-determined first correction parameter; a sixth determination submodule, used to redetermine the second correction parameter according to the plurality of sixth corrected images.

[0171] Optionally, the first determination submodule includes: a seventh determination submodule, used to determine, for each target captured image, the actual pixel coordinates of each characteristic pixel point in the target captured image, wherein the target captured image is an image in the multiple first captured images and contains a number of characteristic pixel points equal to a preset number; an eighth determination submodule, used to determine the first correction parameter of the first lens based on the actual pixel coordinates of each characteristic pixel point in all the target captured images.

[0172] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0173] The present disclosure also provides a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the lens distortion correction method provided by the present disclosure are implemented.

[0174] Figure 6 FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. Figure 6 As shown, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0175] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned lens distortion correction method. The memory 702 is used to store various types of data to support the operation of the electronic device 700, and these data may include, for example, instructions for any application or method used to operate on the electronic device 700, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0176] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned lens distortion correction method.

[0177] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned lens distortion correction method are implemented. For example, the computer-readable storage medium may be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions may be executed by the processor 701 of the electronic device 700 to complete the above-mentioned lens distortion correction method.

[0178] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0179] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0180] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A lens distortion correction method, It is characterized in that include: According to each image frame in the first image sequence displayed in sequence, photographing each displayed image frame to obtain a plurality of first photographed images, wherein the first image sequence includes a plurality of image frames of the same object at different photographing angles; Determining target correction parameters of a target distortion lens according to the plurality of first captured images, wherein the target distortion lens includes a lens of a camera device and a lens of a projection device, and each image frame in the first image sequence is sequentially projected by the projection device to sequentially display each image frame in the first image sequence; Saving the target correction parameters to correct the target distortion lens according to the target correction parameters; The step of determining target correction parameters of a target distortion lens according to the plurality of first captured images comprises: Determine a first calibration parameter of a first lens according to the plurality of first captured images, wherein the first lens is one of a lens of the camera device and a lens of the projection device; Determine second correction parameters of a second lens according to a second image sequence and the first correction parameters, wherein the second image sequence includes multiple image frames of the same object at different shooting angles, and the second lens is the other of the lens of the camera device and the lens of the projection device.

2. The method according to claim 1, It is characterized in that Each image frame in the first image sequence is a calibration image; Before the step of saving the target correction parameters, the method further includes: Determining, according to the target correction parameter, whether the distortion of the target distortion lens is greater than a first preset distortion threshold; If the distortion of the target distortion lens is greater than the first preset distortion threshold, updating the first image sequence to a new image sequence; updating the target correction parameter according to the target correction parameter and the updated first image sequence; Returning to the step of determining, according to the target correction parameter, whether the distortion of the target distortion lens is greater than a first preset distortion threshold, until the distortion of the target distortion lens is less than or equal to the first preset distortion threshold; The step of saving the target correction parameters comprises: If the distortion of the target distortion lens is less than or equal to the first preset distortion threshold, the target correction parameters obtained after the most recent update are saved.

3. The method according to claim 1, It is characterized in that The first lens is a lens of the camera device, and the second lens is a lens of the projection device; The step of determining a second correction parameter of a second lens according to the second image sequence and the first correction parameter comprises: sequentially projecting each image frame in the second image sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of second captured images; According to the first correction parameter, each of the second captured images is corrected to obtain a plurality of first corrected images; A second calibration parameter of the second lens is determined according to the plurality of first calibration images.

4. The method according to claim 1, It is characterized in that The first lens is a lens of the projection device, and the second lens is a lens of the camera device; The step of determining a second correction parameter of a second lens according to the second image sequence and the first correction parameter comprises: Correcting each image frame in the second image sequence according to the first correction parameter to obtain a plurality of second corrected images; Projecting each of the second calibrated images in sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of third captured images; A second correction parameter of the second lens is determined according to the plurality of third photographed images.

5. The method according to claim 1, It is characterized in that Before the step of saving the target correction parameters, the method further includes: Determining whether the distortion of the first lens is greater than a second preset distortion threshold according to the first correction parameter, and determining whether the distortion of the second lens is greater than a third preset distortion threshold according to the second correction parameter; If the distortion of the first lens is greater than the second preset distortion threshold, and the distortion of the second lens is greater than a third preset distortion threshold, updating the first image sequence to a new image sequence, updating the second image sequence to another new image sequence, and updating the first correction parameter and the second correction parameter respectively according to the first correction parameter, the second correction parameter, the updated first image sequence, and the updated second image sequence; If the distortion of the first lens is greater than the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold, updating the first image sequence to a new image sequence, and updating the first correction parameter according to the first correction parameter, the second correction parameter and the updated first image sequence; If the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is greater than the third preset distortion threshold, updating the second image sequence to a new image sequence, and updating the second correction parameter according to the first correction parameter, the second correction parameter and the updated second image sequence; Returning to the step of determining whether the distortion of the first lens is greater than a second preset distortion threshold according to the first correction parameter, and determining whether the distortion of the second lens is greater than a third preset distortion threshold according to the second correction parameter, until the distortion of the first lens is less than or equal to the second preset distortion threshold, and the distortion of the second lens is less than or equal to the third preset distortion threshold; The step of saving the target correction parameters comprises: If the distortion of the first lens is less than or equal to the second preset distortion threshold, saving the first correction parameter obtained after the most recent update; If the distortion of the second lens is less than or equal to the third preset distortion threshold, the second correction parameter obtained after the most recent update is saved.

6. The method according to claim 5, It is characterized in that The updating of the first correction parameter and the second correction parameter respectively according to the first correction parameter, the second correction parameter, the updated first image sequence, and the updated second image sequence includes: According to a third correction parameter, each image frame in the updated first image sequence is corrected respectively to obtain a plurality of third corrected images, wherein the third correction parameter is a correction parameter corresponding to the projection device among the first correction parameter and the second correction parameter; Projecting each of the third calibrated images in sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of fourth captured images; According to a fourth correction parameter, each of the fourth captured images is corrected to obtain a plurality of fourth corrected images, wherein the fourth correction parameter is a correction parameter corresponding to the camera device among the first correction parameter and the second correction parameter; re-determining the first correction parameter according to the plurality of fourth correction images; According to a fifth correction parameter, each image frame in the updated second image sequence is corrected respectively to obtain a plurality of fifth corrected images, wherein the fifth correction parameter is a correction parameter corresponding to the projection device among the second correction parameter and the re-determined first correction parameter; Projecting each of the fifth calibrated images in sequence by the projection device, and capturing a projection image of each projected image frame by the camera device to obtain a plurality of fifth captured images; Correcting each of the fifth captured images according to a sixth correction parameter to obtain a plurality of sixth corrected images, wherein the sixth correction parameter is a correction parameter corresponding to the camera device among the second correction parameter and the re-determined first correction parameter; The second correction parameter is re-determined according to the plurality of sixth corrected images.

7. The method according to claim 1, It is characterized in that The step of determining a first correction parameter of a first lens according to the plurality of first captured images comprises: For each target captured image, determining the actual pixel coordinates of each characteristic pixel point in the target captured image, wherein the target captured image is an image in the plurality of first captured images, the number of characteristic pixel points included being equal to a preset number; A first correction parameter of the first lens is determined according to the actual pixel coordinates of each of the characteristic pixel points in all the target captured images.

8. A lens distortion correction device, It is characterized in that include: An acquisition module, configured to capture each image frame displayed in a first image sequence displayed sequentially, to obtain a plurality of first captured images, wherein the first image sequence includes a plurality of image frames of the same object at different shooting angles; a determination module, configured to determine target correction parameters of a target distortion lens according to the plurality of first captured images acquired by the acquisition module; A saving module, used for saving the target correction parameters determined by the determining module, so as to correct the target distortion lens according to the target correction parameters; The target distortion lens includes a lens of a camera device and a lens of a projection device, and each image frame in the first image sequence is sequentially projected by the projection device to sequentially display each image frame in the first image sequence; The determination module comprises: A first determination submodule, configured to determine a first calibration parameter of a first lens according to the plurality of first captured images, wherein the first lens is one of a lens of the camera device and a lens of the projection device; A second determination submodule is used to determine second correction parameters of a second lens according to a second image sequence and the first correction parameters, wherein the second image sequence includes multiple image frames of the same object at different shooting angles, and the second lens is the other of the lens of the camera device and the lens of the projection device.

9. A non-transitory computer-readable storage medium having stored thereon a computer program, It is characterized in that When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.