Method, medium and electronic device for calculating shrinkage compensation amount of camera module
By calculating the solution of the test images output by the camera module at different object distances, calculating the optimal image distance, and combining the theoretical optimal object distance and the set compensation amount, calculating the compensation amount equipped with glue shrinkage, the sensor position deviation problem caused by glue shrinkage and stress in the prior art is solved, and the effect of reducing material consumption and improving process accuracy is achieved.
Patent Information
- Application Number
- CN202010857626.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-24
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-08-24
Smart Images

Figure CN112040122B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical technology, and in particular to a method for calculating a shrinkage compensation amount of a camera module, and a non-temporary computer storage medium and electronic equipment. Background Art
[0002] During the process of mounting the lens and sensor, the position of the sensor may deviate from the optimal imaging surface due to factors such as thermal shrinkage of the glue and stress generated by the process. Therefore, compensation for the defocus change caused by shrinkage and the process needs to be made in advance, which is called Z-axis compensation.
[0003] In the related art, the method usually adopted is to set the calibration point of 0um at the best imaging surface position, and then compensate 1um-10um in the vertical downward direction of the Z axis, etc., wherein each compensation value needs to be set separately, and a certain number of products are invested, generally 10pcs or more, so that the total investment quantity requires at least 100pcs of product materials, resulting in problems of long time consumption and waste of materials, and the compensation value of the Z axis is usually adjusted in um, which requires high accuracy of the equipment. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, one object of the present invention is to provide a method for calculating the shrinkage compensation amount of a camera module, which can reduce material consumption and improve the accuracy of the process.
[0005] A second object of the present invention is to provide a non-transitory computer storage medium.
[0006] A third objective of the present invention is to provide an electronic device.
[0007] In order to solve the above problems, the method for calculating the shrinkage compensation amount of the camera module in the first aspect of the embodiment of the present invention includes: obtaining a theoretical optimal object distance and setting a compensation amount; obtaining a test image output by the camera module at multiple different object distances; obtaining the resolution of the test image output by the camera module at each object distance; obtaining the corresponding relationship between the image distance and the resolution of the camera module according to the resolution; obtaining the optimal image distance of the camera module according to the corresponding relationship between the image distance and the resolution of the camera module, wherein the optimal image distance is the image distance corresponding to the optimal resolution at multiple different object distances; obtaining the shrinkage compensation amount according to the optimal image distance, the theoretical optimal object distance and the set compensation amount to compensate for the shrinkage of the camera module.
[0008] According to the method for calculating the compensation amount of shrinkage of the camera module carried by the embodiment of the present invention, the test images output by the camera module at different object distances are obtained to obtain the resolution of the test images output at each object distance, so that the corresponding relationship between the image distance and the resolution can be obtained according to the relationship between the object distance and the image distance, and then the optimal image distance of the camera module can be obtained according to the corresponding relationship between the image distance and the resolution, and the shrinkage of the camera module can be compensated by the optimal image distance, the theoretical optimal object distance and the set compensation amount, so that the defocus change caused by factors such as shrinkage or stress can be reduced, and, compared with the prior art During the operation, the image distance is adjusted in micrometers. The method of the embodiment of the present invention calculates the compensation amount of the on-board shrinkage by changing the object distance of the camera module, and the unit level of the object distance is centimeters, which makes the adjustment method more precise and convenient, improves the process accuracy and calculation efficiency, and the method of the embodiment of the present invention compensates for the shrinkage of the camera module by adjusting the object distance. There is no need to set calibration points for compensation in sequence, and there is no need to invest a lot of materials due to the separate setting of each compensation value, thereby reducing the material consumption when determining the compensation amount of the on-board shrinkage and reducing costs.
[0009] In some embodiments, the correspondence between the image distance and the resolution of the camera module is obtained according to the resolution, including: expressing multiple different object distances of the camera module in terms of image distances according to a Gaussian relationship between image distance and object distance; converting the resolution of the camera module at each object distance into a resolution expressed in the corresponding image distance, so as to obtain the correspondence between the image distance and the resolution of the camera module, thereby providing support for obtaining the optimal image distance of the camera module.
[0010] In some embodiments, the optimal image distance of the camera module is obtained according to the correspondence between the image distance and the resolution of the camera module, including: fitting a quadratic curve of image distance and resolution according to the correspondence between the image distance and the resolution of the camera module; determining the optimal resolution according to the quadratic curve of image distance and resolution; obtaining the image distance corresponding to the optimal resolution as the optimal image distance, to provide support for obtaining the shrinkage compensation amount of the camera module.
[0011] In some embodiments, an on-board shrinkage compensation amount is obtained according to the optimal image distance, the theoretical optimal object distance and the set compensation amount to compensate for the on-board shrinkage of the camera module, including: obtaining the image distance corresponding to the theoretical optimal object distance according to the Gaussian relationship between the object distance and the image distance; obtaining the on-board shrinkage compensation amount of the camera module according to the image distance corresponding to the theoretical optimal object distance, the optimal image distance and the set compensation amount, so as to compensate for the on-board shrinkage of the camera module according to the on-board shrinkage compensation amount, thereby reducing the defocus change caused by factors such as shrinkage or stress.
[0012] In some embodiments, the image distance corresponding to the theoretical optimal object distance, the optimal image distance, the set compensation amount, and the onboard shrinkage compensation amount satisfy the following formula:
[0013] Z=PFL 最佳物距 +Z 设定 -PFL 最佳 ;
[0014] Wherein, Z is the shrinkage compensation amount, PFL 最佳物距 is the image distance corresponding to the theoretical optimal object distance, Z 设定 The compensation amount is set as PFL 最佳 The shrinkage of the camera module is compensated according to the shrinkage compensation amount Z, thereby reducing the defocus change caused by shrinkage or stress.
[0015] In some embodiments, the theoretical optimal object distance is the optimal focusing object distance of the camera module, so as to obtain the optimal shrinkage compensation amount of the camera module.
[0016] In some embodiments, the set compensation amount is greater than the actual shrinkage amount of the camera module, so as to determine the optimal image distance corresponding to the optimal resolution.
[0017] In some embodiments, there are multiple camera modules, and the method further includes: obtaining a shrinkage compensation amount based on each camera module; calculating an average value of the shrinkage compensation amount based on each camera module, and using the average value as the final shrinkage compensation amount. This can avoid calculation errors and improve calculation accuracy.
[0018] A second aspect of the present invention provides a non-temporary computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for calculating the shrinkage compensation amount of the camera module as described in the above embodiment.
[0019] A third aspect of the present invention provides an electronic device, comprising: a processor; the non-temporary computer storage medium described in the above embodiment, the non-temporary computer storage medium being communicatively connected to the processor; the non-temporary computer storage medium storing a computer program executable by the processor, and the processor implementing the method for calculating the shrinkage compensation amount of the camera module as described in the above embodiment when executing the computer program.
[0020] According to the electronic device of the embodiment of the present invention, the accuracy of the camera module manufacturing process can be improved and the efficiency of the device operation can be improved by executing the method for calculating the shrinkage compensation amount of the camera module provided by the above embodiment through the processor.
[0021] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0023] Figure 1 is a flow chart of a method for calculating a shrinkage compensation amount of a camera module according to an embodiment of the present invention;
[0024] Figure 2 This is an exemplary diagram of a camera module according to an embodiment of the present invention;
[0025] Figure 3 is an exemplary diagram of a camera module according to another embodiment of the present invention;
[0026] Figure 4 is an example diagram of the corresponding relationship between the image distance and the resolution of a camera module according to an embodiment of the present invention;
[0027] Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present invention.
[0028] Reference numerals:
[0029] Electronic device 1; processor 2; non-transitory computer storage medium 3. DETAILED DESCRIPTION
[0030] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.
[0031] In order to solve the above problems, a method for calculating the shrinkage compensation amount of a camera module proposed in an embodiment of the first aspect of the present invention is described below with reference to the accompanying drawings. This method can reduce material consumption and improve process accuracy.
[0032] Figure 1 FIG. 1 is a flow chart of a method for calculating the shrinkage compensation amount of a camera module according to an embodiment of the present invention. Figure 1 As shown, the method of the embodiment of the present invention at least includes steps S1-S6.
[0033] In the embodiment, the basic idea of the method of the embodiment of the present invention is to use a module product that has been installed as a camera module, such as Figure 2As shown in the figure, when mounting the lens and the chip, in the case of an unknown Z-axis compensation value, a compensation value is pre-set, i.e., a compensation amount is set, and the theoretical optimal object distance of the camera module is determined according to the properties and functions of the lens, and the image distance corresponding to the theoretical optimal object distance and the set compensation amount are used as the actual mounting image distance of the mounted camera module. Furthermore, after the mounting is completed, due to shrinkage and stress factors, the actual mounting image distance will change, that is, the mounting position of the chip will change, for example, Figure 3 As shown, the chip is moved from the actual mounting position along the direction close to the lens to the position after shrinking. Therefore, by obtaining the optimal image distance at the chip's shrinking position, the Z-axis compensation value can be obtained according to the optimal image distance, the theoretical optimal object distance and the set compensation amount to compensate for the shrinking of the camera module. The specific steps are as follows.
[0034] Step S1, obtaining the theoretical optimal object distance and setting the compensation amount.
[0035] In the embodiment, astigmatism and dispersion are considered, but since it is not possible to take all object distances into account, one of the object distances will be optimized, so that when assembling the camera module, it can be mounted according to the object distance imaging best, that is, the theoretical optimal object distance, which is a known quantity of the camera module, and the theoretical optimal object distance is a constant. And when compensating for the shrinkage of the camera module, a compensation value, that is, a compensation amount, can be pre-set.
[0036] The compensation amount may be set with reference to the actual shrinkage amount, and there is no restriction on this.
[0037] Step S2, obtaining test images output by the camera module at multiple different object distances.
[0038] Step S3, obtaining the resolution of the test image output by the camera module at each object distance.
[0039] In an embodiment, the method of the embodiment of the present invention obtains the relationship between the object distance and the resolution by changing the object distance, that is, by adjusting the object distance, without adjusting the distance between the lens and the chip in the camera module, that is, the image distance. At the same time, since the object distance is usually adjusted in centimeters, compared with the method of adjusting the image distance in units of micrometers, the adjustment method adopted by the embodiment of the present invention is more accurate and more convenient, thereby improving the accuracy of the process, saving time, and improving calculation efficiency. In addition, the method of the embodiment of the present invention adopts the method of adjusting the object distance to obtain the onboard shrinkage compensation amount, and there is no need to set calibration points for compensation in sequence, and there is no need to invest a lot of materials due to the separate setting of each compensation value, thereby reducing the material consumption when calculating the onboard shrinkage compensation amount and reducing costs.
[0040] Specifically, the test is performed by changing the object distance of the camera module to obtain the test images output at different object distances, and the resolution of the test images output at each object distance is obtained by the software algorithm, thereby obtaining a correspondence between multiple different object distances and resolutions, and executing step S2. The software algorithm is a technical content known to those skilled in the art, and will not be described in detail.
[0041] Step S4, obtaining a corresponding relationship between the image distance and the resolution of the camera module according to the resolution.
[0042] In the embodiment, according to the physical relationship between the object distance and the image distance, a plurality of different object distances are converted into corresponding plurality of different image distances, so that according to the correspondence between the plurality of different object distances and the resolution, the correspondence between the image distance and the resolution can be obtained.
[0043] Step S5, obtaining the optimal image distance of the camera module according to the corresponding relationship between the image distance and the resolution of the camera module.
[0044] The best image distance is the image distance corresponding to the best resolution at multiple different object distances, or, Figure 3 As shown, the optimal image distance can also be understood as the distance between the chip and the lens when the chip is in the post-collapsing position.
[0045] In the embodiment, the best resolution can be determined according to the resolution of the test image output at each object distance, and thus according to the corresponding relationship between the image distance and the resolution of the camera module, the image distance corresponding to the best resolution can be determined as the best image distance.
[0046] Step S6, obtaining the shrinkage compensation amount according to the optimal image distance, the theoretical optimal object distance and the set compensation amount, so as to compensate for the shrinkage of the camera module.
[0047] In the embodiment, according to the physical relationship between the object distance and the image distance, the image distance corresponding to the theoretical optimal object distance can be obtained, so that Figure 2 Or as shown in 3, the actual mounting image distance of the camera module is obtained according to the sum of the image distance corresponding to the theoretical optimal object distance and the set compensation amount, and then the mounting shrinkage compensation amount, i.e., the Z-axis compensation value, is obtained according to the difference between the actual mounting image distance and the optimal image distance to compensate for the mounting shrinkage of the camera module.
[0048] Therefore, when the camera modules are installed in batches, advance compensation is made based on the shrinkage compensation amount, thereby reducing the defocus change caused by factors such as shrinkage or stress, avoiding the chip mounting position in the camera module from deviating from the optimal imaging surface, and improving the product imaging quality.
[0049] According to the method for calculating the compensation amount of shrinkage of the camera module carried by the embodiment of the present invention, the test images output by the camera module at different object distances are obtained to obtain the resolution of the test images output at each object distance, so that the corresponding relationship between the image distance and the resolution can be obtained according to the relationship between the object distance and the image distance, and then the optimal image distance of the camera module can be obtained according to the corresponding relationship between the image distance and the resolution, and the shrinkage of the camera module can be compensated by the optimal image distance, the theoretical optimal object distance and the set compensation amount, so that the defocus change caused by factors such as shrinkage or stress can be reduced, and, compared with the existing The technology uses a method for adjusting the image distance with a unit level of microns. The method of the embodiment of the present invention calculates the on-board shrinkage compensation amount by changing the object distance of the camera module, and the unit level of the adjusted object distance is centimeters, which makes the adjustment method more precise and more convenient, improves the process accuracy and calculation efficiency, and the method of the embodiment of the present invention uses the method of adjusting the object distance to compensate for the on-board shrinkage of the camera module. There is no need to set calibration points for compensation in sequence, and there is no need to invest a lot of materials due to the separate setting of each compensation value, thereby reducing the material consumption when determining the on-board shrinkage compensation amount and reducing costs.
[0050] In some embodiments, in the method of the embodiment of the present invention, obtaining the correspondence between the image distance and the resolution of the camera module according to the resolution may include, according to the Gaussian relationship between the image distance and the object distance, expressing multiple different object distances of the camera module in terms of image distances, and then converting the resolution of the camera module at each object distance into a resolution expressed by the corresponding image distance, so as to obtain the correspondence between the image distance and the resolution of the camera module, thereby providing support for obtaining the optimal image distance of the camera module.
[0051] In some embodiments, in the method of the embodiment of the present invention, obtaining the optimal image distance of the camera module according to the correspondence between the image distance and the resolution of the camera module may include fitting the correspondence between the image distance and the resolution of the camera module to obtain a quadratic curve of the image distance and the resolution, and then determining the optimal resolution according to the quadratic curve of the image distance and the resolution, such as Figure 4 As shown, the peak value of the quadratic curve of image distance and resolution is the optimal resolution, so the image distance corresponding to the optimal resolution is used as the optimal image distance, which provides support for obtaining the shrinkage compensation amount of the camera module.
[0052] In some embodiments, in the method of the embodiment of the present invention, for obtaining the on-board shrinkage compensation amount based on the optimal image distance, the theoretical optimal object distance and the set compensation amount to compensate for the on-board shrinkage of the camera module, it can include obtaining the image distance corresponding to the theoretical optimal object distance based on the Gaussian relationship between the object distance and the image distance, and then obtaining the on-board shrinkage compensation amount of the camera module based on the image distance corresponding to the theoretical optimal object distance, the optimal image distance and the set compensation amount, so as to compensate for the on-board shrinkage of the camera module according to the on-board shrinkage compensation amount, thereby reducing the defocus change caused by factors such as shrinkage or stress.
[0053] In some embodiments, in the method of the embodiment of the present invention, the image distance corresponding to the theoretical optimal object distance, the optimal image distance, the set compensation amount and the onboard shrinkage compensation amount satisfy the following formula:
[0054] Z=PFL 最佳物距 +Z 设定 -PFL 最佳 ;
[0055] Among them, Z is the shrinkage compensation amount, PFL 最佳物距 is the image distance corresponding to the theoretical optimal object distance, Z 设定 To set the compensation amount, PFL 最佳 The shrinkage of the camera module is compensated according to the shrinkage compensation amount Z, thereby reducing the defocus change caused by shrinkage or stress.
[0056] In some embodiments, the theoretical optimal object distance is the optimal focusing object distance of the camera module, so as to obtain the optimal shrinkage compensation amount of the camera module.
[0057] In some embodiments, in order to facilitate the determination of the peak value of the quadratic curve of image distance and resolution, the compensation amount can be set to be greater than the actual glue shrinkage of the camera module. For example, if the estimated value of the glue shrinkage is 20um, the compensation amount needs to be set to be greater than 20um. Among them, since the shrinkage of the glue is related to its characteristics, the shrinkage of different glues is also different. According to the parameters of the glue, its shrinkage can be roughly estimated.
[0058] In some embodiments, there are multiple camera modules, and the method of the embodiment of the present invention further includes obtaining the shrinkage compensation amount based on each camera module, and then calculating the average value of the shrinkage compensation amount based on each camera module, and using the average value as the final shrinkage compensation amount. This can avoid calculation errors and improve calculation accuracy.
[0059] The following is combined with Figure 2 -Attached Figure 4 The method for calculating the shrinkage compensation amount of the camera module according to the embodiment of the present invention is illustrated by way of example, and the specific contents are as follows.
[0060] like Figure 2 As shown in Figure 3, taking the 90cm theoretical optimal object distance focus as an example, first put in 10 already installed camera modules, set the compensation amount to 16um, and test by changing the object distance of the module product. For example, the object distance range can be set to 10cm-150cm. Adjust the object distance within this range to obtain the resolution at different object distances. At this time, the distance between the lens and the chip in the camera module, that is, the optimal image distance, is:
[0061] PFL1=PFL @90cm +16um-Z,
[0062] Among them, Z is the shrinkage compensation amount, PFL @90cm is the image distance corresponding to the theoretical optimal object distance, and PFL1 is the optimal image distance.
[0063] Then, using the imaging Gaussian formula:
[0064] 1 / P+1 / Q=1 / F,
[0065] Among them, P is the image distance, Q is the object distance, and F is the focal length. Therefore, different object distances can be converted to image distances using Gaussian formula, and the relationship between image distance and resolution can be obtained.
[0066] Then, according to the relationship between image distance and resolution, a quadratic curve is fitted to obtain the image distance PFL1 corresponding to the optimal resolution, as shown in Figure 4 As shown, the best resolution is 0.63, and the corresponding best image distance is PFL1=1.5104mm.
[0067] Finally, according to Gauss's formula, substituting Q = 90cm, PFL @90cm =1.5025mm, so the shrinkage compensation Z is obtained as:
[0068] Z=PFL @90cm +16um-PFL1=8um.
[0069] A second aspect of the present invention provides a non-temporary computer storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for calculating the shrinkage compensation amount of the camera module provided in the above embodiment is implemented.
[0070] A third aspect of the present invention provides an electronic device, such as Figure 5 As shown, the electronic device 1 of the embodiment of the present invention includes a processor 2 and the non-transitory computer storage medium 3 provided in the above embodiment.
[0071] Among them, the non-temporary computer storage medium 3 is communicatively connected with the processor 2, and the non-temporary computer storage medium 3 stores a computer program that can be executed by the processor 2. When the processor 2 executes the computer program, the method for calculating the shrinkage compensation amount of the camera module provided in the above embodiment is implemented.
[0072] According to the electronic device 1 of the embodiment of the present invention, the method for calculating the shrinkage compensation amount of the camera module provided by the above embodiment is executed by the processor 2, so as to improve the accuracy of the camera module process and enhance the efficiency of the device operation.
[0073] In the description of this specification, any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code including one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0074] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0075] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0076] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0077] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0078] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
[0079] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.
[0080] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for calculating the shrinkage compensation amount of a camera module, characterized in that: include: Obtaining a theoretical optimal object distance and setting a compensation amount, wherein the theoretical optimal object distance is an optimal focusing object distance of the camera module; Obtain test images output by the camera module at multiple different object distances; Obtaining the resolution of the test image output by the camera module at each object distance; Obtaining a correspondence between the image distance and the resolution of the camera module according to the resolution; Obtaining the optimal image distance of the camera module according to the corresponding relationship between the image distance and the resolution of the camera module, wherein the optimal image distance is the image distance corresponding to the optimal resolution at multiple different object distances; Obtaining a shrinkage compensation amount according to the optimal image distance, the theoretical optimal object distance and the set compensation amount to compensate for the shrinkage of the camera module; Obtaining a shrinkage compensation amount according to the optimal image distance, the theoretical optimal object distance and the set compensation amount to compensate for the shrinkage of the camera module, including: Obtaining the image distance corresponding to the theoretical optimal object distance according to the Gaussian relationship between the object distance and the image distance; Obtaining the onboard shrinkage compensation amount according to the image distance corresponding to the theoretical optimal object distance, the optimal image distance and the set compensation amount; The image distance corresponding to the theoretical optimal object distance, the optimal image distance, the set compensation amount and the onboard shrinkage compensation amount satisfy the following formula: Z=PFL 最佳物距 +Z 设定 -PFL 最佳 ; Wherein, Z is the shrinkage compensation amount, PFL 最佳物距 is the image distance corresponding to the theoretical optimal object distance, Z 设定 The compensation amount is set as PFL 最佳 is the optimal image distance.
2. The method for calculating the shrinkage compensation amount of the camera module according to claim 1, characterized in that: Obtaining a correspondence between the image distance and the resolution of the camera module according to the resolution includes: According to the Gaussian relationship between the image distance and the object distance, a plurality of different object distances of the camera module are expressed in terms of the image distance respectively; The resolution of the camera module at each object distance is converted into a resolution expressed by a corresponding image distance, so as to obtain a corresponding relationship between the image distance and the resolution of the camera module.
3. The method for calculating the shrinkage compensation amount of the camera module according to claim 1, characterized in that: Obtaining the optimal image distance of the camera module according to the corresponding relationship between the image distance and the resolution of the camera module, including: According to the corresponding relationship between the image distance and the resolution of the camera module, a quadratic curve of the image distance and the resolution is obtained by fitting; Determining the optimal resolution according to the quadratic curve of image distance and resolution; An image distance corresponding to the optimal resolution is obtained as the optimal image distance.
4. The method for calculating the shrinkage compensation amount of the camera module according to any one of claims 1 to 3, characterized in that: The set compensation amount is greater than the actual shrinkage amount of the camera module.
5. The method for calculating the shrinkage compensation amount of the camera module according to any one of claims 1 to 3, characterized in that: The number of the camera modules is multiple, and the method further includes: Obtain the shrinkage compensation amount based on each camera module; An average value of the shrinkage compensation amount of each camera module is calculated, and the average value is used as the final shrinkage compensation amount.
6. A non-transitory computer storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the method for calculating the shrinkage compensation amount of the camera module as described in any one of claims 1-5 is implemented.
7. An electronic device, characterized in that: include: processor; The non-transitory computer storage medium of claim 6, wherein the non-transitory computer storage medium is communicatively coupled to the processor; The non-temporary computer storage medium stores a computer program that can be executed by the processor, and when the processor executes the computer program, it implements the method for calculating the shrinkage compensation amount of the camera module as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and system for obtaining full focal distance image without optical aberration
CN101232578A
Automatic object distance adjusting method and device of imaging system
CN101813946A