Defect detection method and device
By combining the detection methods of the imaging module and the phase detection module, multi-dimensional information of the light field is obtained, and the problem of existing glass bottle defect detection methods is easily detected by mistake, achieving higher detection accuracy and automation.
Patent Information
- Application Number
- CN202411837368.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-02-18
AI Technical Summary
Existing glass bottle defect detection methods are susceptible to decorative pattern texture and lighting shadows, resulting in defect error detection.
The detection method combining the imaging module and the phase detection module is adopted to accurately locate the defect position by obtaining multi-dimensional information of the light field, including the light field intensity component and the phase component.
It reduces the impact of detection interference, improves detection accuracy, and has the advantages of high degree of automation, high detection accuracy and high detection efficiency.
Smart Images

Figure CN119470447A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of non-contact optical detection, and in particular to a defect detection method and device. Background Art
[0002] In the wine industry, glass bottles used to package liquor are an important representation of the wine brand image. Therefore, the detection of glass bottle defects is of great significance to the brand image of the wine industry. For glass bottle defect detection, the industry currently relies mainly on manual work. Although there are automated detection methods based on image processing, the decorative patterns and textures on the surface of glass bottles are prone to lighting shadows and other problems, which can easily lead to false defect detection. Summary of the invention
[0003] In order to overcome the problem of false defect detection caused by the decorative patterns on the surface of existing glass bottles, the present invention provides a defect detection method and device.
[0004] The technical solution adopted by the present invention to solve its technical problem is:
[0005] The defect detection method comprises the following steps:
[0006] S1. Build a detection system, which includes a light source, a workbench, a glass bottle defect detection module and a host computer. The glass bottle defect detection module includes an imaging module for collecting image information and a phase detection module for collecting phase information. Both the imaging module and the phase detection module are connected to the host computer signal;
[0007] S2. Select a standard glass bottle sample and place it on the workbench, turn on the illumination light source, adjust the workbench appropriately, and use the edge extraction algorithm on the imaging module to record the edge information of the glass bottle as the calibration result; use the typical phase measurement calibration method on the phase detection module to record the calibration information;
[0008] S3, placing the glass bottle to be tested on the workbench, turning on the lighting source, and adjusting the workbench so that the edge of the glass bottle to be tested on the imaging module coincides with the calibration result of the imaging module;
[0009] S4. Turn on the illumination light source, and the imaging module and the phase information detection module collect images and phase information respectively. The host computer compares the phase information of the standard glass bottle corresponding to the defect position with the phase information of the tested glass bottle to determine whether the defect is detected correctly.
[0010] The principle of the present invention is that the defects in the glass bottle not only affect the intensity component of the light field of the illumination beam, but also its phase component. The imaging module is used to obtain the light field intensity component information, and the phase detection module is used to obtain the light field phase component information. The two are combined to accurately locate the defect position.
[0011] In this application, by acquiring multi-dimensional information of the light field, the influence of detection interference is reduced and the detection accuracy is improved. At the same time, it has the advantages of high degree of automation, high detection accuracy and high detection efficiency, providing an efficient and accurate solution for automated detection in the glass bottle industry.
[0012] In some embodiments, S4 is turning on the illumination light source, and the imaging module and the phase information detection module respectively collect images and phase information;
[0013] Mark the preliminary inspection results of glass bottle defects in the image results, and compare the preliminary inspection results one by one with the phase measurement results;
[0014] If the initial inspection position of the glass bottle defect coincides with the phase mutation position, it indicates that the defect detection is correct, otherwise it indicates that the defect is a false detection.
[0015] In some embodiments, the phase detection module in S1 includes a Hartmann wavefront sensor structure composed of a microlens array and a photosensitive chip;
[0016] The phase information in S2 corresponding to the initial inspection position in S4 is the sub-aperture of the mth row and nth column of the Hartmann wavefront sensor, and its calibration centroid is (x m,n ,y m,n ), the phase information in S4 corresponding to the initial inspection position in S4 is the centroid (x' m,n , y' m,n );
[0017] like
[0018] The present invention also provides a device for the defect detection method described in any of the above embodiments, comprising a light source, a workbench, a glass bottle defect detection module and a host computer. When the light source is turned on, the light beam passes through the glass bottle to be tested on the workbench and carries the glass bottle defect information into the glass bottle defect detection module. The glass bottle defect detection module comprises an imaging module for collecting image information and a phase detection module for collecting phase information. Both the imaging module and the phase detection module are connected to the host computer signal.
[0019] In some embodiments, the worktable has two-dimensional translation capability and rotation adjustment capability.
[0020] In some embodiments, the light source is a planar light source.
[0021] In some embodiments, the imaging module includes an imaging lens and an imaging camera.
[0022] In some embodiments, the phase detection module includes a Hartmann wavefront sensor structure consisting of a microlens array and a photosensitive chip.
[0023] The beneficial effects of the present invention are:
[0024] By acquiring multi-dimensional information of the light field, the impact of detection interference is reduced and the detection accuracy is improved. At the same time, it has the advantages of high degree of automation, high detection accuracy and high detection efficiency, providing an efficient and accurate solution for automated detection in the glass bottle industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of the structure of a glass bottle defect detection device provided by the present invention;
[0026] Figure 2 A schematic flow chart of the glass bottle defect detection method provided by the present invention.
[0027] Marked in the figure: 1- plane light source, 2- workbench, 3- glass bottle defect detection module, 31- imaging lens, 32- imaging camera, 33- microlens array, 34- photosensitive chip, 35- phase measurement device, 4- host computer. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings.
[0029] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0030] Combination Figure 1 and Figure 2 As shown, the present invention provides a defect detection method and device.
[0031] The glass bottle defect detection device comprises a light source, a workbench 2, a glass bottle defect detection module 3 and a host computer 4. When the light source is turned on, the light beam passes through the glass bottle to be tested on the workbench 2 and carries the glass bottle defect information into the glass bottle defect detection module 3. The glass bottle defect detection module 3 comprises an imaging module for collecting image information and a phase detection module for collecting phase information. Both the imaging module and the phase detection module are connected to the host computer 4 by signal.
[0032] In this application, the imaging module and the phase detection module synchronously analyze the glass bottle defect information, and the collected information of the two modules is handed over to the host computer 4 for processing to obtain the glass bottle defect detection result. If the defective part detected by the imaging method of light intensity detection does not appear as a defect in the corresponding phase detection result, it indicates that the defect is a false detection caused by imaging abnormality. Thereby improving the detection accuracy.
[0033] In this embodiment, the workbench 2 has two-dimensional translation capability and rotation adjustment capability. Further, the upper computer 4 can control the movement of the workbench 2 to adjust the glass bottle on the workbench 2 to a suitable position. Here, the workbench 2 is a spin workbench 2 set on a two-dimensional linear guide rail, such as Figure 2 As shown in , the lower half of the workbench 2 is a base, which is arranged on a two-dimensional linear guide rail, and the upper half can rotate around the center.
[0034] In this embodiment, the light source is a planar light source 1 to achieve efficient calibration of the phase detection module.
[0035] In this embodiment, the imaging module includes an imaging lens 31 and an imaging camera 32 .
[0036] In this embodiment, the phase detection module includes a Hartmann wavefront sensor structure composed of a microlens array 33 and a photosensitive chip 34. In this embodiment, it is a 32×32 array Hartmann wavefront sensor. The phase detection module is also provided with a phase measurement device 35.
[0037] The glass bottle defect detection method comprises the following steps:
[0038] S1. Build a detection system, which includes a light source, a workbench 2, a glass bottle defect detection module 3 and a host computer 4. The glass bottle defect detection module 3 includes an imaging module for collecting image information and a phase detection module for collecting phase information. Both the imaging module and the phase detection module are connected to the host computer 4 by signal;
[0039] S2. System calibration. Select a standard glass bottle sample and place it on the workbench 2. Turn on the illumination source and adjust the workbench 2 appropriately so that the sample image is in the middle of the imaging module and the phase detection module. Use the Canny edge extraction algorithm on the imaging module to record the edge information of the glass bottle as the calibration result. Record the position information of each sub-aperture spot on the Hartmann wavefront sensor and extract the centroid coordinates (x m,n ,y m,n ), subscript m, n represents the centroid of the subaperture spot in the mth row and nth column;
[0040] The calibration result of the imaging module is the edge of the glass bottle, and the calibration result of the phase detection module is the transmission phase of the light beam emitted by the plane light source 1 after passing through the standard glass bottle. The purpose of this step is to adjust the position of the bottle body to ensure that the change in the transmission phase is only caused by the defects of the bottle body. Otherwise, if the positions of the standard glass bottle and the glass bottle to be tested are significantly different, the phase change caused by the position difference is enough to cover up the effect of the bottle body defects.
[0041] S3, aligning the glass bottle to be tested. After the calibration is completed, place the glass bottle to be tested on the workbench 2, turn on the lighting source, and adjust the workbench 2 so that the edge of the glass bottle to be tested on the imaging module coincides with the calibration result of the imaging module;
[0042] S4, detection record. The illumination light source is turned on, and the imaging module and the phase information detection module collect images and phase information respectively. The host computer 4 compares the phase information of the standard glass bottle corresponding to the defect position with the phase information of the tested glass bottle to determine whether the defect is detected correctly.
[0043] In this application, by acquiring multi-dimensional information of the light field, the influence of detection interference is reduced and the detection accuracy is improved. At the same time, it has the advantages of high degree of automation, high detection accuracy and high detection efficiency, providing an efficient and accurate solution for automated detection in the glass bottle industry.
[0044] Further, S4 is turning on the illumination light source, and the imaging module and the phase information detection module respectively collect images and phase information;
[0045] Mark the preliminary inspection results of glass bottle defects in the image results, and compare the preliminary inspection results one by one with the phase measurement results;
[0046] If the initial inspection position of the glass bottle defect coincides with the phase mutation position, it indicates that the defect detection is correct; if the phase corresponding to the initial inspection position of the wavefront defect does not change significantly with the phase calibration result, it indicates that the defect is a false detection.
[0047] Specifically, in this embodiment, the phase detection module in S1 includes a Hartmann wavefront sensor structure composed of a microlens array 33 and a photosensitive chip 34;
[0048] The phase information in S2 corresponding to the initial inspection position in S4 is the sub-aperture of the mth row and nth column of the Hartmann wavefront sensor, and its calibration centroid is (x m,n ,y m,n ), the phase information in S4 corresponding to the initial inspection position in S4 is the centroid (x' m,n , y' m,n );
[0049] like
[0050] The principle of the present invention is that the defects of the glass bottle not only affect the intensity component of the light field of the illumination beam, but also its phase component. The imaging module is used to obtain the information of the intensity component of the light field, and the phase detection module is used to obtain the information of the phase component of the light field. The two are combined to accurately locate the position of the defect. Specifically, the traditional detection method is easily affected by the shadow of the bottle body, and the local shadow may be misjudged as a defect. This method is supplemented by phase detection. Because phase and light intensity are complementary interference information, the existence of local shadows does not affect the accuracy of phase detection. Therefore, if the defective part detected by the imaging method of light intensity detection does not appear as a defect in the corresponding phase detection result, it indicates that the defect is a false detection caused by imaging abnormality.
[0051] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A defect detection method, characterized in that: The following steps are involved: S1. Building a detection system, the detection system comprising a light source, a workbench (2), a glass bottle defect detection module (3) and a host computer (4), the glass bottle defect detection module (3) comprising an imaging module for collecting image information and a phase detection module for collecting phase information, the imaging module and the phase detection module both being connected to the host computer (4) by signal; S2, select a standard glass bottle sample and place it on the workbench (2), turn on the illumination light source, appropriately adjust the workbench (2), and use the edge extraction algorithm on the imaging module to record the edge information of the glass bottle as the calibration result; Recording calibration information using a typical phase measurement calibration method on a phase detection module; S3, placing the glass bottle to be tested on the workbench (2), turning on the illumination light source, and adjusting the workbench (2) so that the edge of the glass bottle to be tested on the imaging module coincides with the calibration result of the imaging module; S4, turning on the illumination light source, the imaging module and the phase information detection module respectively collect images and phase information, and the upper computer (4) determines and analyzes whether the defect is detected correctly by comparing the phase information of the standard glass bottle corresponding to the defect position with the phase information of the tested glass bottle.
2. The defect detection method according to claim 1, characterized in that: S4 is to turn on the illumination light source, and the imaging module and the phase information detection module collect images and phase information respectively; Mark the preliminary inspection results of glass bottle defects in the image results, and compare the preliminary inspection results one by one with the phase measurement results; If the initial inspection position of the glass bottle defect coincides with the phase mutation position, it indicates that the defect detection is correct, otherwise it indicates that the defect is a false detection.
3. The defect detection method according to claim 2, characterized in that: The phase detection module in S1 includes a Hartmann wavefront sensor structure composed of a microlens array (33) and a photosensitive chip (34); The phase information in S2 corresponding to the initial inspection position in S4 is the sub-aperture of the mth row and nth column of the Hartmann wavefront sensor, and its calibration centroid is (x m,n ,y m,n ), the phase information in S4 corresponding to the initial inspection position in S4 is the centroid (x ’ m,n ,y ’ m,n ); like 4. A device for the defect detection method according to any one of claims 1 to 3, characterized in that: The system comprises a light source, a workbench (2), a glass bottle defect detection module (3) and a host computer (4); when the light source is turned on, a light beam passes through a glass bottle to be tested on the workbench (2) and carries the glass bottle defect information to enter the glass bottle defect detection module (3); the glass bottle defect detection module (3) comprises an imaging module for collecting image information and a phase detection module for collecting phase information; the imaging module and the phase detection module are both connected to the host computer (4) by signals.
5. The device for defect detection method according to claim 3, characterized in that: The workbench (2) has two-dimensional translation capability and rotation adjustment capability.
6. The device for defect detection method according to claim 3, characterized in that: The light source is a planar light source (1).
7. The device for defect detection method according to claim 3, characterized in that: The imaging module comprises an imaging lens (31) and an imaging camera (32).
8. The device for defect detection method according to any one of claims 3 to 7, characterized in that: The phase detection module comprises a Hartmann wavefront sensor structure consisting of a microlens array (33) and a photosensitive chip (34).