Modulation transfer function curve determination method and device, electronic equipment and storage medium
By taking a test chart card containing multiple standard rings and correcting the distorted ring with distorted formula, the problem of low accuracy of MTF curve caused by distortion is solved, and a more accurate MTF curve calculation is achieved.
Patent Information
- Application Number
- CN202410021863.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-05
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, when using ISO12233 test image cards and methods to conduct MTF tests on cameras with larger distortions such as fisheye cameras, image distortion leads to low accuracy of MTF curves.
By taking a test chart card containing multiple standard rings with a preset lens, the initial MTF curve is determined, and the distorted ring is corrected based on the preset distortion formula and mapping relationship, and the target MTF curve is calculated.
It effectively improves the accuracy and reliability of the MTF curve and reduces the error caused by distortion.
Smart Images

Figure CN120281891A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of optical precision instruments, and particularly relates to a method, device, electronic device, and storage medium for determining a modulation transfer function curve. Background Art
[0002] The modulation transfer function (MTF) is a multi-valued metric that measures the loss of contrast as a function of spatial frequency. In the related art, ISO12233 defines a test chart and a test method for the MTF response of a digital camera. This test chart and test method are applicable to testing the MTF of the lens of an ordinary digital camera or a video camera with relatively small distortion. However, when this test chart and test method are used for the MTF test of a camera with relatively large distortion (such as a fish-eye camera), due to the wide viewing angle of the camera, barrel distortion will occur in the image obtained by shooting the normal test chart with the camera, resulting in relatively low accuracy of the MTF curve measured based on this image. Summary of the Invention
[0003] Embodiments of the present disclosure provide an implementation different from the related art to solve the technical problem of relatively low accuracy of the MTF curve obtained by testing in the related art.
[0004] In a first aspect, the present disclosure provides a method for determining an MTF curve, including:
[0005] Shooting a preset test chart with a preset lens to obtain image information corresponding to the preset test chart, where the preset test chart includes a plurality of standard rings with different radii, the centers of the plurality of standard rings are located at the same position, and the image information includes a plurality of distorted rings generated after distortion of the plurality of standard rings, and the standard rings and the distorted rings correspond one by one;
[0006] Determining an initial MTF curve corresponding to the preset lens based on the image information;
[0007] Determining a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings;
[0008] Determining a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
[0009] In a second aspect, the present disclosure provides a device for determining a modulation transfer function (MTF) curve, including:
[0010] A photographing unit, configured to photograph a preset test chart by using a preset lens, so as to obtain image information corresponding to the preset test chart, where the preset test chart includes a plurality of standard rings with different radii, centers of the plurality of standard rings are located at the same position, the image information includes a plurality of distorted rings after distortion of the plurality of standard rings, and the standard rings and the distorted rings after distortion correspond one by one;
[0011] A determining unit, configured to determine an initial MTF curve corresponding to the preset lens based on the image information;
[0012] The determining unit is further configured to determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings after distortion;
[0013] The determining unit is further configured to determine a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
[0014] In a third aspect, the present disclosure provides an electronic device, including:
[0015] A processor; and
[0016] A memory, configured to store executable instructions of the processor;
[0017] wherein the processor is configured to execute any method in the first aspect and each possible implementation manner of the first aspect by executing the executable instructions.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any method in the first aspect and each possible implementation manner of the first aspect is implemented.
[0019] The present disclosure provides a method of photographing a preset test chart using a preset lens to obtain image information corresponding to the preset test chart. The preset test chart includes a plurality of standard rings with different radii, and the centers of the plurality of standard rings are located at the same position. The image information includes a plurality of distorted rings after distortion of the plurality of standard rings, and the standard rings and the distorted rings after distortion correspond one by one. Based on the image information, an initial MTF curve corresponding to the preset lens is determined. Based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings after distortion, a first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion is determined. According to the first mapping relationship and the initial MTF curve, a target MTF curve corresponding to the preset lens is determined. The method can use a test chart including a plurality of rings and a sinusoidal Siemens star for testing to obtain an initial MTF curve, and then correct the initial MTF curve according to the corresponding relationship between the distorted rings in the image data and the standard rings in the real test chart to reduce the error caused by distortion, and then obtain a corrected MTF curve, effectively improving the accuracy of the MTF curve. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the following-described drawings are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0021] Figure 1 is a schematic flowchart of a method for determining a modulation transfer function (MTF) curve provided by an exemplary embodiment of the present disclosure;
[0022] Figure 2 is another schematic flowchart of a method for determining a modulation transfer function (MTF) curve provided by an exemplary embodiment of the present disclosure;
[0023] Figure 3 is a schematic structural diagram of an MTF curve determination device provided by an exemplary embodiment of the present disclosure;
[0024] Figure 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] The following will describe in detail the embodiments of the present disclosure, and the examples of the embodiments are shown in the drawings. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present disclosure and should not be construed as a limitation of the present disclosure.
[0026] In the description, claims, and drawings of the embodiments of the present disclosure, terms such as "first" and "second" are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0027] First, some terms in the embodiments of the present disclosure are explained below to facilitate understanding by those skilled in the art.
[0028] Grayscale image: The white and black are divided into several levels according to a logarithmic relationship, which is called grayscale. An image represented by grayscale is called a grayscale image.
[0029] A fish-eye lens is a lens with a focal length of 16 mm or shorter and a viewing angle close to or equal to 180°, which is an extreme wide-angle lens.
[0030] Gamma originates from the response curve of a CRT (monitor / TV set), that is, the non-linear relationship between its brightness and input voltage. In a video system, linear light is converted into a non-linear video signal through Gamma correction, usually completed during the shooting process. An ideal Gamma correction reversely outputs the conversion through an opposite non-linear conversion.
[0031] The Modulation Transfer Function (MTF) is a multi-valued metric that measures the contrast loss as a function of spatial frequency. In the related art, ISO12233 defines a test chart and test method for the MTF response of a digital camera. This test chart and test method are applicable to testing the MTF of the lens of an ordinary digital camera or camera with less distortion. However, when using this test chart and test method for the MTF test of a camera with large distortion (such as a fish-eye camera), due to the wide viewing angle of the camera, barrel distortion will appear in the image obtained by shooting the normal test chart with the camera, resulting in a low accuracy of the MTF curve measured based on this image. For this reason, the present disclosure provides a method, device, electronic device, and storage medium for determining a modulation transfer function curve to solve the technical problem of low accuracy of the MTF curve measured based on this image in the related art.
[0032] The following specific embodiments are used to describe in detail the technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0033] Figure 1 A flow chart of a method for determining a modulation transfer function (MTF) curve provided by an exemplary embodiment of the present disclosure is provided. The method can be applied to a computer device. The method at least includes the following steps S1-S4:
[0034] S1. Using a preset lens to shoot a preset test chart to obtain image information corresponding to the preset test chart, wherein the preset test chart includes a plurality of standard circular rings with different radii, and the centers of the plurality of standard circular rings are located at the same position, and the image information includes a plurality of distorted circular rings after the plurality of standard circular rings are distorted, and the standard circular rings correspond to the distorted circular rings one by one;
[0035] In some embodiments, a sinusoidal Siemens star pattern is displayed in each of the multiple measurement areas formed by the multiple standard circular rings; multiple geometric centers of the multiple sinusoidal Siemens star patterns in the multiple measurement areas are located at the same position as the multiple circle centers.
[0036] Figure 2 Another flow chart of a method for determining a modulation transfer function (MTF) curve provided by an embodiment of the present disclosure is as follows: Figure 2 As shown in (b), the preset test chart includes multiple standard rings: standard ring A1, standard ring B1 and standard ring C1, and multiple measurement areas formed by the multiple standard rings: measurement area 1, measurement area 2 and measurement area 3. A sinusoidal Siemens star pattern is displayed in each measurement area, that is, the measurement area and the sinusoidal Siemens star pattern correspond one to one. Measurement area 1 is used to measure the MTF curve of the central field of view, and measurement area 2 and measurement area 3 can be used to measure the MTF curve of the off-axis field of view. The multiple centers of the multiple standard rings and the multiple geometric centers of the multiple sinusoidal Siemens star patterns are all located at point o1.
[0037] The pattern of the sine Siemens star pattern is a number of star lines generated by a sine function. The star lines can change depending on the frequency and phase of the sine function corresponding to the sine Siemens star pattern. For example, adjusting the frequency can make the star points closer or sparser, while adjusting the phase can rotate the direction of the star line.
[0038] For example, Figure 2For (b) in [reference document], the sine function corresponding to the sine Siemens star pattern in each measurement region can be expressed by the following formula (1):
[0039]
[0040] Where p i is the number of periods of the sine Siemens star, i represents different measurement regions (i = 1, 2, 3), a and b are constant coefficients, is the phase angle, is the initial phase, can represent the gray level of the star lines of the sine Siemens star pattern.
[0041] In some embodiments, a sine Siemens star pattern with a smaller period can be selected for measurement. And the number of periods p1 corresponding to the sine Siemens star pattern in measurement region 1, the number of periods p2 corresponding to the sine Siemens star pattern in measurement region 2, and the number of periods p3 corresponding to the sine Siemens star pattern in measurement region 3 satisfy the following relationship: p1 < p2 < p3, so as to ensure that there are high-frequency spatial fringes that can be measured in different measurement regions. The specific numerical setting can refer to the designed MTF index under different fields of view of the lens.
[0042] In some embodiments, among the multiple standard rings, a preset gray scale map is displayed in the region where the standard ring with the smallest first radius is located, and the image information includes the post-shot gray scale map obtained after photographing the preset gray scale map;
[0043] As Figure 2 in (b), point a1 is any point on standard ring A1, and the first radius of standard ring A1 is the distance between point a1 and point o1; point b1 is any point on standard ring B1, and the first radius of standard ring B1 is the distance between point b1 and point o1; point c1 is any point on standard ring C1, and the first radius of standard ring C1 is the distance between point c1 and point o1. Among them, the first radius of standard ring A1 is the smallest, and a preset gray scale map is displayed in the region where it is located.
[0044] In some embodiments, 16 standard gray levels may be displayed in the preset gray scale map, and the 16 standard gray levels can be used for Gamma correction. Gamma correction is a method for adjusting the contrast of image information. Gamma calibration can help compensate for the lost luminance information of image information during display or printing. The 16 standard gray levels are a commonly used gray scale in Gamma correction, which can provide sufficient gray levels to adjust the contrast of image information to compensate for the non-linearity of the Opto-Electronic Conversion Function (OECF). Among them, OECF is a function used to describe the response characteristics of a camera sensor (or optical devices such as scanners, etc.). It represents the relationship between the number of input photons and the intensity of the output electrical signal. In actual situations, this relationship is usually not linear because the sensor responds differently to different luminance levels.
[0045] In some embodiments, the method further includes: adjusting the digital gray scale of the image information based on the preset gray scale map and the captured gray scale map, so that the digital gray scale of the image information matches the preset test pattern, in order to make the luminance of the image information reach a preset target or standard, and the digital gray scale is used to indicate the gray scale values of each pixel in the image information.
[0046] In some embodiments, the preset lens may be a lens with distortion, such as a fish-eye lens, etc.
[0047] In some embodiments, when using the preset lens to capture a preset test chart, the centers of multiple circles in the preset test chart can be located at the center of the field of view of the preset lens. According to the type of the preset lens and the test requirements, different shooting parameters can be selected, such as aperture, shutter speed, etc.
[0048] As Figure 2 shown in (a) of
[0049] In some embodiments, the first radius of each distorted ring among the multiple standard rings can be the actual radius of the rings in a preset test chart, and the unit can be millimeters (mm). The multiple first radii can be expressed as where i = 1, 2, 3,..., n, and n is the number of multiple standard rings (or distorted rings). The value of n can be flexibly determined by the distortion order of the preset lens. For example, for a lens with high-order distortion, multiple characteristic rings (i.e., standard rings) can be designed.
[0050] In some embodiments, the second radius of each distorted ring among the multiple distorted rings is used to characterize the number of pixels included in the line segment between the distorted ring and the center of the circle, and the unit can be pixels (pixel). The multiple second radii can be expressed as where i = 1, 2, 3,..., n.
[0051] In some embodiments, the second radius of each distorted ring among the multiple distorted rings is used to characterize the number of pixels included in the line segment between the distorted ring and the center of the circle, and the unit can be pixels (pixel).
[0052] S2. Determine the initial MTF curve corresponding to the preset lens based on the image information;
[0053] In some embodiments, the image information can be processed based on a preset algorithm to determine the initial MTF curve corresponding to the preset lens. Among them, the preset algorithm can be the processing method in the ISO12233 standard document, and can include the following steps: divide the preset test chart in the image information into multiple sub-fields; calculate the MTF values corresponding to different pixel radii in each sub-field; and then obtain the initial MTF curve corresponding to the preset lens. The specific step details can refer to the related technology and will not be elaborated here.
[0054] In some embodiments, the initial MTF curve is used to characterize the second mapping relationship between multiple spatial frequencies of the image information and multiple initial MTF values.
[0055] See Figure 2 in (c). For the coordinate axes where the initial MTF curve is located, the abscissa can represent the spatial frequency, with the unit of cycles per pixel (lp / pixel), and the ordinate represents the modulation value.
[0056] In some embodiments, the modulation value in the initial MTF curve, i.e., the initial MTF (uncorrected MTF) value, can be the ratio of the output modulation to the input modulation, where the output modulation and the input modulation respectively refer to the contrast of the image information output by the system and the preset test chart input. The initial MTF value can be between 0 and 1, where 0 indicates no information transmission and 1 indicates complete transmission. In an imaging system, a high MTF value indicates that the image has a high contrast and clear details, while a low MTF value indicates that the image has a low contrast and blurred details.
[0057] In the above steps, if the processing method in the ISO12233 standard document is performed based on the distorted image information, the problem that the algorithm result is affected by the distortion will occur, making the initial MTF curve corresponding to the preset lens have errors. Therefore, the initial MTF curve needs to be corrected subsequently.
[0058] S3. Determine a first mapping relationship between the multiple first radii and the multiple second radii based on the preset distortion formula, the multiple standard rings, and the multiple distorted rings;
[0059] In some embodiments, the unknowns in the preset distortion formula include a scaling coefficient and multiple distortion coefficients. For example, the preset distortion formula can be the Brown radial distortion model, and the specific formula is as shown in formula (2):
[0060]
[0061] where M is the scaling coefficient, which can be a constant, and k1, k2,... are the distortion coefficients, r u is the first radius (unit: millimeter mm), and r d is the second radius (unit: pixel).
[0062] In some alternative embodiments provided by the present disclosure, in S3, determining the first mapping relationship between the multiple standard rings and the multiple distorted rings based on the preset distortion formula, the multiple standard rings, and the multiple distorted rings includes S31 - S32:
[0063] S31. For each standard ring among the multiple standard rings, input the first radius of the standard ring and the second radius of the corresponding distorted ring into the preset distortion formula to obtain the expression corresponding to the standard ring, and further obtain multiple expressions corresponding to the multiple standard rings;
[0064] For example, for each standard ring, input the first radius of the standard ring and the second radius Inputting the preset distortion formula (Brown radial distortion model), the corresponding expression for the standard circular ring can be obtained as the following formula (3):
[0065]
[0066] Furthermore, multiple expressions such as the above-mentioned (3) corresponding to the multiple standard circular rings can be obtained.
[0067] S32. Based on the multiple expressions and the preset distortion formula, determine the first mapping relationship between the multiple standard circular rings and the multiple distorted circular rings.
[0068] In some embodiments, in S32, the determining the first mapping relationship between the multiple standard circular rings and the multiple distorted circular rings based on the multiple expressions and the preset distortion formula includes S321 - S323:
[0069] S321. According to the multiple expressions, solve the values of the scaling coefficient and multiple distortion coefficients included in the preset distortion formula;
[0070] In some embodiments, a linear least - squares equation system can be established based on the multiple expressions, and the values of the scaling coefficient and multiple distortion coefficients can be solved through pseudoinverse. The least - squares equation system is as the following formula (4):
[0071]
[0072] Wherein, m is a value less than n (the number of standard circular rings), and the value of m can be flexibly determined. For example, when n is 3, m can be 4.
[0073] S322. Input the values of the scaling coefficient and the multiple distortion coefficients into the preset distortion formula to obtain the corresponding relationship between the multiple first radii and the multiple second radii.
[0074] Taking the above n = 3, m = 4 as an example, the corresponding relationship between the multiple first radii and the multiple second radii can be expressed as formula (5):
[0075]
[0076] The corresponding relationship between the multiple first radii and the multiple second radii is used to represent the corresponding relationship between the real preset test chart and the preset test chart in the image information generated after distortion.
[0077] S323. Take the corresponding relationship between the multiple first radii and the multiple second radii as the first mapping relationship between the multiple standard circular rings and the multiple distorted circular rings.
[0078] S4. Determine the target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
[0079] In some optional embodiments provided by the present disclosure, in S4, determining the target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve includes S41 - S43:
[0080] S41. Obtain a preset third mapping relationship, where the third mapping relationship includes the multiple second radii and the multiple spatial frequencies corresponding to the multiple second radii;
[0081] In some embodiments, different radii of the sinusoidal Siemens star pattern have different spatial frequencies f. The third mapping relationship can be expressed by formula (6):
[0082]
[0083] S42. For each second radius among the multiple second radii, determine the target MTF value corresponding to the first radius corresponding to the second radius according to the first mapping relationship, the third mapping relationship, and the initial MTF curve, and further obtain the correspondence between the multiple first radii corresponding to the multiple second radii and the multiple target MTF values;
[0084] The above initial MTF curve is used to characterize the second mapping relationship between the multiple spatial frequencies of the image information and the multiple initial MTF values. That is, for each first radius, the second radius corresponding to the first radius can be determined based on the first mapping relationship, and then the spatial frequency corresponding to the second radius can be determined based on the third mapping relationship; furthermore, based on the second mapping relationship, the target MTF value corresponding to the spatial frequency corresponding to the target second radius can be determined, and finally, the target MTF value is used as the target MTF value corresponding to the first radius.
[0085] S43. Determine the target MTF curve corresponding to the preset lens based on the correspondence between the multiple first radii and the multiple target MTF values.
[0086] In some embodiments, in S43, determining the target MTF curve corresponding to the preset lens based on the correspondence between the multiple first radii and the multiple target MTF values includes S431 - S433:
[0087] S431. Obtain a preset fourth mapping relationship, where the fourth mapping relationship includes the multiple first radii and the target spatial frequencies corresponding to each first radius;
[0088] In some embodiments, the fourth mapping relationship can be expressed by the following formula (7):
[0089]
[0090] Among them, f’ is the target spatial frequency.
[0091] S432. Based on the fourth mapping relationship and the correspondence between the multiple first radii and the multiple target MTF values, determine the correspondence between the multiple target spatial frequencies corresponding to the multiple first radii and the multiple target MTF values;
[0092] S433. Based on the correspondence between the multiple target spatial frequencies and the multiple target MTF values, determine the target MTF curve corresponding to the preset lens.
[0093] See Figure 2 In (d) therein, for the coordinate axes where the target MTF curve is located, the abscissa can represent the target spatial frequency, with the unit of line pairs per millimeter (lp / mm), and the ordinate represents the modulation value (i.e., the corrected target MTF value).
[0094] The above solution corrects the initial MTF values corresponding to each first radius to obtain the target MTF values corresponding to the second radii corresponding to each first radius, and then draws the target MTF curve corresponding to the preset test chart in the physical space, which can effectively eliminate the errors caused by the distortion of the preset lens and effectively improve the accuracy and reliability of the MTF curve.
[0095] The present disclosure provides a method of using a preset lens to capture a preset test chart to obtain image information corresponding to the preset test chart. Among them, the preset test chart includes multiple standard rings with different radii, and the centers of the multiple standard rings are located at the same position. The image information includes multiple distorted rings after the distortion of the multiple standard rings, and the standard rings and the distorted rings correspond one by one; determine the initial MTF curve corresponding to the preset lens based on the image information; determine the first mapping relationship between the multiple standard rings and the multiple distorted rings based on a preset distortion formula, the multiple standard rings, and the multiple distorted rings; according to the first mapping relationship and the initial MTF curve, determine the target MTF curve corresponding to the preset lens. This solution can use a test chart containing multiple rings and a sinusoidal Siemens star for testing to obtain the initial MTF curve, and then correct the initial MTF curve according to the correspondence between the distorted rings in the image data and the standard rings in the real test chart to obtain the corrected MTF curve, effectively improving the accuracy of the MTF curve.
[0096] Figure 3 It is a schematic structural diagram of a data processing device provided by an exemplary embodiment of the present disclosure;
[0097] Among them, the device includes:
[0098] A photographing unit 601 is configured to photograph a preset test pattern by using a preset lens, so as to obtain image information corresponding to the preset test pattern. The preset test pattern includes a plurality of standard rings, and the image information includes a plurality of distorted rings generated after distortion of the plurality of standard rings. The standard rings and the distorted rings correspond to each other one by one.
[0099] A determining unit 602 is configured to determine an initial MTF curve corresponding to the preset lens based on the image information.
[0100] The determining unit 602 is further configured to determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings.
[0101] The determining unit 602 is further configured to determine a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
[0102] In some optional embodiments provided by the present disclosure, in each measurement region of the plurality of measurement regions formed by the plurality of standard rings, a sinusoidal Siemens star pattern is displayed; geometric centers of the plurality of sinusoidal Siemens star patterns in the plurality of measurement regions are located at the same position as the plurality of center points.
[0103] In some optional embodiments provided by the present disclosure, when the determining unit 602 is configured to determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings, the determining unit 602 is specifically configured to:
[0104] For each standard ring in the plurality of standard rings, input a first radius of the standard ring and a second radius of a distorted ring corresponding to the standard ring into the preset distortion formula, to obtain an expression corresponding to the standard ring, and further obtain a plurality of expressions corresponding to the plurality of standard rings;
[0105] Based on the plurality of expressions and the preset distortion formula, determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings.
[0106] In some optional embodiments provided by the present disclosure, unknowns in the preset distortion formula include a scaling coefficient and a plurality of distortion coefficients. When the determining unit 602 is configured to determine a first mapping relationship between the plurality of standard rings and the distorted rings based on the plurality of expressions and the preset distortion formula, the determining unit 602 is specifically configured to:
[0107] Solve for the values of the scaling coefficient and the values of the multiple distortion coefficients included in the preset distortion formula according to the multiple expressions;
[0108] Input the value of the scaling coefficient and the values of the multiple distortion coefficients into the preset distortion formula to obtain the corresponding relationship between the multiple first radii and the multiple second radii;
[0109] Use the corresponding relationship between the multiple first radii and the multiple second radii as the first mapping relationship between the multiple standard rings and the multiple distorted rings.
[0110] In some optional embodiments provided by the present disclosure, the initial MTF curve is used to characterize the second mapping relationship between multiple spatial frequencies of the image information and multiple initial MTF values; when the determining unit is used to determine the target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve, it is specifically used for:
[0111] Obtain a preset third mapping relationship, where the third mapping relationship includes the multiple second radii and the multiple spatial frequencies corresponding to the multiple second radii;
[0112] For each second radius among the multiple second radii, determine the target MTF value corresponding to the first radius corresponding to the second radius according to the first mapping relationship, the third mapping relationship, and the initial MTF curve, and further obtain the corresponding relationship between the multiple first radii corresponding to the multiple second radii and the multiple target MTF values;
[0113] Based on the corresponding relationship between the multiple first radii and the multiple target MTF values, determine the target MTF curve corresponding to the preset lens.
[0114] In some optional embodiments provided by the present disclosure, in the multiple standard rings, a preset grayscale image is displayed in the area where the standard ring with the smallest first radius is located, and the image information includes the photographed grayscale image obtained by photographing the preset grayscale image;
[0115] In some optional embodiments provided by the present disclosure, the device is further configured to: adjust the digital grayscale of the image information based on the preset grayscale image and the photographed grayscale image to match the digital grayscale of the preset test chart, and the digital grayscale is used to indicate the grayscale values of the pixels in the image information.
[0116] In some optional embodiments provided by the present disclosure, the second radius of each distorted ring among the multiple distorted rings is used to characterize the number of pixels included in the line segment between the distorted ring and the center of the circle.
[0117] It should be understood that the device embodiments and the method embodiments can correspond to each other, and similar descriptions can refer to the method embodiments. To avoid repetition, they will not be elaborated here. Specifically, the device can execute the above method embodiments, and the foregoing and other operations and / or functions of each module in the device respectively correspond to the corresponding processes in each method in the above method embodiments. For the sake of brevity, they will not be elaborated here.
[0118] The device of the embodiments of the present disclosure has been described above from the perspective of functional modules with reference to the drawings. It should be understood that the functional modules can be implemented in the form of hardware, or in the form of instructions in software, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in the present disclosure can be completed by the integrated logic circuit in hardware in the processor and / or instructions in software. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in mature storage media in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage media is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the above method embodiments.
[0119] Figure 4 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure. The electronic device may include:
[0120] A memory 701 and a processor 702. The memory 701 is used to store a computer program and transmit the program code to the processor 702. In other words, the processor 702 can call and run the computer program from the memory 701 to implement the method in the embodiments of the present disclosure.
[0121] For example, the processor 702 can be used to execute the above method embodiments according to the instructions in the computer program.
[0122] In some embodiments of the present disclosure, the processor 702 may include, but is not limited to:
[0123] A general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0124] In some embodiments of the present disclosure, the memory 701 includes, but is not limited to:
[0125] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).
[0126] In some embodiments of the present disclosure, the computer program may be divided into one or more modules, and the one or more modules are stored in the memory 701 and executed by the processor 702 to complete the method provided by the present disclosure. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0127] As Figure 4 shown, the electronic device may further include:
[0128] A transceiver 703, and the transceiver 703 may be connected to the processor 702 or the memory 701.
[0129] Among them, the processor 702 may control the transceiver 703 to communicate with other devices. Specifically, it may send information or data to other devices, or receive information or data sent by other devices. The transceiver 703 may include a transmitter and a receiver. The transceiver 703 may further include an antenna, and the number of antennas may be one or more.
[0130] It should be understood that the various components in the electronic device are connected through a bus system. Among them, the bus system includes, in addition to a data bus, a power bus, a control bus, and a status signal bus.
[0131] The present disclosure also provides a computer storage medium on which a computer program is stored. When the computer program is executed by a computer, the computer can execute the methods in the above method embodiments. Or, the embodiments of the present disclosure also provide a computer program product containing instructions. When the instructions are executed by a computer, the computer executes the methods in the above method embodiments.
[0132] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present disclosure are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)).
[0133] According to one or more embodiments of the present disclosure, a method for determining an MTF curve is provided, including:
[0134] Using a preset lens to photograph a preset test chart to obtain image information corresponding to the preset test chart. Among them, the preset test chart includes a plurality of standard rings with different radii, and the centers of the plurality of standard rings are located at the same position. The image information includes a plurality of distorted rings generated after distortion of the plurality of standard rings, and the standard rings and the distorted rings correspond one by one;
[0135] Based on the image information, determining an initial MTF curve corresponding to the preset lens;
[0136] Determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings;
[0137] Determine a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
[0138] According to one or more embodiments of the present disclosure, in each measurement area of the plurality of measurement areas formed by the plurality of standard rings, a sinusoidal Siemens star pattern is displayed; the plurality of geometric centers of the plurality of sinusoidal Siemens star patterns in the plurality of measurement areas are located at the same position as the plurality of centers of circles.
[0139] According to one or more embodiments of the present disclosure, the determining a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings includes:
[0140] For each standard ring in the plurality of standard rings, input the first radius of the standard ring and the second radius of the corresponding distorted ring into the preset distortion formula to obtain an expression corresponding to the standard ring, and further obtain a plurality of expressions corresponding to the plurality of standard rings;
[0141] Based on the plurality of expressions and the preset distortion formula, determine the corresponding relationship between the plurality of first radii and the plurality of second radii;
[0142] Use the corresponding relationship between the plurality of first radii and the plurality of second radii as the first mapping relationship between the plurality of standard rings and the plurality of distorted rings.
[0143] According to one or more embodiments of the present disclosure, the unknowns in the preset distortion formula include a scaling coefficient and a plurality of distortion coefficients, and the determining a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on the plurality of expressions and the preset distortion formula includes:
[0144] Solve the values of the scaling coefficient and the plurality of distortion coefficients included in the preset distortion formula according to the plurality of expressions;
[0145] Input the values of the scaling coefficient and the plurality of distortion coefficients into the preset distortion formula to obtain the corresponding relationship between the plurality of first radii and the plurality of second radii;
[0146] Use the corresponding relationship between the plurality of first radii and the plurality of second radii as the first mapping relationship between the plurality of standard rings and the plurality of distorted rings.
[0147] According to one or more embodiments of the present disclosure, the initial MTF curve is used to characterize a second mapping relationship between multiple spatial frequencies of the image information and multiple initial MTF values; determining the target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve includes:
[0148] Obtain a preset third mapping relationship, where the third mapping relationship includes the multiple second radii and the multiple spatial frequencies corresponding to the multiple second radii;
[0149] For each second radius among the multiple second radii, according to the first mapping relationship, the third mapping relationship, and the initial MTF curve, determine the target MTF value corresponding to the first radius corresponding to the second radius, and further obtain the correspondence between the multiple first radii corresponding to the multiple second radii and the multiple target MTF values;
[0150] Based on the correspondence between the multiple first radii and the multiple target MTF values, determine the target MTF curve corresponding to the preset lens.
[0151] According to one or more embodiments of the present disclosure, among the multiple standard rings, a preset grayscale map is displayed in the region where the standard ring with the smallest first radius is located, and the image information includes a captured grayscale map obtained by photographing the preset grayscale map;
[0152] The method further includes: adjusting the digital grayscale of the image information based on the preset grayscale map and the captured grayscale map to match the digital grayscale of the preset test chart, where the digital grayscale is used to indicate the grayscale values of the pixels in the image information.
[0153] According to one or more embodiments of the present disclosure, the second radius of each distorted ring among the multiple distorted rings is used to characterize the number of pixels included in the line segment between the distorted ring and the center of the circle.
[0154] According to one or more embodiments of the present disclosure, there is provided an MTF curve determination device, including:
[0155] A photographing unit, configured to photograph a preset test chart using a preset lens to obtain image information corresponding to the preset test chart, where the preset test chart includes multiple standard rings with different radii, the multiple centers of the multiple standard rings are located at the same position, the image information includes multiple distorted rings generated by distortion of the multiple standard rings, and the standard rings and the distorted rings correspond one by one;
[0156] A determination unit, configured to determine an initial MTF curve corresponding to the preset lens based on the image information;
[0157] The determining unit is further configured to determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings;
[0158] The determining unit is further configured to determine a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
[0159] According to one or more embodiments of the present disclosure, in each measurement area of the plurality of measurement areas formed by the plurality of standard rings, a sinusoidal Siemens star pattern is displayed; the plurality of geometric centers of the plurality of sinusoidal Siemens star patterns in the plurality of measurement areas are located at the same position as the plurality of center points.
[0160] According to one or more embodiments of the present disclosure, when the determining unit is configured to determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on a preset distortion formula, the plurality of standard rings, and the diameters of the plurality of distorted rings, it is specifically configured to:
[0161] For each standard ring in the plurality of standard rings, input the first radius of the standard ring and the second radius of the corresponding distorted ring into the preset distortion formula to obtain an expression corresponding to the standard ring, and further obtain a plurality of expressions corresponding to the plurality of standard rings;
[0162] Based on the plurality of expressions and the preset distortion formula, determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings.
[0163] According to one or more embodiments of the present disclosure, the unknowns in the preset distortion formula include a scaling coefficient and a plurality of distortion coefficients. When the determining unit is configured to determine a first mapping relationship between the plurality of standard rings and the plurality of distorted rings based on the plurality of expressions and the preset distortion formula, it is specifically configured to:
[0164] Solve for the value of the scaling coefficient and the values of the plurality of distortion coefficients included in the preset distortion formula according to the plurality of expressions;
[0165] Input the value of the scaling coefficient and the values of the plurality of distortion coefficients into the preset distortion formula to obtain a corresponding relationship between the plurality of first radii and the plurality of second radii;
[0166] Use the corresponding relationship between the plurality of first radii and the plurality of second radii as the first mapping relationship between the plurality of standard rings and the plurality of distorted rings.
[0167] According to one or more embodiments of the present disclosure, the initial MTF curve is used to characterize a second mapping relationship between multiple spatial frequencies of the image information and multiple initial MTF values; when the determining unit is used to determine the target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve, it is specifically used for:
[0168] Obtain a preset third mapping relationship, where the third mapping relationship includes the multiple second radii and the multiple spatial frequencies corresponding to the multiple second radii;
[0169] For each second radius among the multiple second radii, according to the first mapping relationship, the third mapping relationship, and the initial MTF curve, determine the target MTF value corresponding to the first radius corresponding to the second radius, and further obtain the correspondence between the multiple first radii corresponding to the multiple second radii and the multiple target MTF values;
[0170] Based on the correspondence between the multiple first radii and the multiple target MTF values, determine the target MTF curve corresponding to the preset lens.
[0171] According to one or more embodiments of the present disclosure, among the multiple standard rings, a preset grayscale map is displayed in the area where the standard ring with the smallest first radius is located, and the image information includes a captured grayscale map obtained by photographing the preset grayscale map;
[0172] According to one or more embodiments of the present disclosure, the device is further used for: adjusting the digital grayscale of the image information based on the preset grayscale map and the captured grayscale map to match the digital grayscale of the preset test chart, and the digital grayscale is used to indicate the grayscale values of the pixels in the image information.
[0173] According to one or more embodiments of the present disclosure, the second radius of each distorted ring among the multiple distorted rings is used to characterize the number of pixels included in the line segment between the distorted ring and the center of the circle.
[0174] According to one or more embodiments of the present disclosure, there is provided an electronic device, including:
[0175] A processor; and
[0176] A memory for storing executable instructions of the processor;
[0177] Wherein, the processor is configured to execute the above MTF curve determination method by executing the executable instructions.
[0178] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned MTF curve determination method is implemented.
[0179] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0180] In several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or modules can be electrical, mechanical, or other forms.
[0181] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they can be located in one place, or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, in each embodiment of the present disclosure, the various functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.
[0182] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of changes or substitutions, which should all be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A method for determining a modulation transfer function (MTF) curve, characterized in that Comprising: Taking a picture of a preset test chart using a preset lens to obtain image information corresponding to the preset test chart, wherein the preset test chart includes a plurality of standard rings with different radii, the centers of the plurality of standard rings are located at the same position, and the image information includes a plurality of distorted rings after distortion of the plurality of standard rings, and the standard rings and the distorted rings after distortion correspond one by one; Determining an initial MTF curve corresponding to the preset lens based on the image information; Determining a first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings after distortion; Determining a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
2. The method according to claim 1, wherein In each measurement area of the plurality of measurement areas formed by the plurality of standard rings, a sinusoidal Siemens star pattern is displayed; the geometric centers of the plurality of sinusoidal Siemens star patterns in the plurality of measurement areas are located at the same position as the plurality of centers.
3. The method according to claim 1, characterized in that, The determining the first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion based on a preset distortion formula, the plurality of standard rings, and the plurality of distorted rings after distortion includes: For each standard ring in the plurality of standard rings, inputting the first radius of the standard ring and the second radius of the distorted ring after distortion corresponding to the standard ring into the preset distortion formula to obtain an expression corresponding to the standard ring, and further obtaining a plurality of expressions corresponding to the plurality of standard rings; Determining a first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion based on the plurality of expressions and the preset distortion formula.
4. The method according to claim 3, wherein The unknowns in the preset distortion formula include a scaling coefficient and a plurality of distortion coefficients, and the determining a first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion based on the plurality of expressions and the preset distortion formula includes: Solving the values of the scaling coefficient and the plurality of distortion coefficients included in the preset distortion formula according to the plurality of expressions; Inputting the values of the scaling coefficient and the plurality of distortion coefficients into the preset distortion formula to obtain a corresponding relationship between the plurality of first radii and the plurality of second radii; Taking the corresponding relationship between the plurality of first radii and the plurality of second radii as the first mapping relationship between the plurality of standard rings and the plurality of distorted rings after distortion.
5. The method according to claim 1, wherein The initial MTF curve is used to characterize a second mapping relationship between a plurality of spatial frequencies of the image information and a plurality of initial MTF values; The determining a target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve includes: Obtaining a preset third mapping relationship, where the third mapping relationship includes the plurality of second radii and a plurality of spatial frequencies corresponding to the plurality of second radii; For each of the multiple second radii, according to the first mapping relationship, the third mapping relationship, and the initial MTF curve, determine the target MTF value corresponding to the first radius corresponding to the second radius, and further obtain the correspondence between the multiple first radii corresponding to the multiple second radii and the multiple target MTF values; Based on the correspondence between the multiple first radii and the multiple target MTF values, determine the target MTF curve corresponding to the preset lens.
6. The method according to claim 1, characterized in that, Among the multiple standard rings, a preset grayscale image is displayed in the area where the standard ring with the smallest first radius is located, and the image information includes the captured grayscale image obtained by photographing the preset grayscale image; The method further includes: adjusting the digital grayscale of the image information based on the preset grayscale image and the captured grayscale image to match the digital grayscale of the preset test chart, and the digital grayscale is used to indicate the grayscale values of the pixels in the image information.
7. The method according to claim 1, characterized in that, The second radius of each of the multiple distorted rings is used to represent the number of pixels included in the line segment between the distorted ring and the center of the circle.
8. A modulation transfer function (MTF) curve determination device, characterized in that, Includes: A photographing unit, configured to photograph a preset test chart with a preset lens to obtain image information corresponding to the preset test chart, where the preset test chart includes multiple standard rings with different radii, the multiple centers of the multiple standard rings are located at the same position, and the image information includes multiple distorted rings generated by distortion of the multiple standard rings, and the standard rings and the distorted rings correspond one by one; A determination unit, configured to determine the initial MTF curve corresponding to the preset lens based on the image information; The determination unit is further configured to determine the first mapping relationship between the multiple standard rings and the multiple distorted rings based on a preset distortion formula, the multiple standard rings, and the multiple distorted rings; The determination unit is further configured to determine the target MTF curve corresponding to the preset lens according to the first mapping relationship and the initial MTF curve.
9. An electronic device, characterized in that, Includes: A processor; And A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method according to any one of claims 1-7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1-7 is implemented.