Particle detection method and system, electronic equipment and computer storage medium

By identifying the shadow area and degree of influence of particles in the camera module, and combining the structural parameters of the camera module to calculate the particle size, the problem of low accuracy in the existing technology is solved and more efficient particle detection is achieved.

CN118628430APending Publication Date: 2024-09-10TRIPLE WIN TECH (SHENZHEN) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310264900.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing particle detection methods have low accuracy in camera modules and are difficult to effectively distinguish particles of different sizes, affecting imaging quality and quality management of production lines.

Method used

By obtaining the detection image, the shadow area of ​​the particles is identified, and the maximum influence degree of the particles is determined based on the influence degree of each pixel in the shadow area. Combined with the projection distance and focal ratio of the camera module, the size information of the particles is calculated to improve detection accuracy. sex.

Benefits of technology

It improves the accuracy of particle detection, can more effectively distinguish particles of different sizes, reduces misjudgments, and improves the accuracy of camera module quality assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628430A
    Figure CN118628430A
Patent Text Reader

Abstract

The invention provides a particle detection method and system, electronic equipment and a computer storage medium. The particle detection method comprises the steps of obtaining a detection image; identifying an image of the particle in the detection image to obtain a shadow area of the particle; determining the maximum influence degree of the particles according to the influence degree of each pixel point in the shadow area; and obtaining size information of the particles according to the maximum influence degree of the particles. A shadow area generated by particle projection in a detection image is identified, then the maximum influence degree of particles is determined according to the influence degree of each pixel point in the shadow area, and the size information of the particles is calculated by using the maximum influence degree of the particles. Due to the fact that the difference between the maximum influence degrees corresponding to the particles of different sizes is large, the particles of different sizes can be distinguished more easily, the sizes of the particles can be calculated more accurately, and the accuracy of particle detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera detection, and in particular to a particle detection method, system, electronic device and computer storage medium. Background Art

[0002] A camera module usually includes a lens, a filter lens and a photosensitive component (Sensor). The filter lens can be blue glass. After light enters the lens, it passes through the filter lens and is projected onto the photosensitive component to form an image.

[0003] During the assembly process of the camera module, particles such as dust and impurities may adhere to the filter lens. The light entering the lens will form a shadow in the photosensitive component after passing through the particles, thus affecting the lighting effect and imaging quality of the camera module. Therefore, in the quality management of the camera module production line, the presence and size of particles in the camera module are usually detected, and the test results are used to evaluate whether there are defective products in the camera modules of the production line.

[0004] At present, the commonly used method for detecting the size of particles is to use a camera module to capture an image of a light averaging plate, use a preset algorithm to identify the shadows formed by the projection of particles in the image, calculate the influence of all pixels in the shadow, and then select the pixels in the shadow whose influence is greater than a preset threshold, and use the shadow area occupied by these pixels to convert the size of the particles. However, this detection method has the defect of low accuracy. Summary of the invention

[0005] In view of the above, it is necessary to provide a particle detection method, system, electronic device and computer storage medium, which have the effect of improving detection accuracy.

[0006] In a first aspect, the present invention provides a method for detecting particles.

[0007] A particle detection method, the method comprising:

[0008] Acquire a detection image; identify the imaging of the particle in the detection image to obtain the shadow area of ​​the particle; determine the maximum influence of the particle according to the influence of each pixel in the shadow area; and obtain the size information of the particle according to the maximum influence of the particle.

[0009] Optionally, obtaining the size information of the particles according to the maximum impact degree of the particles includes: determining the projection distance and focal ratio of a camera module, the projection distance being the distance between a photosensitive element and a filter lens, and the focal ratio being the ratio of an equivalent focal length to an optical aperture; obtaining the size information of the particles according to the projection distance, the focal ratio and the maximum impact degree.

[0010] Optionally, after acquiring the detection image, the method further includes: processing the detection image to obtain a particle image that filters out noise and retains the particles; processing the detection image to obtain a background image that averages the particles; determining the maximum influence of the particles based on the influence of each pixel in the shadow area, including: obtaining the influence of each pixel in the shadow area based on the grayscale value of each pixel in the shadow area in the particle image and the grayscale value of the background image; and taking the maximum value of the influence of each pixel in the shadow area as the maximum influence of the particle.

[0011] Optionally, after acquiring the detection image, the method further includes: processing the detection image to obtain a particle image that filters out noise and retains the particles; processing the detection image to obtain a background image that averages the particles; identifying the imaging of the particles in the detection image to obtain the shadow area of ​​the particles, including: identifying the imaging of the particles in the detection image to obtain the initial area of ​​the particles; obtaining the influence of each pixel in the initial area based on the grayscale value of each pixel in the particle image and the grayscale value of each pixel in the initial area in the background image; when there are pixels in the initial area whose influence is greater than a preset threshold, the initial area is used as the shadow area of ​​the particle.

[0012] In a second aspect, an embodiment of the present application provides a particle detection system.

[0013] A particle detection system, the system comprising: an image acquisition module, used to acquire a detection image; a particle recognition module, used to recognize the imaging of particles in the detection image and obtain the shadow area of ​​the particles; a pixel analysis module, used to determine the maximum influence of the particles according to the influence of each pixel point in the shadow area; and a particle calculation module, used to obtain the size information of the particles according to the maximum influence of the particles.

[0014] Optionally, the particle calculation module includes: a parameter acquisition submodule, used to determine the projection distance and focal ratio of the camera module, the projection distance is the distance between the photosensitive element and the filter lens, and the focal ratio is the ratio of the equivalent focal length to the optical aperture; a parameter calculation submodule, used to obtain the size information of the particles based on the projection distance, the focal ratio and the maximum impact degree.

[0015] Optionally, the system also includes: a first image processing module, used to process the detection image to obtain a particle image that filters out noise and retains the particles; a second image processing module, used to process the detection image to obtain a background image that averages the particles; the pixel analysis module includes: a first pixel calculation submodule, used to obtain the influence degree of each pixel in the shadow area based on the grayscale value of each pixel in the particle image and the grayscale value of each pixel in the shadow area in the background image; a pixel comparison submodule, used to take the maximum value of the influence degree of each pixel in the shadow area as the maximum influence degree of the particle.

[0016] Optionally, the system further comprises: a first image processing module, configured to process the detection image to obtain a particle image that filters out noise and retains the particles;

[0017] The second image processing module is used to process the detection image to obtain a background image that averages the particles. The particle recognition module includes: a shadow recognition submodule, which is used to recognize the imaging of the particles in the detection image and obtain the initial area of ​​the particles; a second pixel calculation submodule, which obtains the influence of each pixel in the initial area according to the grayscale value of each pixel in the particle image and the grayscale value of each pixel in the background image; and a shadow selection submodule, which is used to use the initial area as the shadow area of ​​the particle when there are pixels in the initial area whose influence is greater than a preset threshold.

[0018] In a third aspect, an embodiment of the present application provides an electronic device.

[0019] An electronic device comprises: a processor for implementing one or more instructions; and a computer storage medium for storing multiple instructions, wherein the multiple instructions are suitable for being loaded by the processor and executing a particle detection method such as any of the above technical solutions.

[0020] In a fourth aspect, an embodiment of the present application provides a computer storage medium.

[0021] A computer storage medium stores a plurality of instructions, wherein the plurality of instructions are suitable for being loaded by a processor and executing a particle detection method as described in any of the above technical solutions.

[0022] The embodiment of the present application identifies the shadow area generated by the projection of the particles in the detection image, and then determines the maximum influence of the particles according to the influence of each pixel in the shadow area, and then calculates the size information of the particles using the maximum influence of the particles. Since the maximum influences corresponding to particles of different sizes are quite different, it is easier to distinguish particles of different sizes, so that the size of the particles can be calculated more accurately, thereby improving the accuracy of particle detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic structural diagram of a camera module according to an embodiment of the present application.

[0024] Figure 2 This is a relationship diagram between the shadow diameter of the shadow in the image and the influence degree of each pixel in the shadow obtained by experimental data statistics.

[0025] Figure 3 This is a comparison chart of the change curves of area A and area B corresponding to particles of different sizes obtained from experimental data statistics.

[0026] Figure 4 Schematic diagram of the process of the particle detection method according to the embodiment of the present application.

[0027] Figure 5 It is a schematic diagram of a plateau region formed in the shadow of particles in an embodiment of the present application.

[0028] Figure 6 It is a comparison diagram of the influence degree curve of each pixel point in the shadow area of ​​the first particle and the influence degree curve of each pixel point in the shadow area of ​​the second particle obtained by experimental data statistics.

[0029] Figure 7 It is a schematic diagram of the first specific process of the particle detection method of the application implementation method.

[0030] Figure 8 It is a second specific flow chart of the particle detection method according to the embodiment of the application.

[0031] Fig. 9 It is a schematic diagram of a third specific process of the particle detection method according to the embodiment of the application.

[0032] Fig.10 It is a schematic diagram of a fourth specific process of the particle detection method according to the embodiment of the application.

[0033] Fig.11 It is a flowchart of the camera detection method according to the embodiment of the present application.

[0034] Fig.12This is a schematic diagram of a first module of a particle detection system according to an embodiment of the present application.

[0035] Fig.13 A schematic diagram of submodules of a particle computing module according to an embodiment of the present application.

[0036] Fig.14 It is a schematic diagram of a second module of the particle detection system according to an embodiment of the present application.

[0037] Fig.15 Schematic diagram of submodules of the pixel analysis module according to an embodiment of the present application.

[0038] Fig.16 Schematic diagram of submodules of the particle identification module according to an embodiment of the present application.

[0039] Main component symbols

[0040] 1. Lens; 2. Filter lens; 3. Photosensitive component; 10. Image acquisition module; 20. Particle recognition module; 21. Shadow recognition submodule; 22. Second pixel calculation submodule; 23. Shadow selection submodule; 30. Pixel analysis module; 31. First pixel calculation submodule; 32. Pixel comparison submodule; 40. Particle calculation module; 41. Parameter acquisition submodule; 42. Parameter calculation submodule; 50. First image processing module; 60. Second image processing module.

[0041] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] The term "and / or" in this application is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.

[0044] In the present application, the term "plurality" refers to two or more. In addition, it should be understood that in the description of the present application, the terms "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0045] In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in specific implementations.

[0046] Reference Figure 1 The camera module usually includes a lens 1 (Lens), a filter lens 2 and a photosensitive component 3 (Sensor). The filter lens 2 can be blue glass. After the light enters the lens 1, it passes through the filter lens 2 and is projected onto the photosensitive component 3 to form an image. If there are particles such as dust and impurities (POG, Particle on glass) attached to the surface of the filter lens 2, the light will form a shadow in the photosensitive component 3 after passing through the particles, resulting in the presence of clumped shadows in the photos collected by the camera module, thereby affecting the lighting effect and imaging quality of the camera module. Therefore, in the quality management of the camera module production line, the presence of particles in the camera module and the size of the particles are usually detected, and the defective camera modules whose particle size exceeds the preset threshold are intercepted.

[0047] The common particle detection method at present is: use a camera module to capture the image of the light averaging plate, then identify the shadow caused by the particle projection in the image, and calculate the influence of each pixel in the shadow. The pixel points whose influence exceeds the preset threshold are framed out, and the framed part is used as the area of ​​the shadow generated by the particle projection. Finally, the area of ​​the shadow is converted into the size of the particle.

[0048] Among them, the influence degree of a pixel point refers to the influence degree of the pixel point relative to the background value of the light averaging plate. For example, the influence degree can be calculated by: spatially filtering the image through a preset first filtering parameter to obtain a first image that filters out the noise of the photosensitive element but retains the particle shadow, and spatially filtering the image through a preset second filtering parameter to obtain a second image that averages out the noise of the photosensitive element and the particle shadow; then, calculating the difference between the grayscale values ​​of each pixel point in the shadow in the first image and the second image; then, calculating the percentage between the difference in the pixel point and the grayscale value of the pixel point in the second image to obtain the influence degree of the pixel point. The above-mentioned particle detection method utilizes the influence degree of the pixel point in the shadow to better distinguish the pixel points of the particle shadow from the pixel points of the non-particle shadow.

[0049] However, when there is a shadow of particle projection imaging in the image, due to the rectilinear propagation of light, the grayscale value of each pixel in the shadow tends to gradually weaken from approaching the center of the shadow to moving away from the center of the shadow, and ordinary algorithms find it difficult to fully detect the pixels at the edge of the shadow.

[0050] Therefore, the above-mentioned particle detection method does not directly regard all shadows as projections of particles, but sets an area with shadows of a certain degree of difference within the allowable error range, and selects pixels whose influence exceeds a preset threshold. The purpose is to retain a certain detection error and reduce the inclusion of pixels that are not projected by particles in the calculation of the shadow area.

[0051] For example, Figure 2 It is a relationship diagram between the shadow diameter of a shadow in an image and the influence degree of each pixel in the shadow.

[0052] The shadow shown in the figure is formed by the projection of a particle with a size of 60um. The data related to the shadow diameter and the degree of influence are the results of experimental data statistics. Among them, the shadow diameter can also be regarded as the distance from the pixel to the center of the shadow. The degree of influence of each pixel has a tendency to gradually weaken from the direction close to the shadow center to the direction away from the shadow center.

[0053] In the above particle detection method, assuming that the preset threshold is 1.5%, the area A formed by the pixels with an influence degree greater than or equal to 1.5% is taken as the shadow of the particle. If the pixels with an influence degree greater than or equal to 0% are area B, it can be seen that the area of ​​area A is smaller than area B.

[0054] Furthermore, Figure 3 This is a comparison diagram of the change curves of area A and area B corresponding to particles of different sizes.

[0055] Among them, curve la is the change curve of area A corresponding to particles of different sizes. Curve lb is the change curve of area B corresponding to particles of different sizes. Curve la and curve lb are the results obtained by statistical analysis of experimental data.

[0056] When the particle size is 10um, the shadow diameter of area A is 40um, and the shadow diameter of area B is 70um; when the particle size is 70um, the shadow diameter of area A is 80um, and the shadow diameter of area B is 140um. It can be seen that the particle size increases by 7 times from 10um to 70um, and the shadow diameter of area A only increases by about 2 times. The difference between the areas A corresponding to particles of different sizes is small and difficult to distinguish.

[0057] In summary, the above-mentioned particle detection method relies on the calculation of the projected shadow area. However, the shadow area not only needs to be reduced within the assumed error range, but also the difference in shadow diameters corresponding to particles of different sizes is small, making it difficult to distinguish particles of different sizes. Therefore, the above-mentioned particle detection method has the defect of low accuracy.

[0058] To this end, the embodiments of the present application provide a particle detection method, system, electronic device and computer storage medium, which have the effect of more accurately calculating the particle size and improving accuracy.

[0059] See also Figure 4 and Figure 5 The present invention provides a particle detection method, which includes the following steps:

[0060] S401, acquiring a detection image.

[0061] The detection image is an image obtained by the camera module taking pictures of the light averaging plate.

[0062] When particles are attached to the surface of the filter lens 2 in the camera module, shadows of the projected images of the particles will exist in the detected image.

[0063] The filter lens 2 in this embodiment is made of blue glass.

[0064] S402: Identify the imaging of the particles in the detection image and obtain the shadow area of ​​the particles.

[0065] The images of the particles in the detection image are identified and marked by a preset particle recognition algorithm to obtain the shadow area of ​​the particles.

[0066] In this embodiment, when there are multiple particles in the detection image, multiple shadow areas corresponding to the particles are identified, and different particles and corresponding shadow areas are marked and distinguished respectively.

[0067] S403: Determine the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area.

[0068] The maximum influence degree of the particle is the maximum value of the influence degree of each pixel in the shadow area.

[0069] After calculating the influence degree of each pixel point in the shadow area of ​​the particle, the influence degree of each pixel point is numerically compared, and the maximum value is taken as the maximum influence degree of the particle.

[0070] S404. Obtain size information of the particles according to the maximum impact degree of the particles.

[0071] The size information is the diameter of the particle. In some embodiments, the size information may also be the area of ​​the particle converted from the diameter of the particle.

[0072] See also Figure 2 and Figure 5 In the process of light entering the photosensitive element through the filter lens 2, the light first converges into a small aperture on the filter lens 2, and finally converges into a light spot on the photosensitive element. As long as the particle is in the small aperture, a plateau area A' will be formed in the shadow area generated by the particle. The plateau area A' is usually located at the center of the shadow area. The plateau area A' includes some pixels with a greater degree of influence. The degree of influence of these pixels is related to the size information of the particle. Since the detection image in the embodiment of the present application is taken on the homogenizing plate, all particles will produce a plateau area.

[0073] Figure 6 The figure is a comparison diagram of the influence degree curve of each pixel point in the shadow area of ​​the first particle and the influence degree curve of each pixel point in the shadow area of ​​the second particle. The diameter of the first particle is 10um, and the diameter of the second particle is 15um.

[0074] It can be seen that the distribution pattern of each pixel point in the shadow area of ​​the first particle is that each pixel point with a greater influence is located close to the center of the shadow area, and the maximum influence of the first particle is about 1.56%.

[0075] The distribution pattern of each pixel point in the shadow area of ​​the second particle is that each pixel point with a greater influence is located close to the center of the shadow area, and the maximum influence of the second particle is about 3.5%.

[0076] Figure 6 The maximum impact is in the variation curve corresponding to particles of different sizes.

[0077] When the particle size is 10 um, the maximum influence of the particle is about 1.56%; when the particle size is 70 um, the maximum influence of the particle is about 76.56%.

[0078] contrast Figure 3 and Figure 6 It can be seen that there is not only a certain correlation between the maximum impact of particles and the size information of particles, but also that with the change of the size information of particles, the maximum impact of different particles varies greatly. For example, the size of particles increases by 7 times from 10um to 70um, while the maximum impact increases by dozens of times. The maximum impacts corresponding to particles of different sizes vary greatly, making it easier to distinguish particles of different sizes.

[0079] Therefore, there is a certain correlation between the maximum influence of the particles and the size information of the particles. In the same camera module, as the size of the particles gradually increases, the maximum influence of the particles also tends to gradually increase. Then, the maximum influence of the particles can be used for calculation to obtain the size information of the particles.

[0080] See also Figure 1 and Figure 7 In a specific implementation, step S404, i.e. obtaining the size information of the particle according to the maximum influence degree of the particle, includes:

[0081] S701: Determine the projection distance and focal ratio of the camera module.

[0082] The projection distance is the distance between the photosensitive element in the camera module and the filter lens 2. The focal ratio (f-number, also known as F ratio) is the ratio of the focal length to the aperture, and can also be the aperture value.

[0083] The projection distance and focal ratio are both structural parameters of the camera module and can be set according to the structure of the camera module. It is understandable that different camera modules may have different projection distances and focal ratios. When performing particle detection for different camera modules, it is necessary to calculate according to the projection distance and focal ratio corresponding to the camera module.

[0084] S702: Obtain particle size information according to the projection distance, focal ratio and maximum impact degree.

[0085] Among them, the projection distance and focal ratio both affect the imaging effect of light on the photosensitive element after passing through the particles.

[0086] In this embodiment, the specific implementation method of obtaining the size information of the particles according to the projection distance, the focal ratio and the maximum influence degree is as follows: substituting the projection distance and the focal ratio into formula (1) to obtain the size information.

[0087] Influence=(D*F# / G) 2 (1)

[0088] Among them, Influence is the maximum influence, D is the diameter of the particle, G is the projection distance, and F# is the focal ratio.

[0089] In some embodiments, according to the projection distance, focal ratio and maximum impact degree, the specific implementation of obtaining the size information of the particles may also be:

[0090] 1) Establish a training data set. The training data set includes a training projection distance, a training focal ratio, a training maximum influence degree, and training size information. The training projection distance is the projection distance of the camera module, the training focal ratio is the focal ratio of the camera module, the training maximum influence degree is the maximum influence degree of a particle photographed by the camera module, and the training size information is the size information of the particle.

[0091] 2) The training data set is put into a preset neural network model for training to obtain a trained particle detection model.

[0092] 3) The projection distance, focal ratio and maximum impact degree are input into the particle detection model to obtain the particle size information.

[0093] The implementation principle of a particle detection method provided in an embodiment of the present application is: by identifying the shadow area generated by the projection of the particle in the detection image, and then determining the maximum influence of the particle according to the influence of each pixel in the shadow area, and then using the maximum influence of the particle to calculate the size information of the particle. Since the maximum influence corresponding to particles of different sizes is quite different, it is easier to distinguish particles of different sizes, so that the size of the particle can be calculated more accurately, thereby improving the accuracy of particle detection.

[0094] See also Figure 8 In a specific embodiment, after step S401, that is, after acquiring the detection image, the particle detection method further includes the following steps:

[0095] S801, processing the detected image to obtain a particle image in which noise is filtered out and particles are retained.

[0096] The particle image is obtained by performing spatial filtering on the detection image using a preset third filtering parameter, thereby filtering out the noise of the photosensitive element but retaining the shadow of the particle.

[0097] The particle image can better reflect the imaging shadow of the particle, and can be used to calculate the influence degree of the imaging shadow of the particle and to be used in the algorithm recognition of the particle.

[0098] S802: Process the detected image to obtain a background image with averaged particles.

[0099] The background image is an image obtained by performing spatial filtering processing on the detection image using a preset fourth filtering parameter, thereby averaging out the noise of the photosensitive element and the shadow of particles.

[0100] The background image can reflect the background value of the light averaging plate, and the background image can be compared with the particle image to calculate the influence of the imaging shadow of the particles.

[0101] After executing step S801 and step S802, in subsequent steps, the influence degree of each pixel in the detection image can be calculated by using the detection image and the background image.

[0102] For example, in a specific implementation, step S403, i.e., determining the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area, may be implemented as follows:

[0103] S4031. Obtain the influence degree of each pixel in the shadow area according to the grayscale value of each pixel in the particle image and the grayscale value of each pixel in the background image.

[0104] The grayscale value difference between the grayscale value of the pixel in the particle image and the grayscale value in the background image is calculated, and then the grayscale value difference is divided by the grayscale value of the pixel in the background image to obtain the influence degree of the pixel.

[0105] S4032. The maximum value of the influence degree of each pixel in the shadow area is used as the maximum influence degree of the particle.

[0106] See also Fig. 9 In a specific implementation, step S402, i.e., identifying the imaging of particles in the detection image and obtaining the shadow area of ​​the particles, is implemented as follows:

[0107] The imaging of the particles in the particle image is identified to obtain the shadow area of ​​the particles.

[0108] The imaging of the particles in the particle image corresponding to the detection image is identified and marked by a particle recognition algorithm to obtain the shadow area of ​​the particles.

[0109] Since the particle image can highlight the imaging shadow of the particle, particle recognition on the particle image can more accurately identify the shadow area.

[0110] See also Fig.10In another specific implementation, step S402, i.e., identifying the imaging of the particles in the detection image and obtaining the shadow area of ​​the particles, is implemented as follows:

[0111] S1001, identifying the imaging of particles in the detection image, and obtaining the initial region of the particles.

[0112] The imaging of the particles in the detection image is identified and marked by a particle recognition algorithm to obtain the initial area of ​​the particles.

[0113] It can be understood that the initial area is the shadow identified for the first time. Affected by the recognition ability of the particle recognition algorithm, the particle recognition algorithm may recognize the part of the detection image that is not a particle but has a slight shadow as the shadow of the particle. Therefore, the initial area obtained in the first recognition is not necessarily the shadow of the particle, and it is necessary to screen and identify it through the following steps.

[0114] In one implementation, step S1001 may also be: identifying and marking the images of the particles in the particle image corresponding to the detection image by a particle recognition algorithm to obtain the initial region of the particles.

[0115] S1002: Obtain the influence degree of each pixel in the initial region according to the grayscale value of each pixel in the particle image and the grayscale value of each pixel in the background image.

[0116] The grayscale value difference between the grayscale value of the pixel in the particle image and the grayscale value in the background image is calculated, and then the grayscale value difference is divided by the grayscale value of the pixel in the background image to obtain the influence degree of the pixel.

[0117] In addition, after executing step S1002, in the subsequent step S403, that is, in the specific implementation of determining the maximum influence of the particles based on the influence of each pixel in the shadow area, the influence of each pixel in the initial area can also be obtained as the influence of each pixel in the shadow area corresponding to the initial area.

[0118] S1003, determine whether there are pixels in the initial area whose influence is greater than a preset threshold, if yes, execute step S1004; if no, end.

[0119] The preset threshold is a preset influence degree threshold, and is used to evaluate whether the initial area is a shadow generated by particle projection.

[0120] When there are pixels in the initial region whose influence is greater than a preset threshold, it means that there are pixels with a greater influence in this initial region. This initial region should be the shadow produced by the projection of the particles and needs to be included in the calculation of the particle size.

[0121] When there are no pixels with an influence greater than a preset threshold in the initial region, it means that there are no pixels with a large influence in the initial region. The initial region may be a shadow generated by misidentified non-particle projection and does not need to be included in the calculation of the particle size.

[0122] S1004: Use the initial area as the shadow area of ​​the particle.

[0123] The initial area should be the shadow produced by the projection of the particles, and step S403 is executed to calculate the size information of the particles.

[0124] By using the influence of each pixel in the initial area to evaluate whether the initial area is a shadow produced by the projection of particles, the probability of misidentifying particles can be effectively reduced and the detection efficiency can be improved.

[0125] An embodiment of the present application also provides a camera detection method, which includes the steps of the above-mentioned particle detection method.

[0126] See also Fig.11 , the camera detection method includes the following steps:

[0127] S1101, obtaining a detection image.

[0128] S1102: Identify the imaging of the particles in the detection image and obtain the shadow area of ​​the particles.

[0129] S1103 , determining the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area.

[0130] S1104. Obtain size information of the particles according to the maximum impact degree of the particles.

[0131] The implementation principles of steps S1 to S4 can be found in the relevant description of the above-mentioned particle detection method, and will not be repeated here.

[0132] S1105, determine whether the size information of the particles exceeds the preset qualified range, if yes, execute S6; if no, end.

[0133] S1106: Determine the camera module corresponding to the detection image as a defective product.

[0134] When the size information of the particles exceeds the preset qualified range, it means that there are large particles in the camera module that captures the test image, which will have a significant impact on the imaging quality of the camera module, so the camera module is determined to be defective. The defective camera module needs to be repaired and inspected later.

[0135] By utilizing the camera detection method provided in the present application, the size of particles in the camera module can be detected more accurately, thereby improving the accuracy of camera quality assessment, reducing misjudgment of camera quality, and reducing production costs.

[0136] The embodiment of the present application also provides a particle detection system, which can execute each step of the above-mentioned particle detection method.

[0137] See also Fig.12 , the particle detection system includes:

[0138] The image acquisition module 10 is used to acquire the detection image.

[0139] The particle recognition module 20 is used to recognize the imaging of particles in the detection image and obtain the shadow area of ​​the particles.

[0140] The pixel analysis module 30 is used to determine the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area.

[0141] The particle calculation module 40 is used to obtain the size information of the particles according to the maximum influence degree of the particles.

[0142] See also Fig.13 In one embodiment, the particle computing module 40 includes:

[0143] The parameter acquisition submodule 41 is used to determine the projection distance and focal ratio of the camera module. The projection distance is the distance between the photosensitive element and the filter lens 2, and the focal ratio is the ratio of the equivalent focal length to the optical aperture.

[0144] The parameter calculation submodule 42 is used to obtain the size information of the particles according to the projection distance, focal ratio and maximum impact degree.

[0145] See also Fig.14 In one embodiment, the particle detection system further comprises:

[0146] The first image processing module 50 is used to process the detection image to obtain a particle image in which noise is filtered out and particles are retained.

[0147] The second image processing module 60 is used to process the detection image to obtain a background image with averaged particles.

[0148] See also Fig.15 In a specific implementation, the pixel analysis module 30 includes:

[0149] The first pixel calculation submodule 31 is used to obtain the influence degree of each pixel point in the shadow area according to the gray value of each pixel point in the particle image and the gray value of each pixel point in the background image.

[0150] The pixel comparison submodule 32 is used to take the maximum value of the influence degree of each pixel point in the shadow area as the maximum influence degree of the particle.

[0151] See also Fig.16 In a specific embodiment, the particle identification module 20 includes:

[0152] The shadow recognition submodule 21 is used to recognize the imaging of particles in the detection image and obtain the initial area of ​​the particles.

[0153] The second pixel calculation submodule 22 obtains the influence degree of each pixel point in the initial area according to the gray value of each pixel point in the particle image and the gray value of each pixel point in the background image.

[0154] The shadow selection submodule 23 is used to use the initial area as the shadow area of ​​the particle when there are pixels in the initial area whose influence is greater than a preset threshold.

[0155] A particle detection system provided in the present application can achieve the technical effect of the above-mentioned particle detection method by executing each step of the above-mentioned particle detection method. The implementation principle of its technical effect can refer to the relevant description of the above-mentioned particle detection method, which will not be repeated here.

[0156] An embodiment of the present application also provides an electronic device.

[0157] The electronic device includes a processor and a computer storage medium, wherein the processor is used to implement one or more instructions, and the computer storage medium is used to store multiple instructions, which are suitable for being loaded by the processor and executing the particle detection method in the above embodiment.

[0158] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or a processor or any conventional processor, etc. The processor may use various interfaces and buses to connect various parts of the electronic device.

[0159] An electronic device provided in the present application can achieve the technical effect of the above-mentioned particle detection method by executing each step of the above-mentioned particle detection method. The implementation principle of its technical effect can refer to the relevant description of the above-mentioned particle detection method, which will not be repeated here.

[0160] An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the particle detection method in the above embodiment is implemented.

[0161] A computer storage medium provided in the present application can achieve the technical effect of the above-mentioned particle detection method by executing each step of the above-mentioned particle detection method. The implementation principle of the technical effect can refer to the relevant description of the above-mentioned particle detection method, which will not be repeated here.

[0162] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

[0164] Those skilled in the art should recognize that the above embodiments are only used to illustrate the present application and are not intended to be limiting of the present application. As long as they are within the spirit and scope of the present application, appropriate changes and modifications to the above embodiments are within the scope of protection claimed in the present application.

Claims

1. A particle detection method, It is characterized in that The method comprises: Acquire detection images; Identify the imaging of the particles in the detection image to obtain the shadow area of ​​the particles; Determining the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area; According to the maximum influence degree of the particles, size information of the particles is obtained.

2. The microparticle detection method according to claim 1, It is characterized in that The step of obtaining the size information of the particles according to the maximum influence degree of the particles comprises: Determine the projection distance and focal ratio of the camera module, wherein the projection distance is the distance between the photosensitive element and the filter lens, and the focal ratio is the ratio of the equivalent focal length to the optical aperture; The size information of the particles is obtained according to the projection distance, the focal ratio and the maximum impact degree.

3. The microparticle detection method according to claim 1, It is characterized in that After acquiring the detection image, the method further includes: Processing the detection image to obtain a particle image in which noise is filtered out and the particles are retained; Processing the detection image to obtain a background image of the particles being averaged; Determining the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area includes: Obtaining the influence degree of each pixel in the shadow area according to the grayscale value of each pixel in the particle image and the grayscale value of the background image; The maximum value of the influence degree of each pixel point in the shadow area is used as the maximum influence degree of the particle.

4. The microparticle detection method according to claim 1, It is characterized in that After acquiring the detection image, the method further includes: Processing the detection image to obtain a particle image in which noise is filtered out and the particles are retained; Processing the detection image to obtain a background image of the particles being averaged; The step of identifying the imaging of the particles in the detection image to obtain the shadow area of ​​the particles includes: Identifying the imaging of the particle in the detection image to obtain the initial region of the particle; Obtaining the influence degree of each pixel in the initial area according to the gray value of each pixel in the particle image and the gray value of the background image; When the pixel point whose influence degree is greater than a preset threshold exists in the initial area, the initial area is used as the shadow area of ​​the particle.

5. A particle detection system, It is characterized in that The system comprises: An image acquisition module, used for acquiring a detection image; A particle recognition module, used to recognize the imaging of particles in the detection image and obtain the shadow area of ​​the particles; A pixel analysis module, used to determine the maximum influence degree of the particle according to the influence degree of each pixel point in the shadow area; The particle calculation module is used to obtain the size information of the particle according to the maximum influence degree of the particle.

6. The particle detection system according to claim 5, It is characterized in that The particle computing module includes: A parameter acquisition submodule, used to determine the projection distance and focal ratio of the camera module, wherein the projection distance is the distance between the photosensitive element and the filter lens, and the focal ratio is the ratio of the equivalent focal length to the optical aperture; The parameter calculation submodule is used to obtain the size information of the particles according to the projection distance, the focal ratio and the maximum influence degree.

7. The particle detection system according to claim 5, It is characterized in that The system further comprises: A first image processing module, used for processing the detection image to obtain a particle image in which noise is filtered out and the particles are retained; A second image processing module is used to process the detection image to obtain a background image of the particles being averaged; The pixel analysis module comprises: A first pixel calculation submodule, configured to obtain the influence degree of each pixel in the shadow area according to the grayscale value of each pixel in the particle image and the grayscale value of each pixel in the shadow area in the background image; The pixel comparison submodule is used to take the maximum value of the influence degree of each pixel point in the shadow area as the maximum influence degree of the particle.

8. The particle detection system according to claim 5, It is characterized in that The system further comprises: A first image processing module, used for processing the detection image to obtain a particle image in which noise is filtered out and the particles are retained; A second image processing module is used to process the detection image to obtain a background image of the particles being averaged; The particle identification module comprises: A shadow recognition submodule, used for recognizing the imaging of the particles in the detection image to obtain the initial region of the particles; A second pixel calculation submodule, obtaining the influence degree of each pixel in the initial area according to the gray value of each pixel in the initial area in the particle image and the gray value of the background image; The shadow selection submodule is used to use the initial area as the shadow area of ​​the particle when there are pixels in the initial area whose influence degree is greater than a preset threshold.

9. An electronic device, It is characterized in that The electronic device comprises: A processor for implementing one or more instructions; and A computer storage medium for storing a plurality of instructions, wherein the plurality of instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 4.

10. A computer storage medium, Features: The computer storage medium stores a plurality of instructions, and the plurality of instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for measuring particle diameter

    CN101231161A

  • Image impurity analysis system and method

    CN101469984A

  • Detect on -line measuring system of accurate optical element surface particles thing

    CN206362529U

  • Particle diameter measuring apparatus

    US20050046840A1

  • Device for determining particle sizes

    US20120008143A1