Mechanical part surface defect visual detection method and detection device thereof

By designing automated limit cleaning and auxiliary transmission mechanisms, combined with deep learning models, the problems of low efficiency and large errors in mechanical parts detection are solved, and an efficient and accurate detection process is achieved.

CN118603878AInactive Publication Date: 2024-09-06CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410816121.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the current inspection process of mechanical parts, manual operation is required, resulting in low efficiency, and residual flying debris causes error alarms, which increases the workload of staff.

Method used

A visual detection device for surface defects of mechanical parts is designed, including a limit cleaning mechanism and an auxiliary transmission mechanism. The motor drives a bidirectional threaded rod and a vacuum fan to realize automatic limit and dust removal. It is combined with the ResNet network model of deep learning for three-dimensional reconstruction. and feature point extraction.

Benefits of technology

It improves detection efficiency, reduces errors, achieves stable transmission and high-precision vacuuming of parts of different sizes, reduces algorithm complexity, and improves three-dimensional reconstruction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118603878A
    Figure CN118603878A
Patent Text Reader

Abstract

The invention relates to the technical field of mechanical part detection, and discloses a mechanical part surface defect visual detection device which comprises a conveyor body, supporting legs are fixedly connected to the bottom of the conveyor body, a pushing air cylinder is fixedly connected to the front face of the conveyor body, and a first supporting frame is fixedly connected to the top of the conveyor body. According to the mechanical part surface defect visual detection method and the detection device thereof, in the using process, a first motor works, a bidirectional threaded rod is made to rotate, the position of a limiting plate is convenient to adjust, and the mechanical part surface defect visual detection device is convenient to use; and a second motor works to enable a second rotating rod to rotate, left-right reciprocating motion of a dust collection plate is facilitated, damping of mechanical parts on a flow guide plate is facilitated through movement of a baffle and movement of a sliding rod, and the precision of three-dimensional reconstruction is improved through a constructed network model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mechanical parts detection, and in particular to a mechanical parts surface defect visual detection method and a detection device thereof. Background Art

[0002] Mechanical parts, also known as mechanical elements, are the basic elements that constitute machinery. They are the indivisible individual parts that make up machinery and machines. More specifically, parts are individual components that cannot be separated, and components are combinations of parts that achieve a certain action or function. Components can be one part or a combination of multiple parts.

[0003] In the prior art, during the inspection of mechanical parts, workers are required to manually take them from the conveyor to the designated inspection area for inspection, resulting in low inspection efficiency. In addition, due to problems such as flying chips easily generated by mechanical processing, flying chips are easily left on the mechanical parts to be inspected, which easily leads to error alarms in the subsequent identification process, requiring workers to conduct multiple inspections, thereby increasing their workload. Summary of the invention

[0004] The purpose of the present invention is to provide a method and device for visually inspecting surface defects of mechanical parts to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a visual inspection device for surface defects of mechanical parts, comprising a conveyor body, a support leg fixedly connected to the bottom of the conveyor body, a push cylinder fixedly connected to the front of the conveyor body, a first support frame fixedly connected to the top of the conveyor body, a detector arranged on the top of the first support frame, a limited position cleaning mechanism arranged on the top of the conveyor body, and an auxiliary transmission mechanism arranged on the back of the conveyor body;

[0006] The position limiting and cleaning mechanism comprises a position limiting component and a cleaning component. The position limiting component is arranged inside the conveyor body, and the cleaning component is arranged on the top of the conveyor body.

[0007] Preferably, the limit assembly includes a connecting platform, which is fixedly connected to the inside of the conveyor body, a first motor is fixedly connected to the front of the connecting platform, an output end of the first motor passes through the connecting platform and extends to the inside where a bidirectional threaded rod is fixedly connected, a limit rod is fixedly connected to the inside of the connecting platform, a movable block is slidably connected to the outside of the limit rod, and a limit plate is fixedly connected to the outside of the movable block to facilitate adjustment of the position of the limit plate, thereby meeting the limit transmission of mechanical parts of different sizes and avoiding deviation.

[0008] Preferably, the movable block is threadedly connected to the bidirectional threaded rod, the movable block is slidably connected to the connecting platform, and the movable block is slidably connected to the conveyor body, so as to make the adjustment process more stable.

[0009] Preferably, the cleaning assembly includes a second support frame, the second support frame is fixedly connected to the top of the conveyor body, a dust suction fan is fixedly connected to the top of the second support frame, a protective box is fixedly connected to the inner side of the top of the second support frame, a second motor is fixedly connected to the inside of the protective box, an output end of the second motor passes through the protective box and extends to the inside where a second rotating rod is fixedly connected, the second support frame is rotatably connected to the first rotating rod, a dust suction plate is fixedly connected to the bottom of the first rotating rod, and the first rotating rod is rotatably connected to a connecting rod, so as to realize the left and right reciprocating motion of the dust suction plate, increase the dust suction range of mechanical parts, and reduce the occurrence of detection errors.

[0010] Preferably, grooves are provided at corresponding positions of the connecting rod and the second rotating rod, and the second rotating rod is rotatably connected to the connecting rod, and a connecting pipe is provided between the dust suction fan and the dust suction plate to facilitate a more stable dust removal process.

[0011] Preferably, the auxiliary transmission mechanism includes a guide plate, which is fixedly connected to the back of the conveyor body, a connecting box is fixedly connected to the back of the guide plate, a spring is fixedly connected inside the connecting box, a sliding rod is fixedly connected to the front of the spring, a baffle is fixedly connected to the front of the sliding rod, and a damping rod is fixedly connected to the back of the baffle, so as to facilitate shock absorption of mechanical parts on the guide plate, avoid damage to the mechanical parts due to bumps and the like, and facilitate subsequent rework and other operations.

[0012] Preferably, the damping rod is fixedly connected to the guide plate, grooves are provided at positions corresponding to the connection box and the slide rod, and the slide rod is slidably connected inside the groove, and the slide rod is slidably connected to the guide plate, so as to make the shock absorption process more stable.

[0013] A method for visually detecting surface defects of mechanical parts comprises the following steps:

[0014] S1. Feature point setting

[0015] Boundary feature points are set at the four corner points of the first support frame, and images containing boundary feature points are obtained. Then, the binocular camera is calibrated to obtain the parameters of the left and right cameras in the binocular camera, and stereo calibration is performed to obtain the relative position relationship matrix between the left and right cameras. The on-site camera collects the surface images of the transmission machine body and the mechanical parts it transmits, and sends them to the remote control platform through wireless transmission equipment;

[0016] S2. Camera Calibration

[0017] Calibrate the left and right cameras, detect feature points in the calibrated image by image processing technology, realize three-dimensional reconstruction of feature points by parallax method, and extract boundary feature points of the first support frame; if the extraction of boundary feature points fails, return to step S1 to re-extract boundary feature points, otherwise, if the extraction of boundary feature points succeeds, proceed to the next step;

[0018] S3. Data Generation

[0019] Perform perspective projection transformation on the image containing boundary feature points to obtain the corrected target image. On the remote control platform, through digital area positioning and character segmentation, the character image is normalized to obtain the standard pixel size and marked to generate a sample data set.

[0020] S4. Build a network model

[0021] The background of the target area of ​​the corrected target image is removed, the median image of the target area including the surface of the mechanical parts is extracted, a network model based on the PyTorch framework is constructed, and the sample data set is divided proportionally and input into the network model for training.

[0022] Preferably, in step S3, the region of interest is marked, the marked points are directed to the surroundings, the pixel features of the four corners are extracted, the region of interest, that is, the digital region in the image is extracted, and angle correction is performed at the same time. In the digital region, the minimum character region is cut according to the horizontal and vertical projections, and then the single characters are cut out in equal parts according to the digital aspect ratio and the number of rows and columns of the prior information; the segmented digital characters are standardized according to 20*50 pixels, and the numbers 1 to 9 are marked as folders 1 to 9, and the characters "1." to "9." with decimal points are marked as folders 10 to 19, with a total of 20 types of sample data sets; after cutting out the single characters, the binary image of the extracted digital tube characters is projected in the vertical direction, and the projection formula is:

[0023] Sj = ∑colsjP(i, j)

[0024] Among them, Sj is the sum of the pixels with an image pixel value of 255 in the j-th column, i and j are the row and column coordinates of the image pixel points respectively, cols is the column width of the image, P(i,j) takes the value of 0 or 1, when the grayscale value of the pixel point at the coordinate (i,j) is 255, P(i,j) takes the value of 1, otherwise it is 0; the row number of the image is used as the horizontal axis, and the number of pixels with a grayscale value of 255 corresponding to each row is used as the vertical axis to generate a projection histogram, scan the projection histogram, extract the maximum and minimum boundary coordinate points, so as to obtain the upper and lower boundaries of the digital tube characters, and then achieve character segmentation.

[0025] Preferably, in step S4, a deep learning sandbox environment based on the PyTorch framework is created, a ResNet network learning method of CNN feature extraction and residual learning is adopted, and the configuration of the deep learning ResNet network environment and the construction of the model are completed based on the GitHub code framework.

[0026] Compared with the prior art, the present invention provides a method and device for visually inspecting surface defects of mechanical parts, which have the following beneficial effects:

[0027] 1. The method and device for visually inspecting surface defects of mechanical parts and components, through the setting of the limit cleaning mechanism, during use, the first motor is operated to rotate the bidirectional threaded rod, which is convenient for adjusting the position of the limit plate, thereby meeting the limit transmission of mechanical parts and components of different sizes and avoiding deviation. The second motor is operated to rotate the second rotating rod, which is convenient for realizing the left and right reciprocating motion of the dust collection plate, thereby increasing the dust collection range of the mechanical parts and components and reducing the occurrence of detection errors.

[0028] 2. The visual inspection method and device for surface defects of mechanical parts, through the auxiliary transmission mechanism, can move the slide bar by moving the baffle during use, thereby facilitating the shock absorption of the mechanical parts on the guide plate, avoiding damage to the mechanical parts due to bumps and the like, and facilitating subsequent rework and other operations.

[0029] 3. The visual detection method and device for surface defects of mechanical parts, by constructing a ResNet network model based on deep learning and cooperating with the collection of sample data sets, greatly reduces the complexity of the algorithm, improves the efficiency of the algorithm, and avoids the errors that may be caused by the stereo matching algorithm, making the mechanical parts positioning algorithm more generalized and more accurate, thereby improving the accuracy of three-dimensional reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative labor:

[0031] Figure 1 It is a schematic diagram of the front structure of the present invention;

[0032] Figure 2 It is a schematic diagram of the structure of the limit assembly of the present invention;

[0033] Figure 3 This is a schematic diagram of the internal structure of the limit assembly of the present invention;

[0034] Figure 4 This is a schematic diagram of the cleaning component structure of the present invention;

[0035] Figure 5 This is a schematic diagram of the internal structure of the cleaning component of the present invention;

[0036] Figure 6 It is a schematic diagram of the structure of the auxiliary transmission mechanism of the present invention;

[0037] Figure 7 It is a schematic diagram of the internal structure of the auxiliary transmission mechanism of the present invention.

[0038] In the figure: 1. conveyor body; 2. support leg; 3. push cylinder; 4. first support frame; 5. detector; 6. limit cleaning mechanism; 61. limit assembly; 611. connecting table; 612. first motor; 613. movable block; 614. limit plate; 615. bidirectional threaded rod; 616. limit rod; 62. cleaning assembly; 621. second support frame; 622. dust suction fan; 623. protective box; 624. first rotating rod; 625. dust suction plate; 626. second motor; 627. second rotating rod; 628. connecting rod; 7. auxiliary transmission mechanism; 71. guide plate; 72. connecting box; 73. damping rod; 74. baffle; 75. slide rod; 76. spring. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0041] Embodiment 1:

[0042] See also Figure 1-5The present invention provides a technical solution: a visual inspection device for surface defects of mechanical parts, comprising a conveyor body 1, a supporting leg 2 is fixedly connected to the bottom of the conveyor body 1, a pushing cylinder 3 is fixedly connected to the front of the conveyor body 1, a first supporting frame 4 is fixedly connected to the top of the conveyor body 1, a detector 5 is arranged on the top of the first supporting frame 4, a limited position cleaning mechanism 6 is arranged on the top of the conveyor body 1, and an auxiliary conveying mechanism 7 is arranged on the back of the conveyor body 1;

[0043] The position limiting and cleaning mechanism 6 includes a position limiting component 61 and a cleaning component 62 . The position limiting component 61 is arranged inside the conveyor body 1 , and the cleaning component 62 is arranged on the top of the conveyor body 1 .

[0044] Furthermore, the limiting component 61 includes a connecting platform 611, which is fixedly connected to the inside of the conveyor body 1. A first motor 612 is fixedly connected to the front of the connecting platform 611. The output end of the first motor 612 passes through the connecting platform 611 and extends to the inside where a bidirectional threaded rod 615 is fixedly connected. A limiting rod 616 is fixedly connected to the inside of the connecting platform 611. A movable block 613 is slidably connected to the outside of the limiting rod 616. The movable block 613 is fixedly connected to the outside of the limiting plate 614 to facilitate adjustment of the position of the limiting plate 614, thereby satisfying the limit transmission of mechanical parts of different sizes and avoiding deviation.

[0045] Furthermore, the movable block 613 is threadedly connected to the bidirectional threaded rod 615, the movable block 613 is slidably connected to the connecting platform 611, and the movable block 613 is slidably connected to the conveyor body 1, so that the adjustment process is more stable.

[0046] Furthermore, the cleaning component 62 includes a second support frame 621, the second support frame 621 is fixedly connected to the top of the conveyor body 1, the second support frame 621 is fixedly connected to the top of the dust suction fan 622, the second support frame 621 is fixedly connected to the inner side of the top of the second support frame 621, the protective box 623 is fixedly connected to the inside of the protective box 623, the second motor 626 is fixedly connected to the inside of the protective box, the output end of the second motor 626 passes through the protective box 623 and extends to the inside where it is fixedly connected to the second rotating rod 627, the second support frame 621 is internally rotatably connected to the first rotating rod 624, the bottom of the first rotating rod 624 is fixedly connected to the dust suction plate 625, and the first rotating rod 624 is internally rotatably connected to the connecting rod 628, which facilitates the reciprocating movement of the dust suction plate 625 to the left and right, thereby increasing the dust suction range of mechanical parts and reducing the occurrence of detection errors.

[0047] Furthermore, grooves are provided at corresponding positions of the connecting rod 628 and the second rotating rod 627, and the second rotating rod 627 is rotatably connected to the connecting rod 628. A connecting pipe is provided between the dust suction fan 622 and the dust suction plate 625 to facilitate a more stable dust removal process.

[0048] Embodiment 2:

[0049] See also Figure 6-7 , and combined with Example 1, it is further obtained that the auxiliary transmission mechanism 7 includes a guide plate 71, the guide plate 71 is fixedly connected to the back of the conveyor body 1, the guide plate 71 is fixedly connected to the back of the connecting box 72, the connecting box 72 is fixedly connected to the inside of the connecting box 76, the spring 76 is fixedly connected to the front of the slide bar 75, the slide bar 75 is fixedly connected to the front of the baffle 74, and the baffle 74 is fixedly connected to the back of the damping rod 73, which is convenient for shock absorbing the mechanical parts on the guide plate 71 to avoid damage to the mechanical parts caused by bumps and the like, and facilitate subsequent rework and other operations.

[0050] Furthermore, the damping rod 73 is fixedly connected to the guide plate 71, grooves are provided at corresponding positions of the connecting box 72 and the sliding rod 75, and the sliding rod 75 is slidably connected inside the groove, and the sliding rod 75 is slidably connected to the guide plate 71, so that the shock absorption process is more stable.

[0051] Embodiment three:

[0052] Combining the first embodiment with the second embodiment, a method for visually inspecting surface defects of mechanical parts is provided, comprising the following steps:

[0053] S1. Feature point setting

[0054] Boundary feature points are set at the four corner points of the first support frame 4, and images containing boundary feature points are obtained. Then, the binocular camera is calibrated to obtain the parameters of the left camera and the right camera in the binocular camera, and a stereo calibration is performed to obtain the relative position relationship matrix between the left and right cameras. The on-site camera collects the surface image of the transmission machine body 1 and the mechanical parts it transmits, and sends it to the remote control platform through the wireless transmission device;

[0055] S2. Camera Calibration

[0056] Calibrate the left and right cameras, detect feature points in the calibrated image by image processing technology, realize three-dimensional reconstruction of feature points by parallax method, and extract boundary feature points of the first support frame 4; if the extraction of boundary feature points fails, return to step S1 to re-extract boundary feature points, otherwise, if the extraction of boundary feature points succeeds, proceed to the next step;

[0057] S3. Data Generation

[0058] Perform perspective projection transformation on the image containing boundary feature points to obtain the corrected target image. On the remote control platform, through digital area positioning and character segmentation, the character image is normalized to obtain the standard pixel size and marked to generate a sample data set.

[0059] S4. Build a network model

[0060] The background of the target area of ​​the corrected target image is removed, the median image of the target area including the surface of the mechanical parts is extracted, a network model based on the PyTorch framework is constructed, and the sample data set is divided proportionally and input into the network model for training.

[0061] Further, in step S3, the region of interest is marked, the marked points are directed to the surroundings, the pixel features of the four corners are extracted, the region of interest, that is, the digital region in the image is extracted, and angle correction is performed at the same time. In the digital region, the minimum character region is cut according to the horizontal and vertical projections, and then the single characters are cut out in equal parts according to the prior information of the digital aspect ratio and the number of rows and columns; the segmented digital characters are standardized according to 20*50 pixels, and the numbers 1 to 9 are marked as folders 1 to 9, and the characters "1." to "9." with decimal points are marked as folders 10 to 19, with a total of 20 types of sample data sets; after cutting out the single characters, the binary image of the extracted digital tube characters is projected in the vertical direction, and the projection formula is:

[0062] Sj = ∑colsjP(i, j)

[0063] Among them, Sj is the sum of the pixels with an image pixel value of 255 in the j-th column, i and j are the row and column coordinates of the image pixel points respectively, cols is the column width of the image, P(i,j) takes the value of 0 or 1, when the grayscale value of the pixel point at the coordinate (i,j) is 255, P(i,j) takes the value of 1, otherwise it is 0; the row number of the image is used as the horizontal axis, and the number of pixels with a grayscale value of 255 corresponding to each row is used as the vertical axis to generate a projection histogram, scan the projection histogram, extract the maximum and minimum boundary coordinate points, so as to obtain the upper and lower boundaries of the digital tube characters, and then achieve character segmentation.

[0064] Furthermore, in step S4, a deep learning sandbox environment based on the PyTorch framework is created, and the ResNet network learning method of CNN feature extraction and residual learning is adopted. The configuration of the deep learning ResNet network environment and the construction of the model are completed based on the GitHub code framework.

[0065] In actual operation, when this device is used, it is first adjusted according to the size of the mechanical parts, and the bidirectional threaded rod 615 is rotated by the first motor 612, and the movable block 613 is moved in cooperation with the limit rod 616, so that the limit plate 614 is moved, and the conveyor body 1 and the detector 5 are operated to start the transmission and detection process of the mechanical parts, and the dust suction fan 622 is operated by the connecting pipe and the dust suction plate 625 to start the surface dust removal of the mechanical parts, and the second motor 626 is operated to rotate the second rotating rod 627, and the connecting rod 628 is cooperated to rotate the first rotating rod 624, so that the dust suction plate 625 is moved to remove dust from the mechanical parts, and the push cylinder 3 is operated to push the mechanical parts with surface defects onto the guide plate 71, and the mechanical parts are contacted with the mechanical parts through the baffle 74, and the baffle 74 is moved to move the slide bar 75, and the mechanical parts on the guide plate 71 are damped in cooperation with the spring 76 and the damping rod 73.

[0066] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims

1. A visual inspection device for surface defects of mechanical parts, comprising a conveyor body (1), characterized in that: The bottom of the conveyor body (1) is fixedly connected to a support leg (2), the front of the conveyor body (1) is fixedly connected to a push cylinder (3), the top of the conveyor body (1) is fixedly connected to a first support frame (4), the top of the first support frame (4) is provided with a detector (5), the top of the conveyor body (1) is provided with a limited position cleaning mechanism (6), and the back of the conveyor body (1) is provided with an auxiliary transmission mechanism (7); The position limiting and cleaning mechanism (6) comprises a position limiting component (61) and a cleaning component (62); the position limiting component (61) is arranged inside the conveyor body (1), and the cleaning component (62) is arranged on the top of the conveyor body (1).

2. A visual inspection device for surface defects of mechanical parts according to claim 1, characterized in that: The limiting assembly (61) comprises a connecting platform (611), wherein the connecting platform (611) is fixedly connected to the inside of the conveyor body (1), a first motor (612) is fixedly connected to the front of the connecting platform (611), an output end of the first motor (612) passes through the connecting platform (611) and extends to the inside where a bidirectional threaded rod (615) is fixedly connected, a limiting rod (616) is fixedly connected to the inside of the connecting platform (611), a movable block (613) is slidably connected to the outside of the limiting rod (616), and the movable block (613) is fixedly connected to the outside of the limiting plate (614).

3. A visual inspection device for surface defects of mechanical parts according to claim 2, characterized in that: The movable block (613) is threadedly connected to the bidirectional threaded rod (615), the movable block (613) is slidably connected to the connecting platform (611), and the movable block (613) is slidably connected to the conveyor body (1).

4. The device for visually inspecting surface defects of mechanical parts according to claim 1, characterized in that: The cleaning assembly (62) includes a second support frame (621), the second support frame (621) is fixedly connected to the top of the conveyor body (1), a dust suction fan (622) is fixedly connected to the top of the second support frame (621), a protective box (623) is fixedly connected to the inner side of the top of the second support frame (621), a second motor (626) is fixedly connected inside the protective box (623), an output end of the second motor (626) passes through the protective box (623) and extends to the inside where it is fixedly connected to a second rotating rod (627), the second support frame (621) is rotatably connected to the first rotating rod (624), a dust suction plate (625) is fixedly connected to the bottom of the first rotating rod (624), and a connecting rod (628) is rotatably connected inside the first rotating rod (624).

5. The device for visually inspecting surface defects of mechanical parts according to claim 4, characterized in that: The connecting rod (628) and the second rotating rod (627) are provided with grooves at corresponding positions, and the second rotating rod (627) is rotatably connected to the connecting rod (628), and a connecting pipe is provided between the dust suction fan (622) and the dust suction plate (625).

6. The device for visually inspecting surface defects of mechanical parts according to claim 1, characterized in that: The auxiliary transmission mechanism (7) includes a guide plate (71), the guide plate (71) is fixedly connected to the back of the conveyor body (1), the back of the guide plate (71) is fixedly connected to a connection box (72), the connection box (72) is fixedly connected inside with a spring (76), the front of the spring (76) is fixedly connected to a slide rod (75), the front of the slide rod (75) is fixedly connected to a baffle (74), and the back of the baffle (74) is fixedly connected to a damping rod (73).

7. A visual inspection device for surface defects of mechanical parts according to claim 6, characterized in that: The damping rod (73) is fixedly connected to the guide plate (71), a groove is provided at a corresponding position of the connection box (72) and the slide rod (75), and the slide rod (75) is slidably connected inside the groove, and the slide rod (75) is slidably connected to the guide plate (71).

8. A method for visually inspecting surface defects of mechanical parts, characterized in that: The following steps are involved: S1. Feature point setting Boundary feature points are respectively set at the four corner points of the first support frame (4), and an image containing the boundary feature points is obtained. Then, the binocular camera is calibrated to obtain the parameters of the left camera and the right camera in the binocular camera, and a stereo calibration is performed to obtain a relative position relationship matrix between the left and right cameras. The on-site camera collects the surface image of the transmission machine body (1) and the mechanical parts it transmits, and sends it to the remote control platform through a wireless transmission device; S2. Camera Calibration The left and right cameras are calibrated, and feature points in the calibrated image are detected by image processing technology, and three-dimensional reconstruction of the feature points is achieved by parallax method to extract boundary feature points of the first support frame (4); if the extraction of boundary feature points fails, the process returns to step S1 to re-extract the boundary feature points; otherwise, if the extraction of boundary feature points succeeds, the process proceeds to the next step; S3. Data Generation Perform perspective projection transformation on the image containing boundary feature points to obtain the corrected target image. On the remote control platform, through digital area positioning and character segmentation, the character image is normalized to obtain the standard pixel size and marked to generate a sample data set. S4. Build a network model The background of the target area of ​​the corrected target image is removed, the median image of the target area including the surface of the mechanical parts is extracted, a network model based on the PyTorch framework is constructed, and the sample data set is divided proportionally and input into the network model for training.

9. A method for visually inspecting surface defects of mechanical parts according to claim 8, characterized in that: In the step S3, the region of interest is marked, the marked points are directed to the surroundings, the pixel features of the four corners are extracted, the region of interest, that is, the digital region in the image is extracted, and angle correction is performed at the same time. In the digital region, the minimum character region is cut according to the horizontal and vertical projections, and then the single characters are cut out in equal parts according to the prior information digital aspect ratio and the number of rows and columns; the segmented digital characters are standardized according to 20*50 pixels, and the numbers 1 to 9 are marked as folders 1 to 9 respectively, and the characters "1." to "9." with decimal points are marked as folders 10 to 19, with a total of 20 types of sample data sets; after cutting out the single characters, the binary image of the extracted digital tube characters is projected in the vertical direction, and the projection formula is: Sj = ∑colsjP(i, j) Among them, Sj is the sum of the pixels with an image pixel value of 255 in the j-th column, i and j are the row and column coordinates of the image pixel points respectively, cols is the column width of the image, P(i,j) takes the value of 0 or 1, when the grayscale value of the pixel point at the coordinate (i,j) is 255, P(i,j) takes the value of 1, otherwise it is 0; the row number of the image is used as the horizontal axis, and the number of pixels with a grayscale value of 255 corresponding to each row is used as the vertical axis to generate a projection histogram, scan the projection histogram, extract the maximum and minimum boundary coordinate points, so as to obtain the upper and lower boundaries of the digital tube characters, and then achieve character segmentation.

10. A method for visually inspecting surface defects of mechanical parts according to claim 8, characterized in that: In step S4, a deep learning sandbox environment based on the PyTorch framework is created, and the ResNet network learning method of CNN feature extraction and residual learning is adopted to complete the configuration of the deep learning ResNet network environment and the construction of the model based on the GitHub code framework.

Citation Information

Cited By

  • Visual inspection equipment and VDA connector visual inspection method

    CN120205486A