A defect detection device for rotating parts

By employing rotational methods and multi-image synthesis technology, the efficiency and accuracy issues of surface defect detection have been resolved, enabling efficient and precise defect detection of rotating parts, applicable to a variety of rotating parts.

CN115901624BActive Publication Date: 2026-03-10NING XIA JU NENG ROBOTICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the efficiency and accuracy problems of surface defect detection. Traditional methods have drawbacks such as unsuitable focal length, limited imaging accuracy, slow calculation speed, high sample quantity requirements, and difficulty in detecting stains.

Method used

Defect detection of rotating parts is performed by rotating the intermediate body 360 degrees using a motor. The camera takes continuous pictures at a high frequency and extracts and marks defect features in the background software. By combining a line scan camera, a telecentric lens and a light source, multiple pictures are taken and images are synthesized. The software is developed using the VisualStudio development platform and the VIDI and VisionPro function packages.

Benefits of technology

It achieves efficient and accurate surface defect detection, reduces dependence on camera hardware resolution, improves detection efficiency and accuracy, reduces sample quantity requirements, and is suitable for the detection of various rotating parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115901624B_ABST
    Figure CN115901624B_ABST
Patent Text Reader

Abstract

This invention provides a defect detection device for rotating parts, comprising a detection frame, a photographing system, and a control system. The workpiece to be tested rotates inside the detection frame. The photographing system continuously and at high speed takes pictures of the side of the rotating part. The control system is equipped with vision software that extracts and synthesizes the test photos to obtain a side image of the workpiece, analyzes and calculates the results, and outputs the defect detection results. This invention uses a motor to rotate an intermediate body 360 degrees, while the camera continuously takes pictures at a frequency greater than 1000 Hz. After rotation, the pictures are synthesized to complete the image acquisition. In the background software processing, defect features are extracted and marked, enabling stable detection. This invention has a compact overall structure, high flexibility of each unit, is easy to debug, has strong compatibility, can be applied to the detection of various parts, has strong expandability, and requires minimal modifications to add more types of parts, resulting in high detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of measurement and testing technology, and specifically to a defect detection device for rotating parts. Background Technology

[0002] Defect detection includes planar defect detection and curved surface defect detection.

[0003] Planar defect detection involves illuminating the surface of a part with a light source and taking a photograph. Optical image analysis techniques are then used to identify, segment, and classify surface defects, enabling the detection, classification, and statistical analysis of these defects. However, planar defect detection technology is not applicable to the detection of curved surfaces.

[0004] Surface defect detection is a challenging area in defect detection technology. Compared to planar detection, curved surfaces create shadows when illuminated, which can interfere with the defect detection image. Furthermore, the distance between different positions on the curved surface and the camera varies, which can easily lead to focal length incompatibility. Additionally, the image accuracy is limited by the resolution of the photos taken by the camera. Moreover, traditional detection result processing systems use Tensorflow as the function package and Python as the software framework, resulting in slow computation speed, low operating efficiency, and high requirements for the number of samples, typically more than 1000.

[0005] Existing technology typically involves keeping the parts stationary while using a mechanism or robot with a camera to take multiple photos around the rotating body. This method can also achieve the task of capturing images of the parts. Its advantage is high flexibility, as the robot can both take photos and perform handling tasks. However, it has the drawback of being difficult to debug.

[0006] Existing technologies also use range sensors instead of cameras. By continuously sensing the height signal during the rotation of the part through the range sensor, and integrating and analyzing the collected signals, the detection function can also be achieved. Its advantages are lower cost and lower requirements for processing software; however, it has the disadvantage that it is not easy to detect stains on the surface of the part.

[0007] Therefore, a highly efficient surface defect detection device is needed. Summary of the Invention

[0008] This invention addresses the efficiency and accuracy issues in detecting defects on curved surfaces by providing a defect detection device for rotating parts. It detects defects in rotating parts through rotation, and by taking multiple photos, it overcomes the problem of focal length mismatch. Through multiple image synthesis, it obtains extremely high-resolution images, shifting the issue of image resolution depending on camera hardware to one dependent on shooting time. The invention uses a motor to rotate an intermediate body 360 degrees, while the camera continuously takes photos at a frequency greater than 1000Hz. After rotation, the images are synthesized to complete the image acquisition. In the background software processing, defect features are extracted and marked, enabling stable detection.

[0009] This invention provides a defect detection device for rotating parts, including a detection frame, a photographic system installed inside the detection frame, and a control system electrically connected to the photographic system. The workpiece to be tested is placed inside the detection frame and the photographic system is placed on one side of the workpiece to be tested. The workpiece to be tested rotates inside the detection frame. The photographic system takes pictures of the rotating workpiece to obtain test photos. The control system is equipped with vision software. The vision software extracts the test photos, synthesizes them to obtain a side image of the workpiece to be tested, and performs analysis and calculation to output the defect detection result of the workpiece to be tested.

[0010] The inspection frame includes an inspection frame body, a dark chamber connected above the inspection frame body, a barcode reader located on one side above the dark chamber, a gripper located in the dark chamber, a servo motor connected to the gripper, and an automatic door located at the top of the dark chamber. The automatic door can open and close automatically. The barcode reader is used to read the code on the workpiece to be tested and transmit the code to the vision software.

[0011] The imaging system includes a line scan camera set in a darkroom, a telecentric lens assembled at the front end of the line scan camera, a light source set on one side of the telecentric lens, and the line scan camera set on one side of the workpiece to be tested.

[0012] After the workpiece to be tested passes through the barcode reader, it is placed in the darkroom. The gripper clamps the workpiece and transmits power from the servo motor to rotate it. At the same time, the line scan camera takes a side view of the workpiece to obtain a test photo.

[0013] In a preferred embodiment of the rotary part defect detection device of the present invention, a servo motor is positioned below the workpiece to be tested and is collinear with the central axis of the workpiece to be tested. The axis of the line scan camera is collinear with a horizontal diameter of the workpiece to be tested. The workpiece to be tested rotates 360° under the drive of the servo motor. The light source is set with a horizontal rotational degree of freedom.

[0014] The gripper is positioned in the middle of the workpiece to be tested, and the gripper includes both release and clamping functions.

[0015] An automatic door covers the entire ceiling of the darkroom. The automatic door can be opened and closed. When the automatic door is open, the workpiece to be tested can be placed or removed. When the automatic door is closed, the illuminance of the darkroom is less than 10 LUX.

[0016] The rotating part defect detection device of the present invention, as a preferred embodiment, further includes a button box disposed on the side of the darkroom and a chassis cabinet disposed below the button box. The button box includes a box body and an emergency stop button, a manual / automatic knob, a motor forward rotation button, a motor reverse rotation button, a protective cover cylinder button, and a working position cylinder button disposed on the box body.

[0017] The emergency stop button is used to immediately stop the defect detection device or restore it to normal operation. The manual / automatic knob is used to give or take away the user's manual control authority. When the user has manual control authority, the motor forward button, motor reverse button, protective cover cylinder button, and working position cylinder button are all disabled. The motor forward button is used to make the servo motor rotate clockwise, the motor reverse button is used to make the servo motor rotate counterclockwise, the protective cover cylinder button is used to change the opening and closing state of the automatic door, and the working position cylinder button is used to change the opening and closing state of the gripper.

[0018] In a preferred embodiment of the defect detection device for rotating parts described in this invention, the control system communicates with a line scan camera. When the control system receives a detection indication signal, it triggers the line scan camera to take pictures, obtaining at least two test photos. The vision software extracts the test photos and performs image synthesis, image preprocessing, and spot removal before finding defect points and outputting the defect detection result of the workpiece to be tested.

[0019] The defect detection device for rotating parts described in this invention, as a preferred embodiment, uses the following image synthesis method: synthesizing images based on pixel synthesis to obtain a synthesized image;

[0020] P = (ftw)h;

[0021] Where P is the resolution of the synthesized image, f is the shooting frequency, t is the shooting duration, w is the width of each image, and h is the height of each image.

[0022] In the preferred embodiment of the defect detection device for rotating parts described in this invention, the width accuracy of the synthesized image is Pw and the height accuracy is Ph.

[0023] Pw = π * d / (ftw);

[0024] Ph = H / h;

[0025] Where d is the diameter of the workpiece to be tested, and H is the height of the workpiece to be tested.

[0026] The defect detection device for rotating parts according to the present invention, as a preferred embodiment, uses a linear superposition processing method for image preprocessing, which includes the following steps:

[0027] S1. Based on the width and height of the composite image, set the width reduction ratio p and the height reduction ratio q of the reduced composite image. The width * height of the composite image is w1 * h1, and the width * height of the reduced composite image is w2 * h2.

[0028] S2. Search along the width direction of the synthesized image from index 0 to index (w-1), and let the round(x) function round to the nearest integer.

[0029] g(round(x / p), y) = 1 / nΣf1(x, y); where n is the number of integers obtained by rounding p from the original image.

[0030] After iterative calculation, we obtain an image with width * height = w2 * h1, which we denote as g = f2(x,y);

[0031] S3. Perform another loop search on the height direction of the synthesized image, starting from index 0 and searching up to index (h-1) in the height direction of image f2;

[0032] g(x,round(y / q))=1 / mΣf2(x,y); where m is the number of integers that are the same after dividing the f2 graph by q and rounding them.

[0033] After iterative calculation, the scaled-down composite image is obtained. The width and height of the scaled-down composite image are w2 * h2, and the grayscale value g is f3(x,y).

[0034] In the preferred embodiment of the defect detection device for rotating parts described in this invention, in step SⅠ, p = w1 / w2 and q = h1 / h2.

[0035] The defect detection device for rotating parts according to the present invention, as a preferred embodiment, includes the following steps for eliminating blemishes:

[0036] SⅠ. Binarize the reduced composite image and set the noise, background, and size of the spots to be removed;

[0037] SⅡ, using a mask of size (w3+2)*(h3+2), start searching from the origin of the scaled-down composite image, where w3 is the width of the removed speckle and h3 is the height of the removed speckle;

[0038] If all values ​​at the edge are 0, assign 0 to all gray values ​​of 1 within the edge; otherwise, proceed to the next position to search.

[0039] SⅢ. After deleting all the blemishes, the blemish removal is complete, and a side image of the workpiece to be tested is obtained.

[0040] The defect detection device for rotating parts described in this invention, as a preferred embodiment, includes the following defect detection results for the workpiece to be tested: number of images taken, number of tests, test results, total number of tests, number of qualified products, number of unqualified products, pass rate, number of defects in each area, and marked defect locations.

[0041] The vision software is developed on the Visual Studio platform, using the .NET 6 software framework, and combining the VIDI and VisionPro feature packages.

[0042] This technical solution includes a testing frame and a photographic system. The photographic system is located inside the testing frame. The testing frame can provide a good testing environment for the photographic system, and at the same time, it can clamp the parts and provide the parts with the power to rotate 360 ​​degrees.

[0043] The inspection frame includes a darkroom, an automatic door, grippers, a servo motor, a button box, and a cabinet. The automatic door is located above the darkroom and can open or close automatically. The grippers are positioned at the center of the part and have horizontal rotational freedom, enabling them to center the part and transmit motor power. The servo motor is located below the grippers and transmits power through a rigid connection. The darkroom blocks external light, ensuring that the ambient light level for inspection is less than 10 LUX. Users can operate the inspection device through the button box. The cabinet contains a PLC and controller, which can perform logic control on the defect inspection device.

[0044] The imaging system includes a line scan camera, a telecentric lens, and a light source. The telecentric lens is mounted on the line scan camera, which is positioned on the side of the part to be measured. The light source is positioned on the side of the line scan camera and has a horizontal rotational degree of freedom. Users can manually adjust the light source to ensure that the light source's focal point is positioned at the camera's focal point.

[0045] Users can, as needed, align the workpiece with the code reader 11 to read the code before inspection, and the part code will then be transmitted to the vision software.

[0046] The button box has one emergency stop button, four function buttons, and one knob. Pressing the emergency stop button will immediately stop the entire defect detection device. Releasing the emergency stop button will restore the entire defect detection device to normal operation. Turning the knob to the left grants the user manual control, and the other four function buttons can be used. Turning the knob to the right deprives the user of manual control, and the other four buttons become unusable (they have no effect after being pressed). Pressing the forward rotation button will rotate the servo motor clockwise, and pressing the reverse rotation button will rotate the servo motor counterclockwise. Pressing the protective cover cylinder button will close the automatic door if it is open, and open it if it is closed. Pressing the workpiece positioning cylinder button will close the gripper if it is open, and open it if it is closed.

[0047] This invention designs a defect detection mechanism specifically for rotating parts, consisting of a line scan camera, a line scan light source, and a servo motor. The motor rotates, causing the intermediate part to rotate 360 ​​degrees. The camera continuously takes pictures at a frequency greater than 1000Hz. After rotation, the images are combined to complete the image acquisition. In the background software processing, deep learning is used to extract and label defect features. After multiple training sessions, stable detection can be achieved.

[0048] This invention develops a defect detection software. Visual Studio was used as the development platform, and the .NET 6 software framework was adopted, combined with the VIDI and VisionPro feature packages, to complete the software development.

[0049] The PC communicates with the Siemens 1200 PLC via the S7 protocol. When the PC receives a request signal from the PLC, it triggers the camera to take a picture through the camera interface. The picture frequency is 1024Hz, and the total duration is 18 seconds. The resolution of each picture is 1*4096 pixels (width*height), ensuring that the image recognition accuracy is within 0.1mm.

[0050] This invention is universal and applicable to defect detection of most rotating parts. It obtains high-resolution images by continuously taking pictures while rotating. The software development is based on Visual Studio as the development platform, adopts the .Net 6 software framework, and combines VIDI and VisionPro function packages to complete the software development. The software runs fast and requires a small number of samples.

[0051] The present invention has the following advantages:

[0052] (1) This invention detects defects in rotating bodies by rotating them and solves the problem of mismatched focal length by taking multiple photos.

[0053] (2) The overall structure of this invention is compact and suitable for both manual inspection scenarios and automated interfaces (automatic doors can open and close automatically, and the control system can communicate with the line scanning camera), and can be integrated with the production line; each unit has a high degree of flexibility and is easy to debug; it has strong compatibility and can be used for the inspection of a variety of parts; it has strong expandability and does not require major modifications if it is necessary to add more varieties; it has high inspection efficiency, and when a part is placed in the inspection device, the motor drives the part to rotate quickly once to complete the inspection.

[0054] (3) This invention obtains extremely high resolution photos through multiple synthesis, transforming the problem that photo resolution depends on the camera hardware itself into a problem that photo resolution depends on the shooting time. As long as the user provides a long enough shooting time, the accuracy will be high enough.

[0055] (4) This invention uses Visual Studio as the development platform and adopts the .Net 6 software framework. It combines VIDI and VisionPro function packages to complete the software development. The software runs fast and its own algorithm parameters have been trained with a large number of samples. Only a small number of field samples are needed to complete the training. The number of samples is required to be less than 100. Attached Figure Description

[0056] Figure 1 This is a side cross-sectional schematic diagram of a defect detection device for rotating parts.

[0057] Figure 2 A top view of a defect detection device for rotating parts;

[0058] Figure 3 A front view of a defect detection device for rotating parts;

[0059] Figure 4 Schematic diagram of a button box for a defect detection device for rotating parts;

[0060] Figure 5 This is an image processing flowchart for a defect detection device for rotating parts.

[0061] Figure 6 A flowchart for a defect detection device for rotating parts, showing the process of eliminating blemishes.

[0062] Figure 7 This is a visual software interface diagram for a defect detection device for rotating parts.

[0063] Figure 8 This is a defect image of a workpiece to be tested in a defect detection device for rotating parts.

[0064] 1. Inspection frame; 11. Inspection frame body; 12. Darkroom; 13. Code reader; 14. Gripping gripper; 15. Servo motor; 16. Automatic door; 17. Button box; 171. Box body; 172. Emergency stop button; 173. Manual / automatic knob; 174. Motor forward rotation button; 175. Motor reverse rotation button; 176. Protective cover cylinder button; 177. Working position cylinder button; 18. Cabinet; 2. Imaging system; 21. Line scan camera; 22. Telecentric lens; 23. Light source. Detailed Implementation

[0065] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0066] Example 1

[0067] like Figures 1-4 As shown, a defect detection device for rotating parts includes a detection frame 1, a photographic system 2 installed inside the detection frame 1, and a control system electrically connected to the photographic system 2. The workpiece to be tested is installed inside the detection frame 1 and the photographic system 2 is installed on one side of the workpiece to be tested. The workpiece to be tested rotates inside the detection frame 1. The photographic system 2 takes pictures of the rotating workpiece to obtain test photos. The control system is equipped with vision software. The vision software extracts the test photos, synthesizes them to obtain a side image of the workpiece to be tested, and performs analysis and calculation to output the defect detection result of the workpiece to be tested.

[0068] like Figures 1-4 As shown, the inspection frame 1 includes an inspection frame body 11, a dark chamber 12 connected above the inspection frame body 11, a barcode reader 13 disposed on one side above the dark chamber 12, a gripper 14 disposed in the dark chamber 12, a servo motor 15 connected to the gripper 14, and an automatic door 16 disposed on the top of the dark chamber 12. The automatic door 16 can open and close automatically. The barcode reader 13 is used to read the code of the workpiece to be tested and transmit the code to the vision software.

[0069] like Figures 1-2 As shown, the imaging system 2 includes a line scan camera 21 installed in the darkroom 12, a telecentric lens 22 assembled at the front end of the line scan camera 21, a light source 23 installed on one side of the telecentric lens 22, and the line scan camera 21 installed on one side of the workpiece to be tested.

[0070] After the workpiece to be tested passes through the barcode reader 13, it is placed in the dark chamber 12. The gripper 14 clamps the workpiece to be tested and transmits the power of the servo motor 15 to drive the workpiece to be tested to rotate. At the same time, the line scan camera 21 takes a side view of the workpiece to obtain a test photo.

[0071] The servo motor 15 is positioned below the workpiece to be tested and is collinear with the central axis of the workpiece. The axis of the line scan camera 21 is collinear with a horizontal diameter of the workpiece to be tested. The workpiece to be tested rotates 360° under the drive of the servo motor 15. The light source 23 is set with a horizontal rotational degree of freedom.

[0072] The gripper 14 is positioned in the middle of the workpiece to be tested, and the gripper 14 includes both a release function and a clamping function.

[0073] Automatic door 16 covers the top of the entire darkroom 12. Automatic door 16 can be opened and closed. When automatic door 16 is open, the workpiece to be tested can be put in or taken out. When automatic door 16 is closed, the illuminance of darkroom 12 is less than 10 LUX.

[0074] like Figure 4 As shown, the testing frame 1 also includes a button box 17 disposed on the side of the darkroom 12 and a chassis cabinet 18 disposed below the button box 17. The button box 17 includes a box body 171 and an emergency stop button 172, a manual / automatic knob 173, a motor forward rotation button 174, a motor reverse rotation button 175, a protective cover cylinder button 176, and a working position cylinder button 177 disposed on the box body 171.

[0075] The emergency stop button 172 is used to immediately stop the defect detection device from running or restore it to normal operation. The manual / automatic knob 173 is used to allow the user to gain or lose manual control authority. When the user gains manual control authority, the motor forward button 174, motor reverse button 175, protective cover cylinder button 176, and working position cylinder button 177 are all disabled. The motor forward button 174 is used to make the servo motor 15 rotate clockwise, the motor reverse button 175 is used to make the servo motor 15 rotate counterclockwise, the protective cover cylinder button 176 is used to change the opening and closing state of the automatic door 16, and the working position cylinder button 177 is used to change the opening and closing state of the gripper 14.

[0076] The control system communicates with the line scan camera 21. When the control system receives the detection indication signal, the control system triggers the line scan camera 21 to take pictures and obtain at least two test photos. The vision software extracts the test photos and performs image synthesis, image preprocessing, and spot removal before finding the defect points and outputting the defect detection results of the workpiece to be tested.

[0077] The method for image compositing is to synthesize images based on pixels to obtain a composite image;

[0078] P = (ftw)h;

[0079] Where P is the resolution of the synthesized image, f is the shooting frequency, t is the shooting duration, w is the width of each image, and h is the height of each image.

[0080] The width precision of the synthesized image is Pw, and the height precision is Ph;

[0081] Pw = π * d / (ftw);

[0082] Ph = H / h;

[0083] Where d is the diameter of the workpiece to be tested, and H is the height of the workpiece to be tested;

[0084] like Figure 5 As shown, the image preprocessing method uses linear superposition and includes the following steps:

[0085] S1. Based on the width and height of the composite image, set the width reduction ratio p and the height reduction ratio q of the reduced composite image. The width * height of the composite image is w1 * h1, and the width * height of the reduced composite image is w2 * h2.

[0086] S2. Search along the width direction of the synthesized image from index 0 to index (w-1), and let the round(x) function round to the nearest integer.

[0087] g(round(x / p), y) = 1 / nΣf1(x, y); where n is the number of integers obtained by rounding p from the original image.

[0088] After iterative calculation, we obtain an image with width * height = w2 * h1, which we denote as g = f2(x,y);

[0089] S3. Perform another loop search on the height direction of the synthesized image, starting from index 0 and searching up to index (h-1) in the height direction of image f2;

[0090] g(x,round(y / q))=1 / mΣf2(x,y); where m is the number of integers that are the same after dividing the f2 graph by q and rounding them.

[0091] After iterative calculation, the scaled-down composite image is obtained. The width * height of the scaled-down composite image is w2 * h2, and the gray level g is f3(x,y).

[0092] In step SⅠ, p = w1 / w2, q = h1 / h2;

[0093] like Figure 6 As shown, the method for removing blemishes includes the following steps:

[0094] SⅠ. Binarize the reduced composite image and set the noise, background, and size of the spots to be removed;

[0095] SⅡ, using a mask of size (w3+2)*(h3+2), start searching from the origin of the scaled-down composite image, where w3 is the width of the removed speckle and h3 is the height of the removed speckle;

[0096] If all values ​​at the edge are 0, assign 0 to all gray values ​​of 1 within the edge; otherwise, proceed to the next position to search.

[0097] SⅢ. After deleting all the blemishes, the blemish removal is complete, and the side image of the workpiece to be tested is obtained.

[0098] The defect detection results of the workpiece under test include the number of images taken, the number of tests, the test results, the total number of tests, the number of qualified products, the number of unqualified products, the pass rate, the number of defects in each area, and the marked defect locations;

[0099] like Figures 7-8 As shown, the vision software is developed on the Visual Studio platform, using the .NET 6 software framework, and combining the VIDI and VisionPro feature packages.

[0100] Example 2

[0101] like Figure 1 As shown, a defect detection device for rotating parts includes a detection frame 1 and a photographic system 2. The photographic system is installed inside the detection frame, which provides a stable detection environment for the photographic system. At the same time, the detection frame drives the parts to rotate.

[0102] like Figure 1 As shown, the inspection frame includes an inspection frame body 11, a dark chamber 12, a barcode reader 13, a gripper 14, a servo motor 15, an automatic door 16, a button box 17, and an electrical control cabinet 18. The automatic door is located above the dark chamber 12 and can open or close automatically. The gripper 14 is located at the center of the part to be tested 12 and has a horizontal rotational degree of freedom, which can center the part and transmit motor power. The servo motor 15 is located below the gripper 14 and transmits power through a rigid connection. The dark chamber 12 can block external light and ensure that the illuminance of the inspection environment is less than 10 LUX. The user can operate the inspection device through the button box 17. The cabinet 18 contains a PLC and a controller, which can perform logic control on the defect inspection device.

[0103] like Figure 2 As shown, to facilitate loading and unloading, an automatic door 16 is provided above the dark chamber 12 of the inspection frame. The automatic door consists of a bellows cover and a cylinder. The user can control the opening and closing of the automatic door as needed. When the automatic door is open, the user can perform material picking and feeding actions. When the automatic door is closed, the defect detection device can take pictures for inspection.

[0104] like Figure 3As shown, a button box 17 and an electrical control cabinet 18 are provided on the side of the inspection frame. Users can control the defect detection device through the buttons on the button box 17. The electrical control cabinet 18 contains a PLC and a controller, which can perform logic control on the entire defect detection device.

[0105] like Figure 4 As shown, the button box has one emergency stop button, four function buttons, and one knob. When the emergency stop button 172 is pressed, the entire defect detection device will immediately stop operating. When the emergency stop button 172 is released, the entire defect detection device will return to normal operation. When the knob 173 points to the left, the user gains manual control and the other four function buttons can be used. When the knob 173 points to the right, the user loses manual control and the other four buttons become unusable (they do not function after being pressed). When the forward rotation button 174 is pressed, the servo motor rotates clockwise. When the reverse rotation button 175 is pressed, the servo motor rotates counterclockwise. When the protective cover cylinder button 176 is pressed, if the automatic door 16 is in the open state, the automatic door 16 will close; if the automatic door 16 is in the closed state, the automatic door 16 will open. When the workpiece positioning cylinder button 177 is pressed, if the clamping gripper 14 is in the open state, the clamping gripper 14 will close; if the clamping gripper 14 is in the closed state, the clamping gripper 14 will open.

[0106] This invention designs a defect detection mechanism specifically for rotating parts, consisting of a line scan camera 21, a line scan light source 23, and a servo motor 15. The rotation of the motor 15 drives the intermediate part to rotate 360 ​​degrees, while the camera 21 continuously takes pictures at a frequency greater than 1000 Hz. After rotation, the images are combined to complete the image acquisition. In the background software processing, deep learning is used to extract and label defect features. After multiple training iterations, stable detection can be achieved.

[0107] This invention develops a defect detection software. Visual Studio was used as the development platform, and the .NET 6 software framework was adopted, combined with the VIDI and VisionPro feature packages, to complete the software development.

[0108] The PC communicates with the Siemens 1200 PLC via the S7 protocol. When the PC receives a request signal from the PLC, it triggers camera 21 to take a picture via the camera 21 interface. The picture frequency is 1024Hz, and the total duration is 18 seconds. Each picture captures an image with a resolution of width * height = 1 * 4096 pixels, ensuring an image recognition accuracy within 0.1mm.

[0109] The processing method of vision software is as follows:

[0110] 1. Image compositing section:

[0111] Using a line scan camera with a shooting frequency of 1024Hz for a total duration of 18 seconds, the resolution of each captured image is width * height = 1 * 4096 pixels. Therefore:

[0112] P=(ftw)h

[0113] After taking the photo, we obtained an image with a width * height of 18432 * 4096 = 7.55 * 10. 7 Pixel photos;

[0114] Based on the conversion relationship between pixels and precision, we have:

[0115] Pw=π*d / (ftw)=200mm*π / (1024HZ*18s*1pix)=0.034mm / pix

[0116] Ph=H / h=50mm / 4096pix=0.0122mm / pix

[0117] Therefore, the theoretical accuracy can reach within 0.1mm.

[0118] like Figure 5 As shown, the image preprocessing section:

[0119] After compositing the image, since the unit of the composite image is pixels and the aspect ratio is different from the actual ratio, a linear overlay method is used to process the image. Let the original image width * height = w1 * h1, and the reduced image width * height = w2 * h2. The gray value of the original image at any point (x, y) is g = f1(x, y).

[0120] The grayscale value of the image at any point (x, y) is:

[0121] The reduction ratio in the width direction is p = w1 / w2;

[0122] The scaling factor in the vertical direction is q = h1 / h2;

[0123] The search along the width of the original image starts from index 0 and extends to index (w-1).

[0124] Let the round(x) function be used to round to the nearest integer.

[0125] g(round(x / p),y)=1 / nΣf1(x,y); where n is the number of integers obtained by rounding p from the original image.

[0126] After iterative calculation, an image with width * height = w2 * h1 is obtained, denoted as g = f2(x,y);

[0127] Similarly, perform another loop search in the high direction:

[0128] The height direction of the f2 image starts from index 0 and moves to index (h-1). g(x,round(y / q))=1 / mΣf2(x,y); where m is the number of integers that are the same after rounding q in the f2 image. After iterative calculation, an image with width*height=w2*h2 is obtained, which is the image to be reduced.

[0129] Algorithms for removing image speckles:

[0130] like Figure 6 As shown, the user first needs to binarize the image. After binarization, 0 represents black and 1 represents white. The user can choose whether black or white is the noise, and the other color is used as the background. The size of the noise to be eliminated is set to width * height = w * h.

[0131] Suppose the user selected black as the background and white as the noise;

[0132] Using a mask of size (w+2)*(h+2), start searching from the image origin. When all values ​​at the edge are 0, assign 0 to all gray values ​​of 1 within the edge; otherwise, proceed to the next position to search.

[0133] After elimination, all blemishes with a size of w*h can be deleted, which makes it easier to find them later;

[0134] Software interface as Figure 7 As shown:

[0135] The left side image is a composite image of the part obtained by taking a picture with a line scan camera, and the right side is a model of the part. The numbers on the image represent the number of defects found in that area.

[0136] Figure 8 The image on the left is a magnified view of the interface, showing the marked defects on the parts.

[0137] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A device for detecting flaws in a part of a body of revolution, characterized in that: The utility model relates to a kind of detection frame (1), setting in the detection frame (1) inside photographing system (2) and with the control system of photographing system (2) electrical connection, workpiece to be tested is set in the detection frame (1) inside and photographing system (2) is set in workpiece to be tested one side, workpiece to be tested rotates in the detection frame (1) inside, photographing system (2) is photographed to rotating workpiece to be tested and obtains test photo, control system is provided with vision software, vision software extracts test photo and obtains workpiece to be tested side image after synthesis and carries out analysis and calculation and exports workpiece to be tested flaw detection result; The detection frame (1) includes a detection frame body (11), a darkroom (12) connected above the detection frame body (11), a code reader (13) arranged on one side above the darkroom (12), a clamping jaw (14) arranged in the darkroom (12), a servo motor (15) connected with the clamping jaw (14), and an automatic door (16) arranged on the top of the darkroom (12). The automatic door (16) can be automatically opened and closed. The code reader (13) is used for reading the code of the workpiece to be tested and transmitting the code to the vision software. The photographing system (2) includes a line-scan camera (21) arranged in the darkroom (12), a telecentric lens (22) assembled at the front end of the line-scan camera (21), and a light source (23) arranged on one side of the telecentric lens (22). The line-scan camera (21) is arranged on one side of the workpiece to be tested. After the workpiece to be tested passes through the code reader (13), it is placed in the darkroom (12). The clamping jaw (14) clamps the workpiece to be tested and transmits the power of the servo motor (15) to drive the workpiece to be tested to rotate. At the same time, the line-scan camera (21) takes a side photo of the workpiece to be tested to obtain the test photo. The control system communicates with the line-scan camera (21). When the control system receives an indication signal for detection, the control system triggers the line-scan camera (21) to take a photo, obtaining at least two test photos. The vision software extracts the test photos, performs image synthesis, image preprocessing, and speckle elimination, and then finds the flaw points to output the flaw detection result of the workpiece to be tested. The image synthesis method is based on pixel synthesis to obtain a synthesized image. ; Wherein, P is the resolution of the synthesized image, f is the photographing frequency, t is the photographing duration, w is the width of each photographing image, and h is the height of each photographing image.

2. The device for detecting flaws in a part of a body of revolution according to claim 1, characterized in that: The servo motor (15) is arranged below the workpiece to be tested and is collinear with the central axis of the workpiece to be tested. The axis of the line-scan camera (21) is collinear with a horizontal diameter of the workpiece to be tested. The workpiece to be tested rotates 360° under the drive of the servo motor (15). The light source (23) has a horizontal rotational degree of freedom. The clamping jaw (14) is arranged in the middle of the workpiece to be tested. The clamping jaw (14) includes a loosening function and a clamping function. The automatic door (16) covers the top of the darkroom (12), the automatic door (16) can be opened and closed, when the automatic door (16) is opened, the workpiece to be tested is put in or taken out, and when the automatic door (16) is closed, the illuminance of the darkroom (12) is less than 10LUX.

3. A device for detecting flaws in a part of a body of revolution according to claim 2, characterized in that: The detection frame (1) further comprises a button box (17) arranged on the side of the darkroom (12) and a cabinet (18) arranged below the button box (17), the button box (17) comprises a box body (171) and an emergency stop button (172), a manual / automatic knob (173), a motor forward rotation button (174), a motor reverse rotation button (175), a protective cover cylinder button (176) and a working to position cylinder button (177) arranged on the box body (171); The emergency stop button (172) is used for stopping the operation of the flaw detection device immediately or restoring the normal state, the manual / automatic knob (173) is used for enabling or disabling the manual control authority of the user, when the user obtains the manual control authority, the motor forward rotation button (174), the motor reverse rotation button (175), the protective cover cylinder button (176) and the working to position cylinder button (177) are all disabled, the motor forward rotation button (174) is used for rotating the servo motor (15) clockwise, the motor reverse rotation button (175) is used for rotating the servo motor (15) counterclockwise, the protective cover cylinder button (176) is used for changing the opening and closing state of the automatic door (16), and the working to position cylinder button (177) is used for changing the opening and closing state of the clamping jaw (14).

4. The device for detecting flaws in a part of a body of revolution according to claim 1, characterized in that: The width precision of the composite image is , the height precision is ; ; ; Wherein, d is the diameter of the workpiece to be tested, and H is the height of the workpiece to be tested.

5. The device for detecting flaws in a part of a body of revolution according to claim 1, characterized in that: The image preprocessing method is a processing method using linear superposition, and the image preprocessing method comprises the following steps: S1, according to the width and height of the synthesized image, reduce the width and height of the synthesized image to set the width direction reduction ratio p and the height direction reduction ratio q, the width*height of the synthesized image is w1*h1, and the width*height of the reduced synthesized image is w2*h2; S2, find from index 0 to index (w-1) in the width direction of the synthesized image, and set the round(x) function to round off; g(round(x / p),y)=1 / nΣf1(x,y); wherein n is the number of the same integer obtained by rounding off after the original image is divided by p; After loop calculation, an image with width*height=w2*h1 is obtained, which is set as g=f2(x,y); S3, find from index 0 to index (h-1) in the height direction of the synthesized image again; g(x,round(y / q))=1 / mΣf2(x,y); wherein m is the number of the same integer obtained by rounding off after f2 image is divided by q; After loop calculation, an image with width*height=w2*h1 is obtained. S4, obtain a reduced synthesis image, a gray scale of the reduced synthesis image is f3(x, y), and a width*height of the reduced synthesis image is w2*h2.

6. A device for detecting flaws in a part of a body of revolution according to claim 5, characterized in that: In step SⅠ, p=w1 / w2, q=h1 / h2.

7. The device for detecting flaws in a part of a body of revolution according to claim 1, characterized in that: The method for eliminating the speckle includes the following steps: SⅠ, perform binaryzation processing on the reduced synthesis image, and set the speckle, background and the size of the set-eliminated speckle; SⅡ, use a mask with a size of (w3+2)*(h3+2) to search from the origin of the reduced synthesis image, wherein w3 is the width of the eliminated speckle, and h3 is the height of the eliminated speckle; when the edges are all 0, assign the part with the gray scale of 1 in the edges to 0, otherwise, go to the next position to search; SⅢ, after deleting all the speckles, the elimination of the speckle is completed, and the side image of the workpiece to be tested is obtained.

8. The device for detecting flaws in a part of a body of revolution according to claim 1, characterized in that: The flaw detection result of the workpiece to be tested includes the number of image taking, the number of detection, the detection result, the total number of detection, the qualified number, the unqualified number, the qualified rate, the number of flaws in each area and the marked flaw position. The visual software is based on the VisiualStudio development platform, uses the software framework of.Net 6, and combines the VIDI and VisionPro function package.

Citation Information

Patent Citations

  • Optical element defect detection method based on machine vision technology

    CN109030495A

  • Visual detection method for blade surface pattern

    CN109900719A