Stray light detection device and stray light detection method for camera module

By extinguishing multiple bendable light sources one by one to provide detection light and obtain the color characteristics of the stray light analysis image, the problem of low stray light detection efficiency and low accuracy of the camera module in the existing technology is solved, and efficient and accurate stray light detection is achieved. detection.

CN118540463APending Publication Date: 2024-08-23KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410642693.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing camera module stray light detection system has problems such as long detection cycle, low detection efficiency and low accuracy of detection results. Especially when the angle conversion equipment fails, it needs to be re-adjusted, and the human eye judgment results have large errors.

Method used

Multiple long and flexible light sources are used to form a convergence center. The sub-light sources of the light source are controlled to be extinguished one by one to provide detection light. Combined with the stray light detection component, the color characteristics of the stray light analysis image are obtained to automatically determine whether the camera module is Produce stray light.

Benefits of technology

It significantly improves the detection efficiency and accuracy, shortens the detection cycle, reduces human errors, and improves the reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540463A
    Figure CN118540463A
Patent Text Reader

Abstract

The invention discloses a stray light detection device and a stray light detection method of a camera module, the stray light detection device comprises a light source assembly, the light source assembly comprises a support and a plurality of strip-shaped and bendable light sources arranged on the support, and the plurality of light sources are radially arranged to form a convergence center, each light source comprises a plurality of sub light sources arranged in the length direction of the light source, the sub light sources of each light source are extinguished one by one from the position close to the convergence center to the outside and are used for providing detection light for a to-be-detected camera module arranged opposite to the convergence center, and the to-be-detected camera module shoots a stray light analysis image according to the detection light; and the stray light detection assembly is used for acquiring color features of the stray light analysis image and judging whether the camera module generates stray light or not according to the color features. According to the invention, the relative positions of the radial light source and the camera module are kept, and the sub light sources are turned on or off to realize the shooting of the stray light analysis image, so that the detection efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of camera module detection, and in particular to a stray light detection device and a stray light detection method for a camera module. Background Art

[0002] At present, camera module manufacturers mostly use a working system consisting of a single-point light source (usually a snake-shaped LED light), an angle conversion device, an imaging system, and a picture-taking system to detect stray light. The working principle of this system is as follows: fix the camera module to be detected on the angle conversion device, adjust and align the single-point light source to the imaging center of the camera module, and the staff adjusts the exposure parameters of the camera module until the single-point light source is exposed to the best state before shooting, and moves toward the edge at a fixed angle with the center of the image as the origin. In this process, the shutter of the camera module needs to be manually controlled. A photo is taken for each step of the single-point light source until the light source is outside the viewfinder, and then the detection camera module is returned to the origin, and then the camera module is continued to be controlled to move in another direction and at a fixed angle to the edge until the single-point light source completes the cross-shaped path in the viewfinder to complete the picture-taking step, and then all pictures are transferred to another image display device and the stray light results are determined by the human eye.

[0003] The above working system has the problem that when the angle conversion device fails, the angle of rotation of the camera module is not the required angle. It often needs to be re-debugged before continuing the detection, which prolongs the detection cycle and reduces the detection efficiency. At the same time, the result of judgment by the human eye has large errors, resulting in low accuracy of the detection result. Summary of the invention

[0004] In view of the above technical problems, the present invention provides a stray light detection device and a stray light detection method for a camera module, aiming to solve the problems of long detection cycle, low detection efficiency and low detection result accuracy in the existing camera module stray light detection.

[0005] To achieve the above object, the present invention provides a stray light detection device for a camera module, comprising:

[0006] A light source assembly, the light source assembly comprising a bracket and a plurality of light sources in the shape of long strips and capable of being bent, mounted on the bracket, wherein the plurality of light sources are radially arranged to form a convergence center, each of the light sources comprising a plurality of sub-light sources arranged along the length direction of the light source, the sub-light sources of each light source being extinguished one by one from close to the convergence center outwards, and being used to provide detection light to a camera module to be detected that is arranged opposite to the convergence center, and the camera module to be detected captures a stray light analysis image according to the detection light;

[0007] A stray light detection component is used to obtain color features of the stray light analysis image and determine whether the camera module generates stray light based on the color features.

[0008] Optionally, the bracket includes a connecting end, each of the light sources has an end fixed on the connecting end, a plurality of the light sources are arranged in pairs, and each two of the light sources arranged in pairs are arranged on the same straight line.

[0009] Optionally, the number of the light sources is eight, and the eight light sources are arranged in a cross shape around the connecting end.

[0010] Optionally, the stray light detection device further comprises a control unit connected to the plurality of light sources, the plurality of sub-light sources of each light source being arranged at equal intervals from each other, and the control unit being used to control each of the sub-light sources in the light source to light up and extinguish independently of each other.

[0011] Optionally, the stray light detection device further includes a fixing platform and a driving unit, the bracket is arranged on the fixing platform, and the driving unit is used to drive the camera module to move relative to the connecting end.

[0012] The present invention also provides a stray light detection method for a camera module, which is used in the stray light detection device as described above, and the stray light detection method comprises:

[0013] Control the sub-light sources of each of the light sources to be extinguished one by one from close to the convergence center to the outside, so as to provide detection light to the camera module to be detected which is arranged opposite to the convergence center, and control the camera module to be detected to capture a stray light analysis image according to the detection light;

[0014] The color features of the stray light analysis image are acquired, and it is determined whether the camera module generates stray light according to the color features.

[0015] Optionally, controlling the sub-light sources of each of the light sources to be extinguished one by one from close to the convergence center outwards comprises:

[0016] The light source comprises at least a first light source and a second light source;

[0017] Controlling the sub-light sources of the first light source to be extinguished one by one from the convergence center outward, and relighting all the sub-light sources of the first light source after the camera module completes shooting of the stray light analysis image according to the detection light;

[0018] The sub-light sources of the second light source are controlled to be extinguished one by one from the convergence center outward, and all the sub-light sources of the second light source are re-lit after the camera module completes shooting of the stray light analysis image according to the detection light.

[0019] Optionally, the method of providing detection light to a camera module to be detected that is arranged opposite to the convergence center further includes:

[0020] Obtaining the field of view angle of the camera module;

[0021] When the field of view angle is greater than a preset angle threshold, controlling the plurality of light sources to provide the detection light to the camera module in a straight line;

[0022] When the field of view angle is less than a preset angle threshold, the plurality of light sources are controlled to provide the detection light to the camera module in a curved shape.

[0023] Optionally, acquiring the color feature of the stray light analysis image includes:

[0024] The trap spots in the stray light analysis image are captured, and the stray light analysis image is divided into regions according to grayscale values, and a color feature is assigned to each region corresponding to the grayscale value.

[0025] Optionally, determining whether the camera module generates stray light according to the color feature includes:

[0026] Calculating the pixel area of ​​each region in the stray light analysis image;

[0027] If the pixel area of ​​any of the regions in the stray light analysis image is greater than a preset area threshold, it is determined that the camera module generates stray light;

[0028] If the pixel areas of all the regions in the stray light analysis image are smaller than a preset area threshold, it is determined that the camera module does not generate stray light.

[0029] The present invention sets a plurality of light sources, which are arranged radially to form a convergence center. Each light source includes a plurality of sub-light sources arranged along the length direction of the light source. The sub-light sources of each light source are extinguished one by one from close to the convergence center to the outside, so as to provide detection light to the camera module to be detected which is arranged opposite to the convergence center. The camera module to be detected takes a stray light analysis image according to the detection light, and the stray light detection component determines whether the camera module generates stray light according to the color characteristics. The camera module with stray light can be detected with high efficiency and high accuracy, which significantly improves the detection efficiency and accuracy and shortens the detection cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A side view structure diagram of a stray light detection device provided in one embodiment of the present application Figure 1 ;

[0032] Figure 2 A side view structure diagram of a stray light detection device provided in one embodiment of the present application Figure 2 ;

[0033] Figure 3 A schematic diagram of a camera module viewfinder provided in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of the main structure of a light source assembly provided in one embodiment of the present application;

[0035] Figure 5 A schematic diagram of a top view of a stray light detection device provided in one embodiment of the present application;

[0036] Figure 6 A schematic diagram of a flow chart of a stray light detection method provided in one embodiment of the present application. DETAILED DESCRIPTION

[0037] The specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the description of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] The following is an explanation of the implementation of the present application by means of specific embodiments. People familiar with the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification.

[0039] In the description of the present invention, unless otherwise expressly specified and limited, the terms “first”, “second”, “third”, etc. are merely used to distinguish elements with similar properties, rather than indicating or implying relative importance or a specific order.

[0040] In addition, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion in addition to the listed elements and may also include additional elements not expressly listed.

[0041] Please refer to Figure 1 and Figure 2 , Figure 1 and Figure 2 The side view structural schematic diagrams of a stray light detection device of a camera module 90 are shown. The stray light detection device includes: a light source assembly, the light source assembly includes a bracket 11 and a plurality of light sources 12 in the shape of a long strip and capable of bending mounted on the bracket 11, and the plurality of light sources 12 are radially arranged to form a convergence center, each light source 12 includes a plurality of sub-light sources 121 arranged along the length direction of the light source 12, and the sub-light sources 121 of each light source 12 are extinguished one by one from close to the convergence center to the outside, and are used to provide detection light to the camera module 90 to be detected that is arranged opposite to the convergence center, and the camera module 90 to be detected takes a stray light analysis image according to the detection light; a stray light detection assembly, the stray light detection assembly is used to obtain the color characteristics of the stray light analysis image, and determine whether the camera module 90 generates stray light according to the color characteristics. Specifically, in one embodiment, the bracket 11 is used to fix the light source 12 so that the position of the light source 12 remains unchanged, and each light source 12 is in the shape of a long strip and has the function of bending, so that the light source 12 can switch between a straight state and a bent state to adapt to the detection work of different types of camera modules 90, thereby reducing detection errors. For example, for a wide-angle lens and a telephoto lens, the wide-angle lens has a large field of view. During the detection process, the wide-angle lens requires the irradiation direction of the light source 12 to be wider. In this case, the light source 12 needs to be set in a straight line state (such as Figure 1 On the contrary, the telephoto lens has a small field of view. For the telephoto lens, the illumination direction of the light source 12 needs to be more concentrated. In this case, the light source 12 needs to be set in a curved state (such as Figure 2 As shown). Each long strip light source 12 is provided with a plurality of sub-light sources 121 along its own length direction, and the plurality of light sources 12 are radially arranged to form a convergence center. When the plurality of light sources 12 are in a straight state, the shape of the plurality of light sources 12 is similar to the shape of a palm with fingers spread out and stretched out, and when the plurality of light sources 12 are in a bent state, the shape of the plurality of light sources 12 is similar to the shape of a palm with fingers spread out and bent, and the convergence center can be regarded as the palm center. The bending angle range of the bent state can be adjusted from 180° to 90°.

[0042] Please refer to Figure 3 , Figure 3 A schematic diagram of a camera module 90 viewfinder is shown. In the actual detection process, the lens center of the camera module 90 to be detected is directed toward the light source 12 and is set relative to the convergence center. The position of the camera module 90 is fixed so that the center of the viewfinder always corresponds to the convergence center. After the camera module 90 is automatically exposed to the optimal state, it starts from any light source 12. Figure 2Taking the rightmost light source 12 as an example, the sub-light sources 121 of the light source 12 are turned off one by one from the convergence center to the outside (arrow direction X), and the camera module 90 is controlled to take a stray light analysis image each time a sub-light source 121 is turned off. When the sub-light source 121 at the edge of the light source 12 can be seen to have been turned off in the viewfinder of the camera module 90, another light source is selected and the above steps are repeated to obtain multiple stray light analysis images of the light trap. Finally, the stray light detection component analyzes the color features of each stray light analysis image to determine whether the camera module 90 generates stray light. There is no need for human eyes to determine the stray light detection result. Since the positional relationship between the light source 12 and the camera module 90 to be detected remains unchanged, the detection efficiency and detection accuracy are significantly improved, and the detection cycle is shortened. Among them, the carrier for performing stray light analysis image analysis can be a mobile terminal such as a computer or a tablet computer. When the color features of the stray light analysis image do not match the preset standard color features, it is automatically determined that the stray light analysis image has stray light, otherwise, no stray light appears. Optionally, the inner wall of the light source 12 is set to a white board (grayscale value is 256), and the sub-light source 121 is composed of a pure black (grayscale value is 0) black circular spot when it is extinguished. Before the stray light detection is performed, all sub-light sources 121 are lit (ideally, they blend with the color of the inner wall when lit). When the stray light detection is performed, the sub-light sources 121 are extinguished one by one according to the needs (the grayscale value changes from 256 to 0).

[0043] Optionally, the bracket 11 includes a connecting end 111, each light source 12 has one end fixed on the connecting end 111, and the multiple light sources 12 are arranged in pairs, and each two light sources 12 arranged in pairs are arranged in the same straight line. Specifically, in this embodiment, the bracket 11 has a connecting end 111, and one end of a plurality of long strip light sources 12 is fixed on the connecting end 111 to form a radial shape, wherein the multiple light sources 12 are arranged in pairs, and each two light sources 12 arranged in pairs are respectively arranged on both sides of the connecting end 111 and arranged in the same straight line. Exemplarily, the paired light sources 12 can be respectively arranged on both sides of the connecting end 111 along the horizontal direction, the vertical direction or other arbitrary directions, so as to achieve effective and comprehensive stray light detection in any single direction of the camera module 90, effectively improve the accuracy of the detection, and at the same time, the paired light sources 12 that can be freely set in any direction have the function of adapting to different types of camera modules 90, and have high adjustability and flexibility.

[0044] Please refer to Figure 4, there are eight light sources 12, and the eight light sources 12 are arranged in a cross shape around the connecting end 111. Specifically, in the present embodiment, the number of light sources 12 is eight, one end of the eight light sources 12 is respectively fixed on the connecting end 111 and arranged in pairs, and the four pairs of light sources 12 are arranged radially in a cross shape with the connecting end 111 as the axis. Furthermore, the extension directions of the cross-shaped light source 12 are respectively the horizontal direction, the vertical direction and the directions of the two diagonals relative to the viewfinder of the camera module 90. In the present embodiment, the eight light sources 12 are respectively extended in the eight core directions of the camera module 90, so as to achieve the purpose of improving the detection accuracy while also improving the detection efficiency.

[0045] Optionally, the stray light detection device further includes a control unit connected to a plurality of light sources 12, wherein a plurality of sub-light sources 121 of each light source 12 are arranged at equal intervals from each other, and the control unit is used to control each sub-light source 121 in the light source 12 to light up and extinguish independently from each other. Specifically, in the present embodiment, the sub-light sources 121 of each light source 12 are separated by fixed intervals. For example, when the light source 12 is in a straight state, the sub-light sources 121 can be arranged at fixed distances of 0.7 mm, 1 cm, 2 cm, 3.7 cm, etc., and when the light source 12 is in a curved state, the sub-light sources 121 can be arranged at fixed angles of 1°, 1.8°, 2.6°, 3.8°, etc., which are not limited here. The control unit is connected to the electrical signals of all light sources 12, and the user can light up or extinguish any sub-light source 121 on any light source 12 by manipulating the control unit. In actual use, the control unit controls the sub-light sources 121 on the light source 12 in one direction to be extinguished in sequence from near the connection end 111 to the outside, so as to provide a single-direction detection light to the camera module 90. The control unit may be a portable mobile terminal such as a mobile phone, a tablet computer, a smart watch, a smart bracelet, etc., or a common infrared remote control, etc., which is not limited here.

[0046] Please refer to Figure 5, the stray light detection device also includes a fixing table 20 and a driving unit, the bracket 11 is arranged on the fixing table 20, and the driving unit is used to drive the camera module 90 to move relative to the connecting end 111. Specifically, in this embodiment, the bracket 11 for fixing the light source 12 is arranged on the fixing table 20, and the camera module 90 can be fixed on any type of support to ensure that the center of the viewfinder always corresponds to the connecting end 111, and the driving unit drives the camera module 90 to approach or move away from the connecting end 111 on the same horizontal plane, and is used to dynamically adjust the relative distance between the light source 12 and the camera module 90 according to the type of the camera module 90, so as to achieve the purpose of being able to adapt to different types of camera modules 90, and the adjustability and flexibility are high. In one embodiment, the driving unit is a motor, the camera module 90 is arranged on the fixing table 20 through the support, and a long strip track is opened on the fixing table 20, and the driving unit is used to drive the support to reciprocate on the track so that the camera module 90 can approach or move away from the connecting end 111.

[0047] Please refer to Figure 6 , Figure 6 A schematic flow chart of a stray light detection method of a camera module 90 is shown, which is used in the stray light detection device as described above. The stray light detection method includes:

[0048] S1. Control the sub-light sources 121 of each light source 12 to extinguish one by one from the convergence center to the outside, so as to provide detection light to the camera module 90 to be detected which is arranged opposite to the convergence center, and control the camera module 90 to be detected to capture a stray light analysis image according to the detection light. Specifically, in the present embodiment, the staff directs the lens center of the camera module 90 to be detected toward the light source 12 and sets it opposite to the convergence center, fixes the position of the camera module 90 unchanged so that the exact center of the viewfinder always corresponds to the convergence center, and after automatically exposing the camera module 90 to the optimal state, starts from any light source 12, extinguishes the sub-light sources 121 of the light source 12 one by one from close to the convergence center to the outside, and controls the camera module 90 to capture a stray light analysis image each time a sub-light source 121 is extinguished, and when it can be seen in the viewfinder of the camera module 90 that the sub-light source 121 at the edge of the above-mentioned light source 12 has been extinguished, select another light source 12 and repeat the above steps, and the light source 12 continuously provides detection light to the camera module 90 during the process from all the sub-light sources 121 being lit up to being extinguished one by one, thereby acquiring multiple stray light analysis images of the light trap through shooting.

[0049] S2. Obtain the color features of the stray light analysis image, and determine whether the camera module 90 generates stray light based on the color features. Specifically, after the stray light analysis image obtained through the light trap in step S1 is transferred to the stray light detection component, the stray light analysis component automatically obtains the color features of the stray light analysis image and analyzes the color features of each stray light analysis image. For example, when the color features of the stray light analysis image do not match the preset standard color features, it is automatically determined that stray light appears in the stray light analysis image, otherwise, no stray light appears, until all stray light analysis images are analyzed. In this way, it is determined whether the camera module 90 generates stray light, and there is no need for human eyes to determine the stray light detection results. Since the positional relationship between the light source 12 and the camera module 90 to be detected remains unchanged, it is only necessary to control the lighting or extinguishing of the sub-light source 121 on the light source 12, which significantly improves the detection efficiency and detection accuracy and shortens the detection cycle.

[0050] Optionally, the control of the sub-light sources 121 of each light source 12 being extinguished one by one from the convergence center to the outside as described in step S1 includes: the light source 12 includes at least a first light source and a second light source; the sub-light sources 121 of the first light source are controlled to be extinguished one by one from the convergence center to the outside, and all the sub-light sources 121 of the first light source are re-lit after the camera module 90 completes the shooting of the stray light analysis image according to the detection light; the sub-light sources 121 of the second light source are controlled to be extinguished one by one from the convergence center to the outside, and all the sub-light sources 121 of the second light source are re-lit after the camera module 90 completes the shooting of the stray light analysis image according to the detection light. Specifically, the number of light sources 12 is multiple. In order to illustrate the working order between each light source 12, at least two independent light sources 12 are included in the present embodiment. The two light sources 12 can be symmetrically arranged, arranged in pairs, arranged at preset angles, etc., which are not limited here. The two independent light sources 12 include a first light source and a second light source. When the first light source with all sub-light sources 121 lit up is used as the object for providing detection light to the camera module 90, the sub-light sources 121 of the second light source are all lit up at the same time, and the first light source is extinguished one by one from the sub-light source 121 close to the convergence center, and the camera module 90 is controlled to take a stray light analysis image every time a sub-light source 121 is extinguished. When it can be seen in the viewfinder of the camera module 90 that the sub-light source 121 of the first light source at the edge has been extinguished, it means that the stray light analysis image reserve in this direction is sufficient, that is, at this time, the first light source is no longer used as the object for providing detection light to the camera module 90. Then, the second light source with a different setting direction from the first light source is used as the object for providing detection light to the camera module 90. Before the second light source with all sub-light sources 121 lit up is used as the object for providing detection light to the camera module 90, all sub-light sources 121 of the first light source need to be re-lit. The second light sources are extinguished one by one from the sub-light source 121 close to the convergence center outward, and each time a sub-light source 121 is extinguished, the camera module 90 is controlled to take a stray light analysis image. When it can be seen in the viewfinder of the camera module 90 that the sub-light source 121 of the second light source at the edge has been extinguished, it means that the stray light analysis image reserve in this direction is sufficient, that is, at this time, there is no need to use the second light source as an object for providing detection light to the camera module 90. In this way, the purpose of the light source acting as an object for providing detection light to the camera module 90 in two different directions is achieved, and the detection accuracy is effectively improved. The working sequence between the multiple light sources 12 is cycled multiple times until the sub-light source 121, as a light trap, obtains enough stray light analysis images when acting as detection light in multiple different directions, and the cycle ends.

[0051] Optionally, in other embodiments, the number of light sources 12 can be eight, one end of the eight light sources 12 is respectively set on the convergence center and arranged in pairs, and the four pairs of light sources 12 are arranged radially in a cross shape with the convergence center as the axis. Furthermore, the extension directions of the cross-shaped light source 12 are respectively the horizontal direction, the vertical direction and the direction of the two diagonals relative to the viewfinder of the camera module 90. By extending the eight light sources 12 in the eight most core directions of the camera module 90, the purpose of improving the detection accuracy and the detection efficiency can be achieved.

[0052] Optionally, the step S1 of providing detection light to the camera module 90 to be detected that is arranged opposite to the convergence center also includes: obtaining the field of view angle of the camera module 90; when the field of view angle is greater than a preset angle threshold, controlling the multiple light sources 12 to provide detection light to the camera module 90 in a straight line; when the field of view angle is less than the preset angle threshold, controlling the multiple light sources 12 to provide detection light to the camera module 90 in a curved shape. Specifically, in this embodiment, before performing stray light detection on each camera module 90, the staff obtains the field of view angle of the camera module 90 by querying or retrieving. When the field of view angle of the camera module 90 to be detected is greater than the preset angle threshold, it means that the lens of the camera module 90 is a wide-angle lens. At this time, the light source 12 can be set to a straight line to provide the camera module 90 with detection light with a wider illumination range. When the field of view angle of the camera module 90 to be detected is less than the preset angle threshold, it means that the lens of the camera module 90 is a telephoto lens. At this time, the light source 12 can be set to a curved shape to provide a more concentrated detection light to the camera module 90. By obtaining the field of view angle of the camera module 90 before detection and dynamically adjusting the light source 12 to switch between the straight state and the curved state, the detection error is reduced.

[0053] Optionally, the step of acquiring the color features of the stray light analysis image in step S2 includes: capturing trap spots in the stray light analysis image, dividing the stray light analysis image into regions according to grayscale values, and assigning a color feature to a region corresponding to each grayscale value. In the present embodiment, the software installed in the stray light analysis component automatically captures the trap spots in the stray light analysis image, and divides each stray light analysis image into regions according to the grayscale values, for example, each stray light analysis image is divided into four different regions according to the grayscale values ​​of 0-50, 51-100, 101-200, and 201-256, and then the software automatically assigns a unique color feature to the region corresponding to each grayscale value, for example, 0-50 is red, 51-100 is yellow, 101-200 is blue, and 201-256 is green, so that the location, size and other information of the stray light can be clearly seen in each stray light analysis image intuitively, and even if the human eye is used for review, it can quickly and accurately determine whether stray light appears in the stray light analysis image, thereby improving the accuracy and efficiency of detection.

[0054] Optionally, judging whether the camera module 90 generates stray light according to the color feature in step S2 includes: calculating the pixel area of ​​each region in the stray light analysis image; if the pixel area of ​​any region in the stray light analysis image is greater than a preset area threshold, it is determined that the camera module 90 generates stray light; if the pixel areas of all regions in the stray light analysis image are less than the preset area threshold, it is determined that the camera module 90 does not generate stray light. Specifically, in this embodiment, the stray light analysis component first calculates the pixel area of ​​each region in each stray light analysis image, according to the formula Veiling glare = L [black region] / L [white surface], when the pixel area of ​​a certain region in a stray light analysis image is greater than the preset area threshold, it means that there is an area in the entire image where the gray-black level occupies too high a proportion of the overall white background, and at this time, it can be determined that the camera module 90 generates stray light. On the contrary, when the pixel area of ​​any region in a stray light analysis image is less than the preset area threshold, it means that the proportion of the gray-black scale in the entire white background in the entire image is almost negligible, and it can be determined that the camera module 90 does not generate stray light. Exemplarily, when the pixel area of ​​the region with a grayscale value of 0-50 is less than 100, it is standard, and when it is greater than 100, it is judged as unqualified, and the judgment method for other regions is similar. Preferably, the pixel area includes the region area and the number of pixels.

[0055] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A stray light detection device for a camera module, characterized in that: include: A light source assembly, the light source assembly comprising a bracket and a plurality of light sources in the shape of long strips and capable of being bent, mounted on the bracket, wherein the plurality of light sources are radially arranged to form a convergence center, each of the light sources comprising a plurality of sub-light sources arranged along the length direction of the light source, the sub-light sources of each light source being extinguished one by one from close to the convergence center outwards, and being used to provide detection light to a camera module to be detected that is arranged opposite to the convergence center, and the camera module to be detected captures a stray light analysis image according to the detection light; A stray light detection component is used to obtain color features of the stray light analysis image and determine whether the camera module generates stray light based on the color features.

2. The stray light detection device according to claim 1, characterized in that: The bracket includes a connecting end, and each of the light sources has an end fixed on the connecting end. The multiple light sources are arranged in pairs, and each two light sources arranged in pairs are arranged on the same straight line.

3. The stray light detection device according to claim 2, characterized in that: The number of the light sources is eight, and the eight light sources are arranged in a cross shape around the connecting end.

4. The stray light detection device according to claim 2, characterized in that: The stray light detection device further comprises a control unit connected to the plurality of light sources, wherein the plurality of sub-light sources of each light source are arranged at equal intervals from each other, and the control unit is used to control each of the sub-light sources in the light source to light up and extinguish independently of each other.

5. The stray light detection device according to claim 2, characterized in that: The stray light detection device further includes a fixing platform and a driving unit. The bracket is arranged on the fixing platform. The driving unit is used for driving the camera module to move relative to the connecting end.

6. A stray light detection method for a camera module, used in the stray light detection device according to claims 1-5, characterized in that: The stray light detection method comprises: Control the sub-light sources of each of the light sources to be extinguished one by one from close to the convergence center to the outside, so as to provide detection light to the camera module to be detected which is arranged opposite to the convergence center, and control the camera module to be detected to capture a stray light analysis image according to the detection light; The color features of the stray light analysis image are acquired, and it is determined whether the camera module generates stray light according to the color features.

7. The stray light detection method according to claim 6, characterized in that: The controlling of the sub-light sources of each light source to be extinguished one by one from the convergence center outwards comprises: The light source comprises at least a first light source and a second light source; Controlling the sub-light sources of the first light source to be extinguished one by one from the convergence center outward, and relighting all the sub-light sources of the first light source after the camera module completes shooting of the stray light analysis image according to the detection light; The sub-light sources of the second light source are controlled to be extinguished one by one from the convergence center outward, and all the sub-light sources of the second light source are re-lit after the camera module completes shooting of the stray light analysis image according to the detection light.

8. The stray light detection method according to claim 6, characterized in that: The method of providing detection light to the camera module to be detected which is arranged opposite to the convergence center also includes: Obtaining the field of view angle of the camera module; When the field of view angle is greater than a preset angle threshold, controlling the plurality of light sources to provide the detection light to the camera module in a straight line; When the field of view angle is smaller than a preset angle threshold, the plurality of light sources are controlled to provide the detection light to the camera module in a curved shape.

9. The stray light detection method according to claim 6, characterized in that: The acquiring the color feature of the stray light analysis image comprises: The trap spots in the stray light analysis image are captured, and the stray light analysis image is divided into regions according to grayscale values, and a color feature is assigned to each region corresponding to the grayscale value.

10. The stray light detection method according to claim 9, characterized in that: The determining, according to the color feature, whether the camera module generates stray light comprises: Calculating the pixel area of ​​each region in the stray light analysis image; If the pixel area of ​​any of the regions in the stray light analysis image is greater than a preset area threshold, it is determined that the camera module generates stray light; If the pixel areas of all the regions in the stray light analysis image are smaller than a preset area threshold, it is determined that the camera module does not generate stray light.