Method and device for detecting lens assembly abnormity of camera module

By performing multi-dimensional detection of the test images collected by the camera module, the problem of difficulty in comprehensively detecting the camera module lens assembly in the prior art is solved, and accurate evaluation of lens assembly is achieved and the normal use of the camera module is ensured.

CN119996647APending Publication Date: 2025-05-13KUNSHAN Q TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510040502.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to comprehensively and accurately detect the physical state of the camera module lens and the assembly between the lens and the image sensor, resulting in normal lens performance but inability to use normally after assembly.

Method used

By obtaining multiple test pictures collected by the camera module for standard pictures, the modulation transfer function values ​​of each test picture in different preset fields of view, and according to the relative distance and modulation transfer function values, the camera module is detected in multiple dimensions such as field inclination, image surface bending, separation rate, uniformity and monotonicity to ensure that the lens assembly is qualified.

Benefits of technology

A comprehensive evaluation of the lens assembly of the camera module is achieved to ensure that the assembly is qualified, and to avoid the normal performance of the lens but cannot be used normally after assembly, thereby ensuring the normal use of the camera module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996647A_ABST
    Figure CN119996647A_ABST
Patent Text Reader

Abstract

The invention provides a lens assembly anomaly detection method and device for a camera module. The method comprises the steps that a plurality of test pictures collected by a camera module for a standard picture are acquired, the different test pictures are collected at different relative distances, and the relative distances are the distances between a lens in the camera module and the standard picture; determining modulation transfer function values of the test pictures in a plurality of different preset view fields, wherein the different preset view fields correspond to different areas in the test pictures; according to the relative distance and the modulation transfer function value corresponding to each test picture, detecting at least one target dimension of view field gradient, image plane bendability, separation rate, uniformity and monotonicity of the camera module; and determining that the lens assembly is qualified under the condition that the detection of each target dimension is passed. According to the invention, the assembly condition between the lens and the image sensor can be comprehensively evaluated after the lens is assembled to the camera module, and the lens assembly of the camera module is ensured to be qualified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera technology, and in particular to a method and device for detecting abnormalities in lens assembly of a camera module. Background Art

[0002] The camera module includes multiple components such as lenses, motors, and image sensors. In actual applications, for camera modules that are put into use for the first time, most users will perform single-body inspections on the internal lenses, that is, inspect the performance and quality of the lenses as independent components, or after the lenses are assembled into the camera module, use the MTF scores to check the degree of match between the image sensor and the lenses. However, the MTF score mainly focuses on the evaluation of optical properties, and cannot fully and accurately reflect the physical state of the lens itself and the actual assembly between the lens and the image sensor. There are situations where the lens performance is normal, but it cannot be used normally after assembly. It can be seen that in the relevant technology, there is a lack of methods to detect whether the lens of the camera module is assembled properly, which greatly affects the normal use of the camera module. Summary of the invention

[0003] The present application provides a method and device for detecting abnormalities in the lens assembly of a camera module, which can comprehensively evaluate the assembly status between the lens and the image sensor after the lens is assembled to the camera module to ensure that the lens assembly of the camera module is qualified.

[0004] In a first aspect, the present application provides a method for detecting abnormalities in lens assembly of a camera module, comprising:

[0005] Acquire multiple test images captured by the camera module for the standard image, where different test images are captured at different relative distances, where the relative distance is the distance between a lens in the camera module and the standard image;

[0006] Determining a modulation transfer function value of each of the test images in a plurality of different preset fields of view, where different preset fields of view correspond to different areas in the test image;

[0007] According to the relative distance corresponding to each of the test images and the modulation transfer function value, the camera module is tested in at least one target dimension, wherein the target dimension includes field of view tilt, image plane curvature, separation rate, uniformity and monotonicity;

[0008] When all the target dimensions have passed the inspection, it is determined that the lens assembly is qualified.

[0009] Optionally, the modulation transfer function value includes a modulation transfer function value in a horizontal direction and a modulation transfer function value in a vertical direction.

[0010] The types of the preset field of view include a central field of view and a non-central field of view, the intersection of the diagonal lines of the test image represents the central field of view, any point on the path from the central field of view along the diagonal lines to the four vertices of the test image represents the non-central field of view, the field of view value of the central field of view is 0, the field of view values ​​of the four vertices are 1, and the field of view value gradually increases from the central field of view along the diagonal lines to the four vertices.

[0011] Optionally, the plurality of test images include a first test image, the plurality of different preset fields of view include a central field of view and at least one non-central field of view, and determining a modulation transfer function value of each of the test images in the plurality of different preset fields of view includes:

[0012] For the central field of view, determining a modulation transfer function value of the first test picture;

[0013] For the non-central fields of view, modulation transfer function values ​​of the first test image in a plurality of preset directions corresponding to each of the non-central fields of view are determined.

[0014] Optionally, the at least one target dimension is a field of view inclination, and the at least one non-center field of view includes a first preset field of view; and the detecting of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes:

[0015] Determine a relative distance corresponding to a maximum modulation transfer function value in each of the preset directions under the first preset field of view;

[0016] Among the obtained relative distances, determining a first relative distance corresponding to the maximum horizontal modulation transfer function value, a second relative distance corresponding to the minimum horizontal modulation transfer function value, a third relative distance corresponding to the maximum vertical modulation transfer function value, and a fourth relative distance corresponding to the minimum vertical modulation transfer function value;

[0017] determining an inclination in a horizontal direction according to the first relative distance and the second relative distance, and determining an inclination in a vertical direction according to the third relative distance and the fourth relative distance;

[0018] If the inclination in the horizontal direction and the inclination in the vertical direction are both less than a first preset threshold, it is determined that the camera module passes the field of view inclination detection based on the first preset field of view.

[0019] Optionally, the camera module is an autofocus module, and the autofocus module includes a motor; the determining the inclination in the horizontal direction according to the first relative distance and the second relative distance, and the determining the inclination in the vertical direction according to the third relative distance and the fourth relative distance, comprises:

[0020] determining motor positions corresponding to the first relative distance, the second relative distance, the third relative distance, and the fourth relative distance respectively;

[0021] determining the inclination in the horizontal direction according to the motor position corresponding to the first relative distance and the motor position corresponding to the second relative distance;

[0022] The inclination in the vertical direction is determined according to the motor position corresponding to the third relative distance and the motor position corresponding to the fourth relative distance.

[0023] Optionally, the at least one target dimension is image plane curvature, and the at least one non-central field of view includes a second preset field of view; and the detecting of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes:

[0024] Among the modulation transfer function values ​​corresponding to the central field of view, determining the relative distance corresponding to the maximum value as the fifth relative distance;

[0025] Determine a sixth relative distance corresponding to the maximum modulation transfer function value in each of the preset directions under the second preset field of view;

[0026] determining a first difference between each of the sixth relative distances and the fifth relative distance;

[0027] If the maximum value among the first difference values ​​obtained is less than a second preset threshold, it is determined that the camera module passes the image plane curvature detection based on the second preset field of view.

[0028] Optionally, the at least one target dimension is a separation rate, and the multiple different preset fields of view include a third preset field of view; and the detecting of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes:

[0029] Determine a second difference between a relative distance corresponding to a maximum modulation transfer function value in a horizontal direction in each of the preset directions and a relative distance corresponding to a maximum modulation transfer function value in a vertical direction under the third preset field of view;

[0030] If the maximum value among the obtained second difference values ​​is less than the third preset threshold, it is determined that the camera module passes the separation rate detection based on the third preset field of view.

[0031] Optionally, the at least one target dimension is uniformity, and the at least one non-central field of view includes a fourth preset field of view; and the detecting of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes:

[0032] Determine a seventh relative distance corresponding to a maximum modulation transfer function value in the central field of view, and a second test image captured at the seventh relative distance;

[0033] In the second test picture, determining a third difference between the maximum horizontal modulation transfer function value and the minimum horizontal modulation transfer function value in each of the preset directions, and a fourth difference between the maximum vertical modulation transfer function value and the minimum vertical modulation transfer function value in each of the preset directions under the fourth preset field of view;

[0034] If both the third difference and the fourth difference are smaller than a fourth preset threshold, it is determined that the camera module passes the uniformity detection based on the fourth preset field of view.

[0035] Optionally, the at least one target dimension is monotonic, and the at least one preset direction includes a target preset direction; and the detecting of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes:

[0036] Determine, in the target preset direction, a fifth difference between a maximum modulation transfer function value in the horizontal direction corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum modulation transfer function value in the horizontal direction corresponding to a preset field of view far from the central field of view, and a sixth difference between a maximum modulation transfer function value in the vertical direction corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum modulation transfer function value in the vertical direction corresponding to a preset field of view far from the central field of view;

[0037] If the maximum value among the fifth difference values ​​and the sixth difference values ​​obtained is less than the fifth preset threshold value, it is determined that the camera module passes the monotonicity detection based on the preset direction of the target.

[0038] Optionally, when collecting the multiple test pictures, if the camera module is an autofocus module, the change in the relative distance is achieved by keeping the position of the standard picture fixed and moving the position of the motor in the autofocus module; if the camera module is a fixed-focus module, the change in the relative distance is achieved by keeping the position of the lens in the fixed-focus module fixed and moving the position of the standard picture.

[0039] In a second aspect, the present application provides a lens assembly abnormality detection device for a camera module, comprising:

[0040] An acquisition module, used for acquiring a plurality of test images captured by the camera module for a standard image, wherein different test images are captured at different relative distances, where the relative distance is the distance between a lens in the camera module and the standard image;

[0041] A first determination module is used to determine the modulation transfer function value of each of the test pictures in a plurality of different preset fields of view, where different preset fields of view correspond to different areas in the test picture;

[0042] A detection module, used for detecting the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value, wherein the target dimension includes field of view tilt, image plane curvature, separation rate, uniformity and monotonicity;

[0043] The second determination module is used to determine that the lens assembly is qualified when all the target dimensions have passed the detection.

[0044] Optionally, the modulation transfer function value includes a modulation transfer function value in a horizontal direction and a modulation transfer function value in a vertical direction.

[0045] The types of the preset field of view include a central field of view and a non-central field of view, the intersection of the diagonal lines of the test image represents the central field of view, any point on the path from the central field of view along the diagonal lines to the four vertices of the test image represents the non-central field of view, the field of view value of the central field of view is 0, the field of view values ​​of the four vertices are 1, and the field of view value gradually increases from the central field of view along the diagonal lines to the four vertices.

[0046] Optionally, the plurality of test images include a first test image, the plurality of different preset fields of view include a central field of view and at least one non-central field of view, and the first determining module includes:

[0047] A first determination submodule, configured to determine a modulation transfer function value of the first test picture for the central field of view;

[0048] The second determination submodule is used to determine, for the non-central field of view, the modulation transfer function values ​​of the first test image in a plurality of preset directions corresponding to each of the non-central fields of view.

[0049] Optionally, the at least one target dimension is a field of view inclination, the at least one non-central field of view includes a first preset field of view; and the detection module includes:

[0050] A third determination submodule is used to determine the relative distance corresponding to the maximum modulation transfer function value in each of the preset directions under the first preset field of view;

[0051] a fourth determination submodule, configured to determine, from among the relative distances obtained, a first relative distance corresponding to a maximum horizontal modulation transfer function value, a second relative distance corresponding to a minimum horizontal modulation transfer function value, a third relative distance corresponding to a maximum vertical modulation transfer function value, and a fourth relative distance corresponding to a minimum vertical modulation transfer function value;

[0052] a fifth determining submodule, configured to determine the inclination in the horizontal direction according to the first relative distance and the second relative distance, and to determine the inclination in the vertical direction according to the third relative distance and the fourth relative distance;

[0053] The sixth determination submodule is used to determine that the camera module passes the field of view inclination detection based on the first preset field of view if the inclination in the horizontal direction and the inclination in the vertical direction are both less than a first preset threshold value.

[0054] Optionally, the camera module is an autofocus module, and the autofocus module includes a motor; the fifth determination submodule includes:

[0055] a seventh determination submodule, configured to determine a motor position corresponding to each of the first relative distance, the second relative distance, the third relative distance, and the fourth relative distance;

[0056] an eighth determination submodule, configured to determine the inclination in the horizontal direction according to the motor position corresponding to the first relative distance and the motor position corresponding to the second relative distance;

[0057] A ninth determination submodule is used to determine the inclination in the vertical direction according to the motor position corresponding to the third relative distance and the motor position corresponding to the fourth relative distance.

[0058] Optionally, the at least one target dimension is image plane curvature, the at least one non-central field of view includes a second preset field of view; and the detection module includes:

[0059] a tenth determining submodule, configured to determine, among the modulation transfer function values ​​corresponding to the central field of view, the relative distance corresponding to the maximum value as the fifth relative distance;

[0060] An eleventh determining submodule is used to determine a sixth relative distance corresponding to a maximum modulation transfer function value in each of the preset directions under the second preset field of view;

[0061] A twelfth determining submodule, used to determine a first difference between each of the sixth relative distances and the fifth relative distance;

[0062] The thirteenth determination submodule is used to determine whether the camera module passes the image plane curvature detection based on the second preset field of view if the maximum value among the obtained first difference values ​​is less than a second preset threshold value.

[0063] Optionally, the at least one target dimension is a separation rate, the multiple different preset fields of view include a third preset field of view; and the detection module includes:

[0064] A fourteenth determining submodule is used to determine a second difference between a relative distance corresponding to a maximum horizontal modulation transfer function value in each of the preset directions and a relative distance corresponding to a maximum vertical modulation transfer function value in the third preset field of view;

[0065] The fifteenth determination submodule is used to determine whether the camera module passes the separation rate detection based on the third preset field of view if the maximum value among the obtained second difference values ​​is less than a third preset threshold value.

[0066] Optionally, the at least one target dimension is uniformity, the at least one non-central field of view includes a fourth preset field of view; and the detection module includes:

[0067] A sixteenth determination submodule is used to determine a seventh relative distance corresponding to the maximum modulation transfer function value in the central field of view, and a second test image collected at the seventh relative distance;

[0068] a seventeenth determination submodule, configured to determine, in the second test picture, a third difference between a maximum modulation transfer function value in a horizontal direction and a minimum modulation transfer function value in a horizontal direction in each of the preset directions, and a fourth difference between a maximum modulation transfer function value in a vertical direction and a minimum modulation transfer function value in a vertical direction in each of the preset directions under the fourth preset field of view;

[0069] The eighteenth determination submodule is used to determine that the camera module passes the uniformity detection based on the fourth preset field of view if both the third difference and the fourth difference are smaller than a fourth preset threshold.

[0070] Optionally, the at least one target dimension is monotonic, the at least one preset direction includes a target preset direction; and the detection module includes:

[0071] a nineteenth determination submodule, configured to determine, in the target preset direction, a fifth difference between a maximum horizontal modulation transfer function value corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum horizontal modulation transfer function value corresponding to a preset field of view far from the central field of view, and a sixth difference between a maximum vertical modulation transfer function value corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum vertical modulation transfer function value corresponding to a preset field of view far from the central field of view;

[0072] The twentieth determination submodule is used to determine whether the camera module has passed the monotonicity detection based on the preset direction of the target if the maximum value among the fifth difference values ​​and the sixth difference values ​​obtained is less than a fifth preset threshold value.

[0073] In a third aspect, the present application provides an electronic device, including:

[0074] processor;

[0075] a memory for storing instructions executable by the processor;

[0076] Wherein, the processor is configured to execute to implement a lens assembly abnormality detection method for a camera module as described in the first aspect of the present application.

[0077] In a fourth aspect, the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute a method for detecting lens assembly abnormalities in a camera module as described in the first aspect of the present application.

[0078] The method for detecting whether the lens of the camera module is properly assembled according to the present application is implemented by first obtaining a plurality of test images collected by the camera module for standard images; then, determining the modulation transfer function value of each test image in a plurality of different preset fields of view, the preset fields of view representing different areas in the test image; then, based on the relative distance and modulation transfer function value corresponding to each test image, the camera module is tested in at least one target dimension of field of view inclination, image plane curvature, separation rate, uniformity and monotonicity, and when all target dimensions are tested and passed, it is determined that the lens is properly assembled. Through the present application, after the lens is assembled to the camera module, the physical state of the lens itself and the overall assembly between the lens and the image sensor can be evaluated in multiple dimensions to ensure that the lens of the camera module is properly assembled, to avoid the situation where the lens has normal performance but cannot be used normally after assembly, and to ensure that the camera module can be used normally after assembly. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0080] Figure 1 This is a flow chart of a method for detecting abnormalities in lens assembly of a camera module shown in one embodiment of the present application;

[0081] Figure 2 is a schematic diagram of a standard picture shown in an embodiment of the present application;

[0082] Figure 3 is a schematic diagram of field of view division shown in an embodiment of the present application;

[0083] Figure 4 is a schematic diagram showing the relationship between a motor, a lens and an image sensor according to an embodiment of the present application;

[0084] Figure 5 is a side schematic diagram of a lens shown in an embodiment of the present application;

[0085] Figure 6 is a front view schematic diagram of a lens shown in an embodiment of the present application;

[0086] Figure 7 is a schematic diagram of an abnormal situation of a lens shown in an embodiment of the present application;

[0087] Figure 8 It is a structural block diagram of a lens assembly anomaly detection device for a camera module shown in one embodiment of the present application. DETAILED DESCRIPTION

[0088] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0089] The execution device of the method of the present application is any terminal device or server with data processing and analysis functions, which can be specifically configured according to actual needs.

[0090] Figure 1 1 is a flow chart of a method for detecting lens assembly abnormality of a camera module according to an embodiment of the present application. Figure 1The method for detecting whether the lens of the camera module is assembled properly in the present application comprises the following steps:

[0091] Step S11: obtaining a plurality of test images captured by the camera module for the standard image, where different test images are captured at different relative distances, and the relative distance is the distance between the lens in the camera module and the standard image.

[0092] In step S11, the standard image can be Figure 2 The black and white grid pattern shown may also be other forms of patterns, which can be specifically set according to actual needs. Figure 2 It is a schematic diagram of a standard picture shown in an embodiment of the present application.

[0093] The camera module in the present application may be an auto focus (Auto Focus, AF) module or a fixed focus (Fixed Focus, FF) module.

[0094] Among them, the AF module can realize the autofocus function, which moves the lens through electromagnetic induction and changes the focal length to complete the autofocus. The autofocus module usually includes key components such as lens, image sensor, infrared filter, circuit board (PCB), lens holder, connector, voice coil motor (VCM) and autofocus driver integrated circuit (AF driver IC). The focal length of the FF module is fixed during the shooting process, and it cannot automatically adjust the focal length according to the distance of the shooting object like the autofocus module. The FF module usually includes components such as lens, image sensor, infrared filter, circuit board (PCB), lens holder and connector.

[0095] In one embodiment, when using a camera module to collect test images for a standard image, if the camera module is an AF module, the AF module is fixed as a whole, the position of the standard image is kept unchanged, and only the motor is pushed to move, and after each step of the motor is pushed, a test image is taken for the standard image, and then the motor is pushed to move one step, and then a test image is taken for the standard image, and in this way, multiple test images for the standard image are obtained. In the process of collecting test images, the position of the motor after each step of the motor is recorded.

[0096] In actual implementation, the change of the lens after each step of the motor can be determined in advance, so as to find the relationship between the change of the motor and the change of the lens. In this way, after knowing the distance between the lens of the AF module and the standard image before the image is captured, and the pre-recorded positions of each motor, the distance between the lens and the standard image after each step of the motor can be determined based on the relationship between the change of the motor and the change of the lens, and finally the relative distance between the lens and the standard image at each motor position is determined. Due to the different positions of each motor, these relative distances are also different from each other.

[0097] The type of motor used in the AF module of the present application can be selected according to actual needs, but for the convenience of describing the method of the present application, it is specifically noted here that the motors used in the AF module in the subsequent embodiments are all voice coil motors.

[0098] In another embodiment, when using the camera module to collect test pictures for the standard picture, if the camera module is an FF module, since there is no motor, the FF module is fixed as a whole and does not move, and the standard picture is pushed to move, and each time the standard picture is pushed, the FF module takes a test picture for the standard picture, pushes the standard picture again, and then takes a test picture for the standard picture, and in this way, multiple test pictures for the standard picture are obtained. In the process of collecting the test pictures, the position of the standard picture is recorded each time the standard picture is pushed.

[0099] After knowing the distance between the lens of the FF module and the standard picture before picture acquisition, and the pre-recorded positions of each standard picture, the distance between the lens and the standard picture after each push of the standard picture can be determined, and finally the relative distance between the lens and the standard picture when the standard picture is at each position can be determined.

[0100] Among them, the position setting of each standard picture can refer to the position setting of each motor.

[0101] Step S12: determining the modulation transfer function value of each test image in a plurality of different preset viewing fields, where different preset viewing fields correspond to different areas in the test image.

[0102] The modulation transfer function value includes a modulation transfer function value in a horizontal direction and a modulation transfer function value in a vertical direction.

[0103] The plurality of test images include a first test image, and the first test image is any one of the plurality of test images. The plurality of different preset fields of view include a central field of view and at least one non-central field of view.

[0104] On this basis, step S12 may include:

[0105] For the central field of view, determining a modulation transfer function value of the first test picture;

[0106] For the non-central viewing fields, modulation transfer function values ​​of the first test image in a plurality of preset directions corresponding to each non-central viewing field are determined.

[0107] In this embodiment, the Modulation Transfer Function (MTF) is an important indicator for evaluating the performance of an imaging system (such as a camera lens, a telescope, etc.), which describes the imaging system's ability to transfer different frequency components in an image, that is, how the system maintains various details and contrasts in the image. In the imaging process, the details and contrast in the image can be regarded as patterns or edges of different frequencies. When these patterns or edges pass through the imaging system, their contrast and clarity may change due to various factors of the system (such as optical aberrations, diffraction effects, sensor performance, etc.), and the Modulation Transfer Function value can be used to quantify the degree of such change. The Modulation Transfer Function value must be greater than 0 and less than 1. The closer the Modulation Transfer Function value is to 1, the better the performance of the lens. The specific principle of the Modulation Transfer Function value can be referred to the explanation in the prior art, and this embodiment will not be repeated here.

[0108] The field of view refers to the specific area or angle range that a lens can capture. In the field of optical imaging, the field of view describes the range of images that an imaging system can capture. In the calculation of the modulation transfer function value, the field of view is usually divided into different areas or angles in order to evaluate the clarity or resolution of the image in these areas separately. The horizontal and vertical directions are two commonly used dimensions for evaluating the field of view, which correspond to the clarity of the horizontal and vertical edges of the image, respectively. In the MTF test, a specific test chart (such as the SFRplus test chart) is usually used to generate image edges containing different frequencies and contrasts, and then the MTF performance of the lens is evaluated by measuring the clarity of these edges after imaging. During the test, the MTF scores (modulation transfer function values) in different fields of view in the horizontal and vertical directions are calculated separately to fully understand the imaging quality of the lens.

[0109] In various embodiments of the present application, the preset directions include four directions, namely, upper left (LT), lower left (LB), upper right (RT), and lower right (RB).

[0110] In any test image, the intersection of the diagonal lines represents the central field of view, the field of view value at the central field of view is 0, the field of view value at the four vertices of the image is 1, and the field of view value gradually increases from the central field of view along the diagonal lines to the four vertices. Calculating the modulation transfer function value of the test image in the preset field of view X (the field of view value is X) means: calculating the modulation transfer function value of the test image in four set areas formed with the four Xs as the center points. For example, when calculating the modulation transfer function value of the test image at the upper left 0.8 field of view (the field of view value is 0.8), the calculation area is the set area formed with the upper left 0.8 field of view as the center point. For another example, when calculating the modulation transfer function value of the test image at the upper right 0.5 field of view (the field of view value is 0.5), the calculation area is the set area formed with the upper right 0.5 field of view as the center point. Figure 3 Schematic diagram of field of view division shown in an embodiment of the present application. Figure 3 In the figure, for a test image, at the intersection of two diagonal lines, the field of view value is 0 (indicated as the central field of view). At the four corners, the field of view value is 1, and the field of view value gradually increases from the intersection point to the four corners. Figure 3 The center field of view, the 0.3 field of view, the 0.5 field of view and the 0.8 field of view in each preset direction are specifically illustrated.

[0111] Since the lens is a round convex lens, the concept of field of view is not only reflected in the diagonal line of the test image, for example Figure 3 In the example, the field of view value of each point on the circle containing the 0.3 field of view is 0.3. Similarly, the field of view value of each point on the circle containing the 0.5 field of view is 0.5 ( Figure 3 The field of view value of each point on the circle containing the 0.8 field of view is 0.8 ( Figure 3 not shown).

[0112] In step S13, a plurality of different preset fields of view may be selected according to actual needs, for example, the plurality of preset fields of view may be selected as a central field of view, a 0.3 field of view, a 0.5 field of view, and a 0.8 field of view.

[0113] In one embodiment, the multiple test images include a test image X, the multiple preset fields of view are a central field of view, a 0.3 field of view, a 0.5 field of view, and a 0.8 field of view, and the preset directions include upper left (LT), lower left (LB), upper right (RT), and lower right (RB). For the test image X, it is necessary to calculate not only the modulation transfer function value under the central field of view, but also the modulation transfer function values ​​in the upper left, lower left, upper right, and lower right directions under the 0.3 field of view, the modulation transfer function values ​​in the upper left, lower left, upper right, and lower right directions under the 0.5 field of view, and the modulation transfer function values ​​in the upper left, lower left, upper right, and lower right directions under the 0.8 field of view, and the modulation transfer function values ​​all include the modulation transfer function values ​​in the horizontal direction and the modulation transfer function values ​​in the vertical direction.

[0114] Execute step S12, for each test image, process it according to the processing method of the above test image X, and finally obtain the modulation transfer function value of each test image in each preset direction under each preset field of view. If the camera module uses an autofocus module, the data finally summarized can be shown in the following Table 1:

[0115] Table 1

[0116]

[0117]

[0118] In Table 1, only the modulation transfer function value 0.8LT_H of the upper left part in the horizontal direction under the 0.8 field of view and the modulation transfer function value 0.8LT_V of the upper left part in the vertical direction under the 0.8 field of view are shown.

[0119] When executing step S12, for each test image, in addition to calculating the modulation transfer function value under each preset field of view, the modulation transfer function value under the central field of view can also be calculated for subsequent use. Since there are no multiple preset directions under the central field of view, the modulation transfer function value under the central field of view does not distinguish between preset directions.

[0120] If the camera module uses a fixed-focus module, then replace the motor positions in Table 1 with the positions in the standard picture and record the corresponding data.

[0121] Step S13: According to the relative distance and modulation transfer function value corresponding to each test image, the camera module is tested in at least one target dimension, and the target dimensions include field of view tilt, image plane curvature, separation rate, uniformity and monotonicity.

[0122] When executing step S13, multiple dimensions required can be selected for detection from among field of view tilt, image plane curvature, separation rate, uniformity and monotonicity according to actual needs. In order to ensure the accuracy of the detection result, in one embodiment, all target dimensions can be detected.

[0123] Step S14: When all target dimensions have passed the inspection, it is determined that the lens assembly is qualified.

[0124] In this embodiment, if there is a target dimension that fails the inspection, it can be directly determined that the lens assembly is unqualified. Only when all target dimensions that need to be inspected pass the inspection can the lens assembly be determined to be qualified.

[0125] The method for detecting whether the lens of the camera module is properly assembled according to the present application is implemented by first obtaining a plurality of test images collected by the camera module for standard images; then, determining the modulation transfer function value of each test image in a plurality of different preset fields of view, the preset fields of view representing different areas in the test image; then, based on the relative distance and modulation transfer function value corresponding to each test image, the camera module is tested in at least one target dimension of field of view inclination, image plane curvature, separation rate, uniformity and monotonicity, and when all target dimensions are tested and passed, it is determined that the lens is properly assembled. Through the present application, after the lens is assembled to the camera module, the physical state of the lens itself and the overall assembly between the lens and the image sensor can be evaluated in multiple dimensions to ensure that the lens of the camera module is properly assembled, to avoid the situation where the lens has normal performance but cannot be used normally after assembly, and to ensure that the camera module can be used normally after assembly.

[0126] The following will take multiple different preset fields of view as the central field of view, 0.3 field of view, 0.5 field of view and 0.8 field of view, and multiple preset directions as the upper left (LT), lower left (LB), upper right (RT), and lower right (RB) as examples, and explain in detail how to detect each target dimension in the field of view tilt, image plane curvature, separation rate, uniformity and monotonicity with different embodiments:

[0127] (1) The target dimension is the tilt of the field of view

[0128] In this embodiment, at least one non-central field of view includes a first preset field of view, and the first preset field of view is any one of a 0.3 field of view, a 0.5 field of view, and a 0.8 field of view. Accordingly, step S13 may include:

[0129] Step 1: Determine the relative distance corresponding to the maximum modulation transfer function value in each preset direction under the first preset field of view.

[0130] For example, when the first preset field of view is 0.8 field of view, the corresponding relative distances when the maximum modulation transfer function values ​​are obtained in the four directions of upper left (LT), lower left (LB), upper right (RT), and lower right (RB) are: 0.8-D-LT_H, 0.8-D-LT_V, 0.8-D-LB_H, 0.8-D-LB_V, 0.8-D-RT_H, 0.8-D-RT_V, 0.8-D-RB_H, and 0.8-D-RB_V.

[0131] Among them, 0.8-D-LT_H represents the relative distance corresponding to the maximum horizontal modulation transfer function value in the upper left direction under the 0.8 field of view, and 0.8-D-LT_V represents the relative distance corresponding to the maximum vertical modulation transfer function value in the upper left direction under the 0.8 field of view.

[0132] Step 2: Among the relative distances obtained, determine the first relative distance corresponding to the maximum horizontal modulation transfer function value, the second relative distance corresponding to the minimum horizontal modulation transfer function value, the third relative distance corresponding to the maximum vertical modulation transfer function value, and the fourth relative distance corresponding to the minimum vertical modulation transfer function value.

[0133] Continuing with the above example, among the 8 relative distances, the relative distance corresponding to the maximum modulation transfer function value in the horizontal direction is named as the first relative distance, represented by 0.8-D-Max_H, and the relative distance corresponding to the minimum modulation transfer function value in the horizontal direction is named as the second relative distance, represented by 0.8-D-Min_H; the relative distance corresponding to the maximum modulation transfer function value in the vertical direction is named as the third relative distance, represented by 0.8-D-Max_V, and the relative distance corresponding to the minimum modulation transfer function value in the vertical direction is named as the fourth relative distance, represented by 0.8-D-Min_V.

[0134] Step 3: Determine the inclination in the horizontal direction according to the first relative distance and the second relative distance, and determine the inclination in the vertical direction according to the third relative distance and the fourth relative distance.

[0135] Specifically, the inclination 0.8Tilt_H in the horizontal direction under the 0.8 field of view is calculated according to 0.8-D-Max_H and 0.8-D-Min_H, and the inclination 0.8Tilt_V in the vertical direction under the 0.8 field of view is calculated according to 0.8-D-Max_V and 0.8-D-Min_V.

[0136] Step 4: If the inclination in the horizontal direction and the inclination in the vertical direction are both less than the first preset threshold value, it is determined that the camera module passes the field of view inclination detection based on the first preset field of view.

[0137] Continuing with the above example, if 0.8Tilt_H and 0.8Tilt_V are both less than the preset first threshold, it means that the camera module passes the field of view tilt detection under the field of view of 0.8. The first preset threshold is the threshold standard for detecting whether the field of view tilt of the camera module is qualified. It can be set according to the value distribution when the field of view tilt is detected for the first time. For example, when the field of view tilt is detected for the first time, 90% of the values ​​are less than 10, then 10 can be used as the first preset threshold.

[0138] Similarly, for the 0.3 field of view and the 0.5 field of view, the horizontal tilt and the vertical tilt are calculated in the same way as the 0.8 field of view. Finally, the following 6 data are obtained based on the 3 fields of view:

[0139] 0.3Tilt_H, 0.3Tilt_V, 0.5Tilt_H, 0.5Tilt_V, 0.8Tilt_H, 0.8Tilt_V.

[0140] If the above 6 data (0.3Tilt_H, 0.3Tilt_V, 0.5Tilt_H, 0.5Tilt_V, 0.8Tilt_H, 0.8Tilt_V) are finally all less than the first preset threshold, it means that the camera module has passed the detection in the dimension of field of view tilt, that is, the tilt of the camera module is qualified.

[0141] Furthermore, according to different types of camera modules, it is divided into the following two cases:

[0142] 1) The camera module is an auto focus module

[0143] In this case, determining the inclination in the horizontal direction according to the first relative distance and the second relative distance, and determining the inclination in the vertical direction according to the third relative distance and the fourth relative distance may include:

[0144] Determine the motor positions corresponding to the first relative distance, the second relative distance, the third relative distance, and the fourth relative distance respectively;

[0145] determining the inclination in the horizontal direction according to the motor position corresponding to the first relative distance and the motor position corresponding to the second relative distance;

[0146] The inclination in the vertical direction is determined according to the motor position corresponding to the third relative distance and the motor position corresponding to the fourth relative distance.

[0147] Specifically, taking the 0.8 field of view as an example, according to the pre-recorded data (such as Table 1), the motor position 0.8VCMCode_Max_H corresponding to the first relative distance 0.8-D-Max_H, the motor position 0.8VCMCode_Min_H corresponding to the second relative distance 0.8-D-Min_H, the motor position 0.8VCMCode_Max_V corresponding to the third relative distance 0.8-D-Max_V, and the motor position 0.8VCMCode_Min_V corresponding to the fourth relative distance 0.8-D-Min_V are found.

[0148] When the camera module is an autofocus module, the relationship between the motor position, lens and image sensor is as follows: Figure 4 shown. Figure 4 FIG. 1 is a schematic diagram showing the relationship between the motor, the lens, and the image sensor according to an embodiment of the present application. Figure 4 , the following formula is used to calculate 0.8Tilt_H and 0.8Tilt_V:

[0149] 0.8Tilt_H=(0.8VCMCode_Max_H-0.8VCMCode_Min_H)*code_step_size;

[0150] 0.8Tilt_V=(0.8VCMCode_Max_V-0.8VCMCode_Min_V)*code_step_size.

[0151] Where code_step_size represents the distance between each step of the motor stroke (unit: mm).

[0152] Table 1 gives multiple motor positions. For example, when the motor position changes from -0.015 to -0.01, it means that the motor moves one step. For another example, when the motor position changes from -0.01 to -0.005, it also means that the motor moves one step. Therefore, (0.8VCMCode_Max_H-0.8VCMCode_Min_H) can represent the number of steps the motor moves in the horizontal direction of the 0.8 field of view, and (0.8VCMCode_Max_V-0.8VCMCode_Min_V) can represent the number of steps the motor moves in the vertical direction of the 0.8 field of view. code_step_size represents the travel of the motor when it moves one step.

[0153] 2) The camera module is a fixed-focus module.

[0154] In this case, determining the inclination in the horizontal direction according to the first relative distance and the second relative distance, and determining the inclination in the vertical direction according to the third relative distance and the fourth relative distance may include:

[0155] Determine the positions of the standard pictures corresponding to the first relative distance, the second relative distance, the third relative distance, and the fourth relative distance respectively;

[0156] Determine the inclination in the horizontal direction according to the position of the standard picture corresponding to the first relative distance and the position of the standard picture corresponding to the second relative distance;

[0157] The inclination in the vertical direction is determined according to the position of the standard picture corresponding to the third relative distance and the position of the standard picture corresponding to the fourth relative distance.

[0158] Specifically, taking the 0.8 field of view as an example, according to the pre-recorded data, the position of the standard picture corresponding to the first relative distance 0.8-D-Max_H is found as 0.8PIC_Max_H, the position of the standard picture corresponding to the second relative distance 0.8-D-Min_H is found as 0.8PIC_Min_H, the position of the standard picture corresponding to the third relative distance 0.8-D-Max_V is found as 0.8PIC_Max_V, and the position of the standard picture corresponding to the fourth relative distance 0.8-D-Min_V is found as 0.8PIC_Min_V.

[0159] Next, calculate 0.8Tilt_H and 0.8Tilt_V using the following formula:

[0160] 0.8Tilt_H=(0.8PIC_Max_H-0.8PIC_Min_H)*pic_step_size;

[0161] 0.8Tilt_V=(0.8PIC_Max_V-0.8PIC_Min_V)*pic_step_size.

[0162] Among them, pic_step_size represents the spacing of each standard picture travel step.

[0163] In other words, just replace the motor positions with those in the standard picture.

[0164] (2) The target dimension is the curvature of the image plane

[0165] In principle, the lens is an absolutely symmetrical circular convex lens, but in reality, various abnormalities may occur due to environmental reasons, such as Figure 5 shown. Figure 5 FIG. 1 is a side view of a lens according to an embodiment of the present application. Figure 5 In the figure, the OK image on the left indicates a normal lens, and the NG image on the right indicates an abnormal lens. Therefore, it is necessary to perform image plane curvature detection on the camera module.

[0166] In this embodiment, at least one non-central field of view includes a second preset field of view, and the second preset field of view is any one of a 0.3 field of view, a 0.5 field of view, and a 0.8 field of view. Accordingly, step S13 may include:

[0167] Step 1: Among the modulation transfer function values ​​corresponding to the central field of view, determine the relative distance corresponding to the maximum value as the fifth relative distance, which is represented by D-CT_ave.

[0168] Step 2: Determine the sixth relative distance corresponding to the maximum modulation transfer function value in each preset direction under the second preset field of view, and obtain multiple sixth relative distances. For example, when the second preset field of view is 0.8 field of view, the relative distances corresponding to the maximum modulation transfer function value in the four directions of upper left (LT), lower left (LB), upper right (RT), and lower right (RB) include: 0.8-D-LT_H, 0.8-D-LT_V, 0.8-D-LB_H, 0.8-D-LB_V, 0.8-D-RT_H, 0.8-D-RT_V, 0.8-D-RB_H, 0.8-D-RB_V, and the above 8 different relative distances are all sixth relative distances.

[0169] Step 3: Determine the first difference between each sixth relative distance and the fifth relative distance.

[0170] The first difference is an absolute value, which is not differentiated between positive and negative, and is used to indicate the degree of difference between each sixth relative distance and the fifth relative distance.

[0171] Continuing with the above example, the first differences between the eight sixth relative distances and the fifth relative distance include:

[0172] diff_0.8_LT_H=abs(0.8-D-LT_H-D-CT_ave);

[0173] diff_0.8_LT_V=abs(0.8-D-LT_V-D-CT_ave);

[0174] diff_0.8_RT_H=abs(0.8-D-RT_H-D-CT_ave);

[0175] diff_0.8_RT_V=abs(0.8-D-RT_V-D-CT_ave);

[0176] diff_0.8_LB_H=abs(0.8-D-LB_H-D-CT_ave);

[0177] diff_0.8_LB_V=abs(0.8-D-LB_V-D-CT_ave);

[0178] diff_0.8_RB_H=abs(0.8-D-RB_H-D-CT_ave);

[0179] diff_0.8_RB_V=abs(0.8-D-RB_V-D-CT_ave).

[0180] Step 4: If the maximum value among the obtained first difference values ​​is less than the second preset threshold, it is determined that the camera module passes the image plane curvature detection based on the second preset field of view, and the second preset threshold can be set based on experience.

[0181] Find the maximum value among the above 8 first differences, represented by diff_0.8_max. If diff_0.8_max is less than the second preset threshold, it means that the image plane curvature test based on the second preset field of view of the camera module has passed. Otherwise, the image plane curvature test based on the second preset field of view of the camera module has failed.

[0182] Similarly, for the 0.3 field of view and the 0.5 field of view, the same processing method as the 0.8 field of view is used to calculate 8 first differences and obtain the largest first difference. Finally, based on the 3 fields of view, the following 3 data are obtained:

[0183] diff_0.8_max, diff_0.5_max, diff_0.3_max.

[0184] If the above three data are finally all smaller than the second preset threshold, it means that the camera module has passed the inspection on the dimension of image plane curvature, that is, the image plane curvature of the camera module is qualified.

[0185] Furthermore, according to different types of camera modules, it is divided into the following two cases:

[0186] 1) The camera module is an auto focus module

[0187] In this case, in the above method of calculating the first difference, all the relative distances involved can also be replaced by the motor position. That is, according to the relative distance and modulation transfer function value corresponding to each test picture, the camera module is detected in at least one target dimension, including:

[0188] Step 1: Get the modulation transfer function value of each test image in the center field of view, and determine the motor position corresponding to the maximum modulation transfer function value, represented by code_CT_ave.

[0189] code_CT_ave=(VCMCode_CT_H+VCMCode_CT_V) / 2, VCMCode_CT_H is the motor position corresponding to the maximum modulation transfer function value in the horizontal direction under the central field of view, and VCMCode_CT_V is the motor position corresponding to the maximum modulation transfer function value in the vertical direction under the central field of view.

[0190] Step 2: Determine the motor position corresponding to the maximum modulation transfer function value in each preset direction under the second preset field of view. For example, when the second preset field of view is 0.8 field of view, the motor positions corresponding to the maximum modulation transfer function values ​​in the four directions of upper left (LT), lower left (LB), upper right (RT), and lower right (RB) include: 0.8VCMCode_LT_H, 0.8VCMCode_LT_V, 0.8VCMCode_RT_H, 0.8VCMCode_RT_V, 0.8VCMCode_LB_H, 0.8VCMCode_LB_V, 0.8VCMCode_RB_H, 0.8VCMCode_RB_V.

[0191] Step 3: Determine the first difference between each motor position in step 2 and code_CT_ave, as follows:

[0192] diff_0.8_LT_H=abs(0.8VCMCode_LT_H-code_CT_ave);

[0193] diff_0.8_LT_V=abs(0.8VCMCode_LT_V-code_CT_ave);

[0194] diff_0.8_RT_H=abs(0.8VCMCode_RT_H-code_CT_ave);

[0195] diff_0.8_RT_V=abs(0.8VCMCode_RT_V-code_CT_ave);

[0196] diff_0.8_LB_H=abs(0.8VCMCode_LB_H-code_CT_ave);

[0197] diff_0.8_LB_V=abs(0.8VCMCode_LB_V-code_CT_ave);

[0198] diff_0.8_RB_H=abs(0.8VCMCode_RB_H-code_CT_ave);

[0199] diff_0.8_RB_V=abs(0.8VCMCode_RB_V-code_CT_ave);

[0200] Step 4: Find the maximum value among the above 8 first differences, represented by diff_0.8_max. If diff_0.8_max is less than the second preset threshold, it means that the camera module has passed the image plane curvature detection based on the second preset field of view.

[0201] 2) The camera module is a fixed-focus module

[0202] In this case, in the above method for calculating the first difference, all relative distances involved can also be replaced by the positions of the standard image. The specific implementation principle is the same as that of the automatic zoom module, and this embodiment will not be described in detail here.

[0203] (3) Separation rate

[0204] In principle, there should be no difference in the motor position corresponding to the maximum modulation transfer function value in the horizontal direction and the vertical direction, such as Figure 6 As shown, Figure 6 In the figure, H represents the horizontal direction and V represents the vertical direction. Therefore, it is necessary to test the separation rate of the camera module. Figure 6 It is a front schematic diagram of a lens shown in an embodiment of the present application.

[0205] In this embodiment, the plurality of different preset fields of view include a third preset field of view, and the third preset field of view is any one of the central field of view, the 0.3 field of view, the 0.5 field of view, and the 0.8 field of view. Accordingly, step S13 may include:

[0206] Step 1: Determine a second difference between a relative distance corresponding to a maximum horizontal modulation transfer function value in each preset direction and a relative distance corresponding to a maximum vertical modulation transfer function value in a third preset field of view.

[0207] The second difference is an absolute value, regardless of whether it is positive or negative, and is used to indicate the degree of difference.

[0208] For example, when the third preset field of view is 0.8 field of view, the corresponding relative distances when the maximum modulation transfer function values ​​are obtained in the four directions of upper left (LT), lower left (LB), upper right (RT), and lower right (RB) include: 0.8-D-LT_H, 0.8-D-LT_V, 0.8-D-LB_H, 0.8-D-LB_V, 0.8-D-RT_H, 0.8-D-RT_V, 0.8-D-RB_H, and 0.8-D-RB_V, then the obtained four second differences are:

[0209] Diff_0.8_LT=abs(0.8-D-LT_H-0.8-D-LT_V);

[0210] Diff_0.8_RT=abs(0.8-D-RT_H-0.8-D-RT_V);

[0211] Diff_0.8_LB=abs(0.8-D-LB_H-0.8-D-LB_V);

[0212] Diff_0.8_RB=abs(0.8-D-RB_H-0.8-D-RB_V).

[0213] Step 2: If the maximum value among the obtained second difference values ​​is less than the third preset threshold, it is determined that the camera module passes the separation rate detection based on the third preset field of view.

[0214] The maximum value is found among the above four second differences and is represented by Diff_0.8_Max. If Diff_0.8_Max is less than the third preset threshold, it means that the camera module has passed the separation rate detection based on the third preset field of view.

[0215] Similarly, for the 0.3 field of view, 0.5 field of view and central field of view, the same processing method as the 0.8 field of view is used to calculate the four second differences and obtain the largest second difference. Finally, the following four data are obtained based on the four fields of view:

[0216] Diff_0.8_Max, Diff_0.5_Max, Diff_0.3_Max, Diff_CT_Max.

[0217] If the above four data are finally all smaller than the third preset threshold, it means that the camera module has passed the detection in the separation rate dimension, that is, the separation rate of the camera module is qualified.

[0218] Furthermore, according to different types of camera modules, it is divided into the following two cases:

[0219] 1) The camera module is an auto focus module

[0220] In this case, in the above method of calculating the second difference, all the relative distances involved can also be replaced by the motor position. That is, according to the relative distance and modulation transfer function value corresponding to each test picture, the camera module is detected in at least one target dimension, including:

[0221] Step 1: Determine a second difference between a motor position corresponding to a maximum modulation transfer function value in a horizontal direction and a motor position corresponding to a maximum modulation transfer function value in a vertical direction in each preset direction under a third preset field of view.

[0222] For example, when the third preset field of view is 0.8 field of view, the corresponding motor positions when the maximum modulation transfer function values ​​are obtained in the four directions of upper left (LT), lower left (LB), upper right (RT), and lower right (RB) include: 0.8VCMCode_LT_H, 0.8VCMCode_LT_V, 0.8VCMCode_LB_H, 0.8VCMCode_LB_V, 0.8VCMCode_RT_H, 0.8VCMCode_RT_V, 0.8VCMCode_RB_H, 0.8VCMCode_RB_V, then the four second differences are:

[0223] Diff_0.8_LT=abs(0.8VCMCode_LT_H-0.8VCMCode_LT_V);

[0224] Diff_0.8_RT=abs(0.8VCMCode_RT_H-0.8VCMCode_RT_V);

[0225] Diff_0.8_LB=abs(0.8VCMCode_LB_H-0.8VCMCode_LB_V);

[0226] Diff_0.8_RB=abs(0.8VCMCode_RB_H-0.8VCMCode_RB_V).

[0227] Step 2: When the maximum value among the second difference values ​​is less than the third preset threshold value, it is determined that the separation rate detection of the camera module based on the third preset field of view has passed.

[0228] If the maximum value Diff_0.8_Max among the four second difference values ​​is less than the third preset threshold, it means that the camera module passes the separation rate detection based on the third preset field of view.

[0229] 2) The camera module is a fixed-focus module.

[0230] In this case, in the above method for calculating the second difference, all relative distances involved can also be replaced by the positions of the standard image. The specific implementation principle is the same as that of the automatic zoom module, and this embodiment will not be described in detail here.

[0231] (4) Uniformity

[0232] In principle, since the lens is absolutely symmetrical, the modulation transfer function values ​​at various positions on the same circle are consistent, so uniformity testing is required.

[0233] In this embodiment, the plurality of different preset fields of view include a fourth preset field of view, and the fourth preset field of view is any one of a 0.3 field of view, a 0.5 field of view, and a 0.8 field of view. Accordingly, step S13 may include:

[0234] Step 1: Determine the seventh relative distance corresponding to the maximum modulation transfer function value in the central field of view, and the second test image collected at the seventh relative distance.

[0235] Step 2: In the second test image, determine a third difference between the maximum horizontal modulation transfer function value and the minimum horizontal modulation transfer function value in each preset direction, and a fourth difference between the maximum vertical modulation transfer function value and the minimum vertical modulation transfer function value in each preset direction under the fourth preset field of view.

[0236] Taking the fourth preset field of view as 0.8 field of view as an example, the third difference Diff_0.8_H and the fourth difference Diff_0.8_V are calculated as follows:

[0237] Diff_0.8_H=max(0.8MTFvalue_LT_H, 0.8MTFvalue_RT_H,, 0.8MTFvalue_LB_H, 0.8MTFvalue_RB_H)-min(0.8MTFvalue_LT_H, 0.8MTFvalue_RT_H, 0.8MTFvalue_LB_H, 0.8MTFvalue_RB_H);

[0238] Diff_0.8_V=max(0.8MTFvalue_LT_V, 0.8MTFvalue_RT_V,0.8MTFvalue_LB_V,0.8MTFvalue_RB_V)-min(0.8MTFvalue_LT_V,0.8MTFvalue_RT_V,0.8MTFvalue_LB_V,0.8MTFvalue_RB_V).

[0239] Step 3: If both the third difference and the fourth difference are smaller than the fourth preset threshold, it is determined that the camera module passes the uniformity detection based on the fourth preset field of view.

[0240] If the maximum value of Diff_0.8_H and Diff_0.8_V is less than the fourth preset threshold, it is determined that the uniformity test of the camera module based on the fourth preset field of view has passed.

[0241] Similarly, for the 0.3 field of view and the 0.5 field of view, the third difference and the fourth difference are calculated in the same way as the 0.8 field of view. Finally, the following 6 data are obtained based on the 3 fields of view:

[0242] Diff_0.8_H, Diff_0.8_V, Diff_0.5_H, Diff_0.5_V, Diff_0.3_H, Diff_0.3_V.

[0243] If the above 6 data are finally all smaller than the fourth preset threshold, it means that the camera module has passed the uniformity test, that is, the uniformity of the camera module is qualified.

[0244] Furthermore, according to different types of camera modules, it is divided into the following two cases:

[0245] 1) The camera module is an auto focus module

[0246] In this case, in the above method of calculating the third difference and the fourth difference, the seventh relative distance can be replaced by the motor position. That is, the seventh relative distance at which the maximum modulation transfer function value is obtained under the central field of view and the second test image captured at the seventh relative distance can be replaced by:

[0247] Determine the target motor position at which the maximum modulation transfer function value is obtained in the central field of view, and a second test image captured at the target motor position.

[0248] 2) The camera module is a fixed-focus module

[0249] In this case, in the above method of calculating the third difference and the fourth difference, the seventh relative distance can be replaced by the position of the standard image. That is, the seventh relative distance at which the maximum modulation transfer function value is obtained under the central field of view, and the target test image collected at the seventh relative distance can be replaced by:

[0250] Determine the target position of the standard image when the maximum modulation transfer function value is obtained in the central field of view, and the second test image collected at the target position.

[0251] (5) Monotonicity

[0252] Image curvature cannot exclude Figure 7 Therefore, it is necessary to ensure the degree of change of the lens curvature and the monotonicity check by adjusting the decreasing degree of the modulation transfer function value. Figure 7 It is a schematic diagram of an abnormal situation of a lens shown in an embodiment of the present application.

[0253] In this embodiment, the plurality of different preset fields of view include a central field of view, a 0.3 field of view, a 0.5 field of view, and a 0.8 field of view, and at least one preset direction includes a target preset direction, and the target preset direction is any one of the upper left, lower left, upper right, and lower right. Accordingly, step S13 may include:

[0254] Step 1: Determine, in the target preset direction, a fifth difference between the maximum horizontal modulation transfer function value corresponding to the preset field of view close to the central field of view among any two adjacent preset fields of view and the maximum horizontal modulation transfer function value corresponding to the preset field of view away from the central field of view, and a sixth difference between the maximum vertical modulation transfer function value corresponding to the preset field of view close to the central field of view among any two adjacent preset fields of view and the maximum vertical modulation transfer function value corresponding to the preset field of view away from the central field of view.

[0255] Taking the target preset direction as the upper left LT direction as an example, the calculated fifth difference values ​​include:

[0256] Diff_value_1_LT_H=MTFvalue_CT_H-0.3MTFvalue_LT_H;

[0257] Diff_value_2_LT_H=0.3MTFvalue_CT_H-0.5MTFvalue_LT_H;

[0258] Diff_value_3_LT_H=0.5MTFvalue_CT_H-0.8MTFvalue_LT_H;

[0259] The calculated sixth differences include:

[0260] Diff_value_1_LT_V=MTFvalue_CT_V-0.3MTFvalue_LT_V;

[0261] Diff_value_2_LT_V=0.3MTFvalue_CT_V-0.5MTFvalue_LT_V;

[0262] Diff_value_3_LT_V=0.5MTFvalue_CT_V-0.8MTFvalue_LT_V.

[0263] Wherein, MTFvalue_CT_H is the maximum modulation transfer function value in the horizontal direction of the central field of view, and MTFvalue_CT_V is the maximum modulation transfer function value in the vertical direction of the central field of view.

[0264] Step 2: If the maximum value among the fifth difference values ​​and the sixth difference values ​​obtained is less than the fifth preset threshold value, it is determined that the camera module passes the monotonicity detection based on the preset direction of the target.

[0265] Find the maximum value among each fifth difference value and each sixth difference value and record it as Diff_value_max_LT. If Diff_value_max_LT is less than the fifth preset threshold, it is determined that the monotonicity test of the camera module has passed.

[0266] Similarly, for the three preset directions of lower left, upper right and lower right, the fifth difference and the sixth difference are calculated respectively in the same processing method as the upper left preset direction. Finally, the following four data are obtained based on the four preset directions:

[0267] Diff_value_max_LT, Diff_value_max_RT, Diff_value_max_LB, Diff_value_max_RB.

[0268] If the above four data are finally all smaller than the fifth preset threshold, it means that the camera module has passed the monotonicity test, that is, the monotonicity of the camera module is qualified.

[0269] Through this application, after the lens is assembled to the camera module, the physical state of the lens itself and the overall assembly between the lens and the image sensor can be evaluated in multiple dimensions. The multiple dimensions may include the field of view tilt, image plane curvature, separation rate, uniformity, and monotonicity mentioned above. The lens assembly is considered qualified only when all dimensions are tested and passed. In this way, the lens assembly of the camera module is qualified, avoiding the situation where the lens performance is normal but cannot be used normally after assembly, thereby ensuring that the camera module can be used normally after assembly.

[0270] Based on the same inventive concept, an embodiment of the present application provides a lens assembly abnormality detection device 800 for a camera module. Figure 8 , Figure 8 FIG. 1 is a structural block diagram of a lens assembly abnormality detection device for a camera module shown in an embodiment of the present application. Figure 8 As shown, the device 800 includes:

[0271] An acquisition module 801 is used to acquire a plurality of test images captured by the camera module for a standard image, where different test images are captured at different relative distances, where the relative distance is the distance between a lens in the camera module and the standard image;

[0272] A first determination module 802 is used to determine the modulation transfer function value of each of the test pictures in a plurality of different preset fields of view, where different preset fields of view correspond to different areas in the test picture;

[0273] A detection module 803 is used to detect the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value, where the target dimension includes field of view tilt, image plane curvature, separation rate, uniformity and monotonicity;

[0274] The second determination module 804 is used to determine that the lens assembly is qualified when all the target dimensions have passed the detection.

[0275] Optionally, the modulation transfer function value includes a modulation transfer function value in a horizontal direction and a modulation transfer function value in a vertical direction.

[0276] The types of the preset field of view include a central field of view and a non-central field of view, the intersection of the diagonal lines of the test image represents the central field of view, any point on the path from the central field of view along the diagonal lines to the four vertices of the test image represents the non-central field of view, the field of view value of the central field of view is 0, the field of view values ​​of the four vertices are 1, and the field of view value gradually increases from the central field of view along the diagonal lines to the four vertices.

[0277] Optionally, the multiple test pictures include a first test picture, the multiple different preset fields of view include a central field of view and at least one non-central field of view, and the first determining module 802 includes:

[0278] A first determination submodule, configured to determine a modulation transfer function value of the first test picture for the central field of view;

[0279] The second determination submodule is used to determine, for the non-central field of view, the modulation transfer function values ​​of the first test image in a plurality of preset directions corresponding to each of the non-central fields of view.

[0280] Optionally, the at least one target dimension is a field of view inclination, and the at least one non-central field of view includes a first preset field of view; and the detection module 804 includes:

[0281] A third determination submodule is used to determine the relative distance corresponding to the maximum modulation transfer function value in each of the preset directions under the first preset field of view;

[0282] a fourth determination submodule, configured to determine, from among the relative distances obtained, a first relative distance corresponding to a maximum horizontal modulation transfer function value, a second relative distance corresponding to a minimum horizontal modulation transfer function value, a third relative distance corresponding to a maximum vertical modulation transfer function value, and a fourth relative distance corresponding to a minimum vertical modulation transfer function value;

[0283] a fifth determining submodule, configured to determine the inclination in the horizontal direction according to the first relative distance and the second relative distance, and to determine the inclination in the vertical direction according to the third relative distance and the fourth relative distance;

[0284] The sixth determination submodule is used to determine that the camera module passes the field of view inclination detection based on the first preset field of view if the inclination in the horizontal direction and the inclination in the vertical direction are both less than a first preset threshold value.

[0285] Optionally, the camera module is an autofocus module, and the autofocus module includes a motor; the fifth determination submodule includes:

[0286] a seventh determination submodule, configured to determine a motor position corresponding to each of the first relative distance, the second relative distance, the third relative distance, and the fourth relative distance;

[0287] an eighth determination submodule, configured to determine the inclination in the horizontal direction according to the motor position corresponding to the first relative distance and the motor position corresponding to the second relative distance;

[0288] A ninth determination submodule is used to determine the inclination in the vertical direction according to the motor position corresponding to the third relative distance and the motor position corresponding to the fourth relative distance.

[0289] Optionally, the at least one target dimension is image plane curvature, the at least one non-central field of view includes a second preset field of view; and the detection module 804 includes:

[0290] a tenth determining submodule, configured to determine, among the modulation transfer function values ​​corresponding to the central field of view, the relative distance corresponding to the maximum value as the fifth relative distance;

[0291] An eleventh determining submodule is used to determine a sixth relative distance corresponding to a maximum modulation transfer function value in each of the preset directions under the second preset field of view;

[0292] A twelfth determining submodule, used to determine a first difference between each of the sixth relative distances and the fifth relative distance;

[0293] The thirteenth determination submodule is used to determine whether the camera module passes the image plane curvature detection based on the second preset field of view if the maximum value among the obtained first difference values ​​is less than a second preset threshold value.

[0294] Optionally, the at least one target dimension is a separation rate, the multiple different preset fields of view include a third preset field of view; and the detection module 804 includes:

[0295] A fourteenth determining submodule is used to determine a second difference between a relative distance corresponding to a maximum horizontal modulation transfer function value in each of the preset directions and a relative distance corresponding to a maximum vertical modulation transfer function value in the third preset field of view;

[0296] The fifteenth determination submodule is used to determine whether the camera module passes the separation rate detection based on the third preset field of view if the maximum value among the obtained second difference values ​​is less than a third preset threshold value.

[0297] Optionally, the at least one target dimension is uniformity, the at least one non-central field of view includes a fourth preset field of view; and the detection module 804 includes:

[0298] A sixteenth determination submodule is used to determine a seventh relative distance corresponding to the maximum modulation transfer function value in the central field of view, and a second test image collected at the seventh relative distance;

[0299] a seventeenth determination submodule, configured to determine, in the second test picture, a third difference between a maximum modulation transfer function value in a horizontal direction and a minimum modulation transfer function value in a horizontal direction in each of the preset directions, and a fourth difference between a maximum modulation transfer function value in a vertical direction and a minimum modulation transfer function value in a vertical direction in each of the preset directions under the fourth preset field of view;

[0300] The eighteenth determination submodule is used to determine whether the camera module passes the uniformity detection based on the fourth preset field of view if both the third difference and the fourth difference are smaller than a fourth preset threshold.

[0301] Optionally, the at least one target dimension is monotonic, the at least one preset direction includes a target preset direction; and the detection module 804 includes:

[0302] a nineteenth determination submodule, configured to determine, in the target preset direction, a fifth difference between a maximum horizontal modulation transfer function value corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum horizontal modulation transfer function value corresponding to a preset field of view far from the central field of view, and a sixth difference between a maximum vertical modulation transfer function value corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum vertical modulation transfer function value corresponding to a preset field of view far from the central field of view;

[0303] The twentieth determination submodule is used to determine whether the camera module has passed the monotonicity detection based on the preset direction of the target if the maximum value among the fifth difference values ​​and the sixth difference values ​​obtained is less than a fifth preset threshold value.

[0304] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0305] The present application also provides an electronic device, which includes:

[0306] processor;

[0307] a memory for storing instructions executable by the processor;

[0308] Among them, the processor is configured to execute to implement a lens assembly abnormality detection method for a camera module described in an embodiment of the present application.

[0309] An embodiment of the present application also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute a lens assembly abnormality detection method for a camera module described in an embodiment of the present application.

[0310] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0311] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0312] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0313] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0314] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0315] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for detecting abnormalities in lens assembly of a camera module, characterized in that: include: Acquire multiple test images captured by the camera module for the standard image, where different test images are captured at different relative distances, where the relative distance is the distance between a lens in the camera module and the standard image; Determining a modulation transfer function value of each of the test images in a plurality of different preset fields of view, where different preset fields of view correspond to different areas in the test image; According to the relative distance corresponding to each of the test images and the modulation transfer function value, the camera module is tested in at least one target dimension, wherein the target dimension includes field of view tilt, image plane curvature, separation rate, uniformity and monotonicity; When all the target dimensions have passed the inspection, it is determined that the lens assembly is qualified.

2. The method according to claim 1, characterized in that The modulation transfer function value includes a modulation transfer function value in a horizontal direction and a modulation transfer function value in a vertical direction.

3. The method according to claim 2, characterized in that The types of the preset field of view include a central field of view and a non-central field of view, the intersection of the diagonal lines of the test image represents the central field of view, any point on the path from the central field of view along the diagonal lines to the four vertices of the test image represents the non-central field of view, the field of view value of the central field of view is 0, the field of view values ​​of the four vertices are 1, and the field of view value gradually increases from the central field of view along the diagonal lines to the four vertices.

4. The method according to claim 3, characterized in that The plurality of test pictures include a first test picture, the plurality of different preset fields of view include a central field of view and at least one non-central field of view, and determining a modulation transfer function value of each of the test pictures in the plurality of different preset fields of view includes: For the central field of view, determining a modulation transfer function value of the first test picture; For the non-central fields of view, modulation transfer function values ​​of the first test image in a plurality of preset directions corresponding to each of the non-central fields of view are determined.

5. The method according to claim 4, characterized in that The at least one target dimension is a field of view inclination, and the at least one non-center field of view includes a first preset field of view; and the detection of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes: Determine a relative distance corresponding to a maximum modulation transfer function value in each of the preset directions under the first preset field of view; Among the obtained relative distances, determining a first relative distance corresponding to the maximum horizontal modulation transfer function value, a second relative distance corresponding to the minimum horizontal modulation transfer function value, a third relative distance corresponding to the maximum vertical modulation transfer function value, and a fourth relative distance corresponding to the minimum vertical modulation transfer function value; determining an inclination in a horizontal direction according to the first relative distance and the second relative distance, and determining an inclination in a vertical direction according to the third relative distance and the fourth relative distance; If the inclination in the horizontal direction and the inclination in the vertical direction are both less than a first preset threshold, it is determined that the camera module passes the field of view inclination detection based on the first preset field of view.

6. The method according to claim 4, characterized in that The at least one target dimension is image plane curvature, the at least one non-central field of view includes a second preset field of view; and the detection of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes: Among the modulation transfer function values ​​corresponding to the central field of view, determining the relative distance corresponding to the maximum value as the fifth relative distance; Determine a sixth relative distance corresponding to the maximum modulation transfer function value in each of the preset directions under the second preset field of view; determining a first difference between each of the sixth relative distances and the fifth relative distance; If the maximum value among the first difference values ​​obtained is less than a second preset threshold, it is determined that the camera module passes the image plane curvature detection based on the second preset field of view.

7. The method according to claim 4, characterized in that The at least one target dimension is a separation rate, the multiple different preset fields of view include a third preset field of view; the detection of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes: Determine a second difference between a relative distance corresponding to a maximum modulation transfer function value in a horizontal direction in each of the preset directions and a relative distance corresponding to a maximum modulation transfer function value in a vertical direction under the third preset field of view; If the maximum value among the obtained second difference values ​​is less than the third preset threshold, it is determined that the camera module passes the separation rate detection based on the third preset field of view.

8. The method according to claim 4, characterized in that The at least one target dimension is uniformity, the at least one non-central field of view includes a fourth preset field of view; and the detection of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes: Determine a seventh relative distance corresponding to a maximum modulation transfer function value in the central field of view, and a second test image captured at the seventh relative distance; In the second test picture, determining a third difference between the maximum horizontal modulation transfer function value and the minimum horizontal modulation transfer function value in each of the preset directions, and a fourth difference between the maximum vertical modulation transfer function value and the minimum vertical modulation transfer function value in each of the preset directions under the fourth preset field of view; If both the third difference and the fourth difference are smaller than a fourth preset threshold, it is determined that the camera module passes the uniformity detection based on the fourth preset field of view.

9. The method according to claim 4, characterized in that The at least one target dimension is monotonic, the at least one preset direction includes a target preset direction; and the detection of the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value includes: Determine, in the target preset direction, a fifth difference between a maximum modulation transfer function value in the horizontal direction corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum modulation transfer function value in the horizontal direction corresponding to a preset field of view far from the central field of view, and a sixth difference between a maximum modulation transfer function value in the vertical direction corresponding to a preset field of view close to the central field of view among any two adjacent preset fields of view and a maximum modulation transfer function value in the vertical direction corresponding to a preset field of view far from the central field of view; If the maximum value among the fifth difference values ​​and the sixth difference values ​​obtained is less than the fifth preset threshold value, it is determined that the camera module passes the monotonicity detection based on the preset direction of the target.

10. A device for detecting abnormalities in lens assembly of a camera module, characterized in that: include: An acquisition module, used for acquiring a plurality of test images captured by the camera module for a standard image, wherein different test images are captured at different relative distances, where the relative distance is the distance between a lens in the camera module and the standard image; A first determination module is used to determine the modulation transfer function value of each of the test pictures in a plurality of different preset fields of view, where different preset fields of view correspond to different areas in the test picture; A detection module, used for detecting the camera module in at least one target dimension according to the relative distance corresponding to each of the test images and the modulation transfer function value, wherein the target dimension includes field of view tilt, image plane curvature, separation rate, uniformity and monotonicity; The second determination module is used to determine that the lens assembly is qualified when all the target dimensions have passed the detection.