Lens parameter conversion method and device, computer device and storage medium

By calculating the image height conversion ratio and fitting the target physical distortion parameters, the problem of complex lens parameter calibration after the protective housing is solved, and lens parameter conversion with simplified process and improved accuracy is achieved.

CN115482288BActive Publication Date: 2026-05-05ARASHI VISION INC
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ARASHI VISION INC
Filing Date
2021-05-31
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Traditional lens parameter calibration methods are complex and ineffective after installing protective or transparent housings, which affects image processing accuracy.

Method used

By obtaining the pixel image height expression and physical image height expression of the first lens, the image height conversion ratio is calculated, and the target physical distortion parameters are obtained by fitting the target physical distortion table. Lens parameter conversion is then performed, simplifying the calibration process and improving accuracy.

Benefits of technology

It enables simple and accurate parameter determination for lenses with protective lenses, simplifies the calibration process, and improves calculation accuracy and image processing effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482288B_ABST
    Figure CN115482288B_ABST
Patent Text Reader

Abstract

The application relates to a lens parameter conversion method and device, computer equipment and a storage medium, which are applied to a second lens, and the second lens is a first lens configured with a protective lens. The method comprises the following steps: acquiring a pixel image height expression and a physical image height expression of the first lens; obtaining an image height conversion ratio according to the pixel image height expression and the physical image height expression, and acquiring a target physical distortion table corresponding to the second lens; fitting the target physical distortion table to obtain target physical distortion parameters corresponding to the second lens; and performing parameter conversion according to the target physical distortion parameters and the image height conversion ratio to obtain a lens parameter conversion result. The method can simplify a lens parameter calibration process, improve calculation accuracy, and conveniently and accurately determine lens parameters of a lens with a protective lens, thereby achieving good calibration effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a lens parameter conversion method, apparatus, computer device, and storage medium. Background Technology

[0002] With the development of image processing technology, lens parameter calibration technology has emerged. This technology is primarily used to determine the intrinsic, extrinsic, and distortion parameters of a lens. Because lenses in shooting equipment are easily scratched, damaged by water, or subjected to impacts, and replacing lenses is expensive, protective housings are usually installed around the lens. These housings are typically made of transparent material and enclose the lens for protection. Additionally, waterproof transparent housings are often used when shooting underwater scenes. Installing a protective or transparent housing is equivalent to adding an extra layer of protection to the lens. This additional layer causes additional light refraction, affecting the lens's intrinsic and distortion parameters, which in turn impacts subsequent image processing. Therefore, to eliminate this influence on the image processing results, the lens parameters need to be recalibrated.

[0003] In traditional techniques, conventional lens parameter calibration methods are generally used to recalibrate the parameters of lenses with protective or transparent housings. However, the recalibration process is complex and cumbersome, and the reduced edge resolution of the image formed by the lens after installing a protective or transparent housing leads to poor recalibration results. Summary of the Invention

[0004] Therefore, it is necessary to provide a lens parameter conversion method, apparatus, computer equipment, and storage medium that can simplify the parameter calibration process and achieve good calibration results, in order to address the above-mentioned technical problems.

[0005] A lens parameter conversion method is applied to a second lens, wherein the second lens is a first lens equipped with a protective lens.

[0006] The lens parameter conversion method includes:

[0007] Obtain the pixel height expression and physical height expression of the first lens;

[0008] Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained, and the physical distortion table of the target in the second lens is acquired.

[0009] The target physical distortion parameters corresponding to the second lens are obtained by fitting the target physical distortion table.

[0010] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical distortion parameters and image height conversion ratio.

[0011] In one embodiment, obtaining the pixel image height expression and the physical image height expression of the first lens includes:

[0012] Obtain the lens calibration parameters and physical distortion table of the first lens;

[0013] Based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters, the pixel image height expression is obtained, and curve fitting is performed according to the first lens physical distortion table to obtain the physical image height expression.

[0014] In one embodiment, curve fitting based on the first lens physical distortion table yields the physical image height expression, including:

[0015] Based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table, curve fitting is performed to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table.

[0016] Based on the physical distortion fitting curve of the first lens, the physical distortion parameters of the first lens fitting corresponding to the physical image height expression are obtained;

[0017] The physical image height expression is obtained by fitting the physical distortion parameters of the first lens.

[0018] In one embodiment, obtaining the image height conversion ratio based on the pixel image height expression and the physical image height expression includes:

[0019] Obtain the physical distortion table of the first lens, and obtain the set of incident angles based on the physical distortion table of the first lens and the preset step size;

[0020] Substitute the incident angles from the incident angle set into the pixel image height expression to obtain the pixel image height matrix, and substitute the incident angles from the incident angle set into the physical image height expression to obtain the physical image height matrix.

[0021] The image height conversion ratio is obtained based on the pixel image height matrix and the physical image height matrix.

[0022] In one embodiment, the target physical distortion parameters corresponding to the second lens are obtained by fitting a target physical distortion table, including:

[0023] Based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table, curve fitting is performed to obtain the target physical distortion fitting curve corresponding to the target physical distortion table.

[0024] The target physical distortion parameters are determined based on the target physical distortion fitting curve.

[0025] In one embodiment, parameter conversion is performed based on the target physical distortion parameters and the image height conversion ratio to obtain the lens parameter conversion result, including:

[0026] Based on the camera imaging model corresponding to the second lens and the target physical distortion parameters, the target physical focal length and target pixel distortion parameters are obtained;

[0027] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical focal length, target pixel distortion parameters, and image height conversion ratio.

[0028] In one embodiment, the target physical focal length and target pixel distortion parameters are obtained based on the camera imaging model corresponding to the second lens and the target physical distortion parameters, including:

[0029] Based on the camera imaging model and the target physical distortion parameters, generate the target function corresponding to the second lens;

[0030] The target incident angle is determined based on the target physical distortion table. The target function is then optimized based on the target incident angle to obtain the target physical focal length and target pixel distortion parameters.

[0031] A lens parameter conversion device is applied to a second lens, the second lens being a first lens equipped with a protective lens element, the device comprising:

[0032] The acquisition module is used to acquire the pixel image height expression and physical image height expression of the first lens;

[0033] The processing module is used to obtain the image height conversion ratio based on the pixel image height expression and the physical image height expression, and to obtain the target physical distortion table corresponding to the second lens;

[0034] The fitting module is used to fit the target physical distortion parameters corresponding to the second lens based on the target physical distortion table.

[0035] The conversion module is used to perform parameter conversion based on the target's physical distortion parameters and image height conversion ratio to obtain the lens parameter conversion results.

[0036] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0037] Obtain the pixel height expression and physical height expression of the first lens;

[0038] Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained, and the target physical distortion table corresponding to the second lens is acquired.

[0039] The target physical distortion parameters corresponding to the second lens are obtained by fitting the target physical distortion table.

[0040] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical distortion parameters and image height conversion ratio.

[0041] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0042] Obtain the pixel height expression and physical height expression of the first lens;

[0043] Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained, and the target physical distortion table corresponding to the second lens is acquired.

[0044] The target physical distortion parameters corresponding to the second lens are obtained by fitting the target physical distortion table.

[0045] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical distortion parameters and image height conversion ratio.

[0046] The aforementioned lens parameter conversion method, apparatus, computer equipment, and storage medium, by acquiring the pixel height expression and physical height expression of the first lens, can calculate the height conversion ratio using these expressions. This allows for parameter conversion based on the target physical distortion table corresponding to the second lens, fitting the target physical distortion parameters to the table, and then performing parameter conversion using the target physical distortion parameters and the height conversion ratio to obtain the lens parameter conversion result. The entire process utilizes the pixel height expression and physical height expression of the first lens, along with the target physical distortion table corresponding to the second lens, to perform parameter conversion on the first lens with a protective lens, instead of directly recalibrating the first lens with a protective shell or transparent shell. This simplifies the lens parameter calibration process and improves calculation accuracy, enabling convenient and accurate determination of the parameters of the first lens with a protective lens (i.e., the second lens), achieving a good calibration effect. Attached Figure Description

[0047] Figure 1 This is an application environment diagram of the lens parameter conversion method in one embodiment;

[0048] Figure 2 This is a flowchart illustrating a lens parameter conversion method in one embodiment;

[0049] Figure 3 This is a flowchart illustrating the lens parameter conversion method in another embodiment;

[0050] Figure 4This is a flowchart illustrating the lens parameter conversion method in yet another embodiment;

[0051] Figure 5 This is a structural block diagram of a lens parameter conversion device in one embodiment;

[0052] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. The lens parameter conversion method provided in this application can be applied to applications such as... Figure 1 In the application environment shown, installing a protective or transparent shell on the first lens is equivalent to adding a protective lens layer. This part of the lens will have additional refraction of light, thus affecting the lens's intrinsic parameters and distortion parameters, which will affect subsequent image processing. Therefore, in order to eliminate the impact of this factor on the image processing results, the lens parameters need to be recalibrated. Specifically, during lens parameter conversion, the user sends a lens parameter conversion request carrying the first lens information to the terminal 102. After receiving the lens parameter conversion request carrying the first lens information, the terminal 102 obtains the corresponding pixel height expression and physical height expression of the first lens based on the first lens information. Based on the pixel height expression and physical height expression, it obtains the height conversion ratio and obtains the target physical distortion table corresponding to the second lens. Based on the target physical distortion table, it fits to obtain the target physical distortion parameters corresponding to the second lens. Based on the target physical distortion parameters and the height conversion ratio, it performs parameter conversion to obtain the lens parameter conversion result. After obtaining the lens parameter conversion results, and after taking a picture using a first lens with a protective lens such as a protective case or transparent case, when it is necessary to process the captured image, the terminal can perform distortion correction processing on the obtained image based on the obtained lens parameter conversion results. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0054] In one embodiment, such as Figure 2 As shown, a lens parameter conversion method is provided, applied to a second lens, which is a first lens equipped with a protective lens. This embodiment illustrates the method's application to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0055] Step 202: Obtain the pixel height expression and physical height expression of the first lens.

[0056] Here, "first lens" refers to a lens without a protective lens. For example, "first lens" can specifically refer to a bare lens on a camera without a protective lens. The pixel image height expression is a functional expression representing the relationship between the incident angle and the pixel image height in the pixel plane after the incident angle is affected by pixel distortion. The pixel image height corresponds to the actual image height after the first lens parameters are calibrated, and its specific form depends on the selected camera imaging model. For example, when the camera imaging model is an isometric projection model, its form is: h(θ)=k0*θ+k1*θ 2 +k2*θ 3 +k3*θ 4 Where k0, k1, k2, and k3 are coefficients in the expression, and θ is the incident angle. For example, when the camera imaging model is an omnidirectional model, its form is: h(θ) = r + k1*r 3 +k2*r 5 +k3*r 7 , Where k1, k2, and k3 are expression coefficients, ε is a preset constant, and θ is the incident angle. The physical image height expression is a fitting function corresponding to the physical distortion table of the first lens, used to represent the correspondence between the incident angle and the physical image height in the physical image plane. The physical image height corresponds to the theoretical image height of the first lens after it leaves the factory.

[0057] Specifically, when a protective or waterproof case is added to the first lens, and parameter conversion is required for the first lens with the added protective lens, the terminal first obtains the lens calibration parameters and the physical distortion table of the first lens, and determines the camera imaging model corresponding to the first lens. Based on the camera imaging model, the form of the pixel image height expression is determined. Then, based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters and this form, the pixel image height expression is obtained. Curve fitting is performed based on the first lens physical distortion table, and the physical image height expression is obtained based on the correspondence between the incident angle and the theoretical physical image height in the first lens physical distortion table.

[0058] Among them, lens calibration parameters refer to the pre-calibrated focal length and pixel distortion parameters of the first lens. Focal length, which is the distance from the lens's principal point to the focal point, is an important performance indicator of the lens. The length of the lens's focal length determines the image size, field of view, depth of field, and perspective strength of the image. Pixel distortion parameters characterize how the angle of incidence is affected by pixel distortion. The first lens physical distortion table records the correspondence between the first lens's angle of incidence and the theoretical physical image height.

[0059] Since the lens calibration parameters correspond to each first lens, and each first lens requires lens calibration, and the first lens physical distortion table contains the design values ​​corresponding to each first lens, the terminal, after obtaining the first lens information and identifying the first lens requiring parameter conversion, can directly obtain the lens calibration parameters and the first lens physical distortion table corresponding to that first lens. For example, the lens calibration parameters and the first lens physical distortion table can be pre-stored in a database. After receiving a lens parameter conversion request carrying first lens information, the terminal can retrieve the corresponding lens calibration parameters and the first lens physical distortion table from the database based on the first lens information.

[0060] Step 204: Based on the pixel image height expression and the physical image height expression, obtain the image height conversion ratio and acquire the target physical distortion table corresponding to the second lens.

[0061] The image height conversion ratio refers to the conversion ratio from the physical plane to the pixel plane. The second lens refers to the first lens equipped with a protective lens; that is, the first lens and the protective lens together form the second lens. The protective lens is a protective or waterproof casing mounted on the first lens. The target physical distortion table records the correspondence between the incident angle and the physical image height corresponding to the second lens when the protective lens is installed.

[0062] Specifically, after obtaining the pixel image height expression and the physical image height expression, the terminal can calculate the image height conversion ratio using methods such as the least squares method based on the pixel image height expression, the physical image height expression, and the first lens physical distortion table. It can also obtain the parameter values ​​of the protective case or waterproof case corresponding to the protective lens and the lens parameters of the first lens. The terminal then calls the preset optical software and inputs the parameter values ​​of the protective case or waterproof case and the lens parameters of the first lens into the preset optical software so that the optical software outputs the target physical distortion table.

[0063] Step 206: Fit the target physical distortion parameters corresponding to the second lens according to the target physical distortion table.

[0064] Among them, the target physical distortion parameter refers to the coefficient corresponding to the fitting function of the target physical distortion table. The fitting function of the target physical distortion table represents the relationship between the incident angle and physical image height corresponding to the second lens when a protective lens is configured.

[0065] Specifically, the terminal will perform curve fitting based on the target physical distortion table to obtain the target physical distortion fitting curve corresponding to the target physical distortion table, and obtain the target physical distortion parameters based on the coefficients of the target physical distortion fitting curve.

[0066] Step 208: Perform parameter conversion based on the target physical distortion parameters and image height conversion ratio to obtain the lens parameter conversion result.

[0067] The lens parameter conversion result includes the converted pixel focal length and pixel distortion parameters. The pixel focal length refers to the actual focal length, and the pixel distortion parameters refer to the actual distortion parameters.

[0068] Specifically, after obtaining the target physical distortion parameters, the terminal will acquire the camera imaging model corresponding to the second lens. Based on the camera imaging model and the target physical distortion parameters, the target physical focal length and target pixel distortion parameters will be calculated. Based on the target physical focal length and the pixel height conversion ratio, the pixel focal length after parameter conversion will be calculated. The pixel focal length after parameter conversion and the target pixel distortion parameters will be used as the converted lens parameters to obtain the lens parameter conversion result.

[0069] The aforementioned lens parameter conversion method, by obtaining the pixel height expression and physical height expression of the first lens, can calculate the height conversion ratio using these expressions. This allows for the acquisition of the target physical distortion table corresponding to the second lens. After fitting the target physical distortion parameters to this table, parameter conversion is performed based on the target physical distortion parameters and the height conversion ratio to obtain the lens parameter conversion result. The entire process utilizes the pixel height expression and physical height expression of the first lens, along with the target physical distortion table corresponding to the second lens, to perform parameter conversion on the first lens with a protective lens, instead of directly recalibrating the first lens with a protective shell or transparent shell. This simplifies the lens parameter calibration process and improves calculation accuracy, enabling convenient and accurate determination of the parameters of the first lens with a protective lens (i.e., the second lens), achieving a good calibration effect. Especially when the shooting equipment is equipped with multiple protective lenses, the relevant information of the protective lenses can be identified first, and then the lens parameters of the first lens with the protective lens, i.e., the second lens, can be quickly obtained according to the lens parameter conversion method described above. Subsequent image processing can then be performed based on the obtained lens parameters. The entire process eliminates the tedious process of lens recalibration, making it convenient and simple. In one embodiment, obtaining the pixel image height expression and physical image height expression of the first lens includes:

[0070] Obtain the lens calibration parameters and physical distortion table of the first lens;

[0071] Based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters, the pixel image height expression is obtained, and curve fitting is performed according to the first lens physical distortion table to obtain the physical image height expression.

[0072] Specifically, the lens calibration parameters include the pre-calibrated first lens pixel focal length and first lens pixel distortion parameters. When it is necessary to determine the pixel image height expression, the terminal can first obtain the camera imaging model corresponding to the first lens, determine the form of the pixel image height expression corresponding to the camera imaging model, and obtain the pixel image height expression based on the form, the first lens pixel focal length and the first lens pixel distortion parameters. Then, curve fitting is performed based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table to obtain the physical image height expression.

[0073] In this embodiment, by utilizing the pixel focal length and pixel distortion parameters of the first lens, a pixel image height expression is obtained, and by performing curve fitting based on the physical distortion table of the first lens, a physical image height expression is obtained, thus enabling the acquisition of both the pixel image height expression and the physical image height expression.

[0074] In one embodiment, curve fitting based on the first lens physical distortion table yields the physical image height expression, including:

[0075] Based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table, curve fitting is performed to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table.

[0076] Based on the physical distortion fitting curve of the first lens, the physical distortion parameters of the first lens fitting corresponding to the physical image height expression are obtained;

[0077] The physical image height expression is obtained by fitting the physical distortion parameters of the first lens.

[0078] Specifically, the terminal performs curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table. Different incident angles and their corresponding theoretical distortion physical image heights are plotted as a set of discrete data points. Fitting these points with a high-order polynomial yields a curve passing through all points, which is the first lens physical distortion fitting curve. The parameters of the polynomial in this first lens physical distortion fitting curve are the first lens fitted physical distortion parameters. Based on these first lens fitted physical distortion parameters and the preset physical image height expression, the physical image height expression can be obtained. For example, the physical image height expression can be g(α)=c0+c1*α+c2*α 2 +c3*α 3 +c4*α 4 , c1, c2, c3, and c4 are the physical distortion parameters fitted to the first shot.

[0079] In this embodiment, by using the correspondence between the incident angle and the theoretical distortion physical image height to perform curve fitting, a first lens physical distortion fitting curve corresponding to the first lens physical distortion table is obtained. The first lens physical distortion fitting curve can be used to determine the corresponding first lens fitting physical distortion parameters, and thus the physical image height expression can be obtained based on the first lens fitting physical distortion parameters.

[0080] In one embodiment, obtaining the image height conversion ratio based on the pixel image height expression and the physical image height expression includes:

[0081] Obtain the physical distortion table of the first lens, and obtain the set of incident angles based on the physical distortion table of the first lens and the preset step size;

[0082] Substitute the incident angles from the incident angle set into the pixel image height expression to obtain the pixel image height matrix, and substitute the incident angles from the incident angle set into the physical image height expression to obtain the physical image height matrix.

[0083] The image height conversion ratio is obtained based on the pixel image height matrix and the physical image height matrix.

[0084] The preset step size refers to the pre-set interval for obtaining the angle of incidence, which can be set as needed. For example, a step size of 0.1° means that an angle of incidence is obtained every 0.1°.

[0085] Specifically, the terminal obtains the first lens physical distortion table. Based on the maximum field of view and a preset step size in the first lens physical distortion table, it calculates the incident angle set. Substituting the incident angles from the incident angle set into the pixel image height expression, it obtains the pixel image height matrix. Substituting the incident angles from the incident angle set into the physical image height expression, it obtains the physical image height matrix. Then, using this pixel image height matrix and the physical image height matrix, it calculates the image height conversion ratio using the least squares method or other methods. For example, if the maximum field of view in the first lens physical distortion table is 190°, then the maximum field of view on one side is 95°. This means that the incident light travels from the perpendicular camera optical axis to the maximum incident angle from 0 degrees to 95 degrees. Using a preset step size (assumed to be 0.1° here), the corresponding incident angle set can be obtained as {0°, 0.1°, 0.2°, ..., 94.9°, 95°}.

[0086] An example is provided to illustrate how the image height conversion ratio is obtained using the least squares method. Here, F is the focal length of the first lens pixel (a lens calibration parameter), A is the pixel image height matrix, B is the physical image height matrix, scale is the image height conversion ratio, h(θ) is the expression for pixel image height, g(α) is the expression for physical image height, and θ is the angle of incidence.

[0087] A*scale = B;

[0088] scale = (A T A) -1 A T B;

[0089]

[0090]

[0091] In this embodiment, by obtaining the pixel image height matrix according to the pixel image height expression and the physical image height matrix according to the physical image height expression, the image height conversion ratio can be determined based on the pixel image height matrix and the physical image height matrix.

[0092] In one embodiment, the target physical distortion parameters corresponding to the second lens are obtained by fitting a target physical distortion table, including:

[0093] Based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table, curve fitting is performed to obtain the target physical distortion fitting curve corresponding to the target physical distortion table.

[0094] The target physical distortion parameters are determined based on the target physical distortion fitting curve.

[0095] Specifically, the terminal will perform curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table. Different incident angles and corresponding theoretical distortion physical image heights will be plotted as a set of discrete data points. By fitting these points with a high-order polynomial, a curve passing through all points can be obtained, which is the target physical distortion fitting curve. The parameters of the polynomial of the target physical distortion fitting curve are the target physical distortion parameters.

[0096] In this embodiment, by using the correspondence between the incident angle and the theoretical distortion physical image height to perform curve fitting, a target physical distortion fitting curve corresponding to the target physical distortion table is obtained, and the target physical distortion parameters can be determined based on the target physical distortion fitting curve.

[0097] In one embodiment, parameter conversion is performed based on the target physical distortion parameters and the image height conversion ratio to obtain the lens parameter conversion result, including:

[0098] Based on the camera imaging model corresponding to the second lens and the target physical distortion parameters, the target physical focal length and target pixel distortion parameters are obtained;

[0099] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical focal length, target pixel distortion parameters, and image height conversion ratio.

[0100] Specifically, the terminal obtains the camera imaging model corresponding to the second lens. Based on the camera imaging model and the target physical distortion parameters, it obtains the objective function corresponding to the second lens. Then, by optimizing the objective function to minimize it, the target physical focal length and target pixel distortion parameters are obtained. Based on the target physical focal length, target pixel distortion parameters, and image height conversion ratio, parameter conversion is performed to obtain the lens parameter conversion result. The lens parameter conversion result includes the converted pixel focal length and target pixel distortion parameters. The converted pixel focal length is the product of the target physical focal length and the image height conversion ratio.

[0101] In this embodiment, based on the camera imaging model corresponding to the second lens and the target physical distortion parameters, the target physical focal length and target pixel distortion parameters can be obtained. By using the target physical focal length, target pixel distortion parameters and image height conversion ratio to perform parameter conversion, the lens parameter conversion result can be obtained.

[0102] In one embodiment, obtaining the target physical focal length and target pixel distortion parameters based on the camera imaging model and target physical distortion parameters includes:

[0103] Based on the camera imaging model and the target physical distortion parameters, generate the target function corresponding to the second lens;

[0104] The target incident angle is determined based on the target physical distortion table. The target function is then optimized based on the target incident angle to obtain the target physical focal length and target pixel distortion parameters.

[0105] The target incident angle refers to the incident angle used to optimize the objective function. It can be obtained from the target physical distortion table and the preset target step size. The preset target step size is a pre-set interval for obtaining incident angles, which can be set as needed. For example, when the target step size is 0.1°, it means that an incident angle is obtained every 0.1°. Specifically, the terminal determines the corresponding pixel height form based on the camera imaging model. Based on this pixel height form and the target physical distortion parameters, it converts to obtain the objective function corresponding to the second lens. In this objective function, the target physical focal length and the target pixel distortion parameters are specified as variables to be optimized. By determining the target incident angle set according to the target physical distortion table, and substituting the known values ​​such as the target incident angle and the target physical distortion parameters into the target incident angle set, the objective function is nonlinearly optimized to minimize the objective function, thereby estimating the target physical focal length and the target pixel distortion parameters. The method for determining the target incident angle set according to the target physical distortion table is as follows: the target incident angle set is calculated based on the maximum field of view in the target physical distortion table and the preset target step size. For example, if the maximum field of view in the target physical distortion table is 190 degrees, then the maximum field of view on one side is 95 degrees. That is, the incident light rays travel from the vertical camera optical axis to the maximum incident angle from 0 degrees to 95 degrees. By presetting the target step size (assuming it is 0.1° here), the corresponding target incident angle set can be obtained as {0°, 0.1°, 0.2°, ..., 94.9°, 95°}.

[0106] The target physical focal length can be represented by the pixel image height expression and the physical image height expression, i.e. Where g(α) = c0 + c1*α + c2*α 2 +c3*α 3 +c4*α 4 , The form of the pixel image height expression is determined by the camera imaging model. When the camera imaging model is an isometric projection model, the pixel image height expression h(θ) is: h(θ) = k0*θ + k1*θ 2 +k2*θ 3 +k3*θ 4 Where k0, k1, k2, and k3 are coefficients in the expression, and θ is the target incident angle. When the camera imaging model is the Omni model, the pixel image height expression h(θ) is: h(θ) = r + k1 * r 3 +k2*r 5 +k3*r 7 , Where k1, k2, and k3 are expression coefficients, ε is a preset constant, and θ is the target incident angle. Based on the expression for the target's physical focal length, the objective function can be obtained as e = f*h(θ) - g(α). That is, when the camera imaging model is an isometric projection model, the objective function is e = f*(k0*θ + k1*θ). 2 +k2*θ 3 +k3*θ 4 )-(c0+c1*α+c2*α 2 +c3*α 3 +c4*α 4 When the camera imaging model is the Omni model, the objective function is e = f*(r + k1*r). 3 +k2*r 5 +k3*r 7 )-(c0+c1*α+c2*α 2 +c3*α 3 +c4*α 4 ), The target incident angle θ and the target physical distortion parameters are known quantities. Based on the target physical distortion parameters, the physical image height expression g(α) can be obtained. Then, the objective function can be optimized using the physical image height expression and the target incident angle θ to obtain the target physical focal length f and the pixel image height expression h(θ). Based on the pixel image height expression h(θ), the target pixel distortion parameters can be obtained.

[0107] Nonlinear optimization refers to substituting the target incident angles from the target incident angle set into the objective function sequentially, using these angles to estimate and adjust the target physical focal length and target pixel distortion parameters within the objective function. This aims to minimize both the target physical focal length and pixel distortion parameters, thus optimizing the objective function. For example, nonlinear optimization can be achieved by pre-determining the initial values ​​of the target physical focal length *f* and each coefficient in the pixel height expression *h(θ)*. Substituting the target incident angles from the target incident angle set into the objective function, calculating the objective function value corresponding to the initial values, and updating the gradient of the initial values ​​to obtain the gradient update variable value, then substituting this value back into the objective function and recalculating the new objective function value, until the calculated objective function value no longer decreases, the resulting gradient update variable value is the optimization result. In this embodiment, by generating an objective function corresponding to the second lens based on the camera imaging model and target physical distortion parameters, and optimizing the objective function based on the incident angles in the target physical distortion table, the target physical focal length and target pixel distortion parameters can be obtained.

[0108] In one embodiment, such as Figure 3As shown in the diagram, the lens parameter conversion of this application is illustrated by a flowchart, which specifically includes the following steps:

[0109] The terminal uses optical measurement to output a distortion table (i.e., obtains the target physical distortion table corresponding to the second lens), fits distortion coefficients according to the distortion table (i.e., obtains the target physical distortion parameters corresponding to the second lens by fitting the target physical distortion table), obtains the camera's physical focal length according to the distortion coefficients and field of view (i.e., generates a target function corresponding to the second lens based on the camera imaging model and target physical distortion parameters corresponding to the second lens, determines the target incident angle according to the target physical distortion table, optimizes the target function according to the target incident angle, and obtains the target physical focal length and target pixel distortion parameters), and calculates the conversion ratio from the physical plane to the pixel plane according to the bare-metal distortion coefficients and calibration intrinsic parameters (i.e., obtains the lens calibration parameters of the first lens and the first lens physical distortion parameters). The distortion table is used to obtain the pixel image height expression based on the lens calibration parameters, and the physical image height expression is obtained based on the first lens physical distortion table. Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained. Based on the physical focal length (i.e., the target physical focal length) and the physical-to-pixel ratio (i.e., the image height conversion ratio), the focal length (i.e., the target pixel focal length) is obtained. The focal length is equal to the physical focal length multiplied by the physical-to-pixel ratio. The original focal length and distortion coefficient (i.e., the pixel focal length and pixel distortion coefficient corresponding to the first lens) are replaced with the new focal length (i.e., the target pixel focal length) and distortion coefficient (i.e., the target pixel distortion parameter) (i.e., parameter conversion is performed based on the target physical focal length, the target pixel distortion parameter, and the image height conversion ratio to obtain the lens parameter conversion result).

[0110] In one embodiment, such as Figure 4 As shown in the diagram, the lens parameter conversion of this application is illustrated by a flowchart, which specifically includes the following steps:

[0111] Step 402: Obtain the lens calibration parameters of the first lens and the physical distortion table of the first lens;

[0112] Step 404: Based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters, obtain the pixel image height expression;

[0113] Step 406: Based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table, perform curve fitting to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table.

[0114] Step 408: Based on the physical distortion fitting curve of the first lens, obtain the first lens fitted physical distortion parameters corresponding to the physical image height expression;

[0115] Step 410: Based on the physical distortion parameters fitted by the first lens, obtain the physical image height expression;

[0116] Step 412: Obtain the physical distortion table of the first lens; based on the physical distortion table of the first lens and the preset step size, obtain the set of incident angles.

[0117] Step 414: Substitute the incident angles in the incident angle set into the pixel image height expression to obtain the pixel image height matrix, and substitute the incident angles in the incident angle set into the physical image height expression to obtain the physical image height matrix.

[0118] Step 416: Obtain the image height conversion ratio based on the pixel image height matrix and the physical image height matrix;

[0119] Step 418: Obtain the target physical distortion table corresponding to the second lens;

[0120] Step 420: Based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table, perform curve fitting to obtain the target physical distortion fitting curve corresponding to the target physical distortion table.

[0121] Step 422: Determine the target physical distortion parameters based on the target physical distortion fitting curve;

[0122] Step 424: Generate the objective function corresponding to the second lens based on the camera imaging model and target physical distortion parameters corresponding to the second lens;

[0123] Step 426: Determine the target incident angle based on the target physical distortion table, optimize the target function based on the target incident angle, and obtain the target physical focal length and target pixel distortion parameters;

[0124] Step 428: Perform parameter conversion based on the target physical focal length, target pixel distortion parameters, and image height conversion ratio to obtain the lens parameter conversion result.

[0125] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0126] In one embodiment, such as Figure 5As shown, a lens parameter conversion device is provided for use with a second lens, which is a first lens equipped with a protective lens. The device includes: an acquisition module 502, a processing module 504, a fitting module 506, and a conversion module 508, wherein:

[0127] The acquisition module 502 is used to acquire the pixel image height expression and the physical image height expression of the first lens;

[0128] The processing module 504 is used to obtain the image height conversion ratio based on the pixel image height expression and the physical image height expression, and to obtain the target physical distortion table corresponding to the second lens;

[0129] The fitting module 506 is used to fit the target physical distortion parameters corresponding to the second lens according to the target physical distortion table.

[0130] The conversion module 508 is used to perform parameter conversion based on the target physical distortion parameters and the image height conversion ratio to obtain the lens parameter conversion result.

[0131] The aforementioned lens parameter conversion device, by acquiring the pixel height expression and physical height expression of the first lens, can calculate the height conversion ratio using these expressions. This allows for parameter conversion after obtaining the target physical distortion table corresponding to the second lens, fitting the target physical distortion parameters to the table, and then performing parameter conversion based on the target physical distortion parameters and the height conversion ratio to obtain the lens parameter conversion result. The entire process utilizes the pixel height expression and physical height expression of the first lens, along with the target physical distortion table corresponding to the second lens, to perform parameter conversion on the first lens with a protective lens, instead of directly recalibrating the first lens with a protective shell or transparent shell. This simplifies the lens parameter calibration process and improves calculation accuracy, enabling convenient and accurate determination of the parameters of the first lens with a protective lens (i.e., the second lens), achieving a good calibration effect.

[0132] In one embodiment, the acquisition module is further configured to acquire the lens calibration parameters of the first lens and the physical distortion table of the first lens, obtain the pixel image height expression based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters, and perform curve fitting based on the first lens physical distortion table to obtain the physical image height expression.

[0133] In one embodiment, the acquisition module is further configured to perform curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table, to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table, to obtain the first lens fitted physical distortion parameters corresponding to the physical image height expression based on the first lens physical distortion fitting curve, and to obtain the physical image height expression based on the first lens fitted physical distortion parameters.

[0134] In one embodiment, the processing module is further configured to obtain a first lens physical distortion table, obtain an incident angle set based on the first lens physical distortion table and a preset step size, substitute the incident angles in the incident angle set into the pixel image height expression to obtain a pixel image height matrix, substitute the incident angles in the incident angle set into the physical image height expression to obtain a physical image height matrix, and obtain the image height conversion ratio based on the pixel image height matrix and the physical image height matrix.

[0135] In one embodiment, the fitting module is further configured to perform curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table, to obtain the target physical distortion fitting curve corresponding to the target physical distortion table, and to determine the target physical distortion parameters based on the target physical distortion fitting curve.

[0136] In one embodiment, the conversion module is further configured to obtain the target physical focal length and target pixel distortion parameters based on the camera imaging model and target physical distortion parameters corresponding to the second lens, and perform parameter conversion based on the target physical focal length, target pixel distortion parameters and image height conversion ratio to obtain the lens parameter conversion result.

[0137] In one embodiment, the conversion module is further configured to generate a target function corresponding to the second lens based on the camera imaging model and the target physical distortion parameters, determine the target incident angle based on the target physical distortion table, optimize the target function based on the target incident angle, and obtain the target physical focal length and target pixel distortion parameters.

[0138] For specific embodiments of the lens parameter conversion device, please refer to the embodiments of the lens parameter conversion method described above, which will not be repeated here. Each module in the above-described lens parameter conversion device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0139] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a lens parameter conversion method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0140] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0141] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0142] Obtain the pixel height expression and physical height expression of the first lens;

[0143] Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained, and the target physical distortion table corresponding to the second lens is acquired.

[0144] The target physical distortion parameters corresponding to the second lens are obtained by fitting the target physical distortion table.

[0145] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical distortion parameters and image height conversion ratio.

[0146] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining the lens calibration parameters of the first lens and the physical distortion table of the first lens; obtaining the pixel image height expression based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters; and performing curve fitting based on the first lens physical distortion table to obtain the physical image height expression.

[0147] In one embodiment, when the processor executes the computer program, it further performs the following steps: performing curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table; obtaining the first lens fitted physical distortion parameters corresponding to the physical image height expression based on the first lens physical distortion fitting curve; and obtaining the physical image height expression based on the first lens fitted physical distortion parameters.

[0148] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a first lens physical distortion table; obtaining an incident angle set based on the first lens physical distortion table and a preset step size; substituting the incident angles in the incident angle set into the pixel image height expression to obtain a pixel image height matrix; substituting the incident angles in the incident angle set into the physical image height expression to obtain a physical image height matrix; and obtaining the image height conversion ratio based on the pixel image height matrix and the physical image height matrix.

[0149] In one embodiment, when the processor executes the computer program, it further performs the following steps: performing curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table to obtain the target physical distortion fitting curve corresponding to the target physical distortion table, and determining the target physical distortion parameters based on the target physical distortion fitting curve.

[0150] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining the target physical focal length and target pixel distortion parameters based on the camera imaging model corresponding to the second lens and the target physical distortion parameters; performing parameter conversion based on the target physical focal length, target pixel distortion parameters and image height conversion ratio to obtain the lens parameter conversion result.

[0151] In one embodiment, when the processor executes the computer program, it further performs the following steps: generating a target function corresponding to the second lens based on the camera imaging model and the target physical distortion parameters; determining the target incident angle based on the target physical distortion table; optimizing the target function based on the target incident angle to obtain the target physical focal length and the target pixel distortion parameters.

[0152] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0153] Obtain the pixel height expression and physical height expression of the first lens;

[0154] Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained, and the target physical distortion table corresponding to the second lens is acquired.

[0155] The target physical distortion parameters corresponding to the second lens are obtained by fitting the target physical distortion table.

[0156] The lens parameter conversion results are obtained by performing parameter conversion based on the target physical distortion parameters and image height conversion ratio.

[0157] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining the lens calibration parameters of the first lens and the physical distortion table of the first lens; obtaining the pixel image height expression based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters; and performing curve fitting based on the first lens physical distortion table to obtain the physical image height expression.

[0158] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: performing curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table; obtaining the first lens fitted physical distortion parameters corresponding to the physical image height expression based on the first lens physical distortion fitting curve; and obtaining the physical image height expression based on the first lens fitted physical distortion parameters.

[0159] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a first lens physical distortion table; obtaining an incident angle set based on the first lens physical distortion table and a preset step size; substituting the incident angles in the incident angle set into the pixel image height expression to obtain a pixel image height matrix; substituting the incident angles in the incident angle set into the physical image height expression to obtain a physical image height matrix; obtaining the physical image height matrix; and obtaining the image height conversion ratio based on the pixel image height matrix and the physical image height matrix.

[0160] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: performing curve fitting based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table to obtain the target physical distortion fitting curve corresponding to the target physical distortion table, and determining the target physical distortion parameters based on the target physical distortion fitting curve.

[0161] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining the target physical focal length and target pixel distortion parameters based on the camera imaging model corresponding to the second lens and the target physical distortion parameters; performing parameter conversion based on the target physical focal length, target pixel distortion parameters and image height conversion ratio to obtain the lens parameter conversion result.

[0162] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating a target function corresponding to the second lens based on the camera imaging model and the target physical distortion parameters; determining the target incident angle based on the target physical distortion table; optimizing the target function based on the target incident angle to obtain the target physical focal length and the target pixel distortion parameters.

[0163] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0164] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0165] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A lens parameter conversion method, characterized in that, It is applied to a second lens, which is formed by configuring a protective lens on the first lens; The lens parameter conversion method includes: Obtain the pixel image height expression and the physical image height expression of the first lens; the pixel image height expression is a function expression that represents the relationship between the incident angle and the pixel image height in the pixel plane after the incident angle is affected by pixel distortion; the physical image height expression is used to represent the correspondence between the incident angle and the physical image height in the physical plane. Based on the pixel image height expression and the physical image height expression, the image height conversion ratio is obtained, and the target physical distortion table corresponding to the second lens is acquired; the image height conversion ratio refers to the conversion ratio from the physical plane to the pixel plane; the target physical distortion table is used to record the correspondence between the incident angle and the physical image height of the second lens when a protective lens is configured. The target physical distortion parameters corresponding to the second lens are obtained by fitting the target physical distortion table; the target physical distortion parameters refer to the coefficients corresponding to the fitting function of the target physical distortion table; the fitting function of the target physical distortion table represents the relationship between the incident angle and the physical image height corresponding to the second lens when a protective lens is configured. The lens parameter conversion result is obtained by performing parameter conversion based on the target physical distortion parameters and the image height conversion ratio.

2. The method according to claim 1, characterized in that, The process of obtaining the pixel image height expression and physical image height expression of the first lens includes: Obtain the lens calibration parameters and physical distortion table of the first lens; Based on the first lens pixel focal length and the first lens pixel distortion parameters in the lens calibration parameters, the pixel image height expression is obtained, and curve fitting is performed according to the first lens physical distortion table to obtain the physical image height expression.

3. The method according to claim 2, characterized in that, The step of obtaining the physical image height expression by curve fitting based on the first lens physical distortion table includes: Based on the correspondence between the incident angle and the theoretical distortion physical image height in the first lens physical distortion table, curve fitting is performed to obtain the first lens physical distortion fitting curve corresponding to the first lens physical distortion table. Based on the physical distortion fitting curve of the first lens, the physical distortion parameters of the first lens fitting corresponding to the physical image height expression are obtained. The physical image height expression is obtained by fitting the physical distortion parameters of the first lens.

4. The method according to claim 1, characterized in that, The step of obtaining the image height conversion ratio based on the pixel image height expression and the physical image height expression includes: Obtain the first lens physical distortion table, and based on the first lens physical distortion table and the preset step size, obtain the set of incident angles; Substitute the incident angles from the incident angle set into the pixel image height expression to obtain the pixel image height matrix, and substitute the incident angles from the incident angle set into the physical image height expression to obtain the physical image height matrix; The image height conversion ratio is obtained based on the pixel image height matrix and the physical image height matrix.

5. The method according to claim 1, characterized in that, The step of fitting the target physical distortion parameters corresponding to the second lens based on the target physical distortion table includes: Based on the correspondence between the incident angle and the theoretical distortion physical image height in the target physical distortion table, curve fitting is performed to obtain the target physical distortion fitting curve corresponding to the target physical distortion table; The target physical distortion parameters are determined based on the target physical distortion fitting curve.

6. The method according to claim 1, characterized in that, The step of performing parameter conversion based on the target physical distortion parameters and the image height conversion ratio to obtain the lens parameter conversion result includes: Based on the camera imaging model corresponding to the second lens and the target physical distortion parameters, the target physical focal length and target pixel distortion parameters are obtained; The lens parameter conversion result is obtained by performing parameter conversion based on the target physical focal length, the target pixel distortion parameters, and the image height conversion ratio.

7. The method according to claim 6, characterized in that, The step of obtaining the target physical focal length and target pixel distortion parameters based on the camera imaging model corresponding to the second lens and the target physical distortion parameters includes: Based on the camera imaging model and the target physical distortion parameters, generate a target function corresponding to the second lens; The target incident angle is determined based on the target physical distortion table, and the target function is optimized based on the target incident angle to obtain the target physical focal length and target pixel distortion parameters.

8. A lens parameter conversion device, characterized in that, Applied to a second lens, which is formed by configuring a protective lens on the first lens, the device includes: The acquisition module is used to acquire the pixel image height expression and the physical image height expression of the first lens; the pixel image height expression is a function expression that represents the relationship between the incident angle and the pixel image height in the pixel plane after the incident angle is affected by pixel distortion; the physical image height expression is used to represent the correspondence between the incident angle and the physical image height in the physical plane. The processing module is used to obtain the image height conversion ratio based on the pixel image height expression and the physical image height expression, and to obtain the target physical distortion table corresponding to the second lens; the image height conversion ratio refers to the conversion ratio from the physical plane to the pixel plane; the target physical distortion table is used to record the correspondence between the incident angle and the physical image height corresponding to the second lens when a protective lens is configured; The fitting module is used to fit the target physical distortion parameters corresponding to the second lens according to the target physical distortion table; the target physical distortion parameters refer to the coefficients corresponding to the fitting function of the target physical distortion table; the fitting function of the target physical distortion table represents the relationship between the incident angle and the physical image height corresponding to the second lens when a protective lens is configured. The conversion module is used to perform parameter conversion based on the target physical distortion parameters and the image height conversion ratio to obtain the lens parameter conversion result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Robust lens distortion correction method

    CN108876749A

  • Image distortion correcting method, carrier medium carrying distortion correcting program, and optical apparatus

    US20100177219A1