Methods, devices, storage media and computer equipment for detecting internal and external defects

CN122567719APending Publication Date: 2026-08-14CASI VISION TECH (BEIJING) CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

目前行业内对手机摄像头镜片尘点的成像检测,由于无法区分尘点位置,存在将外表面可擦拭尘点误判为内部缺陷,或漏判内部尘点缺陷的问题,导致生产过程中误判率高、返工成本高、良率管控混乱,严重影响生产效率与产品质量

Benefits of technology

本申请实施例提供的内外缺陷检测方法、装置、存储介质及计算机设备,通过同时向透明材料件的入射表面垂直入射第一检测光、以预设入射角呈环形倾斜入射于入射表面的第二检测光,采集经过透明材料件反射后的第一检测光和第二检测光,获得叠加光场图像,利用两种检测光对透明材料件的内外缺陷(如内外尘点)的差异化光学响应,实现内外缺陷的成像区分,使得透明材料件内外尘点与透明材料件本体的灰度差显著提升,成像后内外尘点呈现明显的黑白差异。由此,根据各个像素点的灰度值信息,即可清晰区分表面脏污与内部缺陷,实现了内外缺陷的全面地、精准判断,避免了现有技术中内外尘点无法区分的问题,检测准确率提升至99%以上,大大降低了生产过程中误判率,有利于降低返工成本,提高生产效率与产品质量,提升透明材料件的检测效率与质量管控精度,适于推广应用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122567719A_ABST
    Figure CN122567719A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, storage medium, and computer equipment for detecting internal and external defects, belonging to the field of visual inspection technology. Its main purpose is to achieve imaging differentiation of internal and external dust points on transparent material parts by superimposing light field images from dual light sources, thus enabling comprehensive and accurate judgment of internal and external defects. The main technical solution of this application is as follows: The internal and external defect detection method includes: incident detection light onto the incident surface of the transparent material part, the detection light including a first detection light perpendicularly incident on the incident surface and a second detection light incident on the incident surface at a preset incident angle in a ring-shaped incline; collecting the first and second detection lights after reflection from the transparent material part to obtain a superimposed light field image; processing the superimposed light field image to extract the grayscale value information of each pixel; and determining the existence and location of dust point defects based on the grayscale value information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual inspection technology, and in particular to a method, apparatus, storage medium and computer equipment for detecting internal and external defects. Background Technology

[0002] In the production, assembly, and rework processes of mobile phone camera lenses, the lens surface is easily contaminated with external dust particles that can be wiped away. However, dust particles inside the lens are considered functional defects that cannot be wiped away and must be classified as defective products and reworked. Currently, the industry's imaging inspection of dust particles in mobile phone camera lenses cannot distinguish the location of the dust particles. This leads to problems such as misjudging externally wiping dust particles as internal defects or omitting internal dust particle defects. As a result, the misjudgment rate is high, rework costs are high, and yield control is chaotic during the production process, seriously affecting production efficiency and product quality. Summary of the Invention

[0003] In view of this, this application provides a method, apparatus, storage medium and computer equipment for detecting internal and external defects. The main purpose is to achieve imaging differentiation of internal and external dust points of transparent material parts by superimposing light field images from dual light sources, so as to achieve a comprehensive and accurate judgment of internal and external defects.

[0004] To achieve the above objectives, this application mainly provides the following technical solutions: A first aspect of this application provides a method for detecting internal and external defects, comprising: incident detection light onto the incident surface of a transparent material part, the detection light including a first detection light incident perpendicularly onto the incident surface and a second detection light incident on the incident surface at a preset incident angle in a ring-shaped oblique manner; acquiring the first and second detection lights after reflection from the transparent material part to obtain a superimposed light field image; processing the superimposed light field image to extract grayscale value information of each pixel; and determining whether dust spot defects exist and their locations based on the grayscale value information.

[0005] For example, the preset incident angle is configured such that the second detection light directly reflected by the incident surface is not collected during imaging, the second detection light reflected by the medium outside the incident surface is collected during imaging, and the second detection light reflected by the medium inside the transparent material is collected during imaging.

[0006] For example, the preset incident angle is 30 degrees to 60 degrees.

[0007] For example, the first detection light is configured such that the first detection light directly reflected by the incident surface is collected during imaging, the first detection light reflected by the medium outside the incident surface is collected during imaging, and the first detection light reflected by the medium inside the transparent material is collected during imaging.

[0008] For example, the step of processing the superimposed light field image and extracting the gray value information of each pixel includes: processing the light field image corresponding to the first detection light and extracting the gray value of each pixel as a first gray value; processing the light field image corresponding to the second detection light and extracting the gray value of each pixel as a second gray value; and using the sum of the first gray value and the second gray value of the corresponding pixel as the gray value information of that pixel.

[0009] For example, the step of incidenting detection light onto the incident surface of a transparent material includes: simultaneously incidenting a first detection light and a second detection light onto the incident surface.

[0010] For example, when acquiring superimposed light field images, the same image acquisition module simultaneously receives the first detection light and the second detection light and completes the imaging.

[0011] For example, the step of determining whether a dust point defect exists and its location based on grayscale value information includes: determining that there is no dust point defect if the grayscale information is greater than or equal to a first grayscale threshold and less than or equal to a second grayscale threshold, and the second grayscale threshold is greater than the first grayscale threshold; otherwise, determining that a dust point defect exists; determining that the dust point defect is an external dust point defect if the grayscale information is less than the first grayscale threshold; and determining that the defect is an internal dust point defect if the grayscale information is greater than the second grayscale threshold.

[0012] For example, the method further includes: determining the transparent material part as a qualified product based on the fact that the dust spot defect is an external defect, and sending it into the qualified product warehouse; determining the transparent material part as a non-qualified product based on the fact that the dust spot defect is an internal defect, and sending it into the non-qualified product warehouse.

[0013] For example, prior to the step of incident detection light onto the incident surface of the transparent material, the method further includes: adjusting the position of the transparent material so that the normal of the incident surface coincides with the optical axis of the detection light, and the first detection light and the second detection light are coaxially arranged.

[0014] For example, the method also includes adjusting the position of the transparent material part by means of a transport module.

[0015] A second aspect of this application provides an internal and external defect detection device for implementing any of the methods described above. The device includes: a light source assembly comprising a first light source and a second light source coaxially arranged, wherein the first light source incident a first detection light perpendicularly onto the incident surface of a transparent material, and the second light source incident a second detection light at a preset incident angle in a ring shape onto the incident surface; an image acquisition module coaxially arranged with the light source assembly and located on the reflected light path of the detection light, for acquiring the first and second detection lights reflected by the transparent material to obtain a superimposed light field image; and a control and processing module signal-connected to the image acquisition module, for processing the superimposed light field image, extracting grayscale value information of each pixel, and determining whether a dust spot defect exists and its location based on the grayscale value information.

[0016] For example, the control and processing module is also signal-connected to the light source assembly for controlling the operating status of the first and second light sources.

[0017] For example, the first light source is a coaxial light source, arranged opposite to the incident surface, and the optical axis of the first light source coincides with the normal of the incident surface.

[0018] For example, the second light source is a ring light source, which is arranged around the first light source and coaxially with the first light source.

[0019] For example, the image acquisition module includes an industrial camera, which includes a lens that is coaxially arranged with a first light source.

[0020] For example, the internal and external defect detection device further includes: a transport module that carries a transparent material component and adjusts the position of the transparent material component; and a control and processing module that is signal-connected to the transport module and used to control the working state of the transport module.

[0021] For example, the internal and external defect detection device further includes a display module connected to the control and processing module for displaying the detection results.

[0022] A third aspect of this application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any of the first aspects described above.

[0023] A fourth aspect of this application provides a computer device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the method of any of the first aspects described above.

[0024] By employing the above technical solution, this application has at least the following beneficial effects: The internal and external defect detection method, apparatus, storage medium, and computer equipment provided in this application embodiment simultaneously incident a first detection light perpendicularly onto the incident surface of a transparent material part, and a second detection light incident at a preset incident angle in a ring-shaped incline onto the incident surface. The first and second detection lights, after reflection from the transparent material part, are collected to obtain a superimposed light field image. Utilizing the differentiated optical responses of the two detection lights to internal and external defects (such as internal and external dust spots) of the transparent material part, imaging and differentiation of internal and external defects are achieved. This significantly enhances the grayscale difference between the internal and external dust spots and the transparent material part itself, resulting in a clear black-and-white difference between the internal and external dust spots after imaging. Therefore, based on the grayscale value information of each pixel, surface dirt and internal defects can be clearly distinguished, achieving comprehensive and accurate judgment of internal and external defects. This avoids the problem of not being able to distinguish between internal and external dust spots in existing technologies, increasing the detection accuracy to over 99%. This greatly reduces the misjudgment rate during production, helps reduce rework costs, improves production efficiency and product quality, and enhances the detection efficiency and quality control accuracy of transparent material parts, making it suitable for widespread application.

[0025] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0026] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. Wherein: Figure 1 This illustration shows one of the flowcharts of an embodiment of the internal and external defect detection method provided in this application; Figure 2 One of the structural schematic diagrams of the internal and external defect detection device provided in the embodiments of this application is shown; Figure 3 One of the schematic diagrams of the structure of the incident surface of a transparent material part provided by an embodiment of this application, in which a first light source and a second light source are simultaneously incident on the material part; Figure 4 A grayscale image of a superimposed light field image with internal dust point defects provided in an embodiment of this application is shown; Figure 5 The illustration shows a grayscale image of a superimposed light field image with internal and external dust point defects provided in an embodiment of this application.

[0027] in, Figure 2 and Figure 3The correspondence between the reference numerals and component names in the attached drawings is as follows: 100 First light source, 101 First detection light, 200 Second light source, 201 Second detection light, 300 Image acquisition module, 310 Lens, 400 Control and processing module, 500 Handling module, 600 Transparent material component, 601 Incident surface. Detailed Implementation

[0028] The following description provides numerous specific details to offer a more thorough understanding of the technical solutions provided in this application. However, it will be apparent to those skilled in the art that the technical solutions provided in this application can be implemented without one or more of these details.

[0029] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or combinations thereof.

[0030] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. It should be understood that these embodiments are provided so that the disclosure of this application is thorough and complete, and that the concept of these exemplary embodiments is fully conveyed to those skilled in the art.

[0031] like Figure 1 As shown in the first aspect of this application, an embodiment provides a method for detecting internal and external defects, including: Step S110: Inject detection light onto the incident surface of the transparent material part. The detection light includes a first detection light that is perpendicularly incident on the incident surface and a second detection light that is incident on the incident surface in a ring at a preset incident angle.

[0032] The transparent material component 600 can be a glass substrate, an optical lens, a BGA (Ball Grid Array) substrate, etc. In other words, the internal and external defect detection method and apparatus provided in this application can be applied to internal and external defect detection scenarios of glass substrates, optical lenses, and BGA substrates, and has a wide range of applications. Specifically, this application uses a mobile phone camera lens as an example to illustrate the transparent material component 600. Specifically, the transparent material component 600 has good light transmittance.

[0033] Among them, such as Figure 2 and Figure 3 As shown, the incident surface 601 of the transparent material 600 is the side of the transparent material 600 facing the light source assembly, which is a device for incident detection light onto the incident surface 601 of the transparent material 600. Figure 3 As shown, the detection light includes a first detection light 101 and a second detection light 201. The first detection light 101 is incident perpendicularly on the incident surface 601 of the transparent material 600, and the second detection light 201 is incident on the incident surface 601 in a ring at a preset incident angle. Figure 3 The solid arrow in the image represents the first detection light 101. Figure 3 The dashed arrow in the image represents the second detection light 201. Figure 3 In the diagram, letter A represents the outside of the incident transparent material part 600, and letter B represents the inside of the incident transparent material part 600.

[0034] Specifically, the first detection light 101 can be a parallel light perpendicular to the incident surface 601, and the second detection light 201 can be a ring light. The second detection light 201 is incident on the incident surface 601 at a preset incident angle from the periphery of the incident surface 601.

[0035] The first detection light 101 is configured such that the first detection light 101 directly reflected by the incident surface 601 is collected during imaging, the first detection light 101 reflected by the medium outside the incident surface 601 is collected during imaging, and the first detection light 101 reflected by the medium inside the transparent material part 600 is collected during imaging.

[0036] The preset incident angle of the second detection light 201 is configured such that the second detection light 201 directly reflected by the incident surface 601 is not collected during imaging, the second detection light 201 reflected by the medium outside the incident surface 601 is collected during imaging, and the second detection light 201 reflected by the medium inside the transparent material part 600 is collected during imaging.

[0037] Therefore, by simultaneously and synchronously superimposing the first detection light 101 and the second detection light 201 from different directions and angles onto the incident surface 601, the incident angle of the detection light is expanded, enabling multi-angle supplementary lighting. By utilizing the differentiated optical responses of the two detection lights to the internal and external defects (such as internal and external dust spots) of the transparent material part 600, grayscale distinction between internal and external defects is achieved, providing a basis for judging internal and external defects. Compared with the related technologies that use a single detection light to detect the transparent material part 600, this method can eliminate the defects of misjudgment or omission of internal dust spots that exist with a single detection light, which is conducive to improving the comprehensiveness and accuracy of internal and external defect detection.

[0038] Step S120: Collect the first and second detection lights after they are reflected by the transparent material to obtain a superimposed light field image.

[0039] In this embodiment, when acquiring the superimposed light field image, the same image acquisition module 300 simultaneously receives the first detection light 101 and the second detection light 201 reflected by the transparent material 600 and completes the imaging to obtain the superimposed light field image.

[0040] It is understandable that using the same image acquisition module 300 to simultaneously acquire the first detection light 101 and the second detection light 201 reflected by the transparent material part 600 can simplify the overall structure of the detection device and reduce system cost and calibration difficulty. Simultaneously, in a single imaging process, the first detection light 101 directly reflected from the incident surface 601, the first detection light 101 and the second detection light 201 reflected from the medium outside the incident surface 601, and the first detection light 101 and the second detection light 201 reflected from the medium inside the transparent material part 600 can be acquired. This allows for the acquisition of original images containing grayscale information of the transparent material part 600 body, internal defects (such as internal dust spots), and external defects (such as external dust spots). This enables the superimposed light field image to display internal and external defect information more comprehensively and accurately. For example, the ability to comprehensively and accurately display the transparent material part 600 body, internal dust spots, and external dust spot defects facilitates accurate judgment of internal and external dust spots and improves the accuracy of internal and external defect detection.

[0041] Step S130: Process the superimposed light field image and extract the grayscale value information of each pixel.

[0042] In this embodiment, by processing the superimposed light field image, the grayscale value information of each pixel is extracted, providing a basis for subsequent judgment of dust spot defects and their location.

[0043] The step of processing the superimposed light field image and extracting the grayscale value information of each pixel includes: processing the light field image corresponding to the first detection light and extracting the grayscale value of each pixel as a first grayscale value; processing the light field image corresponding to the second detection light and extracting the grayscale value of each pixel as a second grayscale value; and using the sum of the first grayscale value and the second grayscale value of the corresponding pixel as the grayscale value information of that pixel. Therefore, it is possible to comprehensively and accurately display the transparent material part 600 body, internal dust points, and external dust point defects, which is beneficial to improving the accuracy of internal and external defect detection.

[0044] The first detection light 101 can be a coaxial light. After being reflected by the incident surface 601 of the transparent material 600, the first detection light 101 enters the image acquisition module 300 and is acquired. Due to specular reflection on the surface under test, the grayscale value is relatively high. By adjusting various parameters, the grayscale value of the incident surface 601 can reach 150, that is, the first grayscale value of the incident surface 601 can be 150. The first detection light 101 passes through the dust points on the outside of the transparent material 600, undergoes diffuse reflection, and then enters the image acquisition module 300 and is acquired. Due to diffuse reflection, the grayscale value of the dust points on the outside of the transparent material 600 is relatively low, generally around 10, that is, the first grayscale value of the dust points on the outside of the transparent material 600 can be 10. The first detection light 101 passes through the transparent material 600 (the light transmittance of the transparent material 600 is 98%), passes through the internal dust points, undergoes diffuse reflection, and after being reflected by the incident surface 601 of the transparent material 600, enters the image acquisition module 300 and is acquired. Because the dust particles inside the transparent material part 600 undergo diffuse reflection, and some of the light intensity is reflected away by the incident surface 601, the grayscale value of the dust particles inside the transparent material part 600 will be slightly lower, which can be considered as 9.8 (10 × 98%). However, the grayscale value of the dust particles inside the transparent material part 600 in the image acquisition module 300 will be superimposed with the grayscale value of the incident surface 601. Therefore, the grayscale value of the dust particles inside the transparent material part 600 is 150 + 9.8 = 159.8, that is, the first grayscale value of the dust particles inside the transparent material part 600 can be 159.8. It is almost identical to the incident surface 601 of the transparent material part 600, making it difficult to distinguish, and there is a possibility that the internal dust particle defects cannot be detected. In other words, if a single first detection light 101 is used for defect detection, because the difference in reflected light intensity between the dust particles inside the transparent material part 600 and the incident surface 601 of the transparent material part 600 is extremely small, it is equivalent to the internal dust particles hardly being imaged, and there is a problem that the most important internal dust particles cannot be detected.

[0045] The second detection light 201 can be a ring light. After passing through the incident surface 601 of the transparent material 600, the second detection light 201 undergoes specular reflection. Most of the reflected light cannot enter the image acquisition module 300 and is not acquired. Therefore, the grayscale value of the incident surface 601 of the transparent material 600 is almost zero, meaning the second grayscale value of the incident surface 601 can be 0. Simultaneously, most of the second detection light 201 passes through the incident surface 601 of the transparent material 600 and enters the interior of the transparent material 600 (the light transmittance of the transparent material 600 is 98%). The second detection light 201 illuminates the medium inside the transparent material 600, such as illuminating dust particles within the transparent material 600. When the second detection light 201 passes through dust particles outside the transparent material 600, the dust particles undergo diffuse reflection, resulting in a certain grayscale value. By adjusting various parameters, the grayscale value can reach approximately 80, meaning the second grayscale value of the dust particles outside the transparent material 600 can be 80. Dust spots inside the transparent material part 600 also undergo diffuse reflection, with a grayscale value close to that of dust spots outside the transparent material part 600, at 78.4 (80×98%). This means the second grayscale value of the dust spots inside the transparent material part 600 can be 78.4. Therefore, dust spots inside and outside the transparent material part 600 can be imaged, but because the grayscale values ​​are similar, the location of the dust spots cannot be distinguished. In other words, if a single second detection light 201 is used for defect detection, due to the use of an obliquely incident ring light source, the incident surface 601 of the transparent material part 600 undergoes specular reflection. The reflected light will not enter the image acquisition module 300, and the incident surface 601 of the transparent material part 600 has no grayscale value. However, dust spots inside and outside the transparent material part 600 undergo diffuse reflection, and the reflected light intensity of dust spots inside and outside the transparent material part 600 is not significantly different. This results in the inability to distinguish whether the dust spots are inside or on the outer surface after imaging.

[0046] In this embodiment, the sum of the first grayscale value and the second grayscale value of the corresponding pixel is used as the grayscale value information of that pixel. That is, the grayscale value information of the incident surface 601 of the transparent material part 600 is the sum of the first grayscale value and the second grayscale value of the incident surface 601, which is 150 (150+0). The grayscale value information of the dust point on the outside of the transparent material part 600 is the sum of the first grayscale value and the second grayscale value of the dust point on the outside of the transparent material part 600, which is 90 (10+80). The grayscale value information of the dust point inside the transparent material part 600 is the sum of the first grayscale value and the second grayscale value of the dust point inside the transparent material part 600, which is 238.2 (159.8+78.4). This indicates a significant increase in the difference in grayscale values ​​between the inner and outer surfaces of the transparent material part 600, and a substantial difference in grayscale values ​​compared to the incident surface 601 of the transparent material part 600. Therefore, this facilitates precise algorithmic capture, enabling accurate determination of the presence and location of dust point defects, such as internal or external defects, thus improving detection accuracy. Specifically, Figure 4The image shown is a grayscale representation of a superimposed light field image with internal dust point defects. Figure 5 The image shows grayscale representations of superimposed light field images with internal and external dust point defects, where... Figure 4 and Figure 5 Dust spots within the rectangular area represent internal dust spot defects, while dust spots within the triangular area represent external dust spot defects.

[0047] Step S140: Based on the grayscale value information, determine whether there are dust spot defects and the location of the dust spot defects.

[0048] The dust spot defects include internal and external dust spot defects. Since the grayscale values ​​of each pixel on the incident surface 601, the external dust spot, and the internal dust spot of the transparent material part 600 extracted from the superimposed light field image differ significantly, the presence and location of dust spot defects in the transparent material part 600 can be accurately and comprehensively determined based on the grayscale value information. This allows for precise detection and location determination of dust spots, ensuring high detection accuracy and providing a basis for determining whether the transparent material part 600 needs rework.

[0049] The steps for determining whether a dust point defect exists and its location include: determining that there is no dust point defect based on grayscale information being greater than or equal to a first grayscale threshold and less than or equal to a second grayscale threshold, and the second grayscale threshold being greater than the first grayscale threshold; otherwise, determining that a dust point defect exists; determining that the dust point defect is an external dust point defect based on grayscale information being less than the first grayscale threshold; and determining that the dust point defect is an internal dust point defect based on grayscale information being greater than the second grayscale threshold.

[0050] In this embodiment, a grayscale threshold can be preset, such as a first grayscale threshold and a second grayscale threshold, where the second grayscale threshold is greater than the first grayscale threshold. The grayscale value of the incident surface 601 of the transparent material part 600 can fall between the first and second grayscale thresholds. That is, when the grayscale value is greater than or equal to the first grayscale threshold and less than or equal to the second grayscale threshold, it indicates that the transparent material part 600 is free of dust particles, thus identifying a dust particle defect. Conversely, when the grayscale value is outside the first and second grayscale thresholds, it indicates that the transparent material part 600 has a dust particle defect. Specifically, when the grayscale value is less than the first grayscale threshold, the dust particle defect is determined to be an external dust particle defect; when the grayscale value is greater than the second grayscale threshold, the dust particle defect is determined to be an internal dust particle defect. Therefore, it is possible to clearly and accurately distinguish between wipeable dust particles on the surface of the transparent material part 600 and internal dust particles requiring repair, achieving precise imaging recognition and judgment of internal and external dust particles, and improving detection accuracy.

[0051] The internal and external defect detection method provided in this application illuminates a transparent material part 600 simultaneously and synchronously by superimposing a coaxial first detection light 101 and a ring-shaped second detection light 201. Through dual-field superposition imaging, the method utilizes the differentiated optical responses of the two detection lights to internal and external dust points on the transparent material part 600 to achieve grayscale differentiation. This significantly increases the grayscale difference between the internal and external dust points and the transparent material part 600 itself, resulting in a clear black-and-white difference between the internal and external dust points after imaging. Therefore, surface dirt and internal defects can be clearly distinguished using grayscale information, achieving accurate judgment of internal and external defects. This avoids the problem of indistinguishable internal and external dust points in existing technologies, increasing the detection accuracy to over 99%. This greatly reduces the misjudgment rate during production, helps reduce rework costs, improves production efficiency and product quality, and enhances the detection efficiency and quality control accuracy of the transparent material part 600, making it suitable for widespread application.

[0052] In some embodiments provided in this application, the preset incident angle is 30 degrees to 60 degrees. By reasonably setting the incident angle of the second detection light 201, the second detection light 201 can be obliquely incident on the incident surface 601 of the transparent material part 600, ensuring that the second detection light 201 directly reflected from the incident surface 601 is not collected during imaging, while the second detection light 201 reflected from the medium of the incident surface 601 is collected during imaging, and the second detection light 201 reflected from the medium inside the transparent material part 600 is collected during imaging. Thus, the first detection light 101 and the second detection light 201 have different optical responses to dust points inside and outside the transparent material part 600, achieving grayscale differentiation of internal and external dust points, thereby achieving accurate imaging of internal and external dust points and ensuring good detection accuracy.

[0053] Specifically, the preset incident angle can be 30 degrees, 40 degrees, 50 degrees, 60 degrees, or any other arbitrary angle.

[0054] In some embodiments provided in this application, the internal and external defect detection method further includes: determining that the dust spot defect is an external dust spot defect and sending the transparent material part into the qualified product warehouse; determining that the dust spot defect is an internal dust spot defect and sending the transparent material part into the unqualified product warehouse.

[0055] In this embodiment, since external dust spots can be removed by wiping and are not considered functional defects, they can be judged as qualified products and do not require rework. Internal dust spots, however, are functional defects that cannot be removed by wiping and must be judged as defective products and reworked. Therefore, when the dust spot defect is determined to be external, the transparent material part 600 is judged as a qualified product and sent to the qualified product warehouse. When the dust spot defect is determined to be internal, it is judged as a defective product and sent to the defective product warehouse. In this way, during the repair process, it is not necessary to rework products in the qualified product warehouse; only products in the defective product warehouse need to be reworked. That is, products with external dust spot defects do not need to be reworked, which can significantly reduce rework costs and scrap rates, reduce ineffective rework processes, and improve production yield control efficiency.

[0056] Furthermore, in some examples, the dust spot detection method also includes displaying the detection results. For example, it can display whether there are dust spot defects, internal dust spot defects, external dust spot defects, and whether the product is a qualified product. This adapts to the visualization needs of industrial inspection scenarios, allowing staff to intuitively, accurately, and in real-time view the detection results of the transparent material part 600, facilitating subsequent operations.

[0057] In some embodiments provided in this application, prior to the step of incident detection light onto the incident surface of the transparent material, the method further includes: Adjust the position of the transparent material component so that the normal of the incident surface coincides with the optical axis of the detection light, and set the first and second detection lights coaxially.

[0058] In this embodiment, by adjusting the position of the transparent material component 600, the normal of the incident surface 601 is made to coincide with the optical axis of the detection light, and the first detection light 101 and the second detection light 201 are set coaxially. This reduces refraction and polarization errors, improves measurement accuracy, and helps ensure that the reflected light returns along the original path, thus improving light energy utilization. At the same time, the assembly and adjustment are simple and the alignment is easy, so it is only necessary to align with the center of the incident surface 601 of the transparent material component 600, which simplifies the adjustment operation of the optical axis, and the batch detection tooling debugging efficiency is high, which helps to improve the detection efficiency.

[0059] In the above embodiments, the position of the transparent material component is adjusted by a transport module.

[0060] Therefore, the transport module 500 enables precise positioning of the transparent material component 600, ensuring its coaxial arrangement with the optical path and facilitating high detection accuracy. Simultaneously, the transport module 500 enables automated repositioning of the transparent material component 600, improving detection efficiency and consistency. It is also compatible with various specifications of transparent material components 600, offering strong versatility and avoiding the possibility of damage to the lens due to manual repositioning.

[0061] Specifically, the transport module 500 can drive the transparent material component 600 to move along the X, Y, and Z directions, and can adjust the attitude angle of the transparent material component 600 to ensure that the normal of the incident surface 601 of the transparent material component 600 coincides with the optical axis of the detection light.

[0062] Furthermore, as Figure 1 The specific implementation of the method, such as Figure 2 As shown, this application embodiment provides an internal and external defect detection device for implementing the aforementioned internal and external defect detection method. The internal and external defect detection device includes: a light source assembly, which includes a first light source 100 and a second light source 200 coaxially arranged. The first light source 100 incident a first detection light 101 perpendicularly onto the incident surface 601 of the transparent material 600, and the second light source 200 incident a second detection light 201 in a ring at a preset incident angle onto the incident surface 601; an image acquisition module 300, coaxially arranged with the light source assembly and located on the reflected light path of the detection light, for acquiring the first detection light 101 and the second detection light 201 after reflection by the transparent material 600, to obtain a superimposed light field image; and a control and processing module 400, signal-connected to the image acquisition module 300, for processing the superimposed light field image, extracting the grayscale value information of each pixel, and determining whether dust spot defects exist and their locations based on the grayscale value information.

[0063] In this embodiment, the internal and external defect detection device includes a light source assembly, an image acquisition module 300, and a control and processing module 400. A first light source 100 and a second light source 200, coaxially arranged through the light source assembly, simultaneously emit a first detection light 101 and a second detection light 201 to illuminate the transparent material part 600. The image acquisition module 300 achieves dual-field superposition imaging, and the control and processing module 400 processes the superimposed light field image, extracting the grayscale value information of each pixel. Based on the grayscale value information, it determines whether dust spot defects exist and their locations. Due to the differentiated optical responses of the two detection lights to the internal and external dust spots of the transparent material part 600, grayscale distinction between internal and external dust spot defects can be achieved. This significantly increases the grayscale difference between the internal and external dust spots and the transparent material part 600 itself. After imaging, the internal and external dust spots exhibit a clear black-and-white difference. Therefore, the control and processing module 400 can clearly distinguish between surface dirt and internal defects through the grayscale value information, achieving accurate judgment of internal and external dust spot defects. This avoids the problem of not being able to distinguish between internal and external dust spots in the prior art, increasing the detection accuracy to over 99%. This significantly reduces the error rate during production, which helps lower rework costs, improves production efficiency and product quality, and enhances the detection efficiency and quality control accuracy of transparent material parts 600, making it suitable for widespread application. Furthermore, it requires no complex optical path modifications, has a simple structure, and is cost-controllable, further facilitating its widespread adoption.

[0064] In some embodiments provided in this application, the control and processing module 400 is also signal-connected to the light source assembly for controlling the working state of the first light source 100 and the second light source 200.

[0065] Specifically, the control and processing module 400 controls the first light source 100 and the second light source 200 to work simultaneously, so as to emit the first detection light 101 and the second detection light 201 at the same time, so as to ensure that the image acquisition module 300 can reliably acquire the superimposed light field image and ensure good detection effect.

[0066] In some embodiments provided in this application, the first light source 100 is a coaxial light source, arranged opposite to the incident surface 601, and the optical axis of the first light source 100 coincides with the normal of the incident surface 601. If the first light source 100 is arranged directly above the incident surface 601 of the transparent material 600, and the optical axis coincides with the normal of the incident surface 601, it can emit parallel light that is vertically downward.

[0067] The second light source 200 is a ring light source, which is arranged around the first light source 100 and coaxially with the first light source 100. Specifically, the ring light source is arranged above the incident surface 601 of the transparent material part 600, and surrounds the coaxial light source in a ring shape, emitting oblique light rays towards the incident surface 601 at an angle of 30° to 60°.

[0068] The image acquisition module 300 includes an industrial camera, such as an industrial area scan camera, which includes a lens 310 coaxially arranged with the first light source 100. The industrial camera is used to acquire superimposed light field images reflected by the lens and is connected to the control processing module via a data cable.

[0069] The control and processing module 400 can be an industrial control computer, which is connected to the coaxial light source, the ring light source, and the image acquisition module 300 to realize synchronous control of the light source, image acquisition, and data transmission.

[0070] Therefore, the internal and external defect detection device and method provided in this application embodiment can be realized by relying on mature light sources and industrial cameras. There is no need for complex optical path modification. The structure is simple, the cost is controllable, and it is easy to modify and mass-produce on existing mobile phone camera module AOI (Automated Optical Inspection) equipment, adapting to the existing production cycle.

[0071] In some embodiments provided in this application, the internal and external defect detection device further includes: a transport module 500, which carries the transparent material component 600 and adjusts the position of the transparent material component 600; and a control and processing module 400 which is signal-connected to the transport module 500 and is used to control the working state of the transport module 500.

[0072] The control and processing module 400 can control the working state of the conveying module 500, drive the transparent material part 600 to move along the X, Y, and Z directions, and adjust the attitude angle of the transparent material part 600 to ensure that the normal of the incident surface 601 of the transparent material part 600 coincides with the optical axis of the detection light.

[0073] Specifically, in some examples, the handling module 500 can also send transparent material parts 600 that are determined to have no dust spot defects but have external dust spot defects to the qualified product warehouse, and send transparent material parts 600 that are determined to have internal dust spot defects to the unqualified product warehouse.

[0074] In some embodiments provided in this application, the internal and external defect detection device further includes: an optical fixing bracket for fixing the light source assembly and the image acquisition module 300. This provides stable support for the light source assembly and the image acquisition module 300, ensuring that the light source assembly and the image acquisition module 300 are arranged coaxially.

[0075] In some embodiments provided in this application, the internal and external defect detection device further includes a display module connected to the control and processing module 400 for displaying the detection results.

[0076] The display module can be an industrial display screen, a touch screen, or a computer monitor. It displays the inspection results, such as the presence of dust defects, internal and external dust defects, and whether the product is qualified. It adapts to the visualization needs of industrial inspection scenarios, possessing stable and clear image and data display capabilities, allowing staff to intuitively, accurately, and in real-time view the inspection results of the transparent material part 600, facilitating subsequent operations. Understandably, in some examples, the display module can also display superimposed light field images, grayscale value information of individual pixels, etc.

[0077] Based on the above Figure 1 Accordingly, embodiments of this application also provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method. Figure 1 The method for detecting appearance defects is shown.

[0078] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.

[0079] Based on the above Figure 1To achieve the above objectives, this application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the method. The computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above objectives. Figure 1 The method for detecting appearance defects is shown.

[0080] Furthermore, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, and so on. The user interface may include a display screen, input units such as a keyboard, and optional user interfaces may include USB ports, card reader ports, etc. Optional network interfaces may include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.

[0081] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0082] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.

[0083] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0084] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for detecting internal and external defects, characterized in that, include: Detection light is incident on the incident surface of a transparent material part, the detection light including a first detection light that is perpendicularly incident on the incident surface and a second detection light that is incident on the incident surface in a ring at a preset incident angle; The first and second detection lights, after being reflected by the transparent material, are collected to obtain a superimposed light field image; The superimposed light field image is processed to extract the grayscale value information of each pixel; Based on the grayscale value information, determine whether dust spot defects exist and their locations.

2. The method for detecting internal and external defects according to claim 1, characterized in that, The preset incident angle is configured such that the second detection light directly reflected by the incident surface is not collected during imaging, the second detection light reflected by the medium outside the incident surface is collected during imaging, and the second detection light reflected by the medium inside the transparent material is collected during imaging.

3. The method for detecting internal and external defects according to claim 1, characterized in that, The first detection light is configured such that the first detection light directly reflected by the incident surface is collected during imaging, the first detection light reflected by the medium outside the incident surface is collected during imaging, and the first detection light reflected by the medium inside the transparent material is collected during imaging.

4. The method for detecting internal and external defects according to claim 1, characterized in that, The steps of processing the superimposed light field image and extracting the grayscale value information of each pixel include: The light field image corresponding to the first detection light is processed, and the gray value of each pixel is extracted as the first gray value. The light field image corresponding to the second detection light is processed, and the gray value of each pixel is extracted as the second gray value. The sum of the first gray value and the second gray value of the corresponding pixel is used as the gray value information of that pixel.

5. The method for detecting internal and external defects according to claim 1, characterized in that, The steps of incident detection light onto the incident surface of a transparent material include: Simultaneously, the first detection light and the second detection light are incident on the incident surface.

6. The method for detecting internal and external defects according to claim 1, characterized in that, When acquiring the superimposed light field image, the same image acquisition module simultaneously receives the first detection light and the second detection light and completes the imaging.

7. The method for detecting internal and external defects according to claim 1, characterized in that, The steps for determining the presence and location of dust spot defects based on the grayscale value information include: Based on the grayscale information being greater than or equal to a first grayscale threshold and less than or equal to a second grayscale threshold, where the second grayscale threshold is greater than the first grayscale threshold, it is determined to be a dust-free defect; otherwise, it is determined to be a dust-containing defect. Based on the fact that the gray value information is less than the first gray value threshold, the dust point defect is determined to be an external dust point defect. Based on the fact that the grayscale value information is greater than the second grayscale threshold, the defect is determined to be an internal dust point defect.

8. An internal and external defect detection device, characterized in that, The apparatus for implementing the method according to any one of claims 1 to 7 comprises: The light source assembly includes a first light source (100) and a second light source (200) arranged coaxially. The first light source (100) perpendicularly incidents a first detection light (101) onto the incident surface (601) of the transparent material (600). The second light source (200) incidents a second detection light (201) onto the incident surface (601) in a ring shape at a preset incident angle. An image acquisition module (300) is coaxially arranged with the light source component and located on the reflected light path of the detection light. It is used to acquire the first detection light (101) and the second detection light (201) after being reflected by the transparent material component (600) to obtain a superimposed light field image. The control and processing module (400) is connected to the image acquisition module (300) by signal, and is used to process the superimposed light field image, extract the gray value information of each pixel, and determine whether there is a dust defect and the location of the dust defect based on the gray value information.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

10. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.