Automatic AOI detection method for camera module lens

By analyzing the transmitted light images of the lens at different angles, determining the spot communication domain and performing fusion processing, the problem of inaccurate detection of the lens' light transmittance is solved, and higher detection accuracy and reliability are achieved.

CN120387961AActive Publication Date: 2025-07-29HUNAN JIAN KUN LASER TECH CO LTD

Patent Information

Application Number
CN202510884209.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-07-29
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

In the AOI detection of the existing camera module lens, the light transmittance detection result is inaccurate due to the light spot formed by the reflection effect of the lens surface.

Method used

By analyzing the grayscale characteristics of the transmitted light images of the lens under incident light at different angles, the spot connection domain is determined, and the fusion coefficient is calculated based on the spot intensity and regional similarity, the spot area is superimposed and fusion, and the local exposure time is adjusted for image enhancement.

Benefits of technology

The error of light transmittance detection by light spot is reduced, and the accuracy and reliability of detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387961A_ABST
    Figure CN120387961A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image enhancement, in particular to an automatic AOI detection method for a camera module lens, and the method comprises the steps: analyzing the gray features of a gray image of a transmission light image of a lens under incident light of different angles, and determining a light spot connected domain; determining fusion coefficients of any two light spot connected domains corresponding to the different transmission light images, performing superposition fusion on the light spot connected domains to obtain an overall transmission light image and each fusion light spot area in the image, determining local exposure time of each fusion light spot area according to the comprehensive light spot intensity of each fusion light spot area, and determining the local exposure time of each fusion light spot area according to the comprehensive light spot intensity of each fusion light spot area. And carrying out image enhancement on the overall transmission light image based on the local exposure time to obtain a target transmission light image so as to carry out lens light transmission detection. According to the invention, the image is enhanced according to the self-adaptively determined local exposure time, so that the accuracy of light transmission detection is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image enhancement, and particularly to an automated AOI detection method for a camera module lens. Background Art

[0002] Automated Optical Inspection (AOI) is a quality control technology widely used in the electronics manufacturing industry. This technology uses a vision inspection system to identify and report potential problems on products, ensuring that the products meet quality standards. In the AOI detection of camera module lenses, since the light transmittance of the lens of the camera module directly affects the imaging quality and optical performance, the light transmittance detection is a very crucial part in the AOI detection.

[0003] During the process of detecting the light transmittance of the lens of the camera module, generally, the lens is placed in an environment of bright field illumination or structured light, and then the lens is irradiated with uniform light. The transmitted light image passing through the lens is collected by an AOI camera, and the transmitted light image is analyzed to determine the light transmittance of the lens of the camera module. When obtaining the transmitted light image, since the surface of the lens is a smooth surface, there is a strong reflection effect when the lens is irradiated with uniform light. The reflection effect of the lens on light will form light spots (regions where the reflected light is concentrated) on the detection surface. These light spots will cause the AOI camera to receive an abnormally strong light signal, resulting in the presence of light spots in the collected transmitted light image. The presence of light spots will cause errors in the light transmittance detection results analyzed based on the transmitted light image. Summary of the Invention

[0004] The purpose of the present invention is to provide an automated AOI detection method for a camera module lens, which is used to solve the problem that the light transmittance detection result of the lens in the AOI detection of the lens is inaccurate due to the influence of the light spots existing in the existing transmitted light image.

[0005] To solve the above technical problems, in a first aspect, the present invention provides an automated AOI detection method for a camera module lens, including the following steps: Obtain the transmitted light images of the lens under incident light at different angles, analyze the gray features in the gray images of the transmitted light images, and determine each light spot connected domain; Analyze the light spot intensity of the light spot connected domain, and determine the fusion coefficient of any two light spot connected domains corresponding to different transmitted light images according to the regional similarity and the light spot intensity similarity of any two light spot connected domains corresponding to different transmitted light images; According to the fusion coefficient, the spot connected regions corresponding to the transmitted light images under incident light rays at all different angles are superimposed and fused to obtain an overall transmitted light image and each fused spot region in the overall transmitted light image; Analyze the comprehensive spot intensity of each fused spot region in the overall transmitted light image, and determine the local exposure time of each fused spot region in the overall transmitted light image according to the comprehensive spot intensity; According to the local exposure time of each fused spot region in the overall transmitted light image, perform enhancement processing on the overall transmitted light image to obtain a target transmitted light image of the lens, and perform lens light transmittance detection according to the target transmitted light image.

[0006] Combined with the first aspect above, in some possible implementation manners, analyzing the gray-scale features in the gray-scale image of the transmitted light image to determine each spot connected region includes: Perform connected region detection on the gray-scale image of the transmitted light image to obtain each target connected region; According to the gray-scale distribution of the pixel points in the target connected region and the gray-scale gradient difference between the edge pixel points and their neighboring pixel points, determine the spot confidence of the target connected region, and filter out the spot connected regions in each of the target connected regions according to the spot confidence.

[0007] Combined with the first aspect above, in some possible implementation manners, determining the spot confidence of the target connected region includes: According to the gray-scale gradient difference between each edge pixel point in the target connected region and its neighboring pixel points, determine the gradient change rate of each edge pixel point in the target connected region; According to the difference between the gray-scale value of each pixel point in the target connected region and the maximum gray-scale value, determine the brightness difference index of each pixel point in the target connected region; According to the overall distribution level of the gradient change rates of all the edge pixel points in the target connected region and the overall distribution level of the brightness difference indexes of all the pixel points, determine the spot confidence of the target connected region.

[0008] Combined with the first aspect above, in some possible implementation manners, determining the spot confidence of the target connected region includes: Determine the average value of the gradient change rates of all the edge pixel points in the target connected region to obtain the average gradient change rate; Determine the average value of the brightness difference indexes of all the pixel points in the target connected region to obtain the average brightness difference index; Calculate the product value of the average gradient change rate and the average brightness difference index, and perform negative correlation mapping normalization processing on the product value, so as to obtain the spot confidence of the target connected region.

[0009] Combined with the first aspect above, in some possible implementation manners, analyzing the spot intensity of the spot connected region includes: Determine the ratio of the area of the spot connected region to the maximum area of all the spot connected regions in the grayscale image where the spot connected region is located, so as to obtain the area ratio. Determine the spot intensity of the spot connected region according to the spot confidence and the area ratio of the spot connected region, and both the spot confidence and the area ratio are positively correlated with the spot intensity.

[0010] Combined with the first aspect above, in some possible implementation manners, determining the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images includes: For any two of the spot connected regions corresponding to different transmitted light images, take one of the spot connected regions as the first spot connected region and the other spot connected region as the second spot connected region. Determine the co-location mapping region of the second spot connected region in the grayscale image of the transmitted light image where the first spot connected region is located. Determine the distance and the intersection area between the first spot connected region and the co-location mapping region. Determine the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images according to the distance and the intersection area corresponding to the any two of the spot connected regions, and the difference magnitude between the spot intensities.

[0011] Combined with the first aspect above, in some possible implementation manners, determining the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images includes: Determine the region similarity index corresponding to the any two of the spot connected regions according to the distance and the intersection area corresponding to the any two of the spot connected regions, the distance is negatively correlated with the region similarity index, and the intersection area is positively correlated with the region similarity index. Perform negative correlation mapping processing on the absolute value of the difference between the spot intensities of the any two of the spot connected regions, so as to obtain the spot intensity similarity index corresponding to the any two of the spot connected regions. Perform normalization processing on the product of the region similarity index and the spot intensity similarity index corresponding to the any two of the spot connected regions, so as to obtain the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images.

[0012] Combined with the first aspect described above, in some possible implementation manners, superimposing and fusing the spot connected regions corresponding to the transmitted light images under incident light rays at all different angles to obtain an overall transmitted light image and each fused spot region in the overall transmitted light image, including: Taking the grayscale image of any one transmitted light image as a reference image, and determining the mapped spot connected regions at the same positions in the reference image for the spot connected regions corresponding to all other transmitted light images; In the reference image, comparing the determined fusion coefficient with a fusion coefficient threshold, and fusing two object spot connected regions corresponding to the fusion coefficient being greater than the fusion coefficient threshold into one spot region, where the object spot connected region is a spot connected region or a mapped spot connected region in the reference image; Taking each spot region finally fused in the reference image as a fused spot region, projecting all the fused spot regions onto the grayscale image of any one transmitted light image to obtain an overall transmitted light image, and taking any one spot region in the overall transmitted light image as the fused spot region in the overall transmitted light image.

[0013] Combined with the first aspect described above, in some possible implementation manners, analyzing the comprehensive spot intensity of each fused spot region in the overall transmitted light image, including: Determining the maximum value among the regional areas of all the spot connected regions corresponding to each fused spot region in the overall transmitted light image to obtain the maximum regional area; Taking the ratio of the regional area of each spot connected region corresponding to each fused spot region in the overall transmitted light image to the maximum regional area as the spot intensity weight value of each spot connected region corresponding to each fused spot region in the overall transmitted light image; According to the spot intensity weight value, performing weighted summation on the spot intensities of the respective spot connected regions corresponding to each fused spot region in the overall transmitted light image, so as to obtain the comprehensive spot intensity of each fused spot region in the overall transmitted light image.

[0014] Combined with the first aspect described above, in some possible implementation manners, determining the local exposure time of each fused spot region in the overall transmitted light image, including: Performing negative correlation normalization processing on the comprehensive spot intensity of each fused spot region in the overall transmitted light image respectively to obtain the exposure time coefficient of each fused spot region in the overall transmitted light image; Calculating the product of each exposure time coefficient and the global exposure time for collecting the transmitted light image respectively, so as to obtain the local exposure time of each fused spot region in the overall transmitted light image.

[0015] To solve the above technical problems, in a second aspect, the present invention further provides an automatic AOI detection device for a camera module lens, and the device includes: A spot connected domain acquisition module, configured to acquire a transmitted light image of a lens under incident light at different angles, analyze gray - scale features in the gray - scale image of the transmitted light image, and determine each spot connected domain; A fusion coefficient acquisition module, configured to analyze the spot intensity of the spot connected domain, and determine the fusion coefficient between any two spot connected domains corresponding to different transmitted light images according to the regional similarity and the spot intensity similarity of any two of the spot connected domains corresponding to different transmitted light images; A fused spot region acquisition module, configured to perform superposition fusion on the spot connected domains corresponding to the transmitted light images under incident light at all different angles according to the fusion coefficient, to obtain an overall transmitted light image and each fused spot region in the overall transmitted light image; A local exposure time acquisition module, configured to analyze the comprehensive spot intensity of each fused spot region in the overall transmitted light image, and determine the local exposure time of each fused spot region in the overall transmitted light image according to the comprehensive spot intensity; A detection module, configured to perform enhancement processing on the overall transmitted light image according to the local exposure time of each fused spot region in the overall transmitted light image to obtain a target transmitted light image of the lens, and perform lens light transmission detection according to the target transmitted light image.

[0016] To solve the above technical problems, in a third aspect, the present invention further provides an automatic AOI detection system for a camera module lens, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the method in the first aspect or any possible implementation manner of the first aspect.

[0017] To solve the above technical problems, in a fourth aspect, the present invention further provides a computer program product, which includes: computer program code, when the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any possible implementation manner of the first aspect.

[0018] To solve the above technical problems, in a fifth aspect, the present invention further provides a computer - readable storage medium, which stores computer program code, and when the computer program code runs on a computer, the computer is caused to execute the method in the first aspect or any possible implementation manner of the first aspect.

[0019] The present invention has the following beneficial effects: By analyzing the gray-scale features of the transmitted light images of the lens under incident light at different angles, each spot connected domain is determined. Then, the regional similarity and spot intensity similarity between the spot connected domains in different transmitted light images are analyzed to determine the fusion coefficient between the spot connected domains in different transmitted light images for superposition and fusion of the spot regions. And the local exposure time of the transmitted light image is determined according to the comprehensive spot intensity of the fused spot regions at different positions for image adaptive enhancement, thereby reducing the detection error of the spots on the light transmission uniformity and improving the accuracy and reliability of the light transmission detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0021] Figure 1 It is a step flow chart of an automatic AOI detection method for a camera module lens according to an embodiment of the present invention; Figure 2 It is a schematic diagram of the rotation of a uniform light source according to an embodiment of the present invention; Figure 3 It is a schematic structural diagram of an automatic AOI detection device for a camera module lens according to an embodiment of the present invention; Figure 4 It is a schematic structural diagram of an automatic AOI detection system for a camera module lens according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] In order to clearly illustrate the technical features of the present solution, the present invention will be described in detail below through specific embodiments in combination with the drawings.

[0023] The embodiments of the present invention will be described in more detail below with reference to the drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments described herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.

[0024] It should be understood that the various steps described in the method embodiments of the present invention can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this regard.

[0025] As used herein, the term "comprising" and its variations are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.

[0027] In the embodiments of the present invention, although the operations or steps are described in a specific order in the drawings, it should not be understood that they are required to be executed in the specific order shown or in a serial order, or that all the operations or steps shown are required to be executed to obtain the desired result. In the embodiments of the present invention, these operations or steps can be executed serially; they can also be executed in parallel; or a part of these operations or steps can be executed.

[0028] At the same time, it can be understood that the data involved in the technical solution of the present invention (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and related regulations. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs, and all parameters or indicators in the formulas involved in the present invention are numerical values after normalization to eliminate the influence of dimensions.

[0029] In order to solve the problem that the detection result of the light transmittance of the lens in the AOI detection of the lens is inaccurate due to the influence of light spots in the transmitted light image of the lens of the camera module collected at present, the embodiments of the present invention provide an automatic AOI detection method for the lens of the camera module. This method determines each light spot connected domain by analyzing the gray-scale characteristics of the transmitted light image of the lens under incident light at different angles, then performs the superposition and fusion of the light spots for the fusion coefficient between the light spot connected domains in different transmitted light images, and determines the local exposure time of the transmitted light image according to the comprehensive light spot intensity of the fused light spot regions at different positions to perform image adaptive enhancement, thereby reducing the detection error of the light spots on the light transmittance uniformity and improving the accuracy and reliability of the light transmittance detection.

[0030] The following will introduce in detail an automated AOI detection method for a camera module lens provided by an embodiment of the present invention in conjunction with the accompanying drawings.

[0031] Figure 1 The schematic diagram of the basic process of an automated AOI detection method for a camera module lens provided by an embodiment of the present invention is shown. As Figure 1 shown, the method specifically includes the following steps: Step S100: Obtain the transmitted light images of the lens under incident light at different angles, analyze the gray-scale features in the gray-scale image of the transmitted light image, and determine each light spot connected domain.

[0032] When using an AOI detection system to detect the light transmittance of the lens of a camera module, generally, the lens is placed in an environment of bright-field illumination or structured light, and then uniform light is irradiated onto the lens, and the transmitted light image passing through the lens is collected by an AOI camera and analyzed to determine the light transmittance of the lens of the camera module. Since most of the lens surface is a smooth area, there is a strong reflection effect when the lens is irradiated with uniform light, so light spots will be formed on the lens surface and in the transmitted light image, and the existence of the light spots will cause errors in the light transmittance detection results analyzed based on the transmitted light image.

[0033] To reduce the problem that the local brightness in the transmitted light image caused by the light spots formed due to the light reflection effect is too high, and thus the light transmittance detection result analyzed based on the transmitted light image is not accurate enough, the embodiment of the present invention collects the transmitted light images formed by the lens under light sources at different incident angles, analyzes the gray-scale features in the gray-scale image of the transmitted light image, determines the possible light spot connected domains, calculates the corresponding light spot intensities for different light spot connected domains, then determines the fusion coefficient based on the regional similarity and light spot intensity similarity of the light spot connected domains in the transmitted light images at different incident angles, and performs light spot fusion on the light spot connected domains based on the fusion coefficient to obtain a fused light spot region, analyzes the comprehensive light spot intensity of the fused light spot region, and adjusts the local exposure time of the collected transmitted light image according to the comprehensive light spot intensity to perform adaptive image enhancement on the transmitted light image, thereby improving the accuracy of the light transmittance detection result analyzed based on the transmitted light image.

[0034] To collect the transmitted light images formed by the lens under light sources at different incident angles, as Figure 2 shown, the embodiment of the present invention changes the incident angle of light on the lens by rotating the uniform light source. First, set the uniform light source to be vertically incident, then rotate the uniform light source to the left and right sides respectively, and keep the distance between the light source and the lens unchanged. Each time it is rotated by 15 degrees, the transmitted light image is collected by the AOI camera once, so as to obtain the transmitted light images of the lens under incident light at different angles.

[0035] Since there is usually noise in the directly collected transmitted light images, it is necessary to denoise the collected transmitted light images, and use the denoised transmitted light images as the final transmitted light images of the lens under incident light at different angles. The denoising method used for denoising the collected transmitted light images can be reasonably selected as needed. In the embodiments of the present invention, wavelet transform is selected to denoise all the transmitted light images. Using wavelet transform to denoise the transmitted light images can, while removing the noise in the images, also retain the edge and detail information of the images as much as possible, thereby ensuring that the spot connected regions can be accurately screened out subsequently.

[0036] After obtaining the transmitted light images of the lens under incident light at different angles in the above manner, in order to perform adaptive image enhancement on the transmitted light images, it is necessary to screen the local regions in the transmitted light images to obtain possible spot regions, so as to facilitate subsequent spot fusion and then determine the local exposure time of the transmitted light images.

[0037] In the transmitted light image of the lens, the spot region is usually the part with higher light focusing or reflection intensity, so its brightness is significantly higher than other regions; at the same time, because the light will have a certain degree of scattering or diffraction when passing through the lens, the spot edge shows a soft transition. Therefore, the gray-scale features in the gray-scale image of the transmitted light image can be analyzed, connected component detection can be performed according to the gray-scale value distribution in the gray-scale image, and according to the gray-scale distribution of the pixel points in the connected component and the gradient change of the edge pixel points, the spot regions therein can be screened out.

[0038] In the embodiments of the present invention, analyzing the gray-scale features in the gray-scale image of the transmitted light image to determine each spot connected region, the implementation steps include: Step S101: Perform connected component detection on the gray-scale image of the transmitted light image to obtain each target connected component; Step S102: Determine the spot confidence of the target connected component according to the gray-scale distribution of the pixel points in the target connected component and the gray-scale gradient difference between the edge pixel points and their neighboring pixel points, and screen out the spot connected components in each of the target connected components according to the spot confidence.

[0039] For the above steps, as an example, any transmitted light image is gray-scaled to obtain the gray-scale image of each transmitted light image. By performing connected component detection on the gray-scale image of each transmitted light image, multiple connected components in the gray-scale image are correspondingly obtained, and these connected components are called target connected components. Due to the gray-scale similarity of the pixels in the connected component, the spot region and other regions with similar features will be divided into the corresponding target connected components.

[0040] For any target connected region, all possible edge pixel points of the connected region are marked through an edge detection algorithm, and according to the gray gradient difference between each edge pixel point in the target connected region and its neighborhood pixel points, the gradient change rate of each edge pixel point in the target connected region is determined: In the formula, represents the gradient change rate of the th edge pixel point in the target connected region; represents the gray gradient of the th edge pixel point in the target connected region; represents the gray gradient of the th neighborhood pixel point of the th edge pixel point in the target connected region; represents the total number of neighborhood pixel points of the th edge pixel point in the target connected region. In the embodiments of the present invention, the neighborhood pixel points of each edge pixel point in the target connected region are eight-neighborhood pixel points, and at this time, the total number of neighborhood pixel points of each edge pixel point in the target connected region .

[0041] In the above formula, the gradient change rate is calculated by comparing the difference in the magnitude of the gray gradient between each edge pixel point in the target connected region and its neighborhood pixel points. The smaller the gradient change rate, the smaller the gray gradient difference between the corresponding edge pixel point and its neighborhood pixel points, indicating that the gradient change of the corresponding edge pixel point is smoother, and it is more likely to have a smooth gradual edge, and the greater the possibility that the corresponding target connected region is a light spot region.

[0042] Furthermore, according to the difference between the gray value of each pixel point in any target connected region and the maximum gray value, the brightness difference index of the corresponding pixel point is determined, and according to the overall distribution level of the gradient change rates of all edge pixel points in the target connected region and the overall distribution level of the brightness difference indexes of all pixel points, the light spot confidence of the target connected region is determined: In the formula, is the light spot confidence of the target connected region ; represents the gray value of the th pixel point in the target connected region ; represents the maximum gray value, and this maximum gray value refers to the maximum gray value specified by the gray scale, generally taken as 255; is the total number of pixel points in the target connected region ; represents the target connected region The gradient change rate of the th edge pixel point; represents the total number of edge pixel points in the target connected region ; represents a first correction parameter greater than zero, which is used to prevent the denominator from being 0. In the embodiments of the present invention, is set; represents the standard normalization function.

[0043] In the above formula, represents the overall distribution level of the brightness difference index of the target connected region . Since the light spot area presents a high-brightness feature and the gray value of the pixel points in the area is close to 255, by calculating the difference between the maximum gray value 255 and the gray value of each pixel point in the target connected region , the brightness difference index is obtained, and the average value of all brightness difference indexes is calculated to obtain the average brightness difference index . The smaller the average brightness difference index, the larger the overall gray value of this target connected region , and the greater the possibility that it is the light spot area. At the same time, combined with the average gradient change rate of all edge pixel points in the target connected region , since the smaller the gradient change rate, the flatter the gradient change of the corresponding edge pixel point, and the more likely there is a gentle gradient edge, then the target connected region is more likely to be the light spot area. Therefore, a negative correlation mapping is performed on the product of the average brightness difference index and the average gradient change rate to change the logic, and the function is used to normalize the negative correlation mapping result to the range of [0,1], so as to obtain the light spot confidence of the target connected region . The greater the possibility that the target connected region is the light spot area, the greater the value of the light spot confidence.

[0044] A light spot confidence threshold is preset, and the value of the light spot confidence threshold can be reasonably selected according to the actual situation. In the embodiments of the present invention, the value of the light spot confidence threshold is set to 0.85. The light spot confidence of any target connected region is compared with the light spot confidence threshold. When the light spot confidence of the target connected region is greater than or equal to the light spot confidence threshold, the corresponding target connected region is used as the light spot connected region. In this way, the light spot connected regions in all target connected regions in the gray image of any transmitted light image can be screened out.

[0045] So far, by analyzing the gray features in the gray image of the transmitted light image, each light spot connected region in the gray image is determined.

[0046] Step S200: Analyze the spot intensity of the spot connected regions, and determine the fusion coefficient between any two of the spot connected regions corresponding to different transmitted light images according to the regional similarity and the spot intensity similarity of any two of the spot connected regions corresponding to different transmitted light images.

[0047] The above steps determine the possible spot regions, i.e., the spot connected regions, by analyzing the gray features in the gray-scale images of the transmitted light images under incident light at different angles. In order to improve the accuracy of the light transmittance detection results analyzed based on the transmitted light images, local exposure enhancement needs to be performed on different spot regions of the transmitted light images. Since the coating materials of the lens elements in the camera module have similarity in light transmittance characteristics under incident light at different angles, by superimposing and fusing the spot regions of the transmitted light images under incident light at multiple angles, the light transmittance characteristics of the material can be more comprehensively described, so that the AOI detection system can accurately evaluate the light transmittance and reflection characteristics of the lens, thereby reducing misjudgment.

[0048] In order to superimpose and fuse the spot regions of the transmitted light images under incident light at multiple angles, it is necessary to analyze the spot intensity of the spot regions in different transmitted light images, so as to facilitate subsequent spot fusion based on the similarity of the spot intensity and the regional similarity of the spot regions themselves. Considering that the spot intensity of the spot region can be expressed as the overall brightness and area of the spot, if the brightness of a certain spot is brighter and the corresponding area is larger, it means that the spot intensity is greater. Therefore, by analyzing the spot intensity of the spot connected regions, that is, analyzing the overall brightness and area of the spot connected regions, the spot intensity of different spot connected regions can be obtained.

[0049] In the embodiment of the present invention, the implementation steps of analyzing the spot intensity of the spot connected regions include: Step S201: Determine the ratio of the area of the spot connected region to the maximum area of all the spot connected regions in the gray-scale image where the spot connected region is located, and obtain the area ratio; Step S202: Determine the spot intensity of the spot connected region according to the spot confidence level and the area ratio of the spot connected region, and both the spot confidence level and the area ratio are positively correlated with the spot intensity.

[0050] It should be understood that the positive correlation relationship means that the changes between two variables have the same change trend, that is, when one variable increases, the corresponding other variable also increases, and when one variable decreases, the corresponding other variable also decreases. The negative correlation relationship means that the changes between two variables have opposite change trends, that is, when one variable increases, the corresponding other variable will decrease, and when one variable decreases, the corresponding other variable will increase.

[0051] For the above steps, as an example, in an embodiment of the present invention, according to the spot confidence and area ratio of the spot connected region, the spot intensity of the spot connected region is determined: In the formula, represents the spot intensity of the spot connected region ; represents the spot confidence of the spot connected region ; represents the area of the spot connected region ; represents the maximum area of all the spot connected regions in the grayscale image where the spot connected region is located.

[0052] In the above formula, since the spot confidence contains the grayscale index of the spot connected region , the larger the grayscale value of the spot connected region, the greater the spot intensity. At the same time, combined with the area ratio of the spot connected region , the larger the area ratio , the larger the coverage area of the spot connected region , and the greater the corresponding spot intensity.

[0053] So far, the corresponding spot intensity of the spot connected region existing in any transmitted light image has been calculated. Next, it is necessary to perform superposition and fusion on the spot regions in the transmitted light images under incident light at different angles, so as to determine the local exposure time according to the fused spots to achieve the image enhancement effect.

[0054] Since dust in the lens or surface micro-irregularities will cause light scattering, random spots will be formed in the transmitted light images under incident light at different angles. And the coating materials of the lens elements in the camera module have similarity in the light transmission characteristics under incident light at different angles. Therefore, by performing superposition and fusion on the spot regions in all the transmitted light images and considering the possibility of the spots formed under incident light at different angles, richer brightness and contrast information of different regions of the lens can be obtained, so as to more comprehensively describe the light transmission characteristics of the lens material, and finally help to judge the optimal local exposure time to achieve the image enhancement effect.

[0055] Due to the similarity of the spot regions formed after irradiating the same lens with light sources at different incident angles, if the positions of the spot regions in different transmitted light images are close and the area overlap is higher, the greater the possibility of fusing them; at the same time, the spot intensity in the spot region can be combined. If the spot intensities in different transmitted light images are more similar, the greater the possibility of fusion. Thus, by analyzing the regional similarity and spot intensity similarity of any two spot connected regions corresponding to different transmitted light images, the fusion coefficient of any two spot connected regions corresponding to different transmitted light images can be determined. The fusion coefficient reflects the possibility of fusing the corresponding two spot connected regions, and thus subsequent spot region fusion can be achieved according to the fusion coefficient.

[0056] In an embodiment of the present invention, according to the regional similarity and the spot intensity similarity of any two of the spot connected regions corresponding to different transmitted light images, determining the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images, the implementation steps include: Step S211: For any two of the spot connected regions corresponding to different transmitted light images, take one of the spot connected regions as the first spot connected region and the other spot connected region as the second spot connected region; Step S212: Determine the co - location mapping region of the second spot connected region in the grayscale image of the transmitted light image where the first spot connected region is located; Step S213: Determine the distance and intersection area between the first spot connected region and the co - location mapping region; Step S214: According to the distance and intersection area corresponding to any two of the spot connected regions, and the difference in spot intensities, determine the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images.

[0057] For the above steps, as an example, in an embodiment of the present invention, analyze the regional similarity and spot intensity similarity of any two spot connected regions corresponding to different transmitted light images, and determine the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images: In the formula, represents the spot connected regions corresponding to two different transmitted light images and the spot connected region of the fusion coefficient; and respectively represent the intersection regions corresponding to the spot connected regions and the spot connected region corresponding to two different transmitted light images. The acquisition method of the intersection region is: in the spot connected region In the grayscale image of the transmitted light image where it is located, determine the connected region of the light spot The region at the same position of, and use this region as the connected region of the light spot The mapped region at the same position of, and determine the connected region of the light spot And the connected region of the light spot The overlapping region of the mapped region at the same position of, and use this overlapping region as the connected region of the light spot And the connected region of the light spot The corresponding intersection region; Represents the intersection area of the connected regions of the light spots corresponding to two different transmitted light images (i.e., the area of the overlapping region). And the connected region of the light spot The intersection area of the connected regions of the light spots corresponding to two different transmitted light images (i.e., the area of the overlapping region). Represents the distance between the connected regions of the light spots corresponding to two different transmitted light images. The way to obtain the distance is: In the grayscale image of the transmitted light image where the connected region of the light spot is located, determine the Euclidean distance between the region center of the connected region of the light spot and the regional centroid of the mapped region at the same position of the connected region of the light spot, and use this Euclidean distance as the distance corresponding to the connected region of the light spot And the connected region of the light spot The distance corresponding to the connected region of the light spot. The way to obtain the distance is: In the grayscale image of the transmitted light image where the connected region of the light spot is located, determine the Euclidean distance between the region center of the connected region of the light spot and the regional centroid of the mapped region at the same position of the connected region of the light spot, and use this Euclidean distance as the distance corresponding to the connected region of the light spot In the grayscale image of the transmitted light image where it is located, determine the connected region of the light spot The region of, and the connected region of the light spot The Euclidean distance between the regional centroid of the mapped region at the same position of, and use this Euclidean distance as the distance corresponding to the connected region of the light spot And the connected region of the light spot The distance corresponding to the connected region of the light spot And Respectively represent the light spot intensities of the connected regions of the light spots corresponding to two different transmitted light images And the connected region of the light spot The light spot intensities of the connected regions of the light spots corresponding to two different transmitted light images Represents the standard normalization function; And Respectively represent the second correction parameter and the third correction parameter greater than zero, both of which are used to prevent the denominator from being 0. In the embodiments of the present invention, it is set , .

[0058] In the above formula, Represents the regional similarity index of the connected regions of the light spots corresponding to two different transmitted light images, which reflects the regional similarity of the connected regions of the light spots. If the regional overlap degree of the two connected regions of the light spots is higher, that is, the value of And Is larger and the centroid positions are closer, that is, the value of And Is smaller, then it indicates that these two connected regions of the light spots And The higher the regional overlap degree, that is, the larger the value of And the closer the centroid positions, that is, the smaller the value of The smaller, then it indicates that these two connected regions of the light spots And It may be caused by the same defect in the lens. Then, the greater the possibility of fusion, the larger the value of the corresponding fusion coefficient. Indicates the connected region of two light spots and The similarity index of the light spot intensity of, which reflects the connected region of the light spot and The similarity of the light spot intensity of. If the connected regions of the two light spots and are more similar in light spot intensity, that is the smaller the value of, the greater the possibility of the corresponding fusion degree, and the larger the value of the corresponding fusion coefficient. Finally, use the standard normalization function to normalize the product result determined by the two to the range of [0, 1] for subsequent determination of light spot fusion.

[0059] Step S300: According to the fusion coefficient, perform superposition fusion on the connected regions of the light spots corresponding to the transmitted light images under all different incident light angles to obtain an overall light spot image and each fused light spot region in the overall light spot image.

[0060] Through the above steps, the fusion coefficient of the connected regions of any two different transmitted light images can be determined. Since the larger the fusion coefficient, the greater the possibility of fusion of the connected regions of the two light spots, a suitable fusion coefficient threshold is preset. The specific value of this fusion coefficient threshold can be reasonably selected according to needs. In the embodiment of the present invention, the specific value of this fusion coefficient threshold is set to 0.88. By comparing the fusion coefficient of the connected regions of any two different transmitted light images with this fusion coefficient threshold, and realizing the superposition fusion of the light spots.

[0061] In the embodiment of the present invention, performing superposition fusion on the connected regions of the light spots corresponding to the transmitted light images under all different incident light angles to obtain an overall transmitted light image and each fused light spot region in the overall transmitted light image includes: Step S301: Take the grayscale image of any one transmitted light image as the reference image, and determine the mapped connected regions of the light spots corresponding to all other transmitted light images at the same position in the reference image; Step S302: In the reference image, compare the determined fusion coefficient with the fusion coefficient threshold, and fuse the two object connected regions of the light spots corresponding to the fusion coefficient greater than the fusion coefficient threshold into one light spot region, where the object connected region of the light spot is the connected region of the light spot in the reference image or the mapped connected region of the light spot; Step S303: Each light spot area finally obtained by fusion in the reference image is used as a fused light spot area. All the fused light spot areas are projected onto the grayscale image of any transmitted light image to obtain an overall transmitted light image, and any light spot area in the overall transmitted light image is used as the fused light spot area in the overall transmitted light image.

[0062] For the above steps, as an example, in the embodiments of the present invention, in order to perform superposition fusion on the light spot connected regions with a fusion coefficient greater than the fusion coefficient threshold, it is necessary to map all the light spot connected regions to the same image. Therefore, the grayscale image of any transmitted light image is selected as the reference image, and then the regions at the same positions in the reference image corresponding to each light spot connected region of all other transmitted light images are determined, and these regions are used as the mapped light spot connected regions at the same positions corresponding to each light spot connected region of all other transmitted light images. In the reference image, any two light spot connected regions belonging to different transmitted light images are used as target light spot connected regions, and the fusion coefficient of these two target light spot connected regions is compared with the fusion coefficient threshold. If the fusion coefficient is greater than the fusion coefficient threshold, these two target light spot connected regions are fused into one light spot area; otherwise, these two target light spot connected regions are not fused. By traversing and overlapping all the determined two target light spot connected regions, the finally fused light spot area can be obtained. The fused light spot area can be obtained by fusing two or more light spot connected regions or mapped light spot connected regions belonging to different transmitted light images in the reference image, and the fused light spot area is the union of the regions of the light spot connected regions or mapped light spot connected regions corresponding to different transmitted light images.

[0063] Each light spot area finally obtained by fusion in the reference image is used as a fused light spot area. All the fused light spot areas are projected onto the grayscale image of any transmitted light image, thereby obtaining an overall transmitted light image, that is, the regions at the same positions in the grayscale image of any transmitted light image corresponding to all the fused light spot areas are determined, and all the fused light spot areas are used to replace the regions at the same positions. The grayscale image of the any transmitted light image obtained after the region replacement is the overall transmitted light image. All the fused light spot areas in the overall transmitted light image, as well as other original light spot connected regions that do not belong to any fused light spot area, are used as the fused light spot areas in the overall transmitted light image. At this time, the fused light spot area in the overall transmitted light image may correspond to only one light spot connected region, or may correspond to two or more light spot connected regions belonging to different transmitted light images.

[0064] So far, by using the fusion coefficients of any two spot connected regions corresponding to different transmitted light images, the spot connected regions corresponding to the transmitted light images under incident lights of all different angles are superimposed and fused, obtaining the overall transmitted light image and each fused spot region in the overall transmitted light image.

[0065] Step S400: Analyze the comprehensive spot intensity of each fused spot region in the overall transmitted light image, and determine the local exposure time of each fused spot region in the overall transmitted light image according to the comprehensive spot intensity.

[0066] For the overall transmitted light image, since the high-brightness features in the spot regions may cause errors in the AOI detection system's detection of light transmission uniformity, it is necessary to locally adjust the exposure time based on the spot regions in the overall transmitted light image so that the final image can have better detail performance in the spot regions, thereby improving the accuracy of light transmission uniformity detection.

[0067] The exposure time, also known as the shutter speed, determines the duration for which the image AOI camera or the photosensitive material receives light. Generally speaking, the longer the exposure time, the more light the AOI camera receives, and the brighter the image will be, and vice versa. Therefore, for high-brightness regions such as spots, it is necessary to appropriately reduce the exposure time at the corresponding region positions to retain more details. To determine the appropriate exposure time, it is necessary to analyze the comprehensive spot intensity for different fused spot regions in the overall transmitted light image. The higher the comprehensive spot intensity, the shorter the exposure time should be adjusted.

[0068] In the embodiment of the present invention, the implementation steps of analyzing the comprehensive spot intensity of each fused spot region in the overall transmitted light image include: Step S401: Determine the maximum value among the regional areas of all spot connected regions corresponding to each fused spot region in the overall transmitted light image, obtaining the maximum regional area; Step S402: Determine the spot intensity weight value of each spot connected region corresponding to each fused spot region in the overall transmitted light image as the ratio of the regional area of each spot connected region corresponding to each fused spot region in the overall transmitted light image to the maximum regional area; Step S403: According to the spot intensity weight value, perform weighted summation on the spot intensities of each spot connected region corresponding to each fused spot region in the overall transmitted light image, thereby obtaining the comprehensive spot intensity of each fused spot region in the overall transmitted light image.

[0069] For the above steps, as an example, in an embodiment of the present invention, based on the area and spot intensity of each spot connected domain corresponding to each fusion spot region in the overall transmitted light image, the comprehensive spot intensity corresponding to each fusion spot region is determined: In the formula, represents the comprehensive spot intensity of the th fusion spot region in the overall transmitted light image; represents the spot intensity of the th spot connected domain corresponding to the th fusion spot region in the overall transmitted light image; represents the spot intensity weight of the th spot connected domain corresponding to the th fusion spot region in the overall transmitted light image, represents the area of the th spot connected domain corresponding to the th fusion spot region in the overall transmitted light image, represents the maximum value among the areas of all spot connected domains corresponding to the th fusion spot region in the overall transmitted light image, that is, the maximum area; m represents the total number of spot connected domains corresponding to the th fusion spot region in the overall transmitted light image.

[0070] In the above formula, when determining the comprehensive spot intensity of each fusion spot region in the overall transmitted light image, the relative area of each spot connected domain is used as the spot intensity weight to weight and sum on the spot intensity. If the number of spot connected domains forming a certain fusion spot region is larger and the spot intensity of each spot connected domain is larger, then the comprehensive spot intensity of the corresponding fusion spot region is larger.

[0071] Since it is necessary to reduce the exposure time of all spot regions, and the greater the comprehensive spot intensity, the greater the degree of reduction in the corresponding exposure time, and the smaller the comprehensive spot intensity, the smaller the degree of reduction in the corresponding exposure time. Therefore, based on the comprehensive spot intensity of each fusion spot region in the overall transmitted light image, the local exposure time of each fusion spot region can be determined.

[0072] In an embodiment of the present invention, based on the comprehensive spot intensity of each fusion spot region in the overall transmitted light image, the local exposure time of each fusion spot region is determined: In the formula, represents the local exposure time of the th fusion spot region in the overall transmitted light image; Represents the global exposure time for collecting the transmitted light image, and this global exposure time refers to the global exposure time of the AOI camera in the AOI detection system; Represents the comprehensive spot intensity of the nth fused spot region in the overall transmitted light image;

[0073] In the above formula, by using the function to perform negative correlation normalization on the comprehensive spot intensity of each fused spot region in the overall transmitted light image, the exposure time coefficient is obtained. The value range of the exposure time coefficient is [0, 1], and this exposure time coefficient is used to adjust the global exposure time for collecting the transmitted light image, that is, calculate the product of the exposure time coefficient and the global exposure time. The larger the comprehensive spot intensity, the smaller the local exposure time, so as to obtain the adaptive local exposure time of each fused spot region in the overall transmitted light image.

[0074] Step S500: According to the local exposure time of each fused spot region in the overall transmitted light image, perform enhancement processing on the overall transmitted light image to obtain the target transmitted light image of the lens, and perform lens light transmission detection based on the target transmitted light image.

[0075] Based on the local exposure time of each fused spot region in the overall transmitted light image determined above, perform post - processing local adaptive exposure enhancement on the overall transmitted light image, thereby changing the brightness and contrast of each fused spot region in the overall transmitted light image to increase the image details of the corresponding fused spot region, so as to obtain the target transmitted light image after local adaptive exposure enhancement. Since the specific implementation process of performing post - processing local adaptive exposure enhancement on the image based on the determined local exposure time belongs to the prior art. For example, in Photoshop, the effect of the exposure time can be controlled by adjusting the transparency and blending mode of the layer, and details will not be elaborated here.

[0076] Based on this target transmitted light image, the AOI detection system can use an AI algorithm to perform lens light transmission detection on the lens surface, such as detecting problems such as uneven light transmission and optical foreign objects on the lens. Finally, the AOI detection system will classify the detected defects (such as scratches, stains, poor assembly, etc.) according to the detection results and generate a detailed detection report. Since the focus of the solution in the embodiment of the present invention is to obtain the target transmitted light image of the lens of the camera module lens with less influence from light spots, and the specific implementation steps of performing lens light transmission detection based on this target transmitted light image belong to the prior art and are not the focus of the solution in the embodiment of the present invention, the specific implementation steps of performing lens light transmission detection based on the target transmitted light image will not be elaborated here.

[0077] Based on the same inventive concept, an embodiment of the present invention further provides an automated AOI detection device for a camera module lens, as Figure 3 shown, the device includes: A spot connected domain acquisition module, configured to acquire a transmitted light image of a lens under incident light at different angles, analyze gray-scale features in the gray-scale image of the transmitted light image, and determine each spot connected domain; A fusion coefficient acquisition module, configured to analyze the spot intensity of the spot connected domain, and determine the fusion coefficient of any two spot connected domains corresponding to different transmitted light images according to the regional similarity and the spot intensity similarity of any two of the spot connected domains corresponding to different transmitted light images; A fused spot region acquisition module, configured to perform superposition and fusion on the spot connected domains corresponding to the transmitted light images under incident light at all different angles according to the fusion coefficient, to obtain an overall transmitted light image and each fused spot region in the overall transmitted light image; A local exposure time acquisition module, configured to analyze the comprehensive spot intensity of each fused spot region in the overall transmitted light image, and determine the local exposure time of each fused spot region in the overall transmitted light image according to the comprehensive spot intensity; A detection module, configured to perform enhancement processing on the overall transmitted light image according to the local exposure time of each fused spot region in the overall transmitted light image to obtain a target transmitted light image of the lens, and perform lens light transmission detection according to the target transmitted light image.

[0078] It should be noted that: for the device provided in the above embodiment, only the above division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above.

[0079] Based on the same inventive concept, an embodiment of the present invention further provides an automated AOI detection system for a camera module lens, as Figure 4 shown, the system includes: a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402. When the processor 402 executes the computer program 403, the system can execute any one of the automated AOI detection methods for a camera module lens described above.

[0080] In the embodiments of the present invention, the system can be divided into functional modules according to the above method examples. For example, it can correspond to each functional module, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation.

[0081] Based on the same inventive concept, the embodiments of the present invention also provide a computer program product, which includes: computer program code. When the computer program code runs on a computer, it causes the computer to execute any one of the automated AOI detection methods for the camera module lens described above.

[0082] Based on the same inventive concept, the embodiments of the present invention also provide a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, it causes the computer to execute any one of the automated AOI detection methods for the camera module lens described above.

[0083] It should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. An automated AOI detection method for a camera module lens, characterized in that, Including the following steps: Obtain the transmitted light images of the lens under incident light at different angles, analyze the gray-scale features in the gray-scale images of the transmitted light images, and determine each spot connected domain; Analyze the spot intensity of the spot connected domain, and determine the fusion coefficient of any two spot connected domains corresponding to different transmitted light images according to the regional similarity and the spot intensity similarity of any two spot connected domains corresponding to different transmitted light images; According to the fusion coefficient, superimpose and fuse the spot connected domains corresponding to the transmitted light images under incident light at all different angles to obtain an overall transmitted light image and each fused spot region in the overall transmitted light image; Analyze the comprehensive spot intensity of each fused spot region in the overall transmitted light image, and determine the local exposure time of each fused spot region in the overall transmitted light image according to the comprehensive spot intensity; According to the local exposure time of each fused spot region in the overall transmitted light image, perform enhancement processing on the overall transmitted light image to obtain the target transmitted light image of the lens, and perform lens light transmittance detection according to the target transmitted light image.

2. The automated AOI inspection method for a camera module lens according to claim 1, wherein Analyze the gray-scale features in the gray-scale image of the transmitted light image, and determine each spot connected domain, including: Perform connected domain detection on the gray-scale image of the transmitted light image to obtain each target connected domain; According to the gray-scale distribution of the pixel points in the target connected domain and the gray-scale gradient difference between the edge pixel points and their neighboring pixel points, determine the spot confidence of the target connected domain, and filter out the spot connected domains in each target connected domain according to the spot confidence.

3. The automated AOI detection method for a camera module lens according to claim 2, wherein Determine the spot confidence of the target connected domain, including: According to the gray-scale gradient difference between each edge pixel point in the target connected domain and its neighboring pixel points, determine the gradient change rate of each edge pixel point in the target connected domain; According to the difference between the gray-scale value of each pixel point in the target connected domain and the maximum gray-scale value, determine the brightness difference index of each pixel point in the target connected domain; According to the overall distribution level of the gradient change rates of all edge pixel points in the target connected domain and the overall distribution level of the brightness difference indexes of all pixel points, determine the spot confidence of the target connected domain.

4. The automated AOI detection method for a camera module lens according to claim 3, wherein Determine the spot confidence of the target connected domain, including: Determine the average value of the gradient change rates of all edge pixel points in the target connected domain to obtain the average gradient change rate; Determine the average value of the brightness difference indexes of all pixel points in the target connected domain to obtain the average brightness difference index; Calculate the product value of the average gradient change rate and the average brightness difference index, and perform negative correlation mapping normalization processing on the product value to obtain the spot confidence of the target connected domain.

5. An automated AOI detection method for a camera module lens according to claim 2 or 3, characterized in that, Analyze the spot intensity of the spot connected domain, including: Determine the ratio of the area of the spot connected domain to the maximum area of all the spot connected domains in the gray-scale image where the spot connected domain is located to obtain the area ratio; Determine the spot intensity of the spot connected region according to the spot confidence and area ratio of the spot connected region, where both the spot confidence and area ratio are positively correlated with the spot intensity.

6. The automated AOI detection method for a camera module lens according to claim 1, characterized in that, Determine the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images, including: For any two of the spot connected regions corresponding to different transmitted light images, take one of the spot connected regions as the first spot connected region and the other spot connected region as the second spot connected region; Determine the co-location mapping region of the second spot connected region in the grayscale image of the transmitted light image where the first spot connected region is located; Determine the distance and intersection area between the first spot connected region and the co-location mapping region; Determine the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images according to the distance, intersection area, and the difference in spot intensity corresponding to any two of the spot connected regions.

7. The automated AOI detection method for a camera module lens according to claim 6, characterized in that, Determine the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images, including: Determine the region similarity index corresponding to any two of the spot connected regions according to the distance and intersection area corresponding to any two of the spot connected regions, where the distance is negatively correlated with the region similarity index and the intersection area is positively correlated with the region similarity index; Perform a negative correlation mapping process on the absolute value of the difference between the spot intensities of any two of the spot connected regions to obtain the spot intensity similarity index corresponding to any two of the spot connected regions; Perform a normalization process on the product of the region similarity index and the spot intensity similarity index corresponding to any two of the spot connected regions, so as to obtain the fusion coefficient of any two of the spot connected regions corresponding to different transmitted light images.

8. The automated AOI detection method for a camera module lens according to claim 1, characterized in that Perform superposition fusion on the spot connected regions corresponding to the transmitted light images under different incident light angles to obtain an overall transmitted light image and each fused spot region in the overall transmitted light image, including: Take the grayscale image of any one transmitted light image as the reference image, and determine the mapped spot connected regions at the same position in the reference image for the spot connected regions corresponding to all other transmitted light images; In the reference image, compare the determined fusion coefficient with the fusion coefficient threshold, and fuse the two target spot connected regions corresponding to the fusion coefficient being greater than the fusion coefficient threshold into one spot region, where the target spot connected region is the spot connected region or the mapped spot connected region in the reference image; Take each spot region finally fused in the reference image as a fused spot region, project all the fused spot regions onto the grayscale image of any one transmitted light image to obtain the overall transmitted light image, and take any one spot region in the overall transmitted light image as the fused spot region in the overall transmitted light image.

9. The automated AOI detection method for a camera module lens according to claim 1, characterized in that, Analyze the comprehensive spot intensity of each fused spot region in the overall transmitted light image, including: Determine the maximum value among the regional areas of all spot connected components corresponding to each fused spot area in the overall transmitted light image to obtain the maximum regional area; Determine the spot intensity weight value of each spot connected component corresponding to each fused spot area in the overall transmitted light image as the ratio of the regional area of each spot connected component corresponding to each fused spot area in the overall transmitted light image to the maximum regional area; According to the spot intensity weight value, perform weighted summation on the spot intensities of the respective spot connected components corresponding to each fused spot area in the overall transmitted light image, so as to obtain the comprehensive spot intensity of each fused spot area in the overall transmitted light image.

10. The automated AOI detection method for a camera module lens according to claim 1, characterized in that, Determine the local exposure time of each fused spot area in the overall transmitted light image, including: Perform negative correlation normalization processing on the comprehensive spot intensities of the respective fused spot areas in the overall transmitted light image respectively to obtain the exposure time coefficients of the respective fused spot areas in the overall transmitted light image; Calculate the product of each exposure time coefficient and the global exposure time for collecting the transmitted light image respectively, so as to obtain the local exposure time of each fused spot area in the overall transmitted light image.

Citation Information

Patent Citations

  • Method, device and equipment for detecting light spot area in target visible light image and medium

    CN116342568A

  • Lens detection method and system

    CN119559163A

  • Image processing device and image processing program

    JP2020155953A

  • Method and device for image fusion, computing processing device, and storage medium

    WO2021068618A1

  • Light spot fusion method and apparatus for sequencing image, storage medium, and computer device

    WO2024140739A1

Cited By

  • Defect detection method, device, system and equipment, storage medium and program product

    CN121231508A