A method, device, equipment and medium for determining a glue shrinkage amount
By determining the MTF value and image distance of the camera after curing, and optimizing the glue shrinkage calculation using the Gaussian formula, the problem of back focus change caused by inaccurate glue shrinkage was solved, and more precise focus adjustment after glue curing was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-03-24
AI Technical Summary
The inaccurate determination of adhesive shrinkage in existing technologies makes it impossible to effectively avoid changes in the back focus of the camera.
By determining the modulation transfer function (MTF) value of the camera after it has been solidified, the corresponding image distance is identified, and the shrinkage is calculated. The process of determining the shrinkage is optimized using the Gaussian formula and a preset fluctuation range.
It improves the accuracy of film shrinkage, effectively reduces back focus changes in the camera, and ensures consistent shooting results.
Smart Images

Figure CN116546186B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of optical processing, and particularly relates to a glue shrinkage amount determination method and device, equipment and medium. BACKGROUND
[0002] At present, the market has higher and higher requirements for the quality of cameras. A technical personnel can align the optical axis of a lens with the central normal line of a sensor according to image changes, so that the captured image is clear and uniform, and then the lens and the sensor are fixed by using glue. However, the glue shrinkage will cause the back focus of the camera to change. Therefore, in the actual use process, the technical personnel needs to determine the glue shrinkage amount when the glue is cured and shrunk, and write the glue shrinkage amount into a program to restore the back focus of the camera.
[0003] For the determination of the glue shrinkage amount, the common practice in the industry is to save multiple glue shrinkage amounts, and determine the best glue shrinkage amount from the multiple glue shrinkage amounts by testing the shooting effect of the camera under each glue shrinkage amount, and use the best glue shrinkage amount to configure the camera. However, the glue shrinkage amount obtained by using this method is not accurate, and cannot well avoid the change of the back focus of the camera. SUMMARY
[0004] The present application provides a glue shrinkage amount determination method, device, equipment and medium, to solve the problem that the determined glue shrinkage amount is not accurate and cannot well avoid the change of the back focus of the camera after the glue is cured in the prior art.
[0005] The present application provides a glue shrinkage amount determination method, which comprises the following steps:
[0006] determining a first modulation transfer function (MTF) value of a camera after curing according to a first measured object distance saved in advance;
[0007] determining a first image distance and a second image distance corresponding to the first MTF value in a first MTF curve saved in advance, and determining a second MTF value and a third MTF value corresponding to the first image distance and the second image distance in a second MTF curve saved in advance, respectively;
[0008] determining the minimum difference between the second MTF value and the third MTF value and the first MTF value as a target MTF value, and determining an image distance corresponding to the target MTF value as a third image distance after curing of the camera;
[0009] determining the difference between the third image distance and a fourth image distance before curing of the camera as the glue shrinkage amount after curing of the camera.
[0010] Further, before determining the first modulation transfer function (MTF) value of the camera after curing according to the first preset measurement object distance stored in advance, the method further comprises:
[0011] According to a preset distance range of the lens and the sensor, the camera before curing is caused to take a picture according to the first measurement object distance, a first MTF curve corresponding to the first preset measurement object distance is determined and stored, and the first measurement object distance is a focusing distance of the camera.
[0012] According to the distance range, the camera before curing is caused to take a picture according to a preset second measurement object distance, a second MTF curve corresponding to the second measurement object distance is determined and stored, and the second measurement object distance is a distance between the focusing distance of the camera and the nearest shooting distance.
[0013] Further, the method further comprises:
[0014] According to the distance range, the camera before curing is caused to take a picture according to a preset third measurement object distance, and a third MTF curve corresponding to the third measurement object distance is determined.
[0015] According to the distance range, the camera before curing is caused to take a picture according to a preset fourth measurement object distance, and a fourth MTF curve corresponding to the fourth measurement object distance is determined.
[0016] The first measurement image distance, the second measurement image distance, the third measurement image distance and the fourth measurement image distance corresponding to the maximum MTF value in the first MTF curve, the second MTF curve, the third MTF curve and the fourth MTF curve are respectively determined.
[0017] The measurement object distances are sorted according to the distance, and the measurement object distance movement amount of the adjacent two measurement object distances and the corresponding measurement image distance movement amount are determined.
[0018] According to each measurement object distance movement amount, each measurement image distance movement amount and the Gaussian formula, the fourth image distance is determined.
[0019] Further, before determining the first MTF value of the camera after curing according to the first preset measurement object distance stored in advance, the method further comprises:
[0020] The input predicted glue shrinkage amount is received, and the camera is configured according to the predicted glue shrinkage amount.
[0021] The first MTF value of the camera after curing is determined according to the first measurement object distance stored in advance, which comprises:
[0022] The first MTF value is determined according to the first preset measurement object distance and the predicted glue shrinkage amount.
[0023] Further, the difference between the third image distance and a fourth image distance before curing of the camera is determined as the shrinkage of the glue after curing of the camera.
[0024] A first sub-difference between the third image distance and the fourth image distance is determined, and a second sub-difference between the first sub-difference and the predicted shrinkage of the glue is determined, and the second sub-difference is determined as the shrinkage of the glue after curing of the camera.
[0025] Further, after the image distance corresponding to the target MTF value is determined as the third image distance after curing of the camera, before the difference between the third image distance and the fourth image distance before curing of the camera is determined as the shrinkage of the glue after curing of the camera, the method further comprises:
[0026] According to the Gaussian formula and the third image distance, a target actual object distance corresponding to the third image distance is determined.
[0027] According to the target actual object distance and a preset fluctuation range, a preset number of candidate actual object distances within the preset fluctuation range of the target actual object distance are determined.
[0028] The camera after curing is caused to take pictures according to the target actual object distance and each candidate actual object distance respectively, a first candidate MTF value corresponding to the target actual object distance in the taken pictures is determined, and a second candidate MTF value corresponding to each candidate actual object distance is determined.
[0029] If the first candidate MTF value is greater than each second candidate MTF value, it is determined that the third image distance is correct, and then the step of determining the difference between the third image distance and the fourth image distance before curing of the camera as the shrinkage of the glue after curing of the camera is continued to be executed.
[0030] Embodiments of the present application also provide a shrinkage determination device, the device comprising:
[0031] A determination module is configured to determine a first modulation transfer function (MTF) value of a camera after curing according to a first measured object distance saved in advance.
[0032] A searching module is configured to determine a first image distance and a second image distance corresponding to the first MTF value in a first MTF curve saved in advance, and determine a second MTF value and a third MTF value corresponding to the first image distance and the second image distance respectively in a second MTF curve saved in advance.
[0033] The determining module is further configured to determine, as a target MTF value, the one of the second MTF value and the third MTF value that has the smallest difference from the first MTF value, and determine, as a third image distance after curing of the camera, the image distance corresponding to the target MTF value; and determine, as a shrinkage amount of the glue after curing of the camera, a difference between the third image distance and a fourth image distance before curing of the camera.
[0034] Further, the determining module is further configured to, according to a preset distance range between the lens and the sensor, make the camera before curing take a picture according to a first preset measurement object distance, determine and save a first MTF curve corresponding to the first measurement object distance, wherein the first measurement object distance is a focusing distance of the camera; and according to the distance range, make the camera before curing take a picture according to a second preset measurement object distance, determine and save a second MTF curve corresponding to the second measurement object distance, wherein the second measurement object distance is a distance between the focusing distance of the camera and a nearest shooting distance.
[0035] Further, the determining module is further configured to, according to the distance range, make the camera before curing take a picture according to a third preset measurement object distance, determine a third MTF curve corresponding to the third measurement object distance; according to the distance range, make the camera before curing take a picture according to a fourth preset measurement object distance, determine a fourth MTF curve corresponding to the fourth measurement object distance; respectively determine a first measurement image distance, a second measurement image distance, a third measurement image distance and a fourth measurement image distance corresponding to the maximum MTF value in the first MTF curve, the second MTF curve, the third MTF curve and the fourth MTF curve; sort the measurement object distances according to the distance, and determine a measurement object distance movement amount of adjacent two measurement object distances and a corresponding measurement image distance movement amount; and determine the fourth image distance according to each measurement object distance movement amount, each measurement image distance movement amount and a Gaussian formula.
[0036] Further, the apparatus further comprises:
[0037] The receiving module is configured to receive an input predicted shrinkage amount, and configure the camera according to the predicted shrinkage amount.
[0038] The determining module is specifically configured to determine the first MTF value according to the first preset measurement object distance and the predicted shrinkage amount.
[0039] Further, the determining module is specifically configured to determine a first sub-difference value between the third image distance and the fourth image distance, and determine a second sub-difference value between the first sub-difference value and the predicted shrinkage amount, and determine the second sub-difference value as the shrinkage amount of the glue after curing of the camera.
[0040] Further, the determining module is further configured to determine a target actual object distance corresponding to the third image distance according to the Gaussian formula and the third image distance; determine a preset number of candidate actual object distances within a preset fluctuation range of the target actual object distance according to the target actual object distance and the preset fluctuation range; make the camera after solidification capture images respectively according to the target actual object distance and each candidate actual object distance, determine a first candidate MTF value corresponding to the target actual object distance and a second candidate MTF value corresponding to each candidate actual object distance in the captured images; and if the first candidate MTF value is greater than each second candidate MTF value, determine that the third image distance is correct, and then continue to perform the step of determining the difference between the third image distance and a fourth image distance before solidification of the camera as the shrinkage amount after solidification of the camera.
[0041] The embodiments of the present application further provide an electronic device, which comprises a processor configured to implement the steps of the shrinkage amount determination method according to any of the above embodiments when executing a computer program stored in a memory.
[0042] The embodiments of the present application further provide a computer readable storage medium storing a computer program, which is configured to implement the steps of the shrinkage amount determination method according to any of the above embodiments when executed by a processor.
[0043] In the embodiments of the present application, a first modulation transfer function (MTF) value of a camera after solidification is determined according to a first measured object distance saved in advance, a first image distance and a second image distance corresponding to the first MTF value in a first MTF curve saved in advance are determined, a second MTF value and a third MTF value corresponding to the first image distance and the second image distance in a second MTF curve saved in advance are determined, a target MTF value is determined as the second MTF value or the third MTF value with the smallest difference from the first MTF value, an image distance corresponding to the target MTF value is determined as a third image distance after solidification of the camera, and a difference between the third image distance and a fourth image distance before solidification of the camera is determined as a shrinkage amount after solidification of the camera. In the embodiments of the present application, the fourth image distance after solidification of the camera is determined through the first MTF curve, the second MTF curve and the first MTF value after solidification of the camera, and the shrinkage amount after solidification of the camera is determined according to the fourth image distance and the first image distance before solidification of the camera, so that the determined shrinkage amount is accurate and the problem of back focus change after solidification of the camera can be better solved. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to make the technical solutions of the present application clearer, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described below are only some of the embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative work based on these drawings are within the scope of protection of the present application.
[0045] Figure 1 A schematic diagram of a glue shrinkage determination process provided by an embodiment of the present application is provided.
[0046] Figure 2 A schematic diagram of a change in the back focus of a camera provided by an embodiment of the present application is provided.
[0047] Figure 3 A 3D curve distribution diagram of MTF value-u-v provided by an embodiment of the present application is provided.
[0048] Figure 4 A schematic diagram of imaging of an ideal lens provided by an embodiment of the present application is provided.
[0049] Figure 5 A schematic diagram of imaging of an actual lens provided by an embodiment of the present application is provided.
[0050] Figure 6 A schematic diagram of a glue shrinkage determination process provided by an embodiment of the present application is provided.
[0051] Figure 7 A schematic diagram of a glue shrinkage determination device structure provided by an embodiment of the present application is provided.
[0052] Figure 8 A schematic diagram of an electronic device structure provided by an embodiment of the present application is provided. DETAILED DESCRIPTION
[0053] In order to make the technical solutions of the present application clearer, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described below are only some of the embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative work based on these drawings are within the scope of protection of the present application.
[0054] In order to improve the accuracy of the determined glue shrinkage, an embodiment of the present application provides a glue shrinkage determination method, device, equipment and medium.
[0055] Embodiment 1:
[0056] Figure 1 A schematic diagram of a glue shrinkage determination process provided by an embodiment of the present application is provided, which includes:
[0057] S101: Determine the first modulation transfer function (MTF) value of the camera after solidification according to the first measured object distance saved in advance.
[0058] The method for determining glue shrinkage provided in the embodiments of the present application is applied to an electronic device, which can be a camera, a server, a PC, or the like.
[0059] In the related art, after the lens and the sensor are fixed by the glue, the glue will solidify, and the solidification shrinkage of the glue will cause the back focal length of the camera to change. Therefore, the technician needs to determine the glue shrinkage when the glue solidifies and write the glue shrinkage into the program to restore the back focal length of the camera.
[0060] Figure 2 The schematic diagram of the change of the back focal length of the camera provided in the embodiments of the present application is shown in FIG. 1. Figure 2 As shown in FIG. 1, after the lens and the sensor are fixed by the glue, the solidification shrinkage of the glue causes the back focal length of the camera to increase, and then the glue shrinkage is configured to make the back focal length of the camera after solidification consistent with the back focal length before solidification.
[0061] In the application process, after the lens and the sensor of the camera are fixed together, the camera can capture an object at a certain object distance, and the electronic device can determine the MTF value of the camera at the object distance according to the captured image.
[0062] Based on this, in the embodiments of the present application, the first measured object distance is saved in advance in the electronic device, and the electronic device can control the camera with the glue coated between the lens and the sensor and the glue solidified to capture an object at the first measured object distance, and determine the first MTF value corresponding to the first measured object distance.
[0063] S102: Determine the first image distance and the second image distance corresponding to the first MTF value in the first MTF curve saved in advance, and determine the second MTF value and the third MTF value corresponding to the first image distance and the second image distance in the second MTF curve saved in advance.
[0064] In the application process, before the lens of the camera is fixed together with the sensor by the glue, the camera can also capture an image, and at this time, the camera can continuously adjust the distance between the lens and the sensor when capturing a test card at a certain object distance to obtain the MTF curve corresponding to the object distance. In the embodiments of the present application, the first MTF curve and the second MTF curve determined before the lens of the camera is fixed together with the sensor are saved in the electronic device.
[0065] In the embodiments of the present application, in order to determine the corresponding image distance of the first measured object distance in the camera after curing, the electronic device can determine the corresponding image distance of the first MTF value in the pre-stored first MTF curve according to the first MTF value of the camera after curing. Since the back focus of the camera will change after curing, the first MTF value must not be the peak value of the first MTF. And according to the characteristics of the MTF curve, the image distance corresponding to the first MTF value has two, which are referred to as the first image distance and the second image distance in the embodiments of the present application.
[0066] Based on this, in the embodiments of the present application, one of the first image distance and the second image distance is the corresponding image distance of the first measured object distance in the camera after curing. In the embodiments of the present application, the corresponding image distance of the first measured object distance in the camera after curing can be identified from the first image distance and the second image distance according to the second MTF curve.
[0067] Specifically, in the embodiments of the present application, the electronic device determines the second MTF value corresponding to the first image distance in the pre-stored second MTF curve, and the third MTF value corresponding to the second image distance in the second MTF curve. The electronic device identifies the corresponding image distance of the first measured object distance in the camera after curing from the first image distance and the second image distance according to the first MTF value, the second MTF value and the third MTF value.
[0068] S103: Determine the target MTF value as the one with the smallest difference value from the first MTF value among the second MTF value and the third MTF value, and determine the image distance corresponding to the target MTF value as the third image distance of the camera after curing.
[0069] In the embodiments of the present application, the electronic device calculates the first difference value between the second MTF value and the first MTF value, calculates the second difference value between the third MTF value and the first MTF value, and compares the first difference value and the second difference value. Determine the target MTF value as the one with the smallest difference value between the second MTF value and the third MTF value, and determine the image distance corresponding to the target MTF value as the third image distance of the camera after curing.
[0070] Specifically, in the embodiments of the present application, the electronic device calculates the first difference value between the second MTF value and the first MTF value, and the second difference value between the third MTF value and the first MTF value. If the first difference value is smaller than the second difference value, the second MTF value corresponding to the first difference value is determined as the target MTF value, and the second image distance corresponding to the target MTF value is determined as the third image distance of the camera after curing; if the second difference value is smaller than the first difference value, the third MTF value corresponding to the second difference value is determined as the target MTF value, and the third image distance corresponding to the target MTF value is determined as the third image distance of the camera after curing.
[0071] In this embodiment of the application, if at least one of the differences between the second MTF value and the third MTF value and the first MTF value is negative, then the difference is updated using the absolute value of the difference.
[0072] In order to better determine the third image distance after the camera is fixed, in this embodiment of the application, the electronic device can construct a 3D curve distribution map of MTF value-uv based on the first MTF curve and the second MTF curve.
[0073] Figure 3 The 3D curve distribution of MTF value-uv provided in the embodiments of this application is shown below. Figure 3 As shown, u1 is the first measured object distance, u2 is the second measured object distance, and the first MTF value determined by the electronic device corresponds to the first image distance and the second image distance in the first MTF curve, respectively, v. now and v false .
[0074] S104: The difference between the third image distance and the fourth image distance before the camera is cured is determined as the shrinkage amount of the camera after curing.
[0075] In this embodiment of the application, when determining the amount of adhesive shrinkage after camera curing, the electronic device can determine the amount of adhesive shrinkage after camera curing based on the fourth image distance corresponding to the first measured object distance before camera curing and the third image distance corresponding to the first measured object distance after camera curing.
[0076] In this embodiment of the application, when the electronic device determines the fourth image distance corresponding to the first measured object distance before the camera is fixed, the electronic device determines the image distance corresponding to the peak value of the first MTF curve corresponding to the first measured object distance, and determines the image distance as the fourth image distance.
[0077] Specifically, in this embodiment, the electronic device calculates the difference between the third image distance and the fourth image distance, and determines this difference as the amount of adhesive shrinkage after the camera has cured. Generally, this amount of adhesive shrinkage is a negative value.
[0078] In this embodiment, the fourth image distance of the camera after curing is determined by the first MTF curve, the second MTF curve, and the first MTF value after the camera is cured. Based on the fourth image distance and the first image distance before the camera is cured, the amount of adhesive shrinkage of the camera after curing is determined, making the determined amount of adhesive shrinkage accurate and better addressing the issue of back focus changes after the camera adhesive is cured.
[0079] Example 2:
[0080] In order to more accurately determine the glue shrinkage, on the basis of the above embodiment, in the embodiment of the application, before determining the first modulation transfer function MTF value of the camera after curing according to the first preset measurement object distance, the method further comprises:
[0081] According to the distance range of the preset lens and sensor, the camera before curing is caused to shoot according to the first measurement object distance, and a first MTF curve corresponding to the first measurement object distance is determined and saved, wherein the first measurement object distance is the focusing distance of the camera.
[0082] According to the distance range, the camera before curing is caused to shoot according to a preset second measurement object distance, and a second MTF curve corresponding to the second measurement object distance is determined and saved, wherein the second measurement object distance is a distance between the focusing distance of the camera and the nearest shooting distance.
[0083] In the embodiment of the application, the first MTF curve corresponding to the first measurement object distance and the second MTF curve corresponding to the second measurement object distance are pre-stored in the electronic device, wherein the first measurement object distance is the focusing distance of the camera, and the second measurement object distance is any distance between the focusing distance of the camera and the nearest shooting distance.
[0084] Specifically, the camera before curing shoots the object at the first measurement object distance, and before each shooting of the camera, the electronic device adjusts the distance between the lens and the sensor of the camera according to the preset distance range of the lens and the sensor, so that the distance between the lens and the sensor of the camera is different at each shooting, and thus the first MTF curve is obtained.
[0085] The camera before curing shoots the object at the second measurement object distance, and before each shooting of the camera, the electronic device adjusts the distance between the lens and the sensor of the camera according to the preset distance range of the lens and the sensor, so that the distance between the lens and the sensor of the camera is different at each shooting, and thus the second MTF curve is obtained.
[0086] Embodiment 3
[0087] In order to determine the fourth image distance of the camera before curing, on the basis of the above embodiments, in the embodiment of the application, the method further comprises:
[0088] According to the distance range, the camera before curing is caused to shoot according to a preset third measurement object distance, and a third MTF curve corresponding to the third measurement object distance is determined;
[0089] According to the distance range, the camera before curing is caused to shoot according to a preset fourth measurement object distance, and a fourth MTF curve corresponding to the fourth measurement object distance is determined;
[0090] determining a first measured image distance, a second measured image distance, a third measured image distance and a fourth measured image distance corresponding to the maximum MTF value in the first MTF curve, the second MTF curve, the third MTF curve and the fourth MTF curve respectively;
[0091] sorting the measured object distances according to the distance, and determining a measured object distance movement amount of two adjacent measured object distances and a corresponding measured image distance movement amount;
[0092] determining the fourth image distance according to each measured object distance movement amount, each measured image distance movement amount and the Gaussian formula.
[0093] The lens of the camera is a lens, and the camera can image a distant object according to the lens. Figure 4 An imaging schematic diagram of an ideal lens is provided in the embodiments of the present application, as shown in the figure. Figure 4 As shown in the figure, the ideal lens has no thickness, and therefore the imaging formula of the ideal lens is the Gaussian formula, that is, 1 / u+1 / v=1 / f, where u is an object distance, v is an image distance, and f is a focal length.
[0094] However, in actual production and life, the lens itself has a thickness, as shown in the figure. Figure 5 Figure 5 An imaging schematic diagram of an actual lens is provided in the embodiments of the present application, as shown in the figure. Figure 5 In the figure, the lens of the lens has a certain thickness, and the face of the lens close to the object is called the object side main face, and the face of the lens close to the imaging is called the image side main face.
[0095] Since the actually measured object distance in the application process is generally the distance from the object side main face to the object, and the image distance is generally the distance from the imaging to the image side main face, since it is not the same as the defined object distance and image distance, the Gaussian formula needs to be modified when calculating the image distance. The modified Gaussian formula is 1 / (u+Δu)+1 / (v+Δv)=1 / f, where u is an object distance, v is an image distance, f is a focal length, Δu is an object distance change amount, and Δv is an image distance change amount.
[0096] Based on this, in the embodiments of the present application, the electronic device can calculate the focal length, image distance and object distance of the camera through three groups of object distance movement amounts and image distance movement amounts.
[0097] Specifically, in the embodiments of the present application, the camera before curing photographs the object at the third measured object distance, and before each photographing of the camera, the electronic device adjusts the distance between the lens and the sensor of the camera according to the preset distance range between the lens and the sensor, so that the distance between the lens and the sensor of the camera is different during each photographing, and then the third MTF curve is obtained. Wherein, the third measured object distance is at infinity.
[0098] The camera before curing also photographs the object at the fourth measured object distance, and before each photographing of the camera, the electronic device adjusts the distance between the lens and the sensor of the camera according to a preset distance range between the lens and the sensor, so that the distance between the lens and the sensor of the camera is different at each photographing, and a fourth MTF curve is obtained. The fourth measured object distance is the closest photographing distance of the camera.
[0099] The electronic device determines the first measured image distance, the second measured image distance, the third measured image distance, and the fourth measured image distance corresponding to the maximum MTF value in the first MTF curve, the second MTF curve, the third MTF curve, and the fourth MTF curve, respectively. The electronic device can obtain three groups of measured image distance movement amounts and measured object distance movement amounts according to each measured object distance and the corresponding measured image distance.
[0100] Specifically, in the embodiment of the present application, the electronic device sorts the measured object distances according to the distance, and determines the measured object distance movement amount of the adjacent two measured object distances, and the corresponding measured image distance movement amount. The electronic device brings the three groups of measured image distance movement amounts and measured object distance movement amounts into the formula 1 / (u+Δu)+1 / (v+Δv)=1 / f to obtain the fourth image distance of the camera before curing.
[0101] Embodiment 4:
[0102] In order to improve the accuracy of the determination of the shrinkage amount, on the basis of the above-mentioned embodiments, in the embodiment of the present application, before determining the first MTF value of the camera after curing according to the first preset measured object distance saved in advance, the method further comprises:
[0103] receiving an input predicted shrinkage amount, and configuring the camera according to the predicted shrinkage amount;
[0104] The method further comprises:
[0105] determining the first MTF value according to the first preset measured object distance and the predicted shrinkage amount.
[0106] In the embodiment of the present application, in order to better determine the shrinkage amount of the camera and avoid the influence of the consistency of the focal length and the image distance on the accuracy of the shrinkage amount, the electronic device receives the predicted shrinkage amount input by the technician, and the electronic device configures the camera according to the predicted shrinkage amount.
[0107] Specifically, in the embodiments of the present application, the predicted shrinkage can be slightly larger than the empirical value of the shrinkage, for example, if the empirical value of the shrinkage is 0.006 mm, and the current v-f is greater than or equal to 0.003 mm, the predicted shrinkage can be set to -0.009 mm, to ensure that v is greater than f after shrinkage.
[0108] To further improve the accuracy of the determination of the shrinkage, on the basis of the above embodiments, in the embodiments of the present application, the difference between the third image distance and the fourth image distance before curing of the camera is determined as the shrinkage of the camera after curing, which comprises:
[0109] determining a first sub-difference between the third image distance and the fourth image distance, and determining a second sub-difference between the first sub-difference and the predicted shrinkage, and determining the second sub-difference as the shrinkage of the camera after curing.
[0110] In the embodiments of the present application, when the electronic device determines the shrinkage of the camera after curing according to the third image distance after curing and the fourth image distance before curing, the electronic device determines a first sub-difference between the third image distance and the fourth image distance, and determines a second sub-difference between the first sub-difference and the predicted shrinkage, and determines the second sub-difference as the shrinkage of the camera after curing.
[0111] Embodiment 5:
[0112] To further improve the accuracy of the determination of the shrinkage, on the basis of the above embodiments, in the embodiments of the present application, after the target MTF value corresponding to the image distance is determined as the third image distance after curing of the camera, before the difference between the third image distance and the fourth image distance before curing of the camera is determined as the shrinkage of the camera after curing, the method further comprises:
[0113] determining a target actual object distance corresponding to the third image distance according to the Gaussian formula and the third image distance;
[0114] determining a preset number of candidate actual object distances within a preset fluctuation range of the target actual object distance according to the target actual object distance and the preset fluctuation range;
[0115] making the camera after curing take pictures according to the target actual object distance and each candidate actual object distance respectively, determining a first candidate MTF value corresponding to the target actual object distance in the photographed image, and a second candidate MTF value corresponding to each candidate actual object distance;
[0116] If the first candidate MTF value is greater than each second candidate MTF value, it is determined that the third image distance is correct, and then the subsequent step of determining the difference between the third image distance and the fourth image distance before curing of the camera as the shrinkage of the camera after curing is performed.
[0117] In the embodiment of the present application, after determining the third image distance after camera curing, the electronic device further verifies the third image distance.
[0118] Specifically, in the embodiment of the present application, the electronic device determines a target actual object distance corresponding to the third image distance after camera curing according to the third image distance after camera curing, wherein the target actual object distance can be calculated according to the Gaussian formula 1 / u+1 / v=1 / f. The electronic device takes a picture of an object at the target actual object distance, and determines a first candidate MTF value corresponding to the target actual object distance.
[0119] The electronic device also determines a preset number of candidate actual object distances within the fluctuation range and the target actual object distance, and takes a picture of an object at each candidate actual object distance, and determines a second candidate MTF value corresponding to each candidate actual object distance.
[0120] In the embodiment of the present application, if the first candidate MTF value corresponding to the target actual object distance is greater than the second candidate MTF value corresponding to each candidate actual object distance, it is determined that the third image distance after camera curing determined by the electronic device is accurate, and the electronic device performs a subsequent process of determining the shrinkage amount based on the third image distance.
[0121] Figure 6 The shrinkage amount determination process provided in the embodiment of the present application is shown in the following figure. Figure 6 As shown in the figure, the process includes:
[0122] S601: The electronic device receives input first, second, third and fourth measured object distances.
[0123] S602: The electronic device predefines a distance range between the lens and the sensor, so that the camera before curing takes pictures according to the first, second, third and fourth measured object distances to obtain corresponding first, second, third and fourth MTF curves.
[0124] S603: The electronic device determines a first MTF value after camera curing according to the first measured object distance.
[0125] S604: The electronic device determines a fourth image distance before camera curing according to the first, second, third and fourth MTF curves.
[0126] S605: The electronic device constructs a three-dimensional curve distribution graph according to the first and second MTF curves, and determines a third image distance after camera curing based on the three-dimensional curve distribution graph and the first MTF value.
[0127] S606: The electronic device determines the shrinkage of the cured glue according to the third image distance, the fourth image distance, and the input predicted shrinkage of the glue.
[0128] Embodiment 6
[0129] Figure 7 A structure schematic diagram of a shrinkage determination device is provided for the embodiments of the present application. The device comprises:
[0130] The determination module 701 is configured to determine a first modulation transfer function (MTF) value of the camera after curing according to a first saved measurement object distance.
[0131] The search module 702 is configured to determine a first image distance and a second image distance corresponding to the first MTF value in a first saved MTF curve, and determine a second MTF value and a third MTF value corresponding to the first image distance and the second image distance in a second saved MTF curve, respectively.
[0132] The determination module 701 is further configured to determine the target MTF value as the one having the smallest difference with the first MTF value from among the second MTF value and the third MTF value, and determine the third image distance corresponding to the target MTF value as the third image distance after curing of the camera. The determination module 701 is further configured to determine the difference between the third image distance and a fourth image distance before curing of the camera as the shrinkage of the cured glue of the camera.
[0133] In a possible implementation, the determination module 701 is further configured to, according to a preset distance range between the lens and the sensor, make the camera before curing take a picture according to the first saved measurement object distance, determine and save a first MTF curve corresponding to the first saved measurement object distance, wherein the first saved measurement object distance is the focusing distance of the camera; and according to the distance range, make the camera before curing take a picture according to a preset second measurement object distance, determine and save a second MTF curve corresponding to the second measurement object distance, wherein the second measurement object distance is a distance between the focusing distance of the camera and the nearest shooting distance.
[0134] In a possible implementation, the determining module 701 is further configured to: according to the distance range, make the camera before curing take a picture according to a preset third measurement object distance, determine a third MTF curve corresponding to the third measurement object distance; according to the distance range, make the camera before curing take a picture according to a preset fourth measurement object distance, determine a fourth MTF curve corresponding to the fourth measurement object distance; determine a first measurement image distance, a second measurement image distance, a third measurement image distance and a fourth measurement image distance corresponding to the maximum MTF value in the first MTF curve, the second MTF curve, the third MTF curve and the fourth MTF curve respectively; sort the measurement object distances according to the distance, and determine a measurement object distance movement amount of adjacent two measurement object distances and a corresponding measurement image distance movement amount; and determine the fourth image distance according to each measurement object distance movement amount, each measurement image distance movement amount and a Gaussian formula.
[0135] In a possible implementation, the apparatus further includes:
[0136] The receiving module 703 is configured to receive an input predicted shrinkage amount, and configure the camera according to the predicted shrinkage amount.
[0137] The determining module 701 is specifically configured to determine the first MTF value according to the first preset measurement object distance and the predicted shrinkage amount.
[0138] In a possible implementation, the determining module 701 is specifically configured to determine a first sub-difference value of the third image distance and the fourth image distance, and determine a second sub-difference value of the first sub-difference value and the predicted shrinkage amount, and determine the second sub-difference value as the shrinkage amount of the camera after curing.
[0139] In a possible implementation, the determining module 701 is further configured to: determine a target actual object distance corresponding to the third image distance according to a Gaussian formula and the third image distance; determine a preset number of candidate actual object distances within a preset fluctuation range of the target actual object distance according to the target actual object distance and the preset fluctuation range; make the camera after curing take a picture according to the target actual object distance and each candidate actual object distance respectively, determine a first candidate MTF value corresponding to the target actual object distance in the picture and a second candidate MTF value corresponding to each candidate actual object distance; if the first candidate MTF value is greater than each second candidate MTF value, it is determined that the third image distance is correct, and then the step of determining the shrinkage amount of the camera after curing as a difference between the third image distance and the fourth image distance of the camera before curing is continued to be executed.
[0140] Embodiment 8:
[0141] On the basis of the above embodiments, the embodiments of the present application further provide an electronic device,Figure 8 An electronic device structure schematic diagram provided for an embodiment of the present application is shown in Figure 8 The electronic device structure schematic diagram shown in the figure includes a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 complete mutual communication through the communication bus 84;
[0142] The memory 83 stores a computer program, and when the program is executed by the processor 81, the processor 81 executes the following steps:
[0143] According to the first measurement object distance saved in advance, the first modulation transfer function MTF value of the camera after curing is determined;
[0144] The first image distance and the second image distance corresponding to the first MTF value in the first MTF curve saved in advance are determined, and the second MTF value and the third MTF value corresponding to the first image distance and the second image distance in the second MTF curve saved in advance are determined respectively;
[0145] The target MTF value is determined as the MTF value with the smallest difference from the first MTF value among the second MTF value and the third MTF value, and the image distance corresponding to the target MTF value is determined as the third image distance after curing of the camera;
[0146] The difference between the third image distance and the fourth image distance before curing of the camera is determined as the shrinkage of the glue after curing of the camera.
[0147] In a possible implementation, the processor is further configured to:
[0148] According to a preset distance range of the lens and the sensor, the camera before curing is caused to take a picture according to the first measurement object distance, and a first MTF curve corresponding to the first preset measurement object distance is determined and saved, wherein the first measurement object distance is the focusing distance of the camera;
[0149] According to the distance range, the camera before curing is caused to take a picture according to a preset second measurement object distance, and a second MTF curve corresponding to the second measurement object distance is determined and saved, wherein the second measurement object distance is a distance between the focusing distance of the camera and the nearest shooting distance.
[0150] In a possible implementation, the processor is further configured to:
[0151] According to the distance range, the camera before curing is caused to take a picture according to a preset third measurement object distance, and a third MTF curve corresponding to the third measurement object distance is determined;
[0152] According to the distance range, the camera before curing is caused to take a photograph according to a fourth preset measurement object distance, and a fourth MTF curve corresponding to the fourth measurement object distance is determined;
[0153] A first measurement image distance, a second measurement image distance, a third measurement image distance and a fourth measurement image distance corresponding to maximum MTF values in the first MTF curve, the second MTF curve, the third MTF curve and the fourth MTF curve respectively are determined;
[0154] The measurement object distances are sorted according to the distance sizes, and a measurement object distance moving amount of adjacent two measurement object distances and a corresponding measurement image distance moving amount are determined;
[0155] The fourth image distance is determined according to each measurement object distance moving amount, each measurement image distance moving amount and a Gaussian formula.
[0156] In a possible implementation, the processor is further configured to:
[0157] The camera is configured according to the input predicted adhesive shrinkage amount;
[0158] The first MTF value of the camera after curing is determined according to the first preset measurement object distance includes:
[0159] The first MTF value is determined according to the first preset measurement object distance and the predicted adhesive shrinkage amount.
[0160] In a possible implementation, the processor is further configured to:
[0161] A first sub-difference value of the third image distance and the fourth image distance is determined, a second sub-difference value of the first sub-difference value and the predicted adhesive shrinkage amount is determined, and the second sub-difference value is determined as the adhesive shrinkage amount of the camera after curing.
[0162] In a possible implementation, the processor is further configured to:
[0163] The third image distance corresponding to a target actual object distance is determined according to a Gaussian formula and the third image distance.
[0164] A preset number of candidate actual object distances within a preset fluctuation range of the target actual object distance are determined according to the target actual object distance and the preset fluctuation range.
[0165] The camera after curing is caused to take a photograph according to the target actual object distance and each candidate actual object distance respectively, a first candidate MTF value corresponding to the target actual object distance in the photographed image and a second candidate MTF value corresponding to each candidate actual object distance are determined.
[0166] If the first candidate MTF value is greater than each second candidate MTF value, it is determined that the third image distance is correct, and then the step of determining the difference between the third image distance and a fourth image distance before curing of the camera as the shrinkage of the camera after curing is performed.
[0167] The electronic device described above has a similar principle to the method for solving the problem, and therefore the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be described again.
[0168] The communication bus mentioned in the electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 82 is used for communication between the electronic device and other devices. The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0169] The processor described above can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a Digital Signal Processing (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0170] Embodiment 9:
[0171] On the basis of the above-mentioned embodiments, the embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program executable by a processor. When the program runs on the processor, the processor performs the following steps:
[0172] According to the first measurement object distance saved in advance, a first modulation transfer function (MTF) value of the camera after curing is determined;
[0173] determining a first image distance and a second image distance corresponding to the first MTF value in a pre-stored first MTF curve, and determining a second MTF value and a third MTF value corresponding to the first image distance and the second image distance in a pre-stored second MTF curve respectively;
[0174] determining a target MTF value as the second MTF value or the third MTF value with the smallest difference from the first MTF value, and determining an image distance corresponding to the target MTF value as a third image distance after curing of the camera;
[0175] determining a shrinkage of the adhesive after curing of the camera as a difference between the third image distance and a fourth image distance before curing of the camera.
[0176] In a possible implementation, before the first MTF value after curing of the camera is determined according to the pre-stored first preset measurement object distance, the method further includes:
[0177] causing the camera before curing to capture an image according to the first measurement object distance according to a pre-set distance range between the lens and the sensor, determining and storing a first MTF curve corresponding to the first preset measurement object distance, wherein the first measurement object distance is a focusing distance of the camera;
[0178] causing the camera before curing to capture an image according to a pre-set second measurement object distance according to the distance range, determining and storing a second MTF curve corresponding to the second measurement object distance, wherein the second measurement object distance is a distance between the focusing distance of the camera and a nearest shooting distance.
[0179] In a possible implementation, the method further includes:
[0180] causing the camera before curing to capture an image according to a pre-set third measurement object distance according to the distance range, and determining a third MTF curve corresponding to the third measurement object distance;
[0181] causing the camera before curing to capture an image according to a pre-set fourth measurement object distance according to the distance range, and determining a fourth MTF curve corresponding to the fourth measurement object distance;
[0182] determining a first measurement image distance, a second measurement image distance, a third measurement image distance and a fourth measurement image distance corresponding to the maximum MTF value in the first MTF curve, the second MTF curve, the third MTF curve and the fourth MTF curve respectively;
[0183] sorting the measurement object distances according to the distances, and determining a measurement object distance movement amount and a corresponding measurement image distance movement amount of adjacent two measurement object distances;
[0184] According to each measured object distance movement, each measured image distance movement and a Gaussian formula, the fourth image distance is determined.
[0185] In a possible implementation, before the first MTF value of the camera after curing is determined according to the first preset measured object distance, the method further includes:
[0186] The input predicted shrinkage is received, and the camera is configured according to the predicted shrinkage.
[0187] The first MTF value of the camera after curing is determined according to the first measured object distance includes:
[0188] The first MTF value is determined according to the first preset measured object distance and the predicted shrinkage.
[0189] In a possible implementation, the difference between the third image distance and the fourth image distance before curing of the camera is determined as the shrinkage after curing of the camera includes:
[0190] A first sub-difference between the third image distance and the fourth image distance is determined, a second sub-difference between the first sub-difference and the predicted shrinkage is determined, and the second sub-difference is determined as the shrinkage after curing of the camera.
[0191] In a possible implementation, after the third image distance corresponding to the target MTF value is determined as the third image distance after curing of the camera, before the difference between the third image distance and the fourth image distance before curing of the camera is determined as the shrinkage after curing of the camera, the method further includes:
[0192] According to a Gaussian formula and the third image distance, a target actual object distance corresponding to the third image distance is determined.
[0193] According to the target actual object distance and a preset fluctuation range, a preset number of candidate actual object distances within the preset fluctuation range of the target actual object distance are determined.
[0194] The camera after curing is caused to capture an image according to the target actual object distance and each candidate actual object distance respectively, a first candidate MTF value corresponding to the target actual object distance in the captured image is determined, and a second candidate MTF value corresponding to each candidate actual object distance is determined.
[0195] If the first candidate MTF value is greater than each second candidate MTF value, it is determined that the third image distance is correct, and the subsequent step of determining the difference between the third image distance and the fourth image distance before curing of the camera as the shrinkage after curing of the camera is continued.
[0196] Since the principle of solving the problem by the above computer readable storage medium is similar to the method of determining the shrinkage amount, the implementation of the above computer readable storage medium can refer to the implementation of the method, and the repeated parts will not be described.
[0197] Those skilled in the art will appreciate that embodiments of the application can be supplied as a method, a system, or a computer program product. Therefore, the application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer usable program code.
[0198] The application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart and / or block diagram.
[0199] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more blocks or means for performing the functions specified in the flowchart and / or block diagram.
[0200] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more blocks or means for performing the functions specified in the flowchart and / or block diagram.
[0201] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A method for determining adhesive shrinkage, characterized in that, The method includes: Based on the pre-saved first measured object distance, determine the first MTF value of the camera after it has been solidified; Determine the first image distance and the second image distance corresponding to the first MTF value in the pre-saved first MTF curve, and determine the second MTF value and the third MTF value corresponding to the first image distance and the second image distance in the pre-saved second MTF curve, respectively. The MTF value with the smallest difference from the first MTF value between the second MTF value and the third MTF value is determined as the target MTF value, and the image distance corresponding to the target MTF value is determined as the third image distance after the camera is solidified. The difference between the third image distance and the fourth image distance before the camera is cured is determined as the shrinkage amount of the camera after curing. Before determining the first modulation transfer function (MTF) value of the camera after it has been fixed based on the pre-saved first measured object distance, the method further includes: Based on the preset distance range between the lens and the sensor, the camera before solidification takes a picture according to the first measured object distance, and determines and saves the first MTF curve corresponding to the first measured object distance, wherein the first measured object distance is the focusing distance of the camera. Based on the distance range, the camera before solidification takes a picture according to the preset second measurement distance, and determines and saves the second MTF curve corresponding to the second measurement distance. The second measurement distance is the distance between the camera's focusing distance and the closest shooting distance.
2. The method according to claim 1, characterized in that, The method further includes: Based on the distance range, the camera before solidification takes a picture according to the preset third measurement distance, and determines the third MTF curve corresponding to the third measurement distance; Based on the distance range, the camera before solidification takes a picture according to the preset fourth measurement distance, and determines the fourth MTF curve corresponding to the fourth measurement distance; The first measurement image distance, the second measurement image distance, the third measurement image distance, and the fourth measurement image distance corresponding to the largest MTF value among the first MTF curve, the second MTF curve, the third MTF curve, and the fourth MTF curve are determined respectively. The measured object distances are sorted according to their magnitude, and the measurement object distance movement of two adjacent measured object distances and the corresponding measurement image distance movement are determined. The fourth image distance is determined based on the movement of each measured object distance, the movement of each measured image distance, and the Gaussian formula.
3. The method according to claim 1, characterized in that, Before determining the first MTF value of the camera after solidification based on the pre-saved first measured object distance, the method further includes: Receive the input predicted shrinkage amount and configure the camera according to the predicted shrinkage amount; The step of determining the first MTF value of the camera after solidification based on the pre-saved first measured object distance includes: The first MTF value is determined based on the first measured object distance and the predicted shrinkage.
4. The method according to claim 3, characterized in that, The step of determining the difference between the third image distance and the fourth image distance before camera curing as the shrinkage amount of the camera after curing includes: A first sub-difference value is determined between the third image distance and the fourth image distance, and a second sub-difference value is determined between the first sub-difference value and the predicted adhesive shrinkage amount. The second sub-difference value is then determined as the adhesive shrinkage amount after the camera is cured.
5. The method according to claim 1, characterized in that, After determining the image distance corresponding to the target MTF value as the third image distance of the camera after curing, and before determining the difference between the third image distance and the fourth image distance before curing as the shrinkage amount of the camera after curing, the method further includes: Based on the Gaussian formula and the third image distance, determine the actual target distance corresponding to the third image distance; Based on the target actual object distance and the preset fluctuation range, determine a preset number of candidate actual object distances that are within the preset fluctuation range of the target actual object distance; The camera, after being solidified, takes pictures based on the actual distance to the target and each candidate actual object, and determines the first candidate MTF value corresponding to the actual distance to the target in the captured image, and the second candidate MTF value corresponding to each candidate actual object distance. If the first candidate MTF value is greater than each second candidate MTF value, then the third image distance is determined to be correct, and the subsequent step of determining the difference between the third image distance and the fourth image distance before camera curing as the shrinkage amount of the camera after curing is continued.
6. A device for determining adhesive shrinkage, characterized in that, The device includes: The determination module is used to determine the first MTF value of the camera after it has been fixed, based on the first measured object distance that has been saved in advance. The lookup module is used to determine the first image distance and the second image distance corresponding to the first MTF value in the pre-saved first MTF curve, and to determine the second MTF value and the third MTF value corresponding to the first image distance and the second image distance in the pre-saved second MTF curve, respectively. The determining module is further configured to determine the target MTF value as the one with the smallest difference between the second MTF value and the third MTF value and the first MTF value, and to determine the image distance corresponding to the target MTF value as the third image distance of the camera after curing; and to determine the difference between the third image distance and the fourth image distance of the camera before curing as the shrinkage amount of the camera after curing. The determining module is further configured to, based on a preset distance range between the lens and the sensor, cause the camera before solidification to take a picture according to the first measured object distance, determine and save the first MTF curve corresponding to the first measured object distance, wherein the first measured object distance is the focusing distance of the camera; and based on the distance range, cause the camera before solidification to take a picture according to a preset second measured object distance, determine and save the second MTF curve corresponding to the second measured object distance, wherein the second measured object distance is the distance between the focusing distance and the closest shooting distance of the camera.
7. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the shrinkage determination method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method for determining shrinkage as described in any one of claims 1-5.
Citation Information
Patent Citations
Method for calculating camera module carrying glue shrinkage compensation amount, medium and electronic equipment
CN112040122A
Camera module AA process glue shrinkage test method
CN113188772A