Method and system for detecting quality of perforated workpiece
Through small hole spot imaging technology and image processing analysis, the problems of low detection accuracy, poor applicability and low efficiency in traditional detection methods are solved, and high-precision defect detection and automated analysis are realized. It is suitable for workpieces of various materials and complex shapes. .
Patent Information
- Application Number
- CN202510034829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional defect detection method in small holes has problems such as low detection accuracy, poor applicability and low efficiency, making it difficult to achieve high-precision defect identification and defect detection in deep holes or narrow spaces.
Using small hole spot imaging technology, a diffraction image is formed by laser passing through the small holes of the workpiece to be inspected. The image processing and analysis are performed using the imaging unit and the processing unit to extract the bright spot center area of the diffraction image, and polar coordinate system transformation and Hoff Circle fitting, calculate the actual center position, actual circularity and actual diameter of the ring, and determine whether there are defects in the workpiece.
It realizes high-precision identification of tiny defects on the surface of the workpiece, improves detection efficiency, realizes automated analysis, reduces manual dependence and misjudgment possibility, and is suitable for workpieces of various materials and complex shapes.
Smart Images

Figure CN119470473A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of small hole defect detection, and in particular to a method and system for quality detection of a perforated workpiece. Background Art
[0002] In modern machining processes, defects in small holes have a significant impact on the performance and safety of workpieces. Since small holes are usually difficult to detect directly, traditional methods mainly rely on manual inspection or simple optical inspection, which have the following problems: 1. Low detection accuracy: Manual detection is easily affected by subjective factors, and simple optical detection cannot achieve high-precision defect identification; 2. Poor applicability: Traditional detection technology is difficult to effectively detect defects in deep holes or narrow spaces, which often leads to missed detection; 3. Inefficiency: Manual inspection is slow and cannot meet the needs of large-scale production, affecting overall production efficiency. Summary of the invention
[0003] The purpose of the present invention is to provide an efficient and accurate method and system for detecting defects in perforated workpieces, which can give full play to the advantages of pinhole spot imaging technology and realize comprehensive detection of defects in deep holes and narrow spaces.
[0004] The technical solution adopted by the present invention is: A method for quality inspection of a perforated workpiece comprises the following steps: The laser passes through the small hole of the workpiece to be inspected to form a diffraction image, which appears as multiple layers of circular bright rings; projecting the diffraction image onto an imaging unit; The imaging unit transmits the diffraction image to the processing unit; The processing unit extracts the bright spot center area of the diffraction image, performs polar coordinate transformation on the original diffraction image according to the sub-pixel points in the bright spot center area to obtain a horizontal stripe image, extracts the midline sub-pixel coordinates of the horizontal stripe image, converts the extracted midline sub-pixel coordinates back to the original Cartesian image coordinates to obtain the trajectory midline of each layer of the circular ring, and calculates the actual center position, actual roundness and actual diameter of the circular ring according to the trajectory midline of each layer of the circular ring; The analysis unit analyzes the actual center position, actual roundness and actual diameter to determine whether the workpiece to be inspected has defects.
[0005] Furthermore, a method for projecting the diffraction image onto the imaging unit is to convert the diffraction light beam into parallel light by a collimating lens, and the parallel light is attenuated by an attenuation sheet before being projected onto the imaging unit.
[0006] Furthermore, the method for projecting the diffraction image onto the imaging unit is that the diffraction light beam is projected onto the imaging unit through an imaging screen.
[0007] Furthermore, the processing unit extracts the bright spot center area of the diffraction image through binarization processing.
[0008] Furthermore, the Steger algorithm is used to extract the midline sub-pixel coordinates of the horizontal stripe image.
[0009] Furthermore, the Hough circle fitting algorithm is used to calculate the actual center position, actual circularity and actual diameter of the ring according to the trajectory midline of each layer of the ring.
[0010] Furthermore, after the processing unit extracts the diffraction image, the method for determining whether the workpiece to be inspected has defects using at least one of the following methods includes: (1) Detect the ring structure of the diffraction image and identify the asymmetric or damaged areas; (2) Perform Fourier transform on the diffraction image to identify the corresponding relationship between abnormal frequency components and defects; (3) Perform deep learning classification on the diffraction image to infer the possible defect categories.
[0011] The technical solution also adopted in the present invention is: A system for quality inspection of a perforated workpiece, comprising: Laser, used to generate laser light to pass through the small hole of the workpiece to be inspected to form a diffraction image, and the diffraction image appears as a multi-layer circular bright ring; Projection unit; An imaging unit, used for receiving the diffraction image transmitted by the projection unit; A processing unit is used to extract the bright spot center area of the diffraction image, perform polar coordinate system transformation on the original diffraction image according to the sub-pixel points in the bright spot center area to obtain a horizontal stripe image, extract the midline sub-pixel coordinates of the horizontal stripe image, convert the extracted midline sub-pixel coordinates back to the original Cartesian image coordinates to obtain the trajectory midline of each layer of circular rings, and calculate the actual center position, actual roundness and actual diameter of the circular ring according to the trajectory midline of each layer of circular rings; The analysis unit is used to quantitatively analyze the actual center position, actual roundness and actual diameter to determine whether the workpiece to be inspected has defects.
[0012] The beneficial effects of the present invention are: The present invention provides a non-contact workpiece defect detection method based on circular hole diffraction image analysis, which has many significant beneficial effects. Its main advantages include high-precision identification of tiny defects on the surface of workpieces, improved detection efficiency, automated analysis, and reduced manual dependence and the possibility of misjudgment. The method is applicable to workpieces of various materials and complex shapes, has good environmental adaptability and cost-effectiveness, and significantly improves the level of intelligence and refinement in the manufacturing industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of the system structure for detecting the quality of a perforated workpiece used in Example 1 of the present invention; Figure 2 A schematic diagram of the structure of a system for detecting the quality of a perforated workpiece used in Embodiment 3 of the present invention; In the figure: 1. Processing unit; 2. Imaging unit; 3. Attenuation plate; 4. ToF laser ranging unit; 5. Collimating lens; 6. Dark box; 7. Tripod; 8. Workpiece to be measured; 9. Laser; 10. Imaging screen with marking points; 11. Imaging lens. DETAILED DESCRIPTION
[0014] The present invention is described in detail below in conjunction with embodiments, but the protection scope of the present invention is not limited to the scope described in the embodiments.
[0015] The technical solution of the present invention is: The hardware components of the system include a laser, a PC, a GigE camera, an imaging lens, an attenuation sheet, a collimating lens, a laser rangefinder and a tripod, which work together to achieve high-precision optical measurement and imaging.
[0016] First, the laser beam required for detection is generated by the laser, which is a prerequisite for realizing the internal detection of the pinhole. Secondly, a high-performance GigE camera is used in conjunction with the imaging lens to capture the spot image generated by the pinhole diffraction phenomenon. In order to adapt to different lighting environments and avoid image overexposure, the system also includes an attenuation plate to adjust the intensity of light passing through the collimating lens. The function of the collimating lens is to convert the laser beam into parallel light to improve the accuracy and repeatability of the overall measurement. In addition, the laser rangefinder is used to ensure the correct distance between the equipment and the workpiece being measured, thereby ensuring the clarity and accuracy of the imaging. Finally, the entire device is supported by a stable tripod to ensure the stability and accuracy of the system during operation. The close cooperation of these components enables this system to effectively detect pinhole defects, thereby greatly improving the inspection efficiency and quality control level of workpieces.
[0017] The working principle of the system is to use the small hole diffraction phenomenon generated when the laser passes through the small hole of the workpiece. The multi-layer circular bright ring formed by the laser is modulated by the collimating lens, and then the light intensity is adjusted by the attenuation plate, and then projected onto the camera by the imaging lens. Image processing and defect recognition are performed through software. The specific steps are as follows: S1: The laser emitted by the laser passes through the small hole of the workpiece, causing the small hole diffraction phenomenon, forming a multi-layer circular bright ring; S2: The collimating lens converts the light beam into parallel light, improving the measurement accuracy and stability; S3: The light beam passes through the attenuation sheet to attenuate the light intensity to adapt to the dynamic range of the camera and avoid overexposure; S4: The imaging lens projects the light spot image onto the image plane of the camera; S5: The camera captures the diffraction ring image and transmits it to the PC for processing via the GigE interface; S6: The software extracts the bright spot center area through binarization processing; S7: Fit the sub-pixel center point of the bright spot area; S8: transform the original image into a polar coordinate system according to the center point extracted in S7, convert the original Cartesian pixel coordinates into polar coordinates, so that the original circular image becomes a horizontal stripe image with different intensities; S9: Using the Steger algorithm to extract the midline sub-pixel coordinates of the fringe image from the image after S7; S10: converting the extracted midline back to the original Cartesian image coordinate system to obtain the trajectory midline of each layer of the ring; S11: using the Hough circle fitting algorithm to obtain the center, circularity, diameter and other parameters of the ring using the trajectory centerline obtained in S10; S12: Analyze the obtained data in combination with the diffraction image to determine whether the workpiece has defects.
[0018] Example 1 like Figure 1 As shown, the laser beam emitted by the laser 9 in the system first passes through the small hole of the workpiece 8 to be measured, and the small hole diffraction phenomenon generated thereby is the key to the entire system.
[0019] When a laser beam passes through a pinhole, due to the wave nature of light waves, a diffraction effect will occur at the edge of the pinhole, forming a series of light rings with specific geometric patterns. These patterns, usually appearing as multiple layers of circular bright rings, are the result of the interaction between the light wavefront and the pinhole boundary. The shape and size of the diffraction pattern are directly related to the size and shape of the pinhole, so it can be used to accurately measure the characteristics of the pinhole.
[0020] The collimating lens 5 in the system converts the diffracted light beam emitted from the pinhole into parallel light to ensure the stability and uniformity of the light beam during propagation. The collimated parallel light beam will then pass through the attenuation plate 3. The main function of the attenuation plate 3 is to adjust the light intensity to avoid the problem of overexposure of the imaging device due to excessive light. By precisely controlling the attenuation plate 3, the intensity of light reaching the imaging unit 2 can be effectively adjusted to ensure high-quality images. The ToF laser ranging unit 4 is used to ensure the correct distance between the device and the workpiece to be measured, thereby ensuring the clarity and accuracy of the imaging. This process is completed in the darkroom 6, and the darkroom 6 can be fixed with a tripod 7 if necessary.
[0021] The processed light beam is projected onto the image plane, and the imaging unit 2 converts the optical image into a digital signal, forming a diffraction ring image that can be displayed and analyzed on a PC. This conversion is done by a high-performance GigE camera, which can capture high-resolution images and quickly transmit data via a Gigabit Ethernet interface.
[0022] In the system, software is crucial to the image processing and analysis process, ensuring that the image contrast is improved by adjusting parameters such as the exposure time, all of which are completed by the processing unit 1. In the initial stage of image processing, the image is first binarized, which divides the pixels in the image into bright and dark areas by setting a threshold, thereby highlighting the central bright spot area in the image. This area usually represents the center of the diffraction pattern and is the key to subsequent processing.
[0023] Next, the software will perform geometric fitting on this bright spot area to accurately determine the location of its center point. This step is achieved by identifying the set of bright spots in the binary image and applying a mathematical model to ensure the accuracy of subsequent conversion and analysis. After obtaining the center point, the software will perform a polar coordinate transformation on the image, which converts the pixel coordinates in the Cartesian coordinate system into polar coordinates. In polar coordinates, the original circular image that was symmetrical about the center is converted into a horizontal stripe image, and the different brightness of the stripes reflects the light intensity distribution of the circular ring in the original image.
[0024] Using the polar coordinate converted image, the software applies the Steger algorithm to extract image features. The Steger algorithm is an efficient sub-pixel line detection algorithm that can accurately identify and locate the centerline position of the stripes in the image. This step is achieved by calculating the image brightness gradient and curvature to ensure the precision and accuracy of line extraction. As a result, the sub-pixel coordinates of the centerline of each stripe are accurately recorded.
[0025] These centerline coordinates are then converted back to the original Cartesian image coordinate system. This step is done through an inverse transformation process, the goal is to accurately reproduce the trajectory centerline of each layer of rings in the original image. Based on these centerlines, the system further applies the Hough circle transform algorithm for circle fitting, thereby calculating the specific parameters of each ring, such as the actual center position, actual roundness, and actual diameter.
[0026] Quantitative analysis is performed based on the actual center position, actual roundness, actual diameter, etc. to determine the deviation from the preset standard value, and the deviation is used to preliminarily determine that the workpiece may have defects.
[0027] Example 2 In order to make the determination result more accurate and detailed, based on the preliminary determination in Example 1, at least one of the following determination methods may be combined: The ring structure of the diffraction image is detected. Based on the ring structure detection, the circular Hough transform is used to detect the integrity and offset of the bright ring and identify the asymmetric or damaged areas.
[0028] Perform Fourier transform on the diffraction image, analyze its frequency domain characteristics, and identify the corresponding relationship between abnormal frequency components and defects.
[0029] Based on the qualitative analysis of defects identified based on image features, the MobileNetV3 Large deep learning image classification model is trained using a training data set of known workpiece defects and normal samples. The model automatically extracts features from diffraction images and classifies them, inferring possible defect categories.
[0030] Finally, the quality of the perforated workpiece is evaluated based on Example 1 and combined with all the analysis results of this example. This advanced image processing and analysis technology not only improves the efficiency and accuracy of production quality control, but also greatly reduces the cost loss caused by human judgment errors. The automation and intelligence of the entire process shows that modern industrial production is increasingly dependent on advanced algorithms and software solutions to meet its accuracy and efficiency requirements.
[0031] Example 3 In this embodiment, the collimating lens 5 and the attenuation plate 3 are replaced with an imaging screen 10 with marking points on the basis of the embodiment 1, so as to achieve the decoupling of the optical path. The system architecture is as follows: Figure 2 As shown. The imaging lens 11 projects the diffraction pattern on the imaging screen 10 with the marking points onto the image plane, and the imaging unit 2 converts the optical image into a digital signal. Among them, the four corners of the imaging screen carry the positioning corner point information, and the homography matrix can be calculated by extracting the corner point position. The oblique view can be converted into the front view through the homography matrix. This method does not require the laser line and the camera to be coaxial, which reduces the requirements for equipment installation.
[0032] The specific implementation modes of the present invention are described in detail above, but the present invention is not limited to the above implementation modes. Various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A method for quality inspection of a perforated workpiece, characterized in that: The following steps are involved: The laser passes through the small hole of the workpiece to be inspected to form a diffraction image, which appears as multiple layers of circular bright rings; projecting the diffraction image onto an imaging unit; The imaging unit transmits the diffraction image to the processing unit; The processing unit extracts the bright spot center area of the diffraction image, performs polar coordinate system transformation on the original diffraction image according to the sub-pixel points in the bright spot center area to obtain a horizontal stripe image, extracts the midline sub-pixel coordinates of the horizontal stripe image, converts the extracted midline sub-pixel coordinates back to the original Cartesian image coordinates to obtain the trajectory midline of each layer of circular rings, calculates the actual center position, actual roundness and actual diameter of the circular rings according to the trajectory midline of each layer of circular rings, and the analysis unit analyzes the actual center position, actual roundness and actual diameter to determine whether the workpiece to be inspected has defects.
2. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: The method for projecting the diffraction image onto the imaging unit is that the diffraction light beam is converted into parallel light by a collimating lens, and the parallel light is attenuated by an attenuation sheet and then projected onto the imaging unit.
3. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: The method for projecting the diffraction image onto the imaging unit is that the diffraction light beam is projected onto the imaging unit through an imaging screen.
4. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: The processing unit extracts the bright spot center area of the diffraction image through binarization processing.
5. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: The Steger algorithm is used to extract the midline sub-pixel coordinates of horizontal stripe images.
6. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: The Hough circle fitting algorithm is used to calculate the actual center position, actual roundness and actual diameter of the ring according to the trajectory midline of each layer of the ring.
7. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: The method for determining whether the workpiece to be inspected has defects is to compare the actual center position, actual roundness, and actual diameter with the preset standard center position, standard roundness, and standard diameter, and calculate the deviation.
8. A method for quality inspection of a perforated workpiece according to claim 1, characterized in that: After the processing unit extracts the diffraction image, it also includes a method for determining whether the workpiece to be inspected has defects using at least one of the following methods: Detect ring structures in diffraction images to identify asymmetric or damaged areas; Perform Fourier transform on the diffraction image to identify the correspondence between abnormal frequency components and defects; Deep learning classification is performed on the diffraction images to infer the types of defects that exist.
9. A system for quality inspection of perforated workpieces, characterized in that: include: Laser, used to generate laser light to pass through the small hole of the workpiece to be inspected to form a diffraction image, and the diffraction image appears as a multi-layer circular bright ring; Projection unit; An imaging unit, used for receiving the diffraction image transmitted by the projection unit; A processing unit is used to extract the bright spot center area of the diffraction image, perform polar coordinate system transformation on the original diffraction image according to the sub-pixel points in the bright spot center area to obtain a horizontal stripe image, extract the midline sub-pixel coordinates of the horizontal stripe image, convert the extracted midline sub-pixel coordinates back to the original Cartesian image coordinates to obtain the trajectory midline of each layer of circular rings, and calculate the actual center position, actual roundness and actual diameter of the circular ring according to the trajectory midline of each layer of circular rings; The analysis unit is used to quantitatively analyze the actual center position, actual roundness and actual diameter to determine whether the workpiece to be inspected has defects.
Citation Information
Patent Citations
Visual inspection system and method for temperature controller casing
CN108844961A
Method and device for detecting micron-level defects of small-caliber inner wall and application
CN114113145A
Steel coil end face character recognition method and system based on lightweight feature extraction network
CN116311203A
Defect detecting device and defect detecting method
JP2012159491A
Methods and apparatuses for detecting classifying and measuring spot defects in an image of an object
US7162073B1
Cited By
Washing machine liner plate punching defect detection method
CN120107237A
A method for detecting punching defects of the inner liner plate of a washing machine
CN120107237B
Processing method, system and application for sparse compression reconstruction of ldi sub-pixel image
CN120447307B