Camera module assembly method and related equipment
Through imaging detection and focus digital-to-analog conversion code, the tilt characteristics of the camera module are quantized, and the assembly parameters are dynamically adjusted, which solves the problem of accurate detection and correction of the tilt problem in camera module assembly, and improves assembly accuracy and yield.
Patent Information
- Application Number
- CN202510095851.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
During the assembly process of camera module, due to the slight assembly deviation between the lens and the sensor, the tilt characteristics of the imaging module are difficult to accurately control, affecting the imaging quality and user experience.
Quantify the tilt characteristics of the camera module through imaging detection and focus digital-to-analog conversion codes, and dynamically adjust assembly parameters to optimize assembly accuracy.
It significantly improves the assembly accuracy of the camera module, improves the yield rate and product consistency, and solves the problem that the module tilt cannot be accurately detected and corrected in traditional assembly.
Smart Images

Figure CN120050413A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of optical device assembly. More specifically, the present application relates to a method for assembling a camera module and related equipment. Background Art
[0002] With the continuous popularization of electronic devices and the improvement of their intelligence level, as a key imaging component, camera modules have been widely used in fields such as smart phones, drones, automotive assisted driving, and monitoring devices. However, during the assembly process of camera modules, due to the small assembly deviation between the lens and the sensor, it may be difficult to precisely control the tilt characteristics of the imaging module, thereby affecting the imaging quality of the product and the user experience. Therefore, the research and application of camera module tilt detection and correction technology are particularly important.
[0003] In related technologies, the tilt detection of camera modules usually relies on the method of fixed assembly parameters. Although this method is simple to operate, it fails to fully consider the complex imaging deviations shown by the module due to tilt characteristics after assembly. In traditional technologies, the detection and correction results often deviate from the actual requirements and are difficult to meet the requirements of high-precision assembly. Especially in the process of mass production and the manufacturing of high-end optical devices, this limitation may lead to unqualified imaging performance of the module, thereby affecting the market competitiveness of the product. That is, there are technical problems of low tilt detection accuracy and inflexible correction methods in related technologies. Summary of the Invention
[0004] A series of simplified concepts are introduced in the summary of the invention part of the present application, which will be further described in detail in the detailed implementation part. The summary of the invention part of the present application does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the protection scope of the claimed technical solution.
[0005] The method for assembling a camera module and related equipment provided by the present application can quantify tilt characteristics through imaging detection and focus digital-to-analog conversion code, and dynamically adjust assembly parameters to optimize assembly accuracy, solving the problems of precise detection and correction of tilt problems in traditional assembly.
[0006] In a first aspect, the present application provides a method for assembling a camera module, including: imaging a preset focusing area in a test reticle by a to-be-tested camera module to obtain a focusing digital-to-analog conversion code corresponding to the preset focusing area, where the to-be-tested camera module is a camera module assembled according to first preset parameters; determining an inclination feature of the to-be-tested camera module relative to a horizontal plane according to the focusing digital-to-analog conversion code; adjusting the first preset parameters according to the inclination feature to obtain second preset parameters; and assembling a camera module according to the second preset parameters to obtain a target camera module.
[0007] In some embodiments, the imaging a preset focusing area in a test reticle by a to-be-tested camera module to obtain a focusing digital-to-analog conversion code corresponding to the preset focusing area includes: adjusting the position of the to-be-tested camera module according to a preset code step length, and performing a clarity quantization calculation on an imaging result of the preset focusing area to obtain a clarity quantization array; and determining the focusing digital-to-analog conversion code of the preset focusing area according to the clarity quantization array.
[0008] In some embodiments, the determining the focusing digital-to-analog conversion code of the preset focusing area according to the clarity quantization array includes: fitting a clarity quantization curve corresponding to the preset focusing area according to the clarity quantization array; and determining the digital-to-analog conversion code corresponding to the peak of the clarity quantization curve as the focusing digital-to-analog conversion code.
[0009] In some embodiments, the preset focusing area includes a first focusing area and a second focusing area, the focusing digital-to-analog conversion code includes a first conversion code and a second conversion code, the first conversion code is a focusing digital-to-analog conversion code corresponding to the first focusing area, the second conversion code is a focusing digital-to-analog conversion code corresponding to the second focusing area, and the inclination feature includes an inclination direction and an inclination angle; the determining an inclination feature of the to-be-tested camera module relative to a horizontal plane according to the focusing digital-to-analog conversion code includes: calculating a ratio of the second conversion code to the first conversion code to obtain an inclination coefficient; and determining the inclination direction and the inclination angle according to the inclination coefficient.
[0010] In some embodiments, the process of determining the inclination direction of the to-be-tested camera module according to the inclination coefficient includes: when the inclination coefficient is greater than 1, determining the inclination direction of the to-be-tested camera module as an upward inclination direction of the second focusing area relative to the first focusing area; and when the inclination coefficient is less than 1, determining the inclination direction of the to-be-tested camera module as a downward inclination direction of the second focusing area relative to the first focusing area.
[0011] In some embodiments, the process of determining the tilt angle of the camera module to be measured according to the tilt coefficient includes: calculating the arccosine value of the tilt coefficient to obtain the tilt angle.
[0012] In some embodiments, the first focusing area is the central area of the test target board, and the second focusing area includes four areas located at the upper left, lower left, upper right, and lower right on the diagonal of the test target board.
[0013] In a second aspect, the present application further provides a camera module assembly device, including: a code acquisition unit, configured to image a preset focusing area in a test target board through the camera module to be measured, and obtain a focusing digital-to-analog conversion code corresponding to the preset focusing area, where the camera module to be measured is a camera module assembled according to a first preset parameter; a tilt determination unit, configured to determine the tilt feature of the camera module to be measured relative to the horizontal plane according to the focusing digital-to-analog conversion code; a parameter adjustment unit, configured to adjust the first preset parameter according to the tilt feature to obtain a second preset parameter; and a module assembly unit, configured to assemble a camera module according to the second preset parameter to obtain a target camera module.
[0014] In a third aspect, the present application further provides an electronic device, including: a memory and a processor, where the processor is configured to implement the steps of the camera module assembly method described in the first aspect when executing a computer program stored in the memory.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps of the camera module assembly method described in the first aspect.
[0016] In a fifth aspect, the present application further provides a computer program product, including a computer program or computer-executable instructions, where the computer program or computer-executable instructions, when executed by a processor, implement the camera module assembly method provided in the embodiments of the present application.
[0017] In summary, through the imaging detection after the assembly of the camera module, the present application uses the focusing digital-to-analog conversion code to accurately quantify the tilt feature of the module, and then dynamically adjusts the assembly parameters to optimize the assembly accuracy. This not only improves the assembly accuracy of the module, but also significantly increases the yield and product consistency, effectively solving the problem that the tilt of the module cannot be accurately detected and corrected in traditional assembly. In conclusion, the camera module assembly method provided by the present application uses imaging detection and the focusing digital-to-analog conversion code to quantify the tilt feature, and dynamically adjusts the assembly parameters to optimize the assembly accuracy, solving the problem of accurate detection and correction of the tilt problem in traditional assembly. Description of the Drawings
[0018] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of this specification. Also, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0019] Figure 1 It is a schematic flow chart of a method for assembling a camera module provided by an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of a test reticle provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of the position of a preset focus area provided by an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of the composition structure of a camera module assembling device provided by an embodiment of the present application;
[0023] Figure 5 It is a schematic diagram of the composition structure of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0024] Terms in the specification, claims and drawings of the present application, such as "first", "second", "third", "fourth", etc. (if any), are used to distinguish similar objects and not to describe a specific order or sequence. Therefore, it is understood that under appropriate circumstances, these terms can be interchanged so that the described embodiments can be implemented in a different order, unless there are special requirements in the drawings or descriptions. In addition, the terms "is" and "has" and any variants thereof in the present application are intended to non-exclusively include all possible constituent elements. For example, a process, method, system, product or device comprising several steps or units does not necessarily have to be limited to the clearly listed steps or units, but may also include other steps or units not clearly listed, or steps or units inherent to the process, method, product or device.
[0025] In the present application, a "module" or "unit" refers to a computer program or a part of a computer program with a specific function and works in cooperation with other related parts to achieve a predetermined goal. These modules or units can be implemented by software, hardware (such as a processing circuit or a memory), or a combination of both. One or more processors or memories can implement one or more modules or units. At the same time, each module or unit can also be a part of a larger module or unit.
[0026] The technical solutions in the present application will be described in detail below in conjunction with the accompanying drawings in the embodiments. It should be noted that the described embodiments are only a part of the present application, rather than all embodiments. In the following description, the "some embodiments" mentioned are only subsets of all possible embodiments, which can be the same or different subsets, and different embodiments can be combined with each other without conflict.
[0027] Figure 1 is a schematic flowchart of a method for assembling a camera module provided by an embodiment of the present application. Exemplarily, referring to Figure 1 , the method for assembling a camera module provided by an embodiment of the present application may include the following steps 101 to 104:
[0028] Step 101, imaging a preset focus area in a test reticle through a camera module to be tested, and obtaining a focus digital-to-analog conversion code corresponding to the preset focus area, where the camera module to be tested is a camera module assembled according to a first preset parameter;
[0029] In some examples, the camera module to be tested is at least one camera module that needs to be detected, and is a camera module assembled according to initial assembly parameters (first preset parameters) but not yet calibrated. The test reticle is a standardized reticle for imaging tests of camera modules, usually containing patterns with high contrast and precise design, and is used for focus performance and imaging characteristic detection. It can be, for example, Figure 2The checkerboard pattern target board to be tested, or other test target boards containing multiple groups of high-contrast lines or specific graphics. The preset focus area is at least two areas specifically designed in the test target board, and the camera module needs to focus and image on this area to obtain detection data. The Analog-to-Digital Converter (ADC) can convert the focus signal of the camera module to be tested when shooting the test target board into an Analog-to-Digital Converter Code (ADC Code), which is used to reflect the quantization data of the focus clarity; after the camera module to be tested images the preset focus area, it can analyze the clarity signal of the preset focus area through the built-in algorithm and convert it into a focus analog-to-digital conversion code; for example, after the camera module to be tested shoots the preset focus area in the test target board, a set of focus analog-to-digital conversion codes corresponding to the image clarity is generated. The analog-to-digital conversion code of the preset focus area corresponding to the center point can be 337, and the analog-to-digital conversion code of the preset focus area corresponding to the upper left corner can be 325. The first preset parameter is the assembly parameter used by the camera module to be tested, which can include parameters such as the amount of glue, glue application speed, glue application position, glue application pressure, glue curing time, glue viscosity, glue type, glue temperature, needle diameter, and the alignment accuracy between the lens and the sensor during the Active Alignment (AA) glue application process.
[0030] Exemplarily, the camera module to be tested can be installed on the test platform, a certain distance directly above the test target board vertically to shoot the test target board, analyze the clarity signal of the preset focus area and convert it into a focus analog-to-digital conversion code, and record the values of each preset focus area.
[0031] Through the implementation of step 101, the focus analog-to-digital conversion code (Analog-to-Digital Converter Code, ADC Code) is obtained by using the imaging test, realizing the accurate quantization of the focus performance of the camera module to be tested, providing basic data support for the subsequent analysis of the tilt characteristics, and ensuring the reliability and scientificity of the detection results; and by using the preset focus area and the test target board, the consistency of the test conditions can be ensured, and the interference of external factors on the detection results can be reduced.
[0032] Step 102, determine the tilt characteristics of the camera module to be tested relative to the horizontal plane according to the focus analog-to-digital conversion code;
[0033] In some examples, the horizontal plane is a reference plane used to determine whether the camera module to be tested is installed flat during the detection process. Generally, it refers to the ideal state where the optical system of the camera module to be tested should be parallel to the test target board. For example, the checkerboard test board is placed on a high-precision platform, and its plane is defined as the "horizontal plane". Ideally, the optical axis of the camera module is perpendicular to the board. The tilt feature describes the tilt degree and direction of the camera module to be tested relative to the horizontal plane, and can be quantified by analyzing the differences in the focus digital-to-analog conversion codes of different preset focus regions.
[0034] By implementing step 102, with the help of the focus digital-to-analog conversion code, the tilt direction and degree of the module relative to the horizontal plane can be accurately quantified, providing data support for subsequent parameter adjustment; and the digitization and automation of tilt detection are achieved, which helps to improve the detection efficiency and accuracy.
[0035] Step 103, adjust the first preset parameter according to the tilt feature to obtain the second preset parameter;
[0036] In some examples, the second preset parameter is a set of assembly parameters adjusted according to the tilt feature of the camera module, which is used to optimize the assembly process, correct the tilt problem, and ensure higher imaging quality and focusing accuracy after the camera module is assembled.
[0037] Exemplarily, assuming that in the setting of the first preset parameter, the initial distance between the lens and the sensor is 3.5 mm, and the dispensing volume at each dispensing position is 0.05 ml. It is detected that the upper left corner area of the module tilts downward. Based on this, the dispensing volume at a certain dispensing position can be increased to 0.06 ml, and the dispensing position can be adjusted to lift the lens slightly to the upper left corner to generate the new second preset parameter.
[0038] By implementing step 103, the feedback of the tilt feature is used to optimize the assembly parameters. By dynamically adjusting the first preset parameter, a more practical second preset parameter is generated to ensure the accuracy of subsequent assembly; this closed-loop adjustment mechanism significantly improves the adaptability of parameters during the assembly process, reduces the accumulation of assembly errors, avoids rework or directly rejecting unqualified modules, and reduces material waste and production costs.
[0039] Step 104, assemble the camera module according to the second preset parameter to obtain the target camera module;
[0040] In some examples, the target camera module is assembled according to the optimized second preset parameter and passes the detection to meet the design requirements. It has higher focusing accuracy, smaller tilt error, and better imaging quality compared to the camera module to be tested.
[0041] Through the implementation of step 104, the module assembly is carried out using the optimized parameters to ensure that the module tilt problem is corrected, fundamentally improving the assembly quality of the target module.
[0042] In summary, through the imaging detection after the camera module assembly in the embodiments of the present application, the tilt characteristics of the module are accurately quantified using the focus digital-to-analog conversion code, and then the assembly parameters are dynamically adjusted to optimize the assembly accuracy. This not only improves the assembly accuracy of the module, but also significantly increases the yield and product consistency, effectively solving the problem that the module tilt in traditional assembly cannot be accurately detected and corrected. In summary, the camera module assembly method provided by the embodiments of the present application quantifies the tilt characteristics through imaging detection and the focus digital-to-analog conversion code, and dynamically adjusts the assembly parameters to optimize the assembly accuracy, solving the problem of accurate detection and correction of the tilt problem in traditional assembly.
[0043] In some embodiments, the foregoing step 101 may include: adjusting the position of the camera module to be tested according to a preset code step size, and performing a clarity quantization calculation on the imaging result of the preset focus area to obtain a clarity quantization array; determining the focus digital-to-analog conversion code of the preset focus area according to the clarity quantization array.
[0044] In some examples, the preset code step size refers to the discrete numerical step size changed each time when adjusting the position of the camera module (such as the focal length or the optical axis angle), which is used to precisely control the module adjustment process; for example, the preset code step size can be the minimum resolution unit of the digital-to-analog converter (such as 1 digital-to-analog conversion code or larger), or based on the adjustment accuracy requirement of the imaging system (such as a physical displacement of 0.1 mm), the focal length of the camera module can be adjusted by 1 digital-to-analog conversion code or 0.01 mm each time, and the imaging clarity at different positions is recorded. Then, through algorithms or sensors to analyze the imaging results of the preset focus area, the degree of image clarity is quantified. The quantization index of image clarity can be the Modulation Transfer Function (MTF) value or the Focus Value (FV), etc. The clarity quantization array is a plurality of clarity quantization values recorded when the camera module to be tested is imaged at different positions, which is usually used to reflect the clarity distribution within the entire preset focus area. Then, the digital-to-analog conversion code corresponding to the best clarity can be extracted from the clarity quantization array as the focus digital-to-analog conversion code.
[0045] Through the implementation of the above embodiments, while adjusting the position of the camera module, the clarity distribution is recorded by combining the clarity quantization calculation, which is convenient for subsequent extraction of the best focus position; and by gradually adjusting the module position and combining the statistical analysis of the clarity quantization array, the influence of accidental errors on the focus detection result is reduced.
[0046] In some embodiments, the method of determining the focus digital-to-analog conversion code for the preset focus area according to the clarity quantization array may include: fitting a clarity quantization curve corresponding to the preset focus area according to the clarity quantization array; determining the digital-to-analog conversion code corresponding to the peak of the clarity quantization curve as the focus digital-to-analog conversion code.
[0047] In some examples, the clarity quantization curve is a function curve drawn according to the clarity quantization array, which is used to represent the distribution of the imaging clarity of the camera module with position changes, can reflect the clarity values and their change trends at different positions, and can be fitted by methods such as polynomial fitting or spline interpolation; the digital-to-analog conversion code corresponding to the peak (maximum value) in the clarity quantization curve indicates that the clarity of the preset focus area at this position is the best, that is, the focus digital-to-analog conversion code.
[0048] Through the implementation of the above embodiments, fitting the clarity quantization curve can more accurately locate the peak, so as to accurately determine the digital-to-analog conversion code corresponding to the best focus position; and curve fitting can filter out noise interference, enhance the stability and accuracy of data, and avoid fluctuations caused by directly using single-point data of the clarity array.
[0049] In some embodiments, the foregoing preset focus area may include a first focus area and a second focus area, the foregoing focus digital-to-analog conversion code may include a first conversion code and a second conversion code, the foregoing first conversion code is the focus digital-to-analog conversion code corresponding to the first focus area, the second conversion code is the focus digital-to-analog conversion code corresponding to the second focus area, and the tilt feature may include a tilt direction and a tilt angle; the foregoing step 102 may include: calculating the ratio of the second conversion code to the first conversion code to obtain a tilt coefficient; determining the tilt direction and the tilt angle according to the tilt coefficient.
[0050] In some examples, the first focusing area and the second focusing area are different specific areas on the test target board, which can respectively correspond to the central area and the edge area of the image, and are used to detect the imaging clarity of the camera module at different positions. For example, the first focusing area can be the central area of the test target board, and the second focusing area can be the upper left corner area of the test target board. The first conversion code is the focus digital-to-analog conversion code corresponding to the first focusing area; the second conversion code is the focus digital-to-analog conversion code corresponding to the second focusing area. The tilt coefficient is obtained by calculating the ratio of the second conversion code to the first conversion code, quantifying the difference in imaging clarity of the camera module in different areas, and used to reflect the tilt degree of the module. A tilt coefficient equal to 1 indicates no obvious tilt, and a tilt coefficient deviating from 1 indicates the existence of tilt. The tilt direction can be determined by comparing the size of the tilt coefficient with 1 to determine whether the second focusing area is tilted upward or downward relative to the first focusing area; the tilt angle is the angular deviation between the tilt coefficient and the horizontal reference calculated through the inverse cosine function. For example, if the first conversion code is 337 and the second conversion code is 325, and the tilt coefficient 325 / 337≈0.964, then the tilt direction is downward tilt in the upper left corner, and the tilt angle is cos -1 (0.964)≈15°.
[0051] By implementing the above embodiments, the clarity is detected in multiple preset focusing areas, and the imaging performance of the camera module, especially the tilt characteristics, can be comprehensively analyzed; and by calculating the tilt coefficient (the ratio of the first conversion code to the second conversion code), the tilt direction and degree of the module can be quantitatively characterized, providing data support for the subsequent adjustment of assembly parameters and achieving higher assembly accuracy.
[0052] In some embodiments, the process of determining the tilt direction of the aforementioned camera module to be measured according to the tilt coefficient may include: when the tilt coefficient is greater than 1, determining that the tilt direction of the camera module to be measured is the upward tilt direction of the second focusing area relative to the first focusing area; when the tilt coefficient is less than 1, determining that the tilt direction of the camera module to be measured is the downward tilt direction of the second focusing area relative to the first focusing area.
[0053] Exemplarily, by photographing the test target board with the camera module to be measured, the first conversion code of the central area (the first focusing area) is calculated to be 337, and the second conversion code of the upper left corner area (the second focusing area) is calculated to be 325; the tilt coefficient is calculated to be 325 / 337≈0.964, and it is determined that the tilt coefficient is less than 1, indicating that the upper left corner area of the camera module to be measured is in the downward tilt direction relative to the central area.
[0054] By implementing the above embodiments, comparing the calculation result of the tilt coefficient with 1 can simply and directly determine the tilt direction (upward tilt or downward tilt) of the module; and based on the simple judgment rules of mathematical relationships, it is suitable for the implementation of automated detection and reduces the requirements for the accuracy of hardware devices.
[0055] In some embodiments, the process of determining the tilt angle of the aforementioned camera module to be tested based on the tilt coefficient may include: calculating the arccosine value of the tilt coefficient to obtain the tilt angle.
[0056] Exemplarily, the first conversion code of the first focus area is 337 and the second conversion code of the second focus area is 325; the calculated tilt coefficient is 325 / 337≈0.964, and using the formula θ = cos -1 (0.964) to calculate the arccosine value, the tilt angle θ≈15° is obtained.
[0057] By implementing the above embodiments, calculating the tilt angle using the arccosine function enables the tilt feature to have a clear numerical expression, facilitating subsequent parameter adjustment and analysis; and the data result of the tilt angle can be directly used for the adjustment of automated equipment, which can improve the intelligent level of the production line.
[0058] In some embodiments, the aforementioned first focus area is the central area of the test target board, and the second focus area may include four areas of upper left, lower left, upper right, and lower right arranged on the diagonal of the test target board.
[0059] In some examples, the first focus area may be the central area used as a reference on the test target board, located at the geometric center of the test target board, representing the main imaging area of the camera module. The second focus area is the area on the test target board used for comparative analysis with the first focus area, located at the diagonal position of the target board, and generally includes four areas of upper left, lower left, upper right, and lower right.
[0060] Exemplarily, referring to Figure 3 , the intersection of the diagonals of the test target board 40 in the figure coincides with the center of the circle of the first focus area 410, the center of the circle of the second focus area 421 is located on the upper left line segment of the diagonal of the test target board 40, the center of the circle of the second focus area 422 is located on the lower left line segment of the diagonal of the test target board 40, the center of the circle of the second focus area 423 is located on the upper right line segment of the diagonal of the test target board 40, and the center of the circle of the second focus area 424 is located on the lower right line segment of the diagonal of the test target board 40.
[0061] By implementing the above embodiments, selecting the central area and the diagonal area for clarity detection, and the detection range covers the central and edge areas, which can ensure that the detection results can comprehensively reflect the focusing performance and tilt problems of the camera module to be tested.
[0062] Further, as an implementation of the foregoing method embodiments, the present application also provides a camera module assembly device for implementing the foregoing method embodiments. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, details of the foregoing method embodiment will not be repeated one by one in this camera module assembly device embodiment. However, it should be clear that the device in the embodiments of the present application can correspondingly implement all the content in the foregoing method embodiment. As Figure 4 shown, the camera module assembly device 20 includes: a code acquisition unit 201, an inclination determination unit 202, a parameter adjustment unit 203, and a module assembly unit 204. Among them, the code acquisition unit 201 is configured to image a preset focus area in a test target board through a camera module to be tested, and obtain a focus digital-to-analog conversion code corresponding to the preset focus area, where the camera module to be tested is a camera module assembled according to a first preset parameter; the inclination determination unit 202 is configured to determine the inclination feature of the camera module to be tested relative to the horizontal plane according to the focus digital-to-analog conversion code; the parameter adjustment unit 203 is configured to adjust the first preset parameter according to the inclination feature to obtain a second preset parameter; the module assembly unit 204 is configured to assemble the camera module according to the second preset parameter to obtain a target camera module.
[0063] In some embodiments, the code acquisition unit 201 is further configured to adjust the position of the camera module to be tested according to a preset code step length, perform clarity quantization calculation on the imaging result of the preset focus area, and obtain a clarity quantization array; determine the focus digital-to-analog conversion code of the preset focus area according to the clarity quantization array.
[0064] In some embodiments, the code acquisition unit 201 is further configured to fit a clarity quantization curve corresponding to the preset focus area according to the clarity quantization array; determine the digital-to-analog conversion code corresponding to the peak value of the clarity quantization curve as the focus digital-to-analog conversion code.
[0065] In some embodiments, the preset focus area includes a first focus area and a second focus area, the focus digital-to-analog conversion code includes a first conversion code and a second conversion code, the first conversion code is the focus digital-to-analog conversion code corresponding to the first focus area, the second conversion code is the focus digital-to-analog conversion code corresponding to the second focus area, and the inclination feature includes an inclination direction and an inclination angle; the inclination determination unit 202 is further configured to calculate the ratio of the second conversion code to the first conversion code to obtain an inclination coefficient; determine the inclination direction and the inclination angle according to the inclination coefficient.
[0066] In some embodiments, the tilt determination unit 202 is further configured to, when the tilt coefficient is greater than 1, determine that the tilt direction of the camera module to be tested is the upward tilt direction of the second focus area relative to the first focus area; when the tilt coefficient is less than 1, determine that the tilt direction of the camera module to be tested is the downward tilt direction of the second focus area relative to the first focus area.
[0067] In some embodiments, the tilt determination unit 202 is further configured to calculate the arccosine value of the tilt coefficient to obtain the tilt angle.
[0068] In some embodiments, the first focus area is the central area of the test target board, and the second focus area includes four areas located at the upper left, lower left, upper right, and lower right on the diagonal of the test target board.
[0069] The present application further provides a computer-readable storage medium, which stores computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will be caused to execute any step of the camera module assembly method provided by the present application.
[0070] In some embodiments, the computer-readable storage medium may be a random access memory (RAM), a read-only memory (ROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it may also be various devices including one or any combination of the above memories.
[0071] In some embodiments, the computer-executable instructions may be in the form of a program, software, a software module, a script, or code, and may be written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, a component, a subroutine, or other units suitable for use in a computing environment.
[0072] In some embodiments, the computer-executable instructions may or may not correspond to a file in the file system, and may be stored as a part of a file that stores other programs or data. For example, they may be stored in one or more scripts in a hypertext markup language (HTML) document, stored in a single file dedicated to the program being discussed, or stored in multiple cooperating files (for example, files that store one or more modules, subroutines, or code portions).
[0073] In some embodiments, the computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed at multiple locations and interconnected by a communication network.
[0074] As Figure 5 shown, the present application also provides an electronic device 30, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, any step of the above-mentioned camera module assembly method is implemented.
[0075] The present application also provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or computer-executable instructions from the computer-readable storage medium, and the processor executes the computer program or computer-executable instructions, so that the electronic device executes any step of the above-mentioned camera module assembly method of the present application.
[0076] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A camera module assembly method, characterized in that: include: Imaging a preset focus area in a test target plate through a camera module to be tested, and obtaining a focus digital-to-analog conversion code corresponding to the preset focus area, wherein the camera module to be tested is a camera module assembled according to first preset parameters; Determining the tilt characteristics of the camera module to be tested compared to a horizontal plane according to the focus digital-to-analog conversion code; According to the tilt feature, adjusting the first preset parameter to obtain a second preset parameter; The camera module is assembled according to the second preset parameters to obtain a target camera module.
2. The camera module assembly method according to claim 1, characterized in that: The method of imaging a preset focus area in a test target plate by using a camera module to be tested and obtaining a focus digital-to-analog conversion code corresponding to the preset focus area includes: The camera module to be tested is position-adjusted according to a preset code step length, and a sharpness quantization calculation is performed on the imaging result of the preset focus area to obtain a sharpness quantization array; A focus digital-to-analog conversion code of the preset focus area is determined according to the sharpness quantization array.
3. The camera module assembly method according to claim 2, characterized in that: The step of determining the focus digital-to-analog conversion code of the preset focus area according to the sharpness quantization array includes: Fitting a sharpness quantization curve corresponding to the preset focus area according to the sharpness quantization array; The digital-to-analog conversion code corresponding to the peak value of the sharpness quantization curve is determined as the focus digital-to-analog conversion code.
4. The camera module assembly method according to any one of claims 1 to 3, characterized in that: The preset focus area includes a first focus area and a second focus area, the focus digital-to-analog conversion code includes a first conversion code and a second conversion code, the first conversion code is a focus digital-to-analog conversion code corresponding to the first focus area, the second conversion code is a focus digital-to-analog conversion code corresponding to the second focus area, and the tilt feature includes a tilt direction and a tilt angle; The step of determining the tilt characteristics of the camera module to be tested compared to a horizontal plane according to the focus digital-to-analog conversion code includes: Calculating a ratio of the second conversion code to the first conversion code to obtain a tilt coefficient; The tilt direction and the tilt angle are determined according to the tilt coefficient.
5. The camera module assembly method according to claim 4, characterized in that: The process of determining the tilt direction of the camera module to be tested according to the tilt coefficient includes: When the tilt coefficient is greater than 1, determining that the tilt direction of the camera module to be tested is an upward tilt direction of the second focus area relative to the first focus area; When the tilt coefficient is less than 1, it is determined that the tilt direction of the camera module to be tested is a downward tilt direction of the second focus area relative to the first focus area.
6. The camera module assembly method according to claim 5, characterized in that: The process of determining the tilt angle of the camera module to be tested according to the tilt coefficient includes: The inverse cosine value of the tilt coefficient is calculated to obtain the tilt angle.
7. The camera module assembly method according to claim 4, characterized in that: The first focus area is the central area of the test target plate, and the second focus area includes four areas arranged on the diagonal line of the test target plate, namely, the upper left area, the lower left area, the upper right area, and the lower right area.
8. A camera module assembly device, characterized in that: include: A code acquisition unit, used for imaging a preset focus area in a test target plate through a camera module to be tested, and obtaining a focus digital-to-analog conversion code corresponding to the preset focus area, wherein the camera module to be tested is a camera module assembled according to first preset parameters; A tilt determination unit, used to determine the tilt characteristics of the camera module to be tested compared to the horizontal plane according to the focus digital-to-analog conversion code; A parameter adjustment unit, configured to adjust the first preset parameter according to the tilt feature to obtain a second preset parameter; The module assembly unit is used to assemble the camera module according to the second preset parameters to obtain a target camera module.
9. An electronic device, comprising: A memory and a processor, characterized in that the processor is used to implement the steps of the camera module assembly method as described in any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the camera module assembly method as described in any one of claims 1 to 7 are implemented.