A defect detection method based on photoelectric detection
By upsampling and sub-pixel extraction of defect detection data and using a discrete sliding window to process the signal, the volatility problem of defect detection results in photoelectric detection is solved, and the stability and repeatability of the detection equipment are improved.
Patent Information
- Application Number
- CN202310992778.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-08-08
AI Technical Summary
Existing photoelectric detection methods cannot effectively reduce the volatility of defect detection results during multiple defect detections, affecting the stability and repeatability of the detection equipment.
By upsampling and sub-pixel extraction of defect detection data, using discrete sliding windows for signal processing, calculating the defect level and forming a graded location distribution map, the volatility of multiple detections is reduced.
It effectively reduces the volatility of multiple defect detection results, improves the stability and repeatability of detection equipment, and meets the requirements of automated detection standards.
Smart Images

Figure CN117036274B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to defect detection, and in particular to a defect detection method based on photoelectric detection. Background Art
[0002] Photoelectric detection is an efficient and automated method that uses a light source and corresponding sensors to detect the appearance and properties of an object under test. The detection signal is converted into an electrical signal, which is then analyzed using a subsequent signal processing system. Detection can be performed using light sources of different wavelengths, such as visible light, infrared, and ultraviolet light. The acquired electrical signal can be converted into a digital signal using an analog-to-digital conversion circuit for subsequent analysis.
[0003] Machine vision refers to the use of photoelectric detection principles to obtain digital signals reflecting the characteristics of the object to be measured, and then converting them into human-understandable semantics through digital image processing and pattern recognition methods, thereby forming measurable indicators to complete a series of tasks such as recognition and segmentation.
[0004] Because a complete machine vision system involves multiple subsystems, including light sources, mechanics, and signal acquisition, the intensity and position of a single signal will fluctuate to a certain extent during multiple inspections. The range of this signal fluctuation is related to the system principles, design accuracy, and component performance. For a specific inspection process, the signal values obtained from multiple inspections will deviate to a certain extent.
[0005] In the field of visual inspection, repeatability across multiple inspections is a crucial metric. Automated optical inspection standards, such as those in the US military and China, define the maximum allowable ranges for the number and grade of defects on components under test. Repeated defect inspections of the same component should yield results that are as consistent as possible. Significant discrepancies in the results across multiple inspections of the same component indicate poor stability of the inspection equipment.
[0006] There are three main approaches to eliminating deviations in detection signal values: First, using multiple sensors for multi-path detection to obtain multiple detection signal values at the same moment, and then reducing deviations through joint judgment; second, using large amounts of data to establish a statistical model of the signal, using machine learning and other methods to eliminate interference from external factors; and third, performing data enhancement on the original signal to amplify small fluctuations in the signal, thereby further removing system volatility. However, none of these three methods can effectively reduce the volatility of multiple defect detection results in the field of appearance inspection. Summary of the Invention
[0007] (1) Technical problems solved
[0008] In view of the above-mentioned defects of the prior art, the present application provides a flaw detection method based on photoelectric detection, which can effectively overcome the defect that the prior art cannot better reduce the fluctuation of multiple flaw detection results.
[0009] (II) Technical solutions
[0010] To achieve the above object, the present application is implemented by the following technical solutions:
[0011] A flaw detection method based on photoelectric detection, comprising the following steps:
[0012] S1, acquiring an image of a component to be tested, locating flaws in the image of the component to be tested, and acquiring corresponding original analog signals;
[0013] S2, arranging the digital sampling values of the original analog signals of a single flaw, and upsampling the arranged digital sampling values;
[0014] S3, setting a discrete sliding window based on the original analog signals, using the discrete sliding window to sub-pixel extract the upsampled digital sampling values, and obtaining a sub-pixel extraction subset;
[0015] S4, calculating the flaw grade corresponding to the sub-pixel extraction subset;
[0016] S5, repeating S3 and S4 to complete all possible sub-pixel extraction schemes, and taking the maximum flaw grade corresponding to all sub-pixel extraction subsets as the flaw grade of the flaw;
[0017] S6, repeating S2 to S5 to traverse all flaws in the image of the component to be tested, and obtaining a corresponding flaw grading position distribution map, and judging whether the component to be tested passes the flaw detection according to the flaw grading position distribution map.
[0018] Preferably, in S2, the arranged digital sampling values are upsampled, comprising:
[0019] Selecting a suitable interpolation algorithm based on the physical characteristics of the original analog signals, and performing interpolation operation on the arranged digital sampling values.
[0020] Preferably, in S3, the discrete sliding window is set based on the original analog signals, comprising:
[0021] Setting a discrete sliding window with the same sampling point number and original analog signal sampling size and an interpolation multiple step length.
[0022] Preferably, in S4, the flaw grade corresponding to the sub-pixel extraction subset is calculated, comprising:
[0023] Performing flaw grade quantization operation based on the physical characteristics of the sub-pixel extraction subset.
[0024] Preferably, all possible sub-pixel extraction schemes are completed in S5, including:
[0025] The initial position of the sliding sub-pixel extraction is used to perform all possible sub-pixel extraction schemes in the vertical and horizontal directions on the up-sampled digital sample values using a discrete sliding window.
[0026] (3) Beneficial effects
[0027] Compared with the existing technology, the defect detection method based on photoelectric detection provided by the present invention obtains the maximum defect level quantification result of a specific defect by reasonably estimating the collected defect data, thereby solving the data jitter problem generated by multiple defect detections and effectively reducing the volatility of multiple defect detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0029] Figure 1 It is a schematic diagram of the process of the present invention;
[0030] Figure 2 Schematic diagram of the result of performing sub-pixel extraction on upsampled digital sample values using a discrete sliding window in the present invention. DETAILED DESCRIPTION
[0031] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0032] A defect detection method based on photoelectric detection, such as Figure 1 As shown, ①, obtain an image of the component to be tested, locate defects in the image of the component to be tested, and obtain the corresponding original analog signal.
[0033] ② Arrange the digital sampling values of the original analog signal of a single defect (including but not limited to one-dimensional linear and two-dimensional planar arrangements), and upsample the arranged digital sampling values.
[0034] Specifically, upsampling the arranged digital sample values includes:
[0035] An appropriate interpolation algorithm (including but not limited to linear interpolation and quadratic linear interpolation) is selected based on the physical characteristics of the original analog signal, and an interpolation operation is performed on the arranged digital sample values.
[0036] ③. Set a discrete sliding window based on the original analog signal, and use the discrete sliding window to perform sub-pixel extraction on the upsampled digital sampling value to obtain a sub-pixel extraction subset.
[0037] Specifically, a discrete sliding window is set based on the original analog signal, including:
[0038] Set a discrete sliding window with the same number of sampling points as the original analog signal sampling size and a step size equal to the interpolation multiple.
[0039] like Figure 2 As shown, sub-pixel extraction subsets 1, 2, and 3 are obtained by performing sub-pixel extraction on a discrete sliding window with a sampling point number of 5 (ie, the number of original analog signal samples) and a step size (ie, the interpolation multiple) of 3.
[0040] ④. Calculate the defect level corresponding to the sub-pixel extraction subset, including:
[0041] Defect level quantization is performed based on the physical properties of a subset of sub-pixels.
[0042] ⑤. Repeat ③ and ④ to complete all possible sub-pixel extraction schemes, and use the maximum defect level corresponding to all sub-pixel extraction subsets as the defect level of the defect.
[0043] Specifically, all possible sub-pixel decimation schemes are completed, including:
[0044] The initial position of the sliding sub-pixel extraction is used to perform all possible sub-pixel extraction schemes in the vertical and horizontal directions on the up-sampled digital sample values using a discrete sliding window.
[0045] ⑥. Repeat ② to ⑤ to traverse all defects in the image of the component to be tested and obtain the corresponding defect grading position distribution map. According to the defect grading position distribution map, determine whether the component to be tested passes the defect detection.
[0046] In the technical solution of the present application, by making a reasonable estimate of the collected defect data, the maximum defect level quantitative result of a specific defect is obtained, thereby solving the data jitter problem generated in multiple defect detections and effectively reducing the volatility of multiple defect detection results.
[0047] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A defect detection method based on photoelectric detection, characterized in that: The following steps are involved: S1. Acquire an image of the component to be tested, locate defects in the image of the component to be tested, and obtain the corresponding original analog signal; S2. arranging digital sampling values of the original analog signal of a single defect, and upsampling the arranged digital sampling values; S3, setting a discrete sliding window based on the original analog signal, and performing sub-pixel extraction on the upsampled digital sample values using the discrete sliding window to obtain a sub-pixel extraction subset; S4, calculating the defect level corresponding to the sub-pixel extraction subset; S5. Repeat S3 and S4 to complete all possible sub-pixel extraction schemes, and use the maximum defect level corresponding to all sub-pixel extraction subsets as the defect level of the defect; S6. Repeat S2 to S5 to traverse all defects in the image of the component to be tested, and obtain a corresponding defect grading position distribution map, and determine whether the component to be tested passes the defect detection based on the defect grading position distribution map.
2. The photoelectric detection-based defect detection method according to claim 1, characterized in that: In S2, the arranged digital sample values are up-sampled, including: An appropriate interpolation algorithm is selected based on the physical characteristics of the original analog signal, and an interpolation operation is performed on the arranged digital sample values.
3. The photoelectric detection-based defect detection method according to claim 2, wherein: In S3, a discrete sliding window is set based on the original analog signal, including: Set a discrete sliding window with the same number of sampling points as the original analog signal sampling size and a step size equal to the interpolation multiple.
4. The photoelectric detection-based defect detection method according to claim 3, wherein: S4 calculates the defect level corresponding to the sub-pixel extraction subset, including: Defect level quantization is performed based on the physical properties of a subset of sub-pixels.
5. The photoelectric detection-based defect detection method according to claim 4, characterized in that: All possible sub-pixel decimation schemes are implemented in S5, including: The initial position of the sliding sub-pixel extraction is used to perform all possible sub-pixel extraction schemes in the vertical and horizontal directions on the up-sampled digital sample values using a discrete sliding window.
Citation Information
Patent Citations
Method and system for detecting flaw
CN106097371A
Rail surface defect rapid detection system and method
CN110211101A