Active alignment method, device and computer-readable storage medium for camera module
By adaptively adjusting the step length of the lens assembly and photosensitive element in the camera module, and fitting the defocus curve based on multiple sets of mobile data, the low accuracy and complex assembly of the camera module are solved, and an efficient and accurate assembly process is achieved.
Patent Information
- Application Number
- CN202211681191.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-12-26
AI Technical Summary
The existing active alignment technology of camera modules has problems of low accuracy and complex assembly process. Especially when the selection of optical components and image sensors between different camera modules is large, it is difficult to determine the appropriate initial scanning position and scanning step size, resulting in low productivity.
By moving the target element at the initial step size starting from the initial position, obtaining position data and clarity data of the lens assembly and photosensitive element, estimating the next step size based on multiple sets of moving data, and fitting the defocus curve using the current and historical data, adaptive leveling alignment of the lens assembly and photosensitive element is achieved.
It improves the accuracy and production efficiency of camera module assembly, reduces the number of moving steps for leveling and alignment, adapts to the alignment requirements of camera modules of different specifications, and improves the imaging quality of camera modules.
Smart Images

Figure CN116193225B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera modules, and in particular to an active alignment method, device, and computer-readable storage medium for a camera module. Background Art
[0002] In recent years, as camera modules have been widely used in many fields such as mobile phones, security, medical care, and autonomous driving, the requirements for camera module functions and imaging quality have become increasingly higher, which has also posed greater challenges to the manufacturing and testing of camera modules. Common camera modules mainly include lens assemblies and photosensitive devices, which can also be called image sensors. In order to obtain better imaging quality, more and more camera modules adopt designs such as large apertures and large target surfaces. The previous mechanical fixation method can no longer achieve the accuracy required for high-quality imaging. Active Alignment (AA) technology can achieve precise assembly between lens assemblies and photosensitive devices. Compared with traditional methods, the clarity of camera modules can be further improved, and it is conducive to automated production and improved production efficiency.
[0003] Active alignment technology uses the relative movement between the lens and the image sensor to accurately calculate the relative deviation between the lens' optical center and the lens's clear focal plane and the image sensor. Spatial Frequency Response (SFR) is usually used as a clarity indicator for focal plane calculation. The defocus curves for different target positions are obtained through the relative movement of the lens and the photosensitive element. The spatial position of the target is obtained by taking the maximum value of the defocus curve to calculate the focal plane. However, the selection of optical components and image sensors varies greatly between different camera modules. Different lens components have different focal depths, and there are also tolerances in the manufacturing of lenses from the same batch. How to determine a suitable initial scanning position and scanning step length to ensure accuracy and production efficiency has become a problem that needs to be solved. The commonly used method is to use the design parameters of the optical components and manual testing to give the starting scanning position and a fixed scanning step length. This method increases the debugging time of the equipment and reduces the versatility of the equipment. Another method is to use continuous motion scanning plus synchronous acquisition. This method requires strict signal synchronization, otherwise new errors will be introduced. The single movement distance of this method will be longer, the image may be offset, and other axes cannot be adjusted during continuous motion, which will cause deviations in the target position and SFR value. This method also has very high requirements for the accuracy of the mechanical structure. Summary of the Invention
[0004] The present application mainly provides a method, device and computer-readable storage medium for active alignment of a camera module, which solves the problems of low accuracy and complex assembly process of active alignment of a camera module in the prior art.
[0005] In order to solve the above technical problems, the first aspect of the present application provides a method of moving the target element according to the initial step length starting from the initial position, adjusting the distance between the lens assembly and the photosensitive element, and obtaining the movement data for each time; the movement data includes the position data and clarity data of the target element; estimating the next step length based on at least two sets of movement data; moving the target element according to the next step length, and obtaining the current movement data of the target element; fitting the defocus curve of each target using the current movement data and the historical movement data; the first coordinate axis and the second coordinate axis of the defocus curve represent the position data and the clarity data respectively; and leveling and aligning the lens assembly and the photosensitive element.
[0006] In order to solve the above technical problems, the second aspect of the present application provides an active alignment device for a camera module, the device comprising a processor and a memory coupled to each other; the memory stores a computer program, and the processor is used to execute the computer program to implement the active alignment method of the camera module provided in the first aspect.
[0007] In order to solve the above technical problems, the third aspect of the present application provides a computer-readable storage medium, which stores program data. When the program data is executed by the processor, the active alignment method of the camera module provided by the first aspect is implemented.
[0008] The beneficial effects of the present application are as follows: Different from the prior art, the present application moves the target element according to the initial step length starting from the initial position, adjusts the distance between the lens assembly and the photosensitive element, and obtains the movement data for each time; the movement data includes the position data and clarity data of the target element, the target element is a lens assembly or a photosensitive element, and the target includes at least one central field of view target and four outer field of view targets; the next step length is estimated based on at least two sets of movement data; the target element is moved according to the next step length, and the current movement data of the target element is obtained; the defocus curve of each target is obtained by fitting the current movement data and the historical movement data; the first coordinate axis and the second coordinate axis of the defocus curve represent the position data and the clarity data respectively; the lens assembly and the photosensitive element are leveled and aligned. The present application estimates the next step length based on the movement data of the target element in the previous steps, instead of scanning with a fixed step length throughout the entire process. The movement step length can be adaptively determined, and camera modules of different specifications can also be aligned and leveled in the same way, thereby improving the accuracy of camera module assembly. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0010] Figure 1 This is a schematic flow chart of an embodiment of an active alignment method for a camera module of the present application;
[0011] Figure 2 This is a schematic flow chart of an embodiment of step S12 of the present application;
[0012] Figure 3 This is a schematic flow chart of an embodiment of step S21 of the present application;
[0013] Figure 4 This is a schematic diagram of an embodiment of a defocus curve of the present application;
[0014] Figure 5 This is a schematic flow chart of another embodiment of the active alignment method of the camera module of the present application;
[0015] Figure 6 This is a schematic flow chart of another embodiment of the active alignment method of the camera module of the present application;
[0016] Figure 7 This is a schematic block diagram of the process of fitting defocus curves corresponding to other targets in the outer field of view according to this embodiment;
[0017] Figure 8 This is a schematic structural block diagram of another embodiment of the active alignment device of the camera module of the present application;
[0018] Figure 9 This is a schematic block diagram of the structure of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0020] The terms "first" and "second" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0021] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor do they constitute independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0022] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of the active alignment method of the camera module of the present application. It should be noted that if there is substantially the same result, this embodiment does not necessarily Figure 1 The process sequence shown is limited. This embodiment includes the following steps:
[0023] Step S11: starting from the initial position, the target element is moved according to the initial step length to adjust the distance between the lens assembly and the photosensitive element, and a set of movement data is obtained for each movement.
[0024] The set of movement data includes the position data of the target element and the clarity data corresponding to each target. The target element is either a lens assembly or a photosensitive element. In this step, one of the lens assembly and the photosensitive element is fixed while the other is moved to change the distance between them. The targets include at least one central field of view target and four outer field of view targets.
[0025] Adjust the distance between the lens assembly and the photosensitive element, specifically adjust the distance between the lens assembly and the photosensitive element in the direction of the optical axis.
[0026] In one embodiment, the clarity data is represented by a spatial frequency response (SFR). In other embodiments, the clarity data may be a modulation transfer function (MTF) value or other parameters that can represent clarity.
[0027] Step S12: Estimate the next step length based on at least two sets of movement data.
[0028] The at least two sets of movement data are historical movement data, specifically including movement data obtained after the current movement and movement data for a set number of steps before the current movement and adjacent to the current movement. For example, the at least two sets of movement data may include movement data for the current movement and three adjacent steps before the current movement. The specific number of sets can be set based on actual circumstances and is not limited here.
[0029] See also Figure 2 , Figure 2 This is a flowchart of an embodiment of step S12 of the present application. It should be noted that if there are substantially the same results, this embodiment does not necessarily Figure 1 The process sequence shown is limited. This embodiment includes the following steps:
[0030] Step S21: Update the parameters of the fitting equation based on at least two sets of mobile data, and update the weight coefficient based on the system error, the previously updated prediction covariance matrix and the updated fitting equation, and update the estimated error covariance matrix based on the weight coefficient, the updated fitting equation and the previously updated prediction covariance matrix.
[0031] The fitting relationship is predetermined and includes the parameters to be updated, the independent variables, and the dependent variables. By replacing the independent variables and the dependent variables in the position data and the clarity data in the mobile data respectively, a relationship including only the parameters to be updated can be obtained. Then, the parameters can be updated to obtain the updated fitting relationship.
[0032] The weight coefficient can be updated according to the following formula: K k =P′ k H T (HP′ k H T +R) -1 Among them, K k Represents the weight coefficient, P k represents the prediction covariance matrix of the previous update, H represents the derivative of the first-order Taylor expansion result of the fitting relationship after the update, and H T is the transpose of H, and R represents the systematic error.
[0033] The estimated error covariance matrix can be updated according to the following formula: k =(1-K k H)P′ k .
[0034] See also Figure 3 , Figure 3 This is a flowchart of an embodiment of step S21 of the present application. It should be noted that if there is substantially the same result, this embodiment does not necessarily Figure 3 The process sequence shown is limited. This embodiment includes the following steps:
[0035] Step S211: determining an equation group consisting of at least two sets of fitting relationship expressions based on at least two sets of movement data in combination with the fitting relationship expressions.
[0036] Among them, the fitting relationship is a polynomial function relationship. It can be specifically expressed as: n can be 3, 4, 5, etc. It can be understood that x i is the independent variable of the fitting relationship, Y is the dependent variable of the fitting relationship, a i are the parameters of the fitting relationship.
[0037] Substitute multiple sets of movement data into the fitting equation You can get at least two groups including parameter a i A multivariate equation system consisting of the fitting relationship.
[0038] Step S212: Determine the parameters of the fitting relationship according to the equation group to obtain an updated fitting relationship.
[0039] It is easy to understand that the parameter a can be obtained by solving the above equations i Then we get the fitting relationship Y after parameter update k .
[0040] Step S22: predicting the current definition prediction value corresponding to the current movement data based on the updated fitting relationship and the current position data; and determining the definition estimation value corresponding to the current movement data based on the previously updated definition prediction value, the weight coefficient and the current definition data.
[0041] Specifically, the current position data D k+1 Substitute the updated fitting relationship Y k , solve to get the current clarity prediction value X′ k+1 . It can be specifically expressed as the following formula: X′ k+1 =Y k (D k+1 ).
[0042] The estimated value of sharpness can be determined according to the following formula: k=X′ k +K k (Z k -HX′ k ), where X k Represents the clarity estimation value corresponding to the current mobile data, H′ k Indicates the clarity prediction value of the previous update, Z k Indicates the current resolution data.
[0043] Step S23: Estimate the next step length according to the current definition prediction value and the definition estimation values corresponding to at least two sets of motion data.
[0044] Optionally, according to a preset mapping relationship, the current sharpness prediction value and the sharpness estimation values corresponding to at least two sets of movement data are mapped to obtain the next step length. Specifically, for a complete defocus curve, its position data and gradient have a certain regular relationship. The first and second order derivatives of the fitted curve can be taken, and the peaks of the derivative curves are used as nodes to establish a mapping relationship M between the movement distance and the current position scan data. The current sharpness prediction value and the sharpness estimation values corresponding to at least two sets of movement data can be mapped using this mapping relationship to obtain the next step movement distance: D = M (X′ k+1 ,X k …X k-n ), realize adaptive scanning step length estimation, X k …X k-n Indicates the clarity estimation values corresponding to the at least two sets of motion data.
[0045] According to the above steps S21 to S23, the parameters are iteratively updated. The actual movement data can be input after each movement to predict the next step length. The cycle is repeated. The defocus curve can be drawn by moving according to the predicted step length and obtaining movement data.
[0046] Step S13: moving the target component according to the next step length, and acquiring the current movement data of the target component.
[0047] The target element is controlled to move according to the next long distance, and at the same time, the current movement data of the target element is obtained, including position data and clarity data.
[0048] Step S14: using the obtained current movement data and historical movement data to fit a defocus curve corresponding to each target.
[0049] The first coordinate axis and the second coordinate axis of the defocus curve represent position data and clarity data, respectively. In this embodiment, the horizontal axis represents position data, and the vertical axis represents clarity data.
[0050] The current movement data refers to the movement data obtained after the current movement, and the historical movement data refers to the movement data obtained for each movement before the current movement.
[0051] Step S15: Level and align the lens assembly and the photosensitive element according to each defocus curve.
[0052] The focal plane can be determined based on the peak values of the defocus curves corresponding to each central field of view target and the outer field of view target, and the photosensitive element and lens assembly can be leveled and aligned based on the focal plane.
[0053] See also Figure 4 , Figure 4 It is a schematic diagram of an embodiment of the defocus curve of the present application. The horizontal axis represents the position data of the target element with sampling points, and the vertical axis represents the clarity data with SFR value. The white square represents the defocus curve of equidistant scanning, and the black square represents the defocus curve of adaptive scanning using this embodiment. After verification, it can be seen that: the peak of the defocus curve drawn according to the adaptive step size estimation result is basically consistent with the peak position of the defocus curve drawn with a fixed step size, but the application of the adaptive step size estimation method can move with a larger step size farther away from the peak of the defocus curve, and move with a smaller step size near the peak of the defocus curve, which can greatly reduce the number of moving steps without affecting the peak position of the defocus curve, thereby simplifying the alignment operation of the camera module.
[0054] Different from the existing technology, this step uses the movement data obtained from the initial step movement starting from the initial position to predict the next step length. The next step length can be predicted after each step of movement, realizing adaptive prediction of the movement step length, which can reduce the number of movement steps for leveling and alignment, and at the same time improve the accuracy of the alignment adjustment of the camera module lens assembly and the photosensitive element.
[0055] See also Figure 5 , Figure 5 It is a flowchart of another embodiment of the active alignment method of the camera module of the present application. It should be noted that if there is substantially the same result, this embodiment is not used. Figure 5 The process sequence shown is limited. This embodiment includes the following steps:
[0056] Step S110: moving the target element according to the initial step length to adjust the distance between the lens assembly and the photosensitive element, and obtaining a set of movement data for each movement.
[0057] This step is the same as step S11, starting from the initial position and moving the target component according to the initial step length, and obtaining the movement data of each movement after each movement. Please refer to step S11 for details, which will not be repeated here.
[0058] Step S120: determining, based on the movement data, the outer field of view target that first reaches the peak of the defocus curve as the reference outer field of view target.
[0059] Before this step, it is determined whether the number of steps moved according to the initial step length reaches the set number of steps. If not, the target component is moved step by step with the initial step length according to step S110 until the set number of steps is reached.
[0060] Due to possible mirror tilt, the order in which each target reaches its peak is different. In this step, the outside field target that first reaches the peak of the defocus curve can be predicted based on the movement data according to the initial movement step, and the outside field target that first reaches the peak of the defocus curve can be used as the reference outside field target.
[0061] Optionally, the resolution improvement rate of each target is determined based on the target's corresponding movement data, and the target with the fastest improvement rate is determined as the reference external field of view target. For example, a calculation interval can be selected, such as the last movement according to the initial step length and the 5 to 10 steps before the last movement, and the target with the fastest resolution improvement rate within this interval is determined as the reference external field of view target.
[0062] Step S130: estimating the next step length based on at least two sets of movement data corresponding to the reference outer field of view target and the central field of view target respectively.
[0063] This step uses the method of steps S21 to S23 to estimate the first step length using at least two sets of movement data corresponding to the reference outer field target, and estimates the second step length using at least two sets of movement data corresponding to the central field target. The smaller of the first and second step lengths is used as the next step length.
[0064] Step S140: moving the target element according to the next step length, and obtaining the current movement data of the reference outer field target and the central field target.
[0065] In this step, after the target element is moved according to the estimated next step length, the clarity data and target element position data of the reference outer field target and the center field target are collected.
[0066] Optionally, after this step, it is determined whether the defocus curve of the target in the central field of view reaches a peak value. If not, the process returns to step S130 to continue predicting the next step length. If it reaches a peak value, the process executes step S150.
[0067] Step S150: using the obtained current movement data and historical movement data to fit a defocus curve corresponding to each target.
[0068] For each target, the defocus curve of each target is fitted using the corresponding definition data and the corresponding target element position data. After this step, 5 target defocus curves can be obtained.
[0069] Step S160: Leveling and aligning the lens assembly and the photosensitive element according to each defocus curve.
[0070] In this step, the focal plane can be determined based on the peak values of the defocus curves corresponding to each central field of view target and the outer field of view target, and the photosensitive element and lens assembly can be leveled and aligned according to the focal plane.
[0071] Different from the existing technology, this embodiment predicts the outer field of view target that reaches the peak of the defocus curve first based on several sets of initial movement data of the initial step length movement as the reference outer field of view target, and combines the movement data of the central field of view target to predict the next step length. Finally, the defocus curves of other targets are fitted based on the defocus curves of the reference outer field of view target and the central field of view target, thereby reducing the amount of data processing and saving computing resources.
[0072] See also Figure 6 , Figure 6 This is a flowchart of another embodiment of the active alignment method of the camera module of the present application. It should be noted that if there is substantially the same result, this embodiment is not based on Figure 6 The process sequence shown is limited. This embodiment includes the following steps:
[0073] Step S111: moving the target element according to the initial step length to adjust the distance between the lens assembly and the photosensitive element, and obtaining a set of movement data for each movement.
[0074] Step S121: According to the movement data corresponding to each target, the outer field of view target that first reaches the peak of the defocus curve is determined as the reference outer field of view target.
[0075] Step S131: estimating the next step length based on at least two sets of movement data corresponding to the reference outer field of view target and the central field of view target respectively.
[0076] Step S141: moving the target element according to the next step length, and obtaining the current movement data of the reference outer field target and the central field target.
[0077] Steps S111 to S141 are the same as steps S110 to S140 and will not be repeated here.
[0078] Step S151: Determine whether the defocus curve corresponding to the target in the central field of view reaches a peak value.
[0079] Each time the camera moves one step, it is determined whether the defocus curve of the target in the central field of view reaches a peak value. If so, step S161 is executed; otherwise, the process goes to step S131 to continue predicting the next step length.
[0080] Step S161: Determine whether the mirror tilt exceeds a set tilt threshold.
[0081] Among them, the mirror inclination is determined according to the peak value of the defocus curve corresponding to the central field of view target and the peak value of the defocus curve corresponding to the outer field of view target that reaches the defocus curve peak first. Specifically, it can be determined according to the difference between the peak values of the two.
[0082] If the mirror inclination exceeds the set inclination threshold, execute step S190; otherwise, execute step S171.
[0083] Step S171: estimating a next step length based on at least two sets of movement data, moving the target element according to the next step length, and acquiring movement data of the remaining outer field of view targets.
[0084] It can be understood that when the mirror is tilted, if the defocus curve peak corresponding to the central field of view target appears, the defocus curve peak of at least one outer field of view target also appears. This step repeats the operation of estimating the next step length and moving until the defocus curve peak corresponding to each outer field of view target appears.
[0085] The operation of estimating the next step length can also be performed according to the method of steps S21 to S23. The next step length can be estimated based on the movement data of the remaining targets in the external field of view, or based on the movement data of all targets. Specifically, after determining the target for which the next step length estimation is required, the step length is estimated for each target according to the method of steps S21 to S23. For multiple targets, multiple step lengths can be determined, and the smallest of the multiple step lengths is used as the next step length.
[0086] Step S181: fitting the corresponding defocus curve according to the movement data of each target, and finally leveling and aligning the lens assembly and the photosensitive element according to the defocus curve corresponding to each target.
[0087] In this step, the focal plane can be determined based on the peak values of the defocus curves corresponding to each central field of view target and the outer field of view target, and the photosensitive element and lens assembly are finally leveled and aligned based on the focal plane.
[0088] Step S191: Perform initial leveling and alignment on the lens assembly and the photosensitive element, and move the target element back to the initial position.
[0089] It can be understood that the central field of view target, the central field of view target, and the outer field of view target that first reaches the peak of the defocus curve can all be fitted with corresponding defocus curves based on the movement data obtained by real-time scanning. For targets in the same field of view, which have the same clarity change during the defocus movement, the defocus curves of different outer field of view targets can be obtained by translating the defocus curves of other outer field of view targets. Therefore, this step can be based on the movement data corresponding to the outer field of view target that first reaches the peak of the defocus curve, fit the defocus curves corresponding to the remaining outer field of view targets, determine the focal plane based on the peak value of each defocus curve, and then perform initial leveling and alignment of the lens assembly and the photosensitive element based on the determined focal plane.
[0090] When the target element is moved back to the initial position, the leveled and aligned state is maintained and the target element is moved only in the optical axis direction. After the target element is moved back to the initial position, step S111 is continued and the target element is moved again according to the initial step length.
[0091] See also Figure 7 , Figure 7 This is a flowchart of an embodiment of fitting the defocus curves corresponding to other external field targets. It should be noted that if there are substantially the same results, this embodiment does not use Figure 7 The process sequence shown is limited. This embodiment includes the following steps:
[0092] Step S51 : determining a fitting equation for the defocus curve of the out-of-field target that first reaches the defocus curve peak based on the movement data corresponding to the out-of-field target that first reaches the defocus curve peak.
[0093] The fitting equation corresponding to the first target of the defocus curve can be obtained by fitting the movement equation f(x) according to the movement data obtained for the target.
[0094] Step S52: Determine the translation fitting relationship of the fitting equation.
[0095] Since the defocus curves of the remaining targets outside the field of view can be obtained by translation by f(x), the translation fitting equation can be expressed as f(x+a). This translation fitting equation is the fitting equation for the defocus curves corresponding to the remaining targets outside the field of view.
[0096] Step S53: Process the translation fitting relationship using the least squares method to determine the curve fitting relationship corresponding to the remaining external field of view targets.
[0097] In this step, the least square method is used to solve a to obtain the curve fitting relationship of the defocus curve equation of the remaining external field targets.
[0098] Step S54: fitting the defocus curves of the remaining targets in the outer field of view according to the curve fitting relationship and the position data to be fitted.
[0099] By substituting the position data to be fitted into the curve fitting relationship f(x+a), the clarity data corresponding to the position data of the remaining external field targets can be obtained. Combining the position data to be fitted and the corresponding clarity data, the defocus curves of the remaining external field targets can be fitted.
[0100] Unlike existing technologies, this embodiment detects whether the defocus curve corresponding to the target in the center field of view reaches a peak after each target element moves. When the defocus curve corresponding to the target in the center field of view reaches a peak, it further determines whether the mirror tilt exceeds a set tilt threshold. If the mirror tilt exceeds the tilt threshold, the defocus curve of each target is fitted based on the acquired movement data, and then the focal plane is determined to perform coarse leveling of the camera module. By fitting the defocus curves in the same field of view, the peak values of the defocus curves of the five targets can be obtained using approximately half the original scanning distance compared to the original full scan. Compared to directly adjusting a set of large angles, this gradual adjustment of this embodiment will be more accurate.
[0101] See also Figure 8 , Figure 8 2 is a schematic block diagram of another embodiment of the active alignment device for a camera module of the present application. The active alignment device 200 for the camera module includes a processor 210 and a memory 220 coupled to each other. The memory 220 stores a computer program, and the processor 210 is used to execute the computer program to implement the active alignment method of the camera module described in the above embodiments.
[0102] For the description of each step of the processing execution, please refer to the description of each step of the active alignment method embodiment of the camera module of the above-mentioned application, which will not be repeated here.
[0103] Among them, the alignment device can also include a six-axis mobile platform (not shown in the figure), which can drive the lens assembly or photosensitive element to move translationally in the directions of the three coordinate axes x, y, and z, as well as rotate around the three coordinate axes x, y, and z.
[0104] The memory 220 can be used to store program data and modules. The processor 210 executes various functional applications and data processing by running the program data and modules stored in the memory 220. The memory 220 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a mobile data processing function, a parameter update function), etc.; the data storage area may store data created according to the use of the active alignment device 200 of the camera module (such as clarity data, position data, fitting relationship, etc.). In addition, the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 220 may also include a memory controller to provide the processor 210 with access to the memory 220.
[0105] In each embodiment of the present application, the disclosed method and device can be implemented in other ways. For example, the various embodiments of the active alignment device 200 of the camera module described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0106] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
[0107] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0108] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product can be stored in a storage medium.
[0109] See Figure 9 , Figure 9 This is a structural schematic block diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 300 stores program data 310. When the program data 310 is executed, the steps of each embodiment of the active alignment method of the camera module as described above are implemented.
[0110] For the description of each step of the processing execution, please refer to the description of each step of the active alignment method embodiment of the camera module of the above-mentioned application, which will not be repeated here.
[0111] The computer-readable storage medium 300 may be any medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0112] The above description is merely an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An active alignment method for a camera module, characterized in that: The method comprises: Moving the target element from an initial position according to an initial step length to adjust the distance between the lens assembly and the photosensitive element, and acquiring a set of movement data for each movement; the set of movement data includes position data of the target element and clarity data corresponding to each target; Updating parameters of the fitting relationship based on at least two sets of movement data; and updating weight coefficients based on the system error, the previously updated prediction covariance matrix, and the updated fitting relationship; and updating the estimated error covariance matrix based on the weight coefficients, the updated fitting relationship, and the previously updated prediction covariance matrix; Predicting a current definition prediction value corresponding to the current movement data based on the updated fitting relationship and the current position data; and determining a definition estimation value corresponding to the current movement data based on the previously updated definition prediction value, the weight coefficient, and the current definition data; estimating a next step length according to the current definition prediction value and definition estimation values corresponding to the at least two sets of motion data; Moving the target element according to the next step length and acquiring current movement data of the target element; A defocus curve corresponding to each of the targets is obtained by fitting the obtained current movement data and historical movement data; a first coordinate axis and a second coordinate axis of the defocus curve represent the position data and the clarity data, respectively; The lens assembly and the photosensitive element are leveled and aligned according to each of the defocus curves.
2. The method according to claim 1, characterized in that The updating of the parameters of the fitting relationship based on the at least two sets of movement data includes: Determining an equation group consisting of at least two sets of fitting relationship expressions based on the at least two sets of movement data and the fitting relationship expression; Determining parameters of the fitting relationship according to the set of equations to obtain the updated fitting relationship; The predicting the current definition prediction value corresponding to the current movement data based on the updated fitting relationship and the current position data includes: The current position data is substituted into the updated fitting equation to determine the current definition prediction value.
3. The method according to claim 2, characterized in that The fitting relationship is a polynomial function relationship.
4. The method according to claim 1, wherein After moving the target element from the initial position according to the initial step length to adjust the distance between the lens assembly and the photosensitive element, and acquiring a set of movement data for each movement, the method further includes: Determining, according to the movement data, an outer field target that first reaches a peak value of a defocus curve as a reference outer field target; estimating the next step length based on at least two sets of movement data corresponding to the reference outer field of view target and the central field of view target respectively; The acquiring the current movement data of the target element comprises: Current movement data of the reference outer field of view target and the central field of view target are acquired.
5. The method according to claim 1, wherein After moving the target element according to the next step length and acquiring current movement data of the target element, the method further includes: In response to a defocus curve corresponding to a central field target reaching a peak value, determining whether a mirror tilt exceeds a set tilt threshold value based on the peak values of the defocus curves corresponding to the central field target and the outer field target that first reaches the defocus curve peak value; If the set tilt threshold is exceeded, defocus curves corresponding to the remaining targets in the outside field of view are fitted based on the movement data corresponding to the outside field of view target that first reaches the defocus curve peak; the lens assembly and the photosensitive element are initially leveled and aligned according to the peak values of the defocus curves, and the process of moving the target element from the initial position according to the initial step size is returned to. If the inclination threshold is not exceeded, the steps of estimating the next step length based on at least two sets of movement data and moving the target element according to the next step length are performed, and the defocus curves corresponding to the remaining out-of-field targets are fitted based on the movement data of the remaining out-of-field targets.
6. The method according to claim 5, characterized in that The mirror inclination is determined according to the difference between the peak value of the defocus curve corresponding to the central field of view target and the peak value of the defocus curve corresponding to the outer field of view target that reaches the defocus curve peak first.
7. The method according to claim 5, characterized in that The step of fitting the defocus curves corresponding to the remaining targets in the external field of view based on the movement data corresponding to the external field of view target that first reaches the defocus curve peak comprises: Determining, based on movement data corresponding to the outer field target that first reaches the peak of the defocus curve, a fitting equation for the defocus curve of the outer field target that first reaches the peak of the defocus curve; Determining a translation fitting relationship of the fitting equation; The least square method is used to process the translation fitting relationship to determine the curve fitting relationship corresponding to the remaining external field of view targets; According to the curve fitting relationship and the position data to be fitted, the defocus curves of the remaining outer field targets are obtained by fitting.
8. The method according to claim 1, characterized in that The target element is the lens assembly or the photosensitive element, and the target includes at least one central field of view target and four outer field of view targets.
9. An active alignment device for a camera module, characterized in that: The device includes a processor and a memory coupled to each other; a computer program is stored in the memory, and the processor is configured to execute the computer program to implement the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program data, and when the program data is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Automatic focusing method and device
CN106921830A
Focusing method, focusing device and camera device
CN113438406A