A method and device for visually detecting surface defects of mechanical parts

By using a rotating suction cup and a clamping device combined with multiple inspection equipment at the same work station, all-round inspection of the gear shaft hole, meshing teeth, upper end face and lower end face is achieved, which solves the problem of incomplete detection and high misjudgment rate in the existing technology. problems, improving detection efficiency and accuracy.

CN117890303BActive Publication Date: 2024-09-27TIANJIN INST OF IND & INFORMATION TECH (TIANJIN ENERGY SAVING CENT TIANJIN IND & INFORMATION TECH BUREAU EDUCATION CENT)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410228944.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2024-09-27
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

The existing technology cannot simultaneously detect the shaft hole, meshing teeth, upper end face and lower end face of the gear at the same work station, resulting in incomplete detection, high misjudgment and missed determination rates, and large equipment costs and floor space.

Method used

A visual inspection method for surface defects of mechanical parts is designed. The multi-angle inspection of gears is realized through rotating suction cups and clamping devices. Multiple inspection equipment is used to collect and analyze images of different parts of the gears to ensure that the shaft holes, meshing teeth, Comprehensive inspection of the upper and lower end faces, and at least two inspections with different equipment to reduce the false detection rate.

Benefits of technology

It achieves all-round detection of gears, reduces equipment costs and floor space, improves detection efficiency and accuracy, avoids missed detections and misdetections, and ensures the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117890303B
    Figure CN117890303B
Patent Text Reader

Abstract

The present application provides a method and device for visually inspecting surface defects of mechanical parts, wherein the inspection device comprises a base plate, a gear bracket is arranged on the base plate, an inspection cavity is opened on the top of the gear bracket, an axial hole inspection device is arranged in the middle, and a plurality of meshing tooth inspection devices are arranged on the inner circumference of the inspection cavity; a rotating suction cup is arranged on the upper part of the inspection cavity, the rotating suction cup is connected to a fixed bracket, clamping devices are arranged on both sides of the fixed bracket, and a lower end face inspection device and an upper end face inspection device are respectively arranged on the gear bracket and the fixed bracket; the present application can realize all-round inspection of the axial hole, meshing tooth, upper end face and lower end face of the gear to be inspected at the same work station, thereby improving inspection efficiency, reducing the use cost of the equipment and reducing the floor space occupied by the equipment; the axial hole, meshing tooth, upper end face and lower end face are respectively inspected at least twice by different devices to avoid missed inspection and false inspection, thereby improving inspection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of parts inspection, and in particular to a method and device for visually inspecting surface defects of mechanical parts. Background Art

[0002] Mechanical parts, also known as mechanical elements, are the basic elements that constitute machinery and are inseparable single parts that make up machinery and machines. More specifically, parts are single components that cannot be separated, while components are combinations of parts that realize a certain action or function. Components can be one part or a combination of multiple parts. In this combination, there is a main part that realizes the given action or function, and other parts only play auxiliary roles such as connection, fastening, and guidance. In mechanical structures, most structures require transmission components, such as belt drives, chain drives, and gear drives. Among them, because gear drives are more accurate, efficient, compact, reliable, and have a long life, gear drives are the most widely used transmission form in mechanical transmission. Gears, as the most critical components in gear drives, often need to be tested before leaving the factory. The pre-factory inspection includes size, accuracy, burrs, etc. Usually, there is no automatic inspection of the cracking, damage, wheel surface, and shaft hole of the gears before leaving the factory. Most of them are manually inspected. Because the inspection indicators are not comprehensive, the safety assessment is not accurate enough, especially for large equipment, where gears play a key role.

[0003] With the development of technology, for safety reasons, some have begun to improve the cracking and damage of gears before leaving the factory. Detection is based on automated equipment, and visual inspection is usually used for detection. Visual inspection is a very effective method for detecting cracking and damage of gears. The image of the gear meshing teeth is obtained by camera photography, and then the captured image is processed to determine whether the gear has cracks or damage. After searching, the applicant has retrieved the closest prior art as follows: Chinese patent application number: CN202311050136.9, a multi-dimensional detection device and method for gear detection, discloses a technical solution, including a base plate; an upper portion of one end of the base plate A first detection component for visually inspecting the gear is installed; a steering component for driving the fixed component and the gear to rotate at multiple angles is installed on the upper middle part of the base plate; the upper end of the steering component is fixedly connected to the bottom of the fixed component, and the gear to be inspected is locked and installed on the fixed component; a second detection component for inspecting the flatness of the end of the gear and the distance from each tooth block of the gear to the center of a circle is installed on the upper other end of the base plate; the invention can realize the inspection of the gear teeth and the inspection of the gear end face; the flatness of the gear end and the distance from each tooth block to the center of a circle can be inspected; when inspecting the flatness of the gear end and the distance from each tooth block to the center of a circle, only one second detection component is required, and the operation method is simple.

[0004] This application solves the problem of manual inspection, but in this application, the gear needs to rotate when inspecting the meshing teeth of the gear, and all the meshing teeth cannot be inspected at the same time. In addition, because the setting of the fixed chuck, pressure plate, threaded column, and nut blocks the upper and lower end faces of the gear, it is impossible to inspect the upper and lower end faces of the gear for damage and cracks, and the shaft hole cannot be inspected.

[0005] After searching, the applicant did not find any technical solution that can simultaneously inspect the meshing teeth, upper end face, lower end face and shaft hole of the gear at the same workstation; and in the prior art, when a problem is identified by a visual recognition system, three solutions are usually adopted: the first is to directly define the gear as a defective product, which is prone to misjudgment and missed judgment, and has a low accuracy rate; the second is to move the gear out of the workstation and re-inspect it with the remaining visual equipment. In this step, the additional visual equipment requires additional cost and floor space, and gears without problems cannot be re-inspected; the third is to use the original visual equipment for re-inspection. If there is a problem with the original equipment, the result of re-inspection with the original equipment is still inaccurate, and the accuracy rate is low.

[0006] Therefore, it is necessary to provide a new technical solution to solve the above technical problems. Summary of the invention

[0007] The present application provides a method for visually detecting surface defects of mechanical parts, comprising the following steps:

[0008] S1: insert the shaft hole of the gear to be inspected to the outside of the inspection shaft, the lower end face of the gear contacts the inspection cavity, the shaft hole inspection device in the inspection shaft rotates, and images of various positions of the shaft hole are collected to obtain shaft hole inspection images. The shaft hole inspection device transmits the shaft hole inspection image to the processing device 1, and the processing device 1 analyzes the shaft hole inspection image to determine whether there are defects at various positions in the shaft hole; if there is a defect at any position in the shaft hole, the gear is moved out of the workstation, and if there is no defect, S2 is executed;

[0009] S2: The meshing teeth detection equipment distributed in an annular manner in the detection cavity simultaneously collects images of each meshing tooth of the gear, and the meshing teeth detection equipment transmits all the meshing teeth detection images to the second processing device, and the second processing device analyzes the meshing teeth detection images to determine whether each meshing tooth has defects;

[0010] S3: The rotating suction cup drives the gear to move upward. When there is a problem with any meshing tooth of the gear in S2, after the gear moves upward, the upper end surface detection device or the lower end surface detection device collects images of the defective parts of the meshing teeth to obtain meshing tooth detection image 1. The upper end surface detection device uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3 and 4 are sent to the control device for summary. The processing device 3 or the processing device 4 processes the meshing tooth detection image 1. Perform analysis, and when there is a defect in the meshing tooth detection image 1, move the gear out of the workstation; if there is no defect, replace another upper end surface detection device or lower end surface detection device to collect images of the meshing tooth defect position corresponding to the meshing tooth detection image to obtain the meshing tooth detection image 2, and the upper end surface detection device uploads the meshing tooth detection image 2 to the processing device 3 or the lower end surface detection device uploads the meshing tooth detection image 2 to the processing device 4, and the processing device 3 or the processing device 4 analyzes the meshing tooth detection image 2, and when there is a defect, move the gear out of the workstation; if there is no defect, jump to S4;

[0011] S4: The rotating suction cup drives the gear to rotate. When the gear rotates to match the tooth shape of the clamping devices on both sides, the clamping devices move to clamp the gear, and the rotating suction cup is reset.

[0012] S5: The upper end face detection device and the lower end face detection device simultaneously collect images of the upper end face and the lower end face of the gear to obtain an upper end face detection image and a lower end face detection image. The upper end face detection device sends the upper end face detection image to the third processing device, and the lower end face detection device sends the lower end face detection image to the fourth processing device. The third processing device and the fourth processing device analyze the upper end face detection image and the lower end face detection image respectively to analyze whether there are defects on the upper end face and the lower end face; if there are no defects on both the upper end face and the lower end face, the entire visual inspection is terminated; if there are defects at any position of the upper end face and / or the lower end face, jump to S6;

[0013] S6: The clamping device flips 180 degrees, driving the gear to flip so that the upper end face and the lower end face of the gear are adjusted. The upper end face detection device collects an image of the defect position of the lower end face of the gear to obtain a lower end face detection image 1 or / and the lower end face detection device collects an image of the defect position of the upper end face of the gear to obtain an upper end face detection image 1. The lower end face detection image 1 is uploaded to the processing device 3 and / or the upper end face detection image 1 is uploaded to the processing device 4. The processing device 3 and / or the processing device 4 analyze the lower end face detection image 1 and / or the upper and lower end face detection image 1 respectively to analyze whether there are defects on the upper end face and / or the lower end face. If there are defects, the gear is moved out of the workstation; if there are no defects, the gear is adsorbed by the rotating suction cup, and the clamping device is released. , the rotating suction cup drives the gear to rotate. After rotating a certain angle, the clamping device starts to clamp the gear. After clamping is completed, the rotating suction cup is reset. Another upper end face detection device and / or lower end face detection device respectively collects images of the defect position of the lower end face corresponding to the lower end face detection image and / or the defect position of the upper end face corresponding to the upper end face detection image to obtain lower end face detection image 2 and upper end face detection image 2, and transmits the upper end face detection image 2 to processing device 4 and / or the lower end face detection image 2 to processing device 3. Processing device 4 and / or processing device 3 continue to analyze upper end face detection image 2 and / or lower end face detection image 2 respectively. When there is no defect, the entire visual inspection is terminated; when there is a defect, the gear is moved out of the workstation.

[0014] As a preferred solution, when there is a defect in S1, the rotating suction cup drives the gear to move up, and the rotating suction cup drives the gear to rotate. When it cooperates with the tooth shape of the clamping devices on both sides, the clamping device moves to clamp the gear. After the clamping is completed, the rotating suction cup is reset, and the clamping device drives the gear to rotate. When it is tilted to a preset angle, the upper end face detection device or the lower end face detection device collects an image of the defect position of the shaft hole to obtain shaft hole detection image 1, and the upper end face detection device sends the shaft hole detection image 1 to the processing device 3 or the lower end face detection device sends the shaft hole detection image 1 to the processing device 4, and the processing device 3 or the processing device 4 collects the defect position of the shaft hole The hole detection image 1 is analyzed to see if there are defects. If there are defects, the gear is moved out of the workstation. If there are no defects, another upper end face detection device or a lower end face detection device is replaced to collect images of the defective position of the shaft hole corresponding to the shaft hole detection image to obtain shaft hole detection image 2. The upper end face detection device sends the shaft hole detection image 2 to the processing device 3 or the lower end face detection device sends the shaft hole detection image 2 to the processing device 4. The processing device 3 or the processing device 4 analyzes the shaft hole detection image 2 to see if there are defects. If there are defects, the gear is moved out of the workstation. If there are no defects, S2 is executed.

[0015] As a preferred solution, S1 includes: S11: inserting the shaft hole of the gear to be inspected into the inspection shaft, the lower end face of the gear contacts the inspection cavity, the shaft hole inspection device in the inspection shaft rotates, and images of various positions of the shaft hole are collected to obtain multiple shaft hole inspection images. The shaft hole inspection device transmits the shaft hole inspection image to the processing device 1, and the processing device 1 analyzes the shaft hole inspection image to determine whether there are defects at various positions in the shaft hole; S12: when there is no defect in the shaft hole in S11, the rotating suction cup drives the gear to move up, and the rotating suction cup drives the gear to rotate. When matching with the tooth shape of the clamping claws on both sides, the clamping claw of the clamping device moves to clamp the gear, the rotating suction cup is reset, and the clamping claw drives the gear to rotate. When tilted to a preset angle, the upper end face detection device or the lower end face detection device collects images of the inclined shaft hole to obtain shaft hole detection image 1, and the upper end face detection device sends shaft hole detection image 1 to processing device 3 or the lower end face detection device sends shaft hole detection image 1 to processing device 4; processing device 3 or processing device 4 analyzes shaft hole detection image 1 to determine whether there is a defect. If there is no defect, S2 is executed. If there is a defect, another upper end face detection device or lower end face detection device is replaced to collect images of the defective position of the shaft hole to obtain shaft hole detection image 2, and the upper end face detection device sends shaft hole detection image 2 to processing device 3 or the lower end face detection device sends shaft hole detection image 2 to processing device 4. Sent to processing device four; processing device three or processing device four analyzes shaft hole detection image two to analyze whether there is a defect. If there is a defect, the gear is moved out of the workstation. If there is no defect, S2 is executed; S13: When there is a defect in the shaft hole in S11, the rotating suction cup drives the gear to move up, and the rotating suction cup drives the gear to rotate, and cooperates with the tooth shape of the clamping claws on both sides. The clamping claws of the clamping device move to clamp the gear, the rotating suction cup is reset, and the clamping claw drives the gear to rotate. When it is tilted to a preset angle, the upper end face detection device or the lower end face detection device collects an image of the defective position of the shaft hole to obtain shaft hole detection image one, and the upper end face detection device sends shaft hole detection image one to processing device three or the lower end face detection device The first device sends the shaft hole detection image 1 to the processing device 4; the third processing device or the fourth processing device analyzes the shaft hole detection image 1 to determine whether there are defects. If there are defects, the gear is moved out of the workstation; if there are no defects, another upper end surface detection device or the lower end surface detection device is replaced to collect images of the defective position corresponding to the shaft hole in the shaft hole detection image to obtain the shaft hole detection image 2. The upper end surface detection device sends the shaft hole detection image 2 to the processing device 3 or the lower end surface detection device sends the shaft hole detection image 2 to the processing device 4; the third processing device or the fourth processing device analyzes the shaft hole detection image 2 to determine whether there are defects. If there are defects, the gear is moved out; if there are no defects, S2 is executed.

[0016] As a preferred solution, S3 includes: S31: rotating the suction cup to drive the gear to move upward, so that the gear is out of the detection cavity. When there are no defects in the meshing teeth of the gear, the upper end surface detection device or the lower end surface detection device moves to the position of the meshing teeth, collects images of the meshing teeth, and obtains meshing tooth detection image 1. The upper end surface detection device uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3, and 4 are sent to the control device. The processing device 3 or the processing device 4 analyzes the meshing tooth detection image 1; if there is no defect, it jumps to S4; if there is a defect, another upper end surface detection device or a lower end surface detection device is replaced to collect images of the defective position of the meshing tooth to obtain the meshing tooth detection image 2, and the meshing tooth detection image 2 is uploaded to the processing device 3 or the processing device 4; the processing device 3 or the processing device 4 analyzes the meshing tooth detection image 2; if there is a defect, the gear is moved out of the workstation; if there is no defect, it jumps to S4; S32: When the gear When any meshing tooth has a defect, after the gear moves up, the upper end surface detection device or the lower end surface detection device moves to the defective position of the meshing tooth, collects images of the defective position of the meshing tooth, and obtains meshing tooth detection image 1. The upper end surface detection device uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3, and 4 are sent to the control device for summary processing. The processing device 3 or the processing device 4 processes the meshing tooth detection image 1. Perform analysis, and when a defect is found, the gear is moved out of the workstation. When there is no defect, replace another upper end face detection device or lower end face detection device to continue image acquisition of the defect position of the meshing tooth corresponding to the meshing tooth detection image to obtain the meshing tooth detection image 2. The upper end face detection device transmits the meshing tooth detection image 2 to the processing device 3, and the lower end face detection device transmits the meshing tooth detection image 2 to the processing device 4. The processing device 3 or the processing device 4 analyzes the meshing tooth detection image 2. When a defect is found, the gear is moved out of the workstation; when there is no defect, jump to S4.

[0017] As a preferred solution, S5 includes S51: the upper end face detection device and the lower end face detection device move, and simultaneously collect images of the upper end face and the lower end face of the gear to obtain an upper end face detection image and a lower end face detection image, the upper end face detection device sends the upper end face detection image to the processing device three, and the lower end face detection device sends the lower end face detection image to the processing device four respectively, and the processing device three and the processing device four analyze the upper end face detection image and the lower end face detection image respectively to analyze whether there are defects in the upper end face and / or the lower end face; S52: S When there are no defects in 51, the clamping device is turned 180 degrees, driving the gear to turn over, so that the upper end face and the lower end face of the gear are adjusted, the upper end face detection device collects the image of the lower end face of the gear to obtain the lower end face detection image 1, the lower end face detection device collects the image of the upper end face of the gear to obtain the upper end face detection image 1, the upper end face detection device sends the lower end face detection image 1 to the processing device 3, the lower end face detection device sends the upper end face detection image 1 to the processing device 4, the processing device 3 and the processing device 4 respectively process the lower end face detection image 1 and the upper end face detection image 1. The surface inspection image is analyzed to determine whether there are defects on the upper end face and / or the lower end face. If there are no defects, the entire visual inspection is terminated. If there are defects, the gear is adsorbed by the rotating suction cup, the clamping device is released, and the rotating suction cup drives the gear to rotate. After rotating a certain angle, it cooperates with the tooth shape of the clamping claws of the clamping device on both sides. The clamping device moves to clamp the gear through the cooperation between the clamping claws and the meshing teeth. The rotating suction cup is reset, and the upper end face inspection device and / or the lower end face inspection device are moved to check the defect position of the lower end face and / or the upper end face. Image detection, obtain lower end face detection image 2 and / or upper end face detection image 2, the upper end face detection device transmits the lower end face detection image 2 to processing device 3 and / or the lower end face detection device transmits the upper end face detection image 2 to processing device 4, processing device 3 and / or processing device 4 analyze the lower end face detection image 2 and the upper end face detection image 2 respectively, when there is no defect, the entire visual inspection is terminated; when there is a defect, the gear is moved out of the workstation; S53: if there is a defect at any position of the upper end face and / or the lower end face in S51, jump to S6.

[0018] A visual inspection device for surface defects of mechanical parts comprises a base plate, a gear bracket is arranged on the base plate, an inspection cavity is opened on the top of the gear bracket, an axial hole inspection device is arranged in the middle of the inspection cavity, and a plurality of meshing tooth inspection devices are evenly arranged on the outside of the inspection cavity; a rotating suction cup is arranged on the upper part of the inspection cavity, the rotating suction cup is connected to a fixed bracket, clamping devices for clamping gears are arranged on both sides of the fixed bracket, and a lower end face inspection device and an upper end face inspection device are respectively arranged on the upper part of the gear bracket and the fixed bracket.

[0019] As a preferred solution, the shaft hole detection equipment includes a hollow detection shaft, which is connected to a rotating motor. A mounting rod is arranged inside the hollow detection shaft, a miniature detection camera is fixed on the mounting rod, and a detection port is arranged at a position corresponding to the hollow detection shaft and the miniature detection camera.

[0020] As a preferred solution, the meshing tooth detection device includes a meshing tooth detection bracket arranged in a detection cavity, and an industrial camera 1 is installed on the meshing tooth detection bracket.

[0021] As a preferred embodiment, the clamping device includes a telescopic motor, the end of which is connected to a U-shaped support plate, a rotating motor 1 is fixed on the U-shaped support plate, the rotating motor 1 is connected to a rotating shaft 1, the end of the rotating shaft 1 is connected to a fixed plate, the fixed plate is connected to a mounting plate, and a clamping claw is provided on the mounting plate.

[0022] As a preferred solution, the lower end surface detection device includes two Y-direction movable slide rails, each of which is provided with a Y-direction movable slide seat matched therewith, and the two Y-direction movable slide seats are provided with an X-direction slide rail, and the X-direction slide rail is provided with at least two X-direction slide seats, and the X-direction slide seat is provided with a lifting device, and a detection mounting plate is provided on the top of the lifting device, and a camera bracket is fixed on the detection mounting plate, and an industrial camera 2 is installed on the camera bracket, and the industrial camera 2 is connected to the camera bracket through a rotating shaft 2, and the rotating shaft 2 is connected to a rotating motor 3 The upper end surface detection equipment includes two Y-direction movable slide rails 2, the two Y-direction movable slide rails 2 are respectively provided with a Y-direction movable slide seat 2 cooperating therewith, the two Y-direction movable slide seats 2 are provided with an X-direction slide rail 2, the X-direction slide rail 2 is provided with at least two X-direction slide seats 2, the X-direction slide seat 2 is provided with a lifting device 2, the top of the lifting device 2 is provided with a detection mounting plate 2, the detection mounting plate 2 is fixed with a camera bracket 2, the camera bracket 2 is installed with an industrial camera 3, the industrial camera 3 is connected to the camera bracket 2 through a rotating shaft 3, and the rotating shaft 3 is connected to a rotating motor 4.

[0023] The present application can realize all-round detection of the shaft hole, meshing teeth, upper end face and lower end face of the gear to be inspected at the same work station, thereby improving detection efficiency, reducing the use cost of the equipment and reducing the equipment's footprint; when there are no defects in the shaft hole, meshing teeth, upper end face and lower end face, at least two inspections can be carried out through different equipment to avoid missed inspections and false inspections, thereby improving detection efficiency; the defective positions of the shaft hole, meshing teeth, upper end face and lower end face are inspected at least twice through different equipment to avoid false inspections at the defective positions, thereby improving the accuracy of visual inspection at the defective positions and avoiding a series of false inspections and wrong inspections caused by hardware and software problems; and each detection device corresponds to a different processing device to avoid the inability to continue inspecting the gear when hardware and software problems occur. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a structural diagram of angle 1 of state 1 of the present application;

[0025] Figure 2 This is a schematic diagram of the structure of the state 1 of the present application from the perspective 2;

[0026] Figure 3 This is a structural diagram of angle 1 of state 2 of the present application;

[0027] Figure 4 This is a structural diagram of angle 2 of state 2 of the present application;

[0028] Figure 5 It is a structural schematic diagram of the shaft hole detection device of the present application;

[0029] Figure 6 It is a schematic diagram of the structure of the clamping device of the present application;

[0030] Figure 7 is a structural schematic diagram of angle 1 of the upper end surface detection device of the present application;

[0031] Figure 8 It is a structural schematic diagram of angle 2 of the upper end surface detection device of the present application;

[0032] Fig. 9 It is a structural schematic diagram of the lower end surface detection device of the present application;

[0033] Fig.10 It is the logic block diagram of the shaft hole measurement method;

[0034] Fig.11 It is a logic block diagram of the meshing tooth measurement method;

[0035] Fig.12 It is a logic block diagram of the upper end face and lower end face measurement method;

[0036] Reference numerals:

[0037] 1. Gear; 2. Shaft hole; 3. Detection shaft; 4. Detection cavity; 5. Meshing teeth; 6. Rotating suction cup; 7. Upper end surface detection equipment; 8. Lower end surface detection equipment; 9. Clamping device; 10. Upper end surface; 11. Lower end surface; 12. Clamping claw; 13. Bottom plate; 14. Gear bracket; 16. Fixed bracket; 17. Hollow detection shaft; 18. Rotating motor; 19. Motor fixing plate; 20. Mounting rod; 21. Micro detection camera; 22. Detection port; 23. Dust cover; 24. Meshing teeth detection bracket; 25. Industrial camera 1; 26. Telescopic motor; 27. Telescopic motor fixing plate; 28. Vertical plate; 29. ​​Horizontal plate; 30. Rotating motor 1; 31. Rotating axis 1; 32. Fixed plate; 33. Mounting plate; 34. Y-axis moving slide rail 1; 35. Support leg; 36. Placement plate; 37. Y-axis moving slide seat 1; 38. X-axis slide rail 1; 39. X-axis slide seat 1; 40. Lifting device; 41. Detection mounting plate; 42. Camera bracket; 43. Industrial camera 2; 44. Rotating motor 3; 45. Y-axis moving slide rail 2; 46. Y-axis moving slide seat 2; 47. X-axis slide rail 2; 48. X-axis slide seat 2; 49. Lifting device 2; 50. Detection mounting plate 2; 51. Camera bracket 2; 52. Industrial camera 3; 54. Rotating motor 4. DETAILED DESCRIPTION

[0038] The following combination Figure 1 — Fig.12 The specific implementation of the present invention is described in detail. It should be noted that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.

[0039] Embodiment 1:

[0040] The present embodiment provides a method for visual inspection of surface defects of mechanical parts, more specifically, a method for visual inspection of surface defects of gears, comprising the following steps: S1: inserting the shaft hole 2 of the gear 1 to be inspected into the outer side of the inspection shaft 3 through an external clamping device, an adsorption device, etc., the lower end face 11 of the gear 1 is in contact with the inspection cavity 4, the shaft hole inspection device in the inspection shaft 3 is rotated, and images of various positions of the shaft hole 2 are collected to obtain multiple shaft hole inspection images, the shaft hole inspection device transmits the shaft hole inspection images to a processing device 1, and the processing device 1 analyzes the shaft hole inspection images to determine whether there are defects at various positions in the shaft hole 2; defects include cracks, because the existence of cracks makes the gear 1 prone to breakage during use, thereby causing a safety accident; when there is a defect, the gear 1 is removed by an external device as an unqualified gear, and when there is no defect, S2 is executed;

[0041] S2: The meshing teeth detection equipment distributed in an annular manner in the detection chamber 4 simultaneously collects images of all the meshing teeth 5 of the gear 1 to obtain a plurality of meshing teeth detection images. The meshing teeth detection equipment transmits all the meshing teeth detection images to the processing device 2, and the processing device 2 analyzes the meshing teeth detection images to determine whether there are defects at various positions of the meshing teeth 5. The defects of the meshing teeth 5 include cracks, pits, knife marks, scratches, etc. The presence of pits, knife marks, and scratches reduces the contact area of ​​the meshing teeth 5 and forms stress concentration on the meshing teeth, resulting in an increase in the actual contact stress. Subsequent use is likely to cause pitting and the like, affecting the service life of the gear 1. Cracks are likely to cause the gear 1 to crack, thereby causing a safety accident. In this step, each meshing tooth 5 can be detected at the same time, and there is no need for the gear 1 to rotate for detection, thereby improving the detection efficiency. The accuracy of static detection is higher, thereby avoiding inaccurate image acquisition during rotation, resulting in missed detection, wrong detection, etc.

[0042] S3: The rotating suction cup 6 drives the gear 1 to move upward, so that the gear 1 is separated from the detection chamber 4. The rotating suction cup 6 can drive the gear 1 to move up and down, and can rotate to adjust the angle of the gear 1. It belongs to conventional equipment in the prior art. This application does not make any improvement to it, and it is not described here. When any meshing tooth 5 of the gear 1 has a defect, after the gear 1 moves upward, the upper end surface detection device 7 or the lower end surface detection device 8 moves to the position where the meshing tooth 5 has a defect, and the image of the defective position of the meshing tooth 5 is collected to obtain a meshing tooth detection image 1. The upper end surface detection device 7 uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device 8 uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3 and 4 are sent to the control device for summary processing and recording. All detection data of each gear 1 can be viewed through the control device, which is convenient for data sorting and viewing; the processing device 3 or the processing device 4 analyzes the meshing tooth detection image 1. When there is a defect, it is detected by the peripheral The device removes gear 1, and the gear 1 is regarded as an unqualified gear. When there is no defect, another upper end surface detection device 7 or lower end surface detection device 8 is replaced to continue to collect images of the defective position of the meshing tooth 5 corresponding to the meshing tooth detection image to obtain the meshing tooth detection image 2, and the meshing tooth detection image 2 is uploaded to the processing device 3 or the processing device 4. The processing device 3 or the processing device 4 analyzes the meshing tooth detection image 2. When there is a defect, the gear 1 is removed by the external device and the gear 1 is regarded as an unqualified product; when there is no defect, jump to S4; in this step, when there is a defect at any position of the meshing tooth 5, the upper end surface detection device 7 or the lower end surface detection device 8 is used to collect images of the defective position of the meshing tooth 5. When there are defects in both the meshing tooth detection image and the meshing tooth detection image 1, the gear 1 is removed as a unqualified product. If the results of the two times are inconsistent, a third detection is performed. By detecting the defective position multiple times, the probability of false detection is reduced to prevent false judgments caused by visual misjudgment or other factors.

[0043] S4: The rotating suction cup 6 drives the gear 1 to rotate until it matches the tooth shape of the clamping claws 12 of the clamping devices 9 on both sides, and the clamping devices 9 move to clamp the gear 1, and the rotating suction cup 6 is reset; in this step, the upper end face 10, the lower end face 11, and the shaft hole 2 of the gear 1 are exposed through the clamping of the clamping device 9, which is convenient for subsequent detection operations;

[0044] S5: the upper end face detection device 7 and the lower end face detection device 8 move, and simultaneously collect images of the upper end face 10 and the lower end face 11 of the gear 1 to obtain an upper end face detection image and a lower end face detection image. The upper end face detection device 7 sends the upper end face detection image to the processing device three, and the lower end face detection device 8 sends the lower end face detection image to the processing device four respectively. The processing device three and the processing device four analyze the upper end face detection image and the lower end face detection image respectively to analyze whether there are defects on the upper end face 10 and / or the lower end face 11, and the defects include cracks. If there are no defects, the entire visual inspection is terminated; if there are defects at any position of the upper end face 10 and / or the lower end face 11, jump to S6;

[0045] S6: When there is a defect at any position of the upper end surface detection image and / or the lower end surface detection image, the clamping device 9 flips 180 degrees, thereby driving the gear 1 to flip, so that the upper end surface 10 and the lower end surface 11 of the gear 1 are swapped, and the upper end surface detection device 7 collects the image of the lower end surface 11 of the gear 1 to obtain the lower end surface detection image 1, and / or the lower end surface detection device 8 collects the image of the upper end surface 10 of the gear 1 to obtain the upper end surface detection image 1, the upper end surface detection device 7 sends the lower end surface detection image 1 to the processing device 3, and / or the lower end surface detection device 8 sends the upper end surface detection image 1 to the processing device 4, the processing device 3 and / or the processing device 4 respectively analyze the lower end surface detection image 1 and / or the upper end surface detection image 1, and analyze the upper end surface detection image 1. Check whether there are defects on the end face 10 and / or the lower end face 11. If there are defects, the gear 1 is removed as a defective product through an external device; if there are no defects, the gear 1 is adsorbed by the rotating suction cup 6, the clamping device 9 is loosened, and the rotating suction cup 6 drives the gear 1 to rotate. After rotating a certain angle, it cooperates with the tooth shape of the clamping claws 12 of the clamping device 9 on both sides. The clamping device 9 moves through the cooperation between the clamping claws 12 and the meshing teeth 5 to achieve the clamping of the gear 1, and the rotating suction cup 6 is reset. The upper end face detection device 7 and / or the lower end face detection device 8 are moved to perform image detection on the lower end face 11 and / or the upper end face 10 respectively to obtain the lower end face detection image 2 and / or the upper end face detection image 2. The upper end face detection device 7 transmits the lower end face detection image 2 to The processing device three and / or the lower end face detection device 8 transmit the upper end face detection image 2 to the processing device four, and the processing device three and / or the processing device four respectively analyze the lower end face detection image 2 and / or the upper end face detection image 2. When there is no defect, the entire visual inspection is terminated; when there is a defect, the gear is removed by an external device as a defective product; for example, in this step, when only one position of the upper end face 10 has a defect, the gear 1 is turned over, and the image of the defective position of the upper end face 10 is captured by the lower end face detection device 8 to obtain the upper end face detection image 1, and the lower end face detection device 8 sends the upper end face detection image 1 to the processing device four, and the processing device four analyzes the upper end face detection image 1. When there is a defect in image 1, gear 1 is removed and gear 1 is regarded as a defective product; if there is no defect in the upper end surface detection image 1, gear 1 is adsorbed by rotating suction cup 6, and jaws 12 are loosened, and rotating suction cup 6 drives gear 1 to rotate. After rotating a certain angle, it cooperates with the tooth shape of jaws 12 on both sides, and jaws 12 move to clamp gear 1, and rotating suction cup 6 is reset. Through rotation, the lower end surface detection device 8 at another position is used to collect the image of the defect position of the upper end surface 10 corresponding to the upper end surface detection image to obtain the upper end surface detection image 2, and the processing device 4 analyzes the upper end surface detection image 2; if there is no defect, the entire visual inspection is ended; if there is a defect, gear 1 is removed by an external device and regarded as a defective product;Similarly, when there is a defect at any position of the lower end surface 11, the above detection method is used; when there are defects at both the upper end surface 10 and the lower end surface 11, the upper end surface collection device 7 and the lower end surface collection device 8 work simultaneously to collect the defect positions of the lower end surface 11 and the upper end surface 10 respectively, which will not be described in detail here. ;

[0046] Embodiment 2:

[0047] In this embodiment, the position where the axial hole 2 in S1 has defects is subjected to secondary inspection by the upper end surface inspection device 7 or the lower end surface inspection device 8 to reduce the false detection rate. Specifically:

[0048] When there is a defect in the shaft hole 2 in the S1, the rotating suction cup 6 drives the gear 1 to move up, and the rotating suction cup 6 drives the gear 1 to rotate, and cooperates with the tooth shape of the clamping claws 12 on both sides, and the clamping claws 12 of the clamping device 9 move to clamp the gear 1, and the rotating suction cup 6 is reset, and the clamping claws 12 drive the gear 1 to rotate. When it is tilted to a preset angle, the preset angle is preferably 30°-60°; the upper end surface detection device 7 or the lower end surface detection device 8 moves to capture an image of the defective position of the inclined shaft hole 2 to obtain a shaft hole detection image 1, and the upper end surface detection device 7 sends the shaft hole detection image 1 to the processing device 3 or the lower end surface detection device 8 sends the shaft hole detection image 1 to the processing device 4; the processing device 3 or the processing device 4 analyzes the shaft hole detection image 1 to analyze whether there is a defect. If there is a defect, the device 7 is detected by the peripheral device. The gear 1 is removed from the upper end face detection device 7 and treated as a defective product; if there is no defect, another upper end face detection device 7 or lower end face detection device 8 is replaced to collect an image of the defective position of the shaft hole 2 corresponding to the shaft hole detection image to obtain a shaft hole detection image 2. The upper end face detection device 7 sends the shaft hole detection image 2 to the processing device 3 or the lower end face detection device 8 sends the shaft hole detection image 2 to the processing device 4; the processing device 3 or the processing device 4 analyzes the shaft hole detection image 2 to determine whether there is a defect. If there is a defect, the gear 1 is removed from the upper end face detection device 7 and treated as a defective product through an external device. If there is no defect, S2 is executed. In this method, the upper end face detection device 7 or the lower end face detection device 8 re-detects the defective position of the shaft hole 2 to reduce the error rate and prevent misjudgment caused by visual problems.

[0049] Embodiment three:

[0050] This embodiment can improve the accuracy of the overall surface defect visual detection method, reduce the false detection rate, and prevent inaccurate defects detected due to problems with the visual equipment, and also prevent the problem that the production line cannot operate normally due to problems with the visual equipment. Specifically:

[0051] S1 includes: S11: through the external clamping equipment, adsorption equipment, etc., the shaft hole 2 of the gear 1 to be tested is inserted into the outside of the detection shaft 3, the lower end face of the gear 1 contacts the detection cavity 4, the shaft hole detection equipment in the detection shaft 3 rotates, and the images of various positions of the shaft hole 2 are collected to obtain multiple shaft hole detection images. The shaft hole detection equipment transmits the shaft hole detection image to the processing device 1, and the processing device 1 analyzes the shaft hole detection image to determine whether there are defects at various positions in the shaft hole 2; defects include cracks; S12: when there is no defect in the shaft hole 2 in S11, the rotating suction cup 6 drives the gear 1 to move up, and the rotating suction cup 6 drives the gear 1 to rotate, and cooperates with the tooth shape of the clamping claws 12 on both sides, The clamping jaws 12 of the clamping device 9 move to clamp the gear 1 to be inspected, the rotating suction cup 6 is reset, and the clamping jaws 12 drive the gear 1 to rotate. When it is tilted to a preset angle, the preset angle is preferably 30°-60°; the upper end surface detection device 7 or the lower end surface detection device 8 moves to collect an image of the inclined shaft hole 2 to obtain a shaft hole detection image 1, and the upper end surface detection device 7 sends the shaft hole detection image 1 to the processing device 3 or the lower end surface detection device 8 sends the shaft hole detection image 1 to the processing device 4; the processing device 3 or the processing device 4 analyzes the shaft hole detection image 1 to analyze whether there is a defect. If there is no defect, S2 is executed. If there is a defect, another upper end surface detection device is replaced. 7 or the lower end surface detection device 8 collects the image of the defect position of the shaft hole 2 corresponding to the shaft hole detection image to obtain the shaft hole detection image 2, and the upper end surface detection device 7 sends the shaft hole detection image 2 to the processing device 3 or the lower end surface detection device 8 sends the shaft hole detection image 2 to the processing device 4; the processing device 3 or the processing device 4 analyzes the shaft hole detection image 2 to analyze whether there is a defect. If there is a defect, the gear 1 is removed by the external device and the gear 1 is treated as a defective product. If there is no defect, S2 is executed; S13: When there is a defect in the shaft hole 2 in S11, the rotating suction cup 6 drives the gear 1 to move up, and the rotating suction cup 6 drives the gear 1 to rotate, and cooperates with the tooth shape of the clamping jaws 12 on both sides, The clamping jaws 12 of the clamping device 9 move to clamp the gear 1, the rotating suction cup 6 is reset, and the clamping jaws 12 drive the gear 1 to rotate. When it is tilted to a preset angle, the preset angle is preferably 30°-60°; the upper end surface detection device 7 or the lower end surface detection device 8 moves to collect images of the defective position of the inclined shaft hole 2 to obtain shaft hole detection image 1, and the upper end surface detection device 7 sends the shaft hole detection image 1 to the processing device 3 or the lower end surface detection device 8 sends the shaft hole detection image 1 to the processing device 4; the processing device 3 or the processing device 4 analyzes the shaft hole detection image 1 to analyze whether there are defects. If there are defects, the gear 1 is removed by an external device and the gear is treated as a defective product;If there is no defect, replace another upper end surface detection device 7 or lower end surface detection device 8 to collect images of the defect position of the shaft hole 2 corresponding to the shaft hole detection image to obtain the shaft hole detection image 2. The upper end surface detection device 7 sends the shaft hole detection image 2 to the processing device 3 or the lower end surface detection device 8 sends the shaft hole detection image 2 to the processing device 4; the processing device 3 or the processing device 4 analyzes the shaft hole detection image 2 to analyze whether there is a defect. If there is a defect, the gear 1 is removed by the peripheral device and the gear 1 is regarded as a defective product. If there is no defect, S2 is executed. ;

[0052] S3 includes: S31: rotating the suction cup 6 to drive the gear 1 to move upward, so that the gear 1 is out of the detection chamber 4. When there is no defect in any meshing tooth 5 of the gear 1, the upper end surface detection device 7 and / or the lower end surface detection device 8 move to the position of the meshing tooth 5, and collect images of the meshing tooth 5 to obtain a meshing tooth detection image 1. The upper end surface detection device 7 uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device 8 uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3 and 4 are sent to the control device for summary and recording. All the detection data of each gear 1 can be viewed through the control device, which is convenient for data collection. The processing device 3 or the processing device 4 analyzes the meshing tooth detection image 1; when there is no defect, it jumps to S4; when there is a defect, another upper end surface detection device 7 or the lower end surface detection device 8 is replaced to collect the image of the defective position of the defective meshing tooth 5 to obtain the meshing tooth detection image 2, and the meshing tooth detection image 2 is uploaded to the processing device 3 or the processing device 4, and the processing device 3 or the processing device 4 analyzes the meshing tooth detection image 2. When there is a defect, the gear 1 is removed by the external device and the gear 1 is treated as a defective product; when there is no defect, it jumps to S4; S32: When any meshing tooth 5 of the gear 1 has a defect, the gear 1 After moving up, the upper end surface detection device 7 or the lower end surface detection device 8 moves to the position where the meshing tooth 5 has defects, and collects images of the defective positions of the meshing teeth 5 to obtain meshing tooth detection image 1. Although the gear 1 moves up, the meshing teeth 5 are still completely exposed to the outside, which is convenient for collecting images of the meshing teeth 5. The upper end surface detection device 7 uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device 8 uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3, and 4 are sent to the control device for summary and recording. All detection data of each gear 1 can be viewed through the control device, which is convenient for data integration. Processing and viewing; processing device three or processing device four analyzes the meshing tooth detection image one. When a defect is found, gear 1 is removed by an external device to make gear 1 a disqualified gear. When there is no defect, another upper end surface detection device 7 or lower end surface detection device 8 is replaced to continue image acquisition of the defective position of the meshing tooth corresponding to the meshing tooth detection image to obtain the meshing tooth detection image two, and the meshing tooth detection image two is uploaded to processing device three or processing device four. Processing device three or processing device four analyzes the meshing tooth detection image two. When a defect is found, gear 1 is removed by an external device to make gear 1 a disqualified product. When there is no defect, jump to S4.

[0053] S5 includes: S51: the upper end surface detection device 7 and the lower end surface detection device 8 move, and simultaneously collect images of the upper end surface 10 and the lower end surface 11 of the gear 1 to obtain the upper end surface detection image and the lower end surface detection image, the upper end surface detection device 7 sends the upper end surface detection image to the processing device three, and the lower end surface detection device 8 sends the lower end surface detection image to the processing device four respectively, and the processing device three and the processing device four analyze the upper end surface detection image and the lower end surface detection image respectively to analyze whether there are defects in the upper end surface 10 and / or the lower end surface 11, and the defects include cracks; S52: there are no defects in S51 When the gear 1 is sunk, the clamping device 9 is turned 180 degrees, thereby driving the gear 1 to turn over, so that the upper end face 10 and the lower end face 11 of the gear 1 are swapped, the upper end face detection device 7 collects the image of the lower end face 11 of the gear 1 to obtain the lower end face detection image 1, the lower end face detection device 8 collects the image of the upper end face 10 of the gear 1 to obtain the upper end face detection image 1, the upper end face detection device 7 sends the lower end face detection image 1 to the processing device 3, the lower end face detection device 8 sends the upper end face detection image 1 to the processing device 4, the processing devices 3 and 4 respectively process the lower end face detection image 1 and the upper end face detection image 1 Analyze whether there are defects on the upper end face 10 and / or the lower end face 11. If there are no defects, the entire visual inspection is terminated. If there are defects, the gear 1 is adsorbed by the rotating suction cup 6, the clamping device 9 is loosened, and the rotating suction cup 6 drives the gear 1 to rotate. After rotating a certain angle, it cooperates with the tooth shape of the clamping claws 12 of the clamping device 9 on both sides. The clamping device 9 moves through the cooperation between the clamping claws 12 and the meshing teeth 5 to achieve the clamping of the gear 1. The rotating suction cup 6 is reset, and the upper end face detection device 7 and / or the lower end face detection device 8 are moved to perform image inspection on the defective positions of the lower end face 11 and / or the upper end face 10 respectively. The upper end face detection device 7 transmits the lower end face detection image 2 to the processing device 3, and / or the lower end face detection device 8 transmits the upper end face detection image 2 to the processing device 4. The processing device 3 and / or the processing device 4 analyze the lower end face detection image 2 and / or the upper end face detection image 2 respectively. When there is no defect, the entire visual inspection is terminated; when there is a defect, the gear 1 is removed as a defective product through an external device; S53: If there is a defect at any position of the upper end face 10 and / or the lower end face 11 in S51, jump to S6.

[0054] In this embodiment, the defective positions in the shaft hole 2, meshing teeth 5, upper end face 10, and lower end face 11 of the gear 1 are inspected at least twice. When there are no defects in the shaft hole 2, meshing teeth 5, upper end face 10, and lower end face 11 of the gear 1, they are all inspected at least twice by different inspection devices to avoid inaccurate inspection results when problems occur in the visual inspection device. Specifically, the shaft hole 2 is inspected by the shaft hole inspection device, the upper end face inspection device 7, and / or the lower end face inspection device 8, the meshing teeth 5 are inspected by the meshing teeth inspection device, the upper end face inspection device 7, and / or the lower end face inspection device 8, the upper end face 10 is inspected by the upper end face inspection device 7 and the lower end face inspection device 8, and the upper end face 10 is inspected by the upper end face inspection device 7 and the lower end face inspection device 8. The end face detection device 8 is used for detection; when there is a problem with the shaft hole detection device, detection can be carried out through the upper end face detection device 7 and / or the lower end face detection device 8; when there is a problem with the meshing tooth detection device, detection can be carried out through the upper end face detection device 7 and / or the lower end face detection device 8; when there is a problem with the upper end face detection device 7, detection can be carried out through the lower end face detection device 8; similarly, when there is a problem with the lower end face detection device 8, the upper end face detection device 7 can be used. The visual inspection of each component surface can be replaced, and different visual devices are used for at least two times of image acquisition at each position to avoid missed judgments, misjudgments, etc., and to avoid wrong detections due to problems with the visual device itself and the processing device.

[0055] Embodiment 4:

[0056] The present embodiment provides a visual inspection device for surface defects of mechanical parts, including a base plate 13, on which a gear bracket 14 is arranged, and the gear bracket 14 is connected to the base plate 13 by welding or the like, and a detection cavity 4 is opened on the top of the gear bracket 14, and the detection cavity 4 is circular and is used to place the gear 1 to be inspected, and an axial hole detection device is arranged in the middle of the detection cavity 4, and a plurality of meshing tooth detection devices are evenly arranged in a ring shape on the outer periphery of the detection cavity 4; when in use, the axial hole 2 of the gear 1 is matched with the axial hole detection device, the axial hole detection device is used to collect the image of the axial hole 2, and the meshing tooth detection device is used to collect the image of the meshing tooth 5 of the gear 1; a rotating suction cup 6 is arranged on the upper part of the detection cavity 4, and the rotating suction cup 6 is connected to the fixed bracket 16, and the rotating suction cup 6 can adsorb the gear 1 and drive the gear 1 to move upward and rotate, so as to adjust The height and angle of the gear 1, and the movement and rotation of the rotating suction cup 6 adopt mature technical solutions in the prior art. The present application does not make any improvements thereto and will not elaborate on them herein. The bottom of the fixed bracket 16 is connected to the base plate 13 by well-known connection methods such as bonding, welding, and screw connection. Clamping devices 9 for clamping the gear 1 are provided on both sides of the fixed bracket 16. The clamping devices 9 cooperate with the gear 1 and will not block the upper end face 10 and the lower end face 11 of the gear 1 during clamping, and will not affect the detection of the upper end face 10 and the lower end face 11. A lower end face detection device 8 and an upper end face detection device 7 are respectively provided on the upper part of the gear bracket 14 and the fixed bracket 16. The lower end face detection device 8 collects images of the lower end face 11 or / and the upper end face 10 of the gear 1, and the upper end face detection device 7 collects images of the lower end face 11 or / and the upper end face 10 of the gear 1.

[0057] Specifically, the shaft hole detection device includes a hollow detection shaft 17, the hollow detection shaft 17 is connected to a rotating motor 18, the rotating motor 18 is fixed on a motor fixing plate 19, the motor fixing plate 19 is connected to the gear bracket 14, and is connected by welding, screw connection, etc., the hollow detection shaft 17 is fixedly provided with a mounting rod 20, which is connected by a bracket, or the mounting rod 20 is connected to the bottom of the hollow detection shaft 17 by welding, bonding, etc., which are commonly used in the prior art, and a micro detection camera 21 is fixed on the mounting rod 20. A detection port 22 is provided on the measuring shaft 17 at a position corresponding to the micro detection camera 21. In order to prevent dust and facilitate maintenance and repair of the micro detection camera 21 in the hollow detection shaft 17, a dust cover 23 is screwed on the top of the hollow detection shaft 17 through a thread or other structure; the rotating motor 18 is started to drive the hollow detection shaft 17 to rotate, thereby driving the micro detection camera 21 to rotate, and the micro detection camera 21 collects the image in the shaft hole 2 through the detection port 22. For the specific detection method, refer to Examples 1 to 3, and will not be described in detail here;

[0058] Specifically, the meshing tooth detection device includes a meshing tooth detection bracket 24 arranged in the detection cavity 4, and an industrial camera 25 is installed on the meshing tooth detection bracket 24. The number of industrial cameras 25 and meshing tooth detection bracket 24 is set according to the specific situation. This application does not make specific restrictions, and it is based on the comprehensive capture of all the meshing teeth 5 of the gear 1; the industrial camera 25 collects images of the meshing teeth 5. Because the meshing tooth detection device is arranged in a ring on the inner periphery of the detection cavity 4, it can detect each meshing tooth 5 of the gear 1 at the same time, thereby improving work efficiency. Any meshing tooth 5 can be detected at any time. When a problem occurs on the gear 1, the rotating suction cup 6 absorbs the gear 1 and moves it upward and rotates, and then the gear 1 is placed in the detection chamber 4, and the defect is detected by another industrial camera 25 to reduce the error rate and prevent misjudgment caused by problems with the industrial camera 25. After the rotating suction cup 6 absorbs the gear 1 and moves it upward, the meshing tooth 5 can be detected by the upper end surface detection device 7 and / or the lower end surface detection device 8; more preferably, when no defect is detected, the upper end surface detection device 7 and / or the lower end surface detection device 8 can also be used to detect the defect, so as to further avoid false detection and missed detection and improve the accuracy of detection.

[0059] Specifically, the clamping device 9 includes a telescopic motor 26, which is fixed on a telescopic motor fixing plate 27. The telescopic motor fixing plate 27 is connected to the fixed bracket 16 by welding, screw connection, etc. The telescopic motor fixing plate 27 is vertically arranged with the fixed bracket 16. In order to improve stability, a triangular reinforcement is arranged between the telescopic motor fixing plate 27 and the fixed bracket 16. The end of the telescopic motor 26 is connected to a U-shaped support plate. The fixed bracket 16 and the telescopic motor 26 are provided with mounting holes for the output end of the telescopic motor 26 to extend out at positions corresponding to the telescopic motor 26. The U-shaped support plate includes two symmetrically arranged longitudinal plates 28. The longitudinal plates 28 are connected to the ends of the telescopic motor 26 by welding, screw connection, etc. One end of the two longitudinal plates 28 is connected to a transverse plate 29. The transverse plate 29 is connected to the longitudinal plate 28 by screw connection, bonding, welding, etc., and can also be formed in an integrated manner. A rotating Motor 30, specifically, the rotating motor 30 is fixed on the horizontal plate 29, the rotating motor 30 is connected to the rotating shaft 31, the end of the rotating shaft 31 is connected with a fixing plate 32, the fixing plate 32 is connected to the mounting plate 33, and a clamping jaw 12 is provided on the mounting plate 33, the clamping jaw 12 and the mounting plate 33 are connected by well-known fixing methods such as welding and screw connection, the fixing plate 32 and the mounting plate 33 are connected by bolts, etc., which is convenient for disassembly and replacement of the clamping jaw 12 model. In order to better clamp the gear 1 and improve the clamping stability, different models of gears 1 correspond to different clamping jaws 12. In order to prevent the clamping jaw 12 from damaging the meshing teeth 5, a buffer pad is pasted on the clamping jaw 12 to avoid damaging the meshing teeth 5 of the gear 1; the clamping jaw 12 is adapted to the meshing teeth 5 of the clamped gear 1, which is convenient for better clamping the gear 1 and will not affect the simultaneous detection of the upper end face 10 and the lower end face 11.

[0060] Specifically, the lower end surface detection device 8 includes two Y-direction movable slide rails 34, and the two Y-direction movable slide rails 34 are arranged on the gear bracket 14, wherein the gear bracket 14 includes a support leg 35, and a placement plate 36 is arranged on the top of the support leg 35, and a detection cavity 4 is opened on the placement plate 36, and the Y-direction movable slide rail 34 is fixed on the placement plate 36. It is noted that the detection cavity 4 does not need to be affected during installation, that is, the placement of the gear 1 is not affected. The two Y-direction movable slide rails 34 are respectively provided with a Y-direction movable slide seat 37 matched therewith, and the two Y-direction movable slide seats 37 are provided with an X-direction slide rail 38, and the Y-direction movable slide seat 37 slides along the Y-direction movable slide rail 34, thereby driving the X-direction slide rail 38 to move along the Y direction. Adjustment, at least two X-direction slides 39 are arranged on the X-direction slide 38, and a lifting device 40 is arranged on the X-direction slide 39. The lifting device 40 adopts the electric push rod, pneumatic push rod, hydraulic rod and other structures in the prior art to achieve lifting, and no specific details are given here. The X-direction slide 39 moves along the X-direction slide 38, so as to achieve the adjustment of the lifting device 40 in the X direction. A detection mounting plate 41 is arranged on the top of the lifting device 40, and a camera bracket 42 is fixed on the detection mounting plate 41. An industrial camera 2 43 is installed on the camera bracket 42. The industrial camera 2 43 is connected to the camera bracket 42 through a rotating shaft 2, and the rotating shaft 2 is connected to a rotating motor 3 44; the industrial camera 2 43 can move along The Y-direction movable slide rail 1 34 and the X-direction slide rail 1 38 are adjusted in the Y-direction and X-direction respectively, the lifting device 40 realizes the adjustment of the height of the industrial camera 2 43, and the cooperation of the rotating motor 3 44 and the rotating shaft 2 realizes the adjustment of the angle of the industrial camera 2 43, which can conveniently realize the acquisition of the image of the lower end face 11 and / or the upper end face 10, and better realize the detection of the gear 1; the number of the industrial cameras 2 43 is set according to the specific situation, based on the comprehensive acquisition of the images of the lower end face 11, the upper end face 10, and the meshing teeth 5. The number of the industrial cameras 2 43 is equal to the number of the X-direction slide seat 1 39 and the lifting device 40; similarly, the upper end face detection device 7 includes two Y-direction movable slide rails 2 45 and two Y-direction movable slide rails 2 45 The upper end surface detection device 7 is provided with a Y-direction movable slide 2 46 matched therewith, and the two Y-direction movable slides 2 46 are provided with an X-direction slide rail 2 47, and the X-direction slide rail 2 47 is provided with at least two X-direction slides 2 48, and the X-direction slide 2 48 is provided with a lifting device 2 49, and the top of the lifting device 2 49 is provided with a detection mounting plate 2 50, and a camera bracket 2 51 is fixed on the detection mounting plate 2 50, and an industrial camera 3 52 is installed on the camera bracket 2 51, and the industrial camera 3 52 is connected to the camera bracket 2 51 through a rotating shaft 3, and the rotating shaft 3 is connected to a rotating motor 4 54; the structure of the upper end surface detection device 7 is the same as that of the lower end surface detection device 8, and the different description methods are to distinguish different installation positions.

[0061] This application breaks through the conventional detection methods in the past. In conventional detection methods, when problems are found in image recognition analysis, the gears are immediately classified as defective products. However, in the actual detection process, due to various reasons such as visual equipment, processing devices, processing procedures, lighting, dust, industrial cameras, software analysis, etc., missed judgments and misjudgments may occur, and gears that originally had no problems may be classified as defective products.

[0062] The present application can be used not only for the detection of gears, but also for the detection of mechanical parts such as pipes, pipe joints, and seals. The clamping jaws 12 of the clamping device 9 can be replaced according to the external shape of the corresponding mechanical parts.

[0063] In summary, the present application has the following advantages: 1. It can realize all-round detection of the shaft hole, meshing teeth, upper end face and lower end face of the gear to be inspected at the same workstation, thereby improving detection efficiency, reducing the use cost of equipment and reducing the floor space occupied by equipment; 2. The defective positions of the shaft hole, meshing teeth, upper end face and lower end face are detected at least twice by different equipment, thereby avoiding missed detection and false detection, thereby improving detection efficiency; when there are no defects in the shaft hole, meshing teeth, upper end face and lower end face, they can be detected at least twice by different equipment, thereby further avoiding overall missed detection and false detection, thereby improving detection efficiency; 3. The shaft hole detection equipment, upper end face detection equipment and lower end face detection equipment can collect images of the shaft hole; the meshing tooth detection equipment, upper end face detection equipment and lower end face detection equipment can image the meshing teeth Image collection; the upper end face can be imaged by the upper end face detection device and the lower end face detection device; the lower end face can be imaged by the upper end face detection device and the lower end face detection device; when any of the visual detection devices has a problem, other detection devices can be used to replace it, which will not affect the operation of the equipment; in addition, the shaft hole detection device is connected to the processing device one, the meshing tooth detection device is connected to the processing device two, the upper end face detection device is connected to the processing device three, and the lower end face detection device is connected to the processing device four, each detection device corresponds to a different processing device, which can effectively avoid the problem of being unable to use the equipment due to problems with the processing device, thereby further improving safety; it also avoids misjudgment of the collected image due to problems with the processing device itself or the program, thereby fundamentally reducing the misjudgment rate.

[0064] The discussion of any of the above embodiments is only exemplary. Under the concept of the invention, the technical features in the above embodiments or different embodiments may also be combined. For the sake of simplicity, they are not provided in detail. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included in the protection scope of the embodiments of the present invention.

Claims

1. A method for visually inspecting surface defects of mechanical parts, characterized in that: The steps include: S1: inserting the shaft hole (2) of the gear (1) to be inspected into the inspection shaft (3), rotating the shaft hole inspection device in the inspection shaft (3), collecting images of various positions of the shaft hole (2), and obtaining shaft hole inspection images. The shaft hole inspection device transmits the shaft hole inspection images to a processing device 1, and the processing device 1 analyzes the shaft hole inspection images to determine whether various positions in the shaft hole (2) have defects. If any position in the shaft hole (2) has defects, the gear (1) is moved out of the workstation. If no defects exist, S2 is executed. S2: the meshing tooth detection devices distributed in an annular manner in the detection chamber (4) simultaneously collect images of the meshing teeth (5) of the gear (1) to obtain meshing tooth detection images, and the meshing tooth detection devices transmit the meshing tooth detection images to the second processing device, and the second processing device analyzes the meshing tooth detection images to determine whether each meshing tooth (5) has defects; S3: The rotating suction cup (6) drives the gear (1) to move upward. When any meshing tooth (5) of the gear (1) in S2 has a defect, the upper end surface detection device (7) or the lower end surface detection device (8) collects an image of the defect position of the meshing tooth (5) to obtain a meshing tooth detection image 1. The upper end surface detection device (7) uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device (8) uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3 and 4 are sent to the control device for summary processing. The processing device 3 or the processing device 4 processes the meshing tooth detection image 1. Image 1 is analyzed. If the meshing teeth (5) have defects, the gear (1) is moved out of the workstation. If there are no defects, another upper end surface detection device (7) or lower end surface detection device (8) is replaced to continue image acquisition at the meshing teeth defect position corresponding to the meshing teeth detection image to obtain meshing teeth detection image 2. The upper end surface detection device (7) uploads the meshing teeth detection image 2 to the processing device 3 or the lower end surface detection device (8) uploads the meshing teeth detection image 2 to the processing device 4. The processing device 3 or the processing device 4 analyzes the meshing teeth detection image 2. If there are defects, the gear (1) is moved out of the workstation. If there are no defects, the process jumps to S4. S4: The rotating suction cup (6) drives the gear (1) to rotate until it matches the tooth shape of the clamping devices (9) on both sides, the clamping devices (9) move to clamp the gear (1), and the rotating suction cup (6) is reset; S5: The upper end face detection device (7) and the lower end face detection device (8) simultaneously collect images of the upper end face (10) and the lower end face (11) of the gear (1) to obtain an upper end face detection image and a lower end face detection image. The upper end face detection device (7) sends the upper end face detection image to the third processing device, and the lower end face detection device (8) sends the lower end face detection image to the fourth processing device. The third processing device and the fourth processing device analyze the upper end face detection image and the lower end face detection image respectively to analyze whether there are defects on the upper end face (10) and the lower end face (11). If there are no defects on both the upper end face (10) and the lower end face (11), the entire visual inspection is terminated. If there are defects at any position of the upper end face (10) or / and the lower end face (11), the process jumps to S6. S6: The clamping device (9) performs a 180-degree flip, driving the gear (1) to flip, so that the upper end face (10) and the lower end face (11) of the gear (1) are swapped, and the upper end face detection device (7) collects the defect position image of the lower end face (11) of the gear (1) to obtain the lower end face detection image 1 or / and the lower end face detection device (8) collects the defect position image of the upper end face (10) of the gear (1) to obtain the upper end face detection image 1, and the lower end face detection image 1 and / or the upper end face detection image 1 are uploaded to the processing device 3 and / or the processing device 4 respectively, and the processing device 3 and / or the processing device 4 respectively analyze the lower end face detection image 1 and / or the upper end face detection image 1 to analyze whether there are defects on the upper end face (10) and / or the lower end face (11). If there are defects, the gear (1) is moved out of the workstation; if there are no defects, the gear (1) is removed from the workstation by rotating the suction device. The disc (6) adsorbs the gear (1), the clamping device (9) is released, and the rotating suction cup (6) drives the gear (1) to rotate. After rotating a certain angle, the clamping device (9) starts to clamp the gear (1). After clamping is completed, the rotating suction cup (6) is reset, and the upper end surface detection device (7) and / or the lower end surface detection device (8) collect images of the defect position of the lower end surface (11) corresponding to the lower end surface detection image and / or the defect position of the upper end surface (10) corresponding to the upper end surface detection image to obtain the lower end surface detection image 2 and / or the upper end surface detection image 2, and transmit the lower end surface detection image 2 and / or the upper end surface detection image 2 to the processing device 3 and / or the processing device 4 respectively. The processing device 3 and / or the processing device 4 analyze the lower end surface detection image 2 and / or the upper end surface detection image 2 respectively. When there is no defect, the entire visual inspection is terminated; When there is a defect, the gear (1) is moved out of the work station.

2. A method for visually inspecting surface defects of mechanical parts according to claim 1, characterized in that: When there is a defect in S1, the rotating suction cup (6) drives the gear (1) to move upward, and the clamping device (9) moves to clamp the gear (1). After clamping is completed, the rotating suction cup (6) is reset, and the clamping device (9) drives the gear (1) to rotate. When it is tilted to a preset angle, the upper end surface detection device (7) or the lower end surface detection device (8) collects an image of the defect position of the shaft hole (2) to obtain shaft hole detection image 1. The upper end surface detection device (7) sends the shaft hole detection image 1 to the processing device 3 or the lower end surface detection device (8) sends the obtained shaft hole detection image 1 to the processing device 4. The processing device 3 or the processing device 4 processes the shaft hole detection image 1. An analysis is performed to determine whether a defect exists. If a defect exists, the gear (1) is removed from the workstation. If no defect exists, another upper end face detection device (7) or lower end face detection device (8) is replaced to collect an image of the defect position of the shaft hole (2) corresponding to the shaft hole detection image to obtain shaft hole detection image 2. The upper end face detection device (7) sends shaft hole detection image 2 to processing device 3 or the lower end face detection device (8) sends shaft hole detection image 2 to processing device 4. Processing device 3 or processing device 4 analyzes shaft hole detection image 2 to determine whether a defect exists. If a defect exists, the gear (1) is removed. If no defect exists, S2 is executed.

3. A method for visually inspecting surface defects of mechanical parts according to claim 2, characterized in that: S1 includes: S11: inserting the shaft hole (2) of the gear (1) to be inspected into the inspection shaft (3), rotating the shaft hole inspection device in the inspection shaft (3), collecting images of various positions of the shaft hole (2), and obtaining a plurality of shaft hole inspection images. The shaft hole inspection device transmits the shaft hole inspection images to a processing device 1, and the processing device 1 analyzes the shaft hole inspection images to determine whether there are defects at various positions in the shaft hole (2); S12: When there is no defect in the shaft hole (2) in S11, the rotating suction cup (6) drives the gear (1) to move upward, the clamping device (9) moves to clamp the gear (1), the rotating suction cup (6) is reset, and the clamping device (9) drives the gear (1) to rotate. When it is tilted to a preset angle, the upper end surface detection device (7) or the lower end surface detection device (8) moves to collect an image of the shaft hole (2) to obtain shaft hole detection image 1, and the upper end surface detection device (7) sends shaft hole detection image 1 to processing device 3 or the lower end surface detection device (8) sends shaft hole detection image 1 to processing device 4; processing device 3 or processing device 4 Analyze the shaft hole detection image 1 to determine whether there is a defect. If there is no defect, execute S2. If there is a defect, replace another upper end surface detection device (7) or lower end surface detection device (8) to collect an image of the defect position of the shaft hole (2) to obtain a shaft hole detection image 2. The upper end surface detection device (7) sends the shaft hole detection image 2 to the processing device 3 or the lower end surface detection device (8) sends the shaft hole detection image 2 to the processing device 4. The processing device 3 or the processing device 4 analyzes the shaft hole detection image 2 to determine whether there is a defect. If there is a defect, remove the gear (1). If there is no defect, execute S2. S13: When the shaft hole (2) in S11 has a defect, the rotating suction cup (6) drives the gear (1) to move upward, the clamping device (9) moves to clamp the gear (1), the rotating suction cup (6) is reset, and the clamping device (9) drives the gear (1) to rotate. When it is tilted to a preset angle, the upper end surface detection device (7) or the lower end surface detection device (8) collects an image of the defective position of the shaft hole (2) to obtain shaft hole detection image 1, and the upper end surface detection device (7) sends shaft hole detection image 1 to processing device 3 or the lower end surface detection device (8) sends shaft hole detection image 1 to processing device 4; processing device 3 or processing device 4 performs shaft hole detection on the defective position of the shaft hole (2) Image 1 is analyzed to determine whether there are defects. If there are defects, the gear (1) is removed. If there are no defects, another upper end surface detection device (7) or lower end surface detection device (8) is replaced to acquire an image of the defect position of the shaft hole (2) corresponding to the shaft hole detection image to obtain shaft hole detection image 2. The upper end surface detection device (7) sends shaft hole detection image 2 to processing device 3 or the lower end surface detection device (8) sends shaft hole detection image 2 to processing device 4. Processing device 3 or processing device 4 analyzes shaft hole detection image 2 to determine whether there are defects. If there are defects, the gear (1) is removed. If there are no defects, S2 is executed.

4. A method for visually inspecting surface defects of mechanical parts according to claim 1, characterized in that: The S3 includes: S31: The rotating suction cup (6) drives the gear (1) to move upward. When there is no defect in any meshing tooth (5) of the gear (1), the upper end surface detection device (7) or the lower end surface detection device (8) moves to the position of the meshing tooth (5), collects an image of the meshing tooth (5), and obtains a meshing tooth detection image 1. The upper end surface detection device (7) uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device (8) uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3, and 4 are sent to The control device performs summary processing, and the processing device three or the processing device four analyzes the meshing tooth detection image one; if there is no defect, the process jumps to S4; if there is a defect, another upper end surface detection device (7) or a lower end surface detection device (8) is replaced to collect an image of the defective position of the meshing tooth (5) to obtain the meshing tooth detection image two, and the meshing tooth detection image two is uploaded to the processing device three or the processing device four; the processing device three or the image processing device four analyzes the meshing tooth detection image two; if there is a defect, the gear (1) is moved out of the workstation; if there is no defect, the process jumps to S4; S32: When any meshing tooth (5) of the gear (1) has a defect, after the gear (1) moves upward, the upper end surface detection device (7) or the lower end surface detection device (8) moves to the defective position of the meshing tooth (5), collects an image of the defective position of the meshing tooth (5), and obtains a meshing tooth detection image 1. The upper end surface detection device (7) uploads the meshing tooth detection image 1 to the processing device 3 or the lower end surface detection device (8) uploads the meshing tooth detection image 1 to the processing device 4. The data processed by the processing devices 1, 2, 3, and 4 are sent to the control device for aggregation. Processing, the processing device three or the processing device four analyzes the meshing tooth detection image one, and when a defect is found, the gear (1) is moved out of the workstation; when no defect is found, another upper end surface detection device (7) or a lower end surface detection device (8) is replaced to continue image acquisition of the defect position of the meshing tooth corresponding to the meshing tooth detection image to obtain the meshing tooth detection image two, and the meshing tooth detection image two is uploaded to the processing device three or the processing device four, and the processing device three or the processing device four analyzes the meshing tooth detection image two, and when a defect is found, the gear (1) is moved out of the workstation; when no defect is found, the process jumps to S4.

5. The method for visually inspecting surface defects of mechanical parts according to claim 1, characterized in that: The S5 includes: S51: the upper end surface detection device (7) and the lower end surface detection device (8) simultaneously collect images of the upper end surface (10) and the lower end surface (11) of the gear (1) to obtain an upper end surface detection image and a lower end surface detection image, the upper end surface detection device (7) sends the upper end surface detection image to the third processing device, and the lower end surface detection device (8) sends the lower end surface detection image to the fourth processing device, and the third processing device and the fourth processing device respectively analyze the upper end surface detection image and the lower end surface detection image to analyze whether there are defects on the upper end surface (10) and / or the lower end surface (11); S52: When there are no defects in S51, the clamping device (9) is turned 180 degrees, driving the gear (1) to turn so that the upper end face (10) and the lower end face (11) of the gear (1) are swapped, and the upper end face detection device (7) collects the image of the lower end face (11) of the gear (1) to obtain the lower end face detection image 1, and the lower end face detection device (8) collects the image of the upper end face (10) of the gear (1) to obtain the upper end face detection image 1, and the upper end face detection device (7) sends the lower end face detection image 1 to the processing device 3, and the lower end face detection device (8) sends the upper end face detection image 1 to the processing device 4, and the processing devices 3 and 4 respectively analyze the lower end face detection image 1 and the upper end face detection image 1 to analyze whether there are defects in the upper end face (10) and / or the lower end face (11). If there are no defects, the entire visual inspection is terminated; if there are defects, the inspection is completed. The gear (1) is adsorbed by the rotating suction cup (6), the clamping device (9) is released, and the rotating suction cup (6) drives the gear (1) to rotate. After rotating to a certain angle, the clamping device (9) moves to clamp the gear (1), and the rotating suction cup (6) is reset. Another upper end surface detection device (7) and / or lower end surface detection device (8) is replaced to perform image detection on the defect position of the lower end surface (11) and / or the upper end surface (10), and obtain the lower end surface detection image 2 and / or the upper end surface detection image 2. The upper end surface detection device (7) transmits the lower end surface detection image 2 to the processing device 3 and / or the lower end surface detection device (8) transmits the upper end surface detection image 2 to the processing device 4. The processing device 3 and / or the processing device 4 analyze the lower end surface detection image 2 and / or the upper end surface detection image 2 respectively. When there is no defect, the entire visual inspection is terminated; when there is a defect, the gear (1) is removed; S53: If there is a defect at any position of the upper end surface (10) and / or the lower end surface (11) in S51, jump to S6.

6. A mechanical parts surface defect visual inspection device using a mechanical parts surface defect visual inspection method according to any one of claims 1 to 5, comprising a bottom plate (13), a gear bracket (14) being arranged on the bottom plate (13), characterized in that: The top of the gear bracket (14) is provided with a detection cavity (4), the middle of the detection cavity (4) is provided with an axial hole detection device, and the inner circumference of the detection cavity (4) is evenly arranged with a plurality of meshing tooth detection devices; the upper part of the detection cavity (4) is provided with a rotating suction cup (6), the rotating suction cup (6) is connected to the fixed bracket (16), and clamping devices (9) for clamping the gear (1) are provided on both sides of the fixed bracket (16); the upper part of the gear bracket (14) and the fixed bracket (16) are respectively provided with a lower end surface detection device (8) and an upper end surface detection device (7).

7. A visual inspection device for surface defects of mechanical parts according to claim 6, characterized in that: The shaft hole detection device comprises a hollow detection shaft (17), the hollow detection shaft (17) is connected to a rotating motor (18), a mounting rod (20) is arranged inside the hollow detection shaft (17), a miniature detection camera (21) is fixed on the mounting rod (20), and a detection port (22) is arranged at a position corresponding to the hollow detection shaft (17) and the miniature detection camera (21).

8. The device for visually inspecting surface defects of mechanical parts according to claim 6, characterized in that: The meshing tooth detection device comprises a meshing tooth detection bracket (24) arranged in a detection cavity (4), and an industrial camera (25) is installed on the meshing tooth detection bracket (24).

9. The device for visually inspecting surface defects of mechanical parts according to claim 6, characterized in that: The clamping device (9) comprises a telescopic motor (26), the end of the telescopic motor (26) is connected to a U-shaped support plate, a rotating motor (30) is fixed on the U-shaped support plate, the rotating motor (30) is connected to a rotating shaft (31), the end of the rotating shaft (31) is connected to a fixing plate (32), the fixing plate (32) is detachably connected to a mounting plate (33), and a clamping claw (12) is provided on the mounting plate (33).

10. The device for visually inspecting surface defects of mechanical parts according to claim 6, characterized in that: The lower end surface detection device (8) comprises two Y-direction movable slide rails (34), the two Y-direction movable slide rails (34) are respectively provided with a Y-direction movable slide seat (37) matched therewith, the two Y-direction movable slide seats (37) are provided with an X-direction slide rail (38), the X-direction slide rail (38) is provided with at least two X-direction slide seats (39), the X-direction slide seat (39) is provided with a lifting device (40), the top of the lifting device (40) is provided with a detection mounting plate (41), the detection mounting plate (41) is fixed with a camera bracket (42), the camera bracket (42) is installed with an industrial camera (43), the industrial camera (43) is connected to the camera bracket (42) through a rotating shaft (43), and the rotating shaft (44) is connected to a rotating motor (44); The upper end surface detection device (7) comprises two Y-direction movable slide rails (45), the two Y-direction movable slide rails (45) are respectively provided with a Y-direction movable slide seat (46) matched therewith, the two Y-direction movable slide seats (46) are provided with an X-direction slide rail (47), the X-direction slide rail (47) is provided with at least two X-direction slide seats (48), the X-direction slide seat (48) is provided with a lifting device (49), the top of the lifting device (49) is provided with a detection installation plate (50), the detection installation plate (50) is fixed with a camera bracket (51), the camera bracket (51) is installed with an industrial camera (52), the industrial camera (52) is connected to the camera bracket (51) through a rotating shaft (3), and the rotating shaft (3) is connected to a rotating motor (44).