Product surface defect detection system and detection method based on machine vision

Through an inspection system based on machine vision, line array cameras and manipulators are used to automatically detect surface defects of small module worms, which solves the problems of low detection efficiency and low accuracy in the existing technology, and achieves efficient and automated detection and classification arrangement. material.

CN111672773BActive Publication Date: 2024-09-20HARBIN INST OF TECH AT WEIHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010667158.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-13
Publication Date
2024-09-20
Estimated Expiration
2040-07-13

AI Technical Summary

Technical Problem

In the existing technology, the detection efficiency and accuracy of surface defects of small and medium-sized worm gears are low, and the labor cost is high. Especially when detecting small-sized defects, human eye fatigue is aggravated, which reduces the detection efficiency and accuracy.

Method used

A product surface defect detection system based on machine vision is adopted, including a machine platform, loading device, detection device, manipulator and unloading sorting device. Line array cameras and light sources are used for image acquisition and processing, combined with automatic rotation and sorting of the manipulator. Implement automated detection.

Benefits of technology

It effectively improves the detection efficiency and accuracy, reduces labor costs, realizes automated detection and classification, and is easy to operate and fast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111672773B
    Figure CN111672773B
Patent Text Reader

Abstract

The present invention relates to a product surface defect detection system and detection method based on machine vision, which solves the technical problems of low efficiency, low accuracy and high labor cost in detecting surface defects of small modulus worms by manual visual inspection in the prior art, and comprises a machine platform, a feeding device, a detection device, a manipulator and a material unloading and sorting device. The present invention is widely used for quality detection of product surface defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of worm quality inspection equipment, and in particular to a product surface defect detection system and detection method based on machine vision. Background Art

[0002] The worm is an important basic mechanical part in industrial production. During the processing, it is affected by the processing technology, production environment and other factors, and surface defects such as pits, notches and scratches will inevitably occur. Products with surface defects will be eliminated after the quality inspection process.

[0003] In actual industrial production, the output of small modulus worms is huge, and detection efficiency is crucial for worm quality inspection. However, the surface defects of small modulus worms are generally inspected by manual visual inspection, which has technical problems such as low detection efficiency, low detection accuracy, and high labor costs. In particular, for some small defects, they need to be inspected under brighter light sources, which will quickly increase eye fatigue and reduce detection efficiency and accuracy. Summary of the invention

[0004] The present invention aims to solve the technical problems of low efficiency, low accuracy and high labor cost in detecting surface defects of small-modulus worms by manual visual inspection, and provides a product surface defect detection system and detection method based on machine vision.

[0005] The present invention provides a product surface defect detection system based on machine vision, including a machine platform, a loading device, a detection device, a manipulator and a material unloading and sorting device;

[0006] The feeding device includes a motor, a rotating shaft, a motor bracket, a first bearing seat, a second bearing seat, a retaining ring, a turntable and a support plate. The motor bracket is fixedly connected to the machine platform, the motor is fixedly connected to the motor bracket, the rotating shaft is connected to the output shaft of the motor through a coupling, the first bearing seat is fixedly connected to the machine platform through the first bracket, the second bearing seat is fixedly connected to the machine platform through the second bracket, and the two ends of the rotating shaft are respectively connected to the first bearing seat and the second bearing seat; the support plate is fixedly connected to the machine platform, the retaining ring is fixedly connected to the support plate, the retaining ring is provided with a central through hole, and the support plate An axial hole is provided on the top, and the rotating shaft passes through the axial hole of the supporting plate and the central through hole of the retaining ring; the retaining ring surrounds the turntable, and a gap is provided between the outer edge of the turntable and the inner wall of the retaining ring; the retaining ring is provided with a feeding port, a bottom discharge port and a top opening; the turntable is provided with a plurality of product receiving grooves uniformly distributed along the circumferential direction and a plurality of plane needle roller bearing receiving chambers uniformly distributed along the circumferential direction corresponding to the number of product receiving grooves to be tested, the bottom surface of the plane needle roller bearing receiving chamber is connected with a positioning cylinder, a plane needle roller bearing is provided in the plane needle roller bearing receiving chamber, and the positioning cylinder passes through the plane needle roller bearing;

[0007] The detection device includes a mounting bracket, a linear array camera and a light source. The mounting bracket is fixedly connected to the machine platform, the linear array camera is connected to the mounting bracket, the light source is connected to the mounting bracket, and the lens of the linear array camera is facing the top position of the turntable.

[0008] The manipulator is connected to the machine platform and is located just above the top opening of the retaining ring. The manipulator is used to drive the product to be tested placed in the product receiving groove on the top of the turntable to rotate;

[0009] The unloading and sorting device is connected to the machine platform, and is used to sort the tested products output from the bottom discharge port of the retaining ring into qualified and unqualified categories.

[0010] Preferably, the unloading and sorting device includes a hose connecting plate, a unloading hose, an unqualified discharge hose, a qualified discharge hose, a discharge hose connecting plate and an electric slide. The unloading hose is connected to the hose connecting plate, the unqualified discharge hose and the qualified discharge hose are respectively connected to the discharge hose connecting plate, the discharge hose connecting plate is connected to a slider on the electric slide, the electric slide is fixedly connected to the bottom surface of the machine, the hose connecting plate is fixedly connected to the support plate, the upper inlet of the unloading hose is located directly below the bottom discharge port of the retaining ring, the unloading hose passes through the machine, and the lower outlet of the unloading hose is located above the discharge hose connecting plate.

[0011] Preferably, the manipulator includes a Z-axis slide, a rotary drive motor, a motor seat, a connecting plate, a push rod, a sleeve, a spring, an infrared sensor, a bushing, and a connecting block. The Z-axis slide is fixedly connected to the machine platform, the connecting plate is fixedly connected to the slider on the Z-axis slide, the motor seat is fixedly connected to the connecting plate, the connecting block is fixedly connected to the connecting plate, the rotary drive motor is fixedly connected to the upper part of the motor seat, the sleeve is fixedly connected to the connecting block, the bushing is connected to the output shaft of the rotary drive motor through a coupling, the upper end of the push rod is connected to the sleeve, the middle part of the push rod is located in the sleeve, the spring is arranged in the sleeve, the spring is sleeved in the middle part of the push rod, the connecting block is provided with a bearing chamber, a plane bearing is arranged in the bearing chamber, the upper part of the push rod passes through the plane bearing, the upper part of the push rod is provided with a shaft shoulder, the shaft shoulder presses down the plane bearing, the lower part of the push rod is provided with a circular plate, the upper end of the spring contacts the bottom surface of the connecting block, the lower end of the spring contacts the circular plate, and the infrared sensor is connected to the circular plate of the push rod;

[0012] The lower end of the ejector pin is located just above the top opening of the retaining ring.

[0013] Preferably, the manipulator includes a Z-axis slide, a connecting plate, a rotation drive motor, a motor seat, a push rod and an infrared sensor. The Z-axis slide is fixedly connected to the machine platform, the connecting plate is fixedly connected to the slider on the Z-axis slide, the motor seat is fixedly connected to the connecting plate, the rotation drive motor is fixedly connected to the motor seat, the push rod is connected to the output shaft of the rotation drive motor through a coupling, and the infrared sensor is connected to the lower part of the push rod.

[0014] Preferably, the product surface defect detection system based on machine vision also includes a conveyor belt device, which is located below the machine platform, and the lower ends of the unqualified discharge hose and the qualified discharge hose of the unloading and sorting device are placed on two conveyor belts of the conveyor belt device.

[0015] The beneficial effect of the present invention is that, based on machine vision technology, it can effectively replace the manual naked eye visual inspection method, reduce labor costs, and improve detection efficiency and accuracy. It has a high degree of automation, is easy to operate, has a fast detection speed, and can be classified and arranged.

[0016] Further features of the present invention will be clearly described in the following description of the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the structure of the product surface defect detection system based on machine vision;

[0018] Figure 2 yes Figure 1 A top view of a product surface defect detection system based on machine vision is shown;

[0019] Figure 3 yes Figure 1 In the structure shown, the position relationship diagram between the manipulator and the turntable of the loading device;

[0020] Figure 4 yes Figure 1 A partial enlarged view of the top of the turntable in the structure shown;

[0021] Figure 5 yes Figure 3 A partial enlarged view of point B in the middle;

[0022] Figure 6 This is a schematic diagram of the retaining ring of the feeding device being fixedly installed on the machine platform;

[0023] Figure 7 yes Figure 6 Cross-sectional view of the middle retaining ring and the rotating disc;

[0024] Figure 8 It is a schematic diagram of the structure of the robot;

[0025] Fig. 9 yes Figure 8 a side view of the structure shown;

[0026] Fig.10 is a cross-sectional view of the manipulator;

[0027] Fig.11 It is a structural schematic diagram of a material unloading and sorting device;

[0028] Fig.12It is the connection relationship diagram between the unloading and sorting device and the machine platform;

[0029] Fig.13 yes Fig.12 In the figure, the position relationship diagram of the discharge hose, the unqualified discharge hose, and the qualified discharge hose;

[0030] Fig.14 It is a structural diagram of a specific implementation form of the manipulator;

[0031] Fig.15 It is a flowchart of the computer image processing process.

[0032] Explanation of symbols in the figure:

[0033] 100. machine platform, 200. feeding device, 210. motor, 220. coupling, 230. rotating shaft, 240. motor bracket, 250. first bearing seat, 260. second bearing seat, 270. retaining ring, 271. feeding port, 272. bottom discharge port, 273. top opening, 280. turntable, 281. positioning cylinder, 282. plane needle roller bearing, 283. plane needle roller bearing accommodation chamber, 284. product accommodation slot to be tested, 290. support plate; 300. detection device, 310. linear array camera, 311. lens, 320. light source, 330. mounting bracket; 400. manipulator, 401. Z-axis slide, 402. rotation drive motor, 4 03. Coupling, 404. Motor seat, 405. Connecting plate, 406. Push rod, 407. Sleeve, 408. Spring, 409. Infrared sensor, 410. Plane bearing, 411. Bushing, 412. Connecting block; 500. Unloading and sorting device, 510. Hose connecting plate, 520. Unloading hose, 530. Unqualified discharge hose, 540. Qualified discharge hose, 550. Discharge hose connecting plate, 560. Electric slide; 600. Conveyor belt device, 700. Display; 800. Manipulator, 801. Rotating drive motor, 802. Motor seat, 803. Coupling, 804. Push rod, 805. Infrared sensor; 1. Small modulus worm. DETAILED DESCRIPTION

[0034] The present invention will be further described in detail below with reference to the accompanying drawings by way of specific embodiments.

[0035] like Figure 1-7 As shown, the product surface defect detection system based on machine vision includes a machine platform 100, a loading device 200, a detection device 300, a robot 400, a material sorting device 500, and a conveyor belt device 600. The loading device 200, the detection device 300, the robot 400, and the material sorting device 500 are respectively installed on the machine platform 100, and the conveyor belt device 600 is located below the machine platform 100.

[0036] The feeding device 200 includes a motor 210, a coupling 220, a rotating shaft 230, a motor bracket 240, a first bearing seat 250, a second bearing seat 260, a retaining ring 270, a turntable 280, and a support plate 290. The motor bracket 240 is fixedly installed on the machine 100, the motor 210 is fixedly connected to the motor bracket 240, the rotating shaft 230 is connected to the output shaft of the motor 210 through the coupling 220, the first bearing seat 250 is fixedly installed on the machine 100 through the first bracket, the second bearing seat 260 is fixedly installed on the machine 100 through the second bracket, one end of the rotating shaft 230 is connected to the first bearing seat 250, and the other end of the rotating shaft 230 is connected to the second bearing seat 260. The support plate 290 is fixedly connected to the machine 100, and the retaining ring 270 is fixedly installed on the support plate 290 by screws. The retaining ring 270 is provided with a central through hole, and the support plate 290 is provided with an axial hole 291. The rotating shaft 230 passes through the axial hole 291 and the central through hole of the retaining ring 270. The retaining ring 270 surrounds the turntable 280, and there is a certain gap between the outer edge of the turntable 280 and the inner wall of the retaining ring 270. The turntable 280 will not interfere with the retaining ring 270 during rotation. The retaining ring 270 is provided with a loading port 271, a bottom discharge port 272 and a top opening 273. The turntable 280 is provided with a plurality of product receiving grooves 284 uniformly distributed along the circumferential direction, and the turntable 280 is provided with a plurality of plane needle roller bearing receiving chambers 283 uniformly distributed along the circumferential direction, one plane needle roller bearing receiving chamber 283 corresponds to one product receiving groove 284 to be tested, the positioning cylinder 281 is fixedly connected to the bottom surface of the plane needle roller bearing receiving chamber 283, the plane needle roller bearing 282 is sleeved on the positioning cylinder 281, and the plane needle roller bearing 282 is located in the plane needle roller bearing receiving chamber 283. In this embodiment, the number of the positioning cylinders 281 is 24, and the corresponding plane needle roller bearings 28 are 24. The setting of 24 workstations is only an example, and the number of the positioning cylinders 281 can be designed according to actual needs.

[0037] The detection device 300 includes a mounting bracket 330, a linear array camera 310, and a light source 320. The mounting bracket 330 is fixedly connected to the machine 100, the linear array camera 310 is fixedly connected to the mounting bracket 330, the light source 320 is fixedly connected to the mounting bracket 330, and the lens 311 of the linear array camera 310 is facing the top position of the turntable 280.

[0038] The manipulator 400 is used to drive the small modulus worm placed on the top of the turntable 280 to rotate, combined with Figure 8 , 910, the manipulator 400 includes a Z-axis slide 401, a rotation drive motor 402, a coupling 403, a motor seat 404, a connecting plate 405, a push rod 406, a sleeve 407, a spring 408, an infrared sensor 409, a plane bearing 410, a sleeve 411, and a connecting block 412. The Z-axis slide 401 is fixedly mounted on the machine table 100, the connecting plate 405 is fixedly connected to the slider on the Z-axis slide 401, the motor seat 404 is fixedly connected to the connecting plate 405, the connecting block 412 is fixedly connected to the connecting plate 405, the rotation drive motor 402 is fixedly mounted on the upper position of the motor seat 402, the sleeve 407 is fixedly connected to the connecting block 412, and the sleeve 411 is connected to the rotation drive motor 402 through the coupling 403. The output shaft is connected, the upper end of the push rod 406 is connected to the sleeve 411 through a key, the middle part of the push rod 406 is located in the sleeve 407, the spring 408 is arranged in the sleeve 407, the spring 408 is sleeved in the middle part of the push rod 406, the connecting block 412 is provided with a bearing chamber, the plane bearing 410 is installed in the bearing chamber, the plane bearing 410 is sleeved on the upper part of the push rod 406, the upper part of the push rod 406 is provided with a shoulder 406-1, the shoulder 406-1 presses down the top of the plane bearing 410, the lower part of the push rod 406 is connected with a circular plate 406-2, the upper end of the spring 408 contacts the bottom surface of the connecting block 412, the lower end of the spring 408 contacts the circular plate 406-2, and the infrared sensor 409 is connected to the circular plate 406-2 of the push rod 406.

[0039] The lower end of the push rod 406 is located just above the top opening 273 of the retaining ring 270 .

[0040] Combination Figure 11-13 As shown, the material sorting device 500 includes a hose connecting plate 510, a material discharge hose 520, an unqualified material discharge hose 530, a qualified material discharge hose 540, a discharge hose connecting plate 550, and an electric slide 560. The material discharge hose 520 is connected to the hose connecting plate 510, the unqualified material discharge hose 530 and the qualified material discharge hose 540 are respectively connected to the discharge hose connecting plate 550, the discharge hose connecting plate 550 is connected to the slider on the electric slide 560, and the electric slide 560 is fixedly installed on the bottom surface of the machine 100, and the hose connecting plate 510 is connected to the support plate 2 90 is fixedly connected, the upper inlet of the discharge hose 520 is located directly below the bottom discharge port 272 of the retaining ring 270, the discharge hose 520 passes through the machine 100, the position of the discharge hose 520 is moderate and unchanged, the lower outlet of the discharge hose 520 is located above the discharge hose connecting plate 550, and the electric slide 560 drives the discharge hose connecting plate 550 to move horizontally, so that the upper inlet of the unqualified discharge hose 530 can be aligned with the lower outlet of the discharge hose 520 or the upper inlet of the qualified discharge hose 540 can be aligned with the lower outlet of the discharge hose 520. The upper inlet of the discharge hose 520 is preferably a tapered port, which is conducive to discharge.

[0041] refer to Figure 1 The lower ends of the unqualified discharge hose 530 and the qualified discharge hose 540 are placed on the two conveyor belts of the conveyor belt device 600, and the two conveyor belts of the conveyor belt device 600 are respectively collected by the small-module worm gears output from the unqualified discharge hose 530 and the qualified discharge hose 540.

[0042] The following describes the working process of the product surface defect detection system based on machine vision:

[0043] The processed small modulus worm is dusted by a dust removal gun in a clean room, and then the operator manually puts the small modulus worm into the feed port 271 of the retaining ring 270. Figure 3 As shown in FIG. 1 , the small modulus worm is sleeved on the positioning cylinder 281 of the rotating disk 280, that is, the positioning cylinder 281 passes through the central through hole of the small modulus worm. Then, under the action of the controller, the motor 210 drives the rotating disk 280 to rotate, and the small modulus worm moves to the top opening 273 of the retaining ring 270, as shown in FIG. Figure 3 and 4 As shown; at this time, the infrared sensor 805 detects that there is a small modulus worm gear below, and the controller instructs the Z-axis slide 401 of the manipulator 400 to work according to the signal feedback from the infrared sensor 805, driving the push rod 406 to gradually descend from the initial position and approach the small modulus worm gear 1, so that the lower end of the push rod 406 is pressed against the center hole of the top end face of the small modulus worm gear 1 (at this time, the spring 408 plays a buffering role), and the small modulus worm gear 1 is pressed against the upper end face of the plane needle roller bearing 282. Then, the driving motor 402 is rotated to drive the push rod 406 to rotate, and the push rod 406 drives the small modulus worm 1 to rotate one circle. At the same time, the linear array camera 310 of the detection device 300 works to collect images of the surface of the small modulus worm 1. The collected images are transmitted to the computer, and the computer completes image processing. After the image collection is completed, the push rod 406 stops rotating and rises to separate from the small modulus worm 1 and return to the initial position. The small modulus worm 1 after image collection continues to rotate with the turntable 280 to the bottom discharge port 272 of the retaining ring 270, and the small modulus worm 1 falls through the retaining ring 270 under the action of gravity. After the bottom discharge port 272, it enters the discharge hose 520. The computer determines whether the small modulus worm is defective or qualified based on the image processing results, and instructs the discharge sorting device 500 to operate, so that the qualified discharge hose 540 is aligned with the discharge hose 520, so that the qualified small modulus worm enters the qualified discharge hose 540, and the unqualified discharge hose 530 is aligned with the discharge hose 520, so that the unqualified small modulus worm enters the unqualified discharge hose 530. The conveyor belt device 600 collects the small modulus worm output from the unqualified discharge hose 530 and the qualified discharge hose 540.

[0044] The turntable 280 stops rotating after rotating 15°, and manual loading and image acquisition of the small modulus worm at the detection position on the top of the turntable 280 are performed.

[0045] The display 700 is installed on the machine platform 100 , and the computer sends image information to the display 700 . The operator can observe the image of the surface of the small-module worm from the display 700 .

[0046] like Fig.14 As shown, the above-mentioned manipulator 400 can be replaced by a manipulator 800, which includes a Z-axis slide, a connecting plate, a rotation drive motor 801, a motor seat 802, a coupling 803, a push rod 804, and an infrared sensor 805. The Z-axis slide is fixedly mounted on the machine platform 100, the connecting plate is fixedly connected to the slider on the Z-axis slide, the motor seat 802 is fixedly connected to the connecting plate 405, the rotation drive motor 801 is fixedly connected to the motor seat 802, the push rod 804 is connected to the output shaft of the rotation drive motor 801 through the coupling 803, and the infrared sensor 805 is connected to the lower part of the push rod 804.

[0047] It should be noted that the specific structure of the manipulator 400 may also adopt existing technologies (such as a clamping manipulator structure), as long as it can drive a small-modulus worm to rotate.

[0048] The process of performing image processing on the image information collected by the linear array camera 310 by the computer may adopt the related processing algorithm of the prior art, or may adopt the following algorithm:

[0049] Step 1, image preprocessing. The image will be affected by various noises during the formation process. These noises are superimposed on the signal charge, which will seriously reduce the clarity and accuracy of the image. Therefore, the image needs to be preprocessed. The present invention uses adaptive median filtering to preprocess the image, and processes the image through the statistical characteristics of the local window pixels (such as mean, median, variance, etc.). Without having to know the statistical information of the input signal and noise in advance, different statistical characteristic parameters can be estimated and adjusted in the filtering process to achieve the effect of adaptive optimal filtering. Compared with traditional median filtering, adaptive median filtering can handle impulse noise with a higher probability, and maintain image clarity and details while smoothing non-impulse noise.

[0050] The adaptive median filter calculation has two processing steps, which are marked as: A and B.

[0051] A: A1 = Z med -Z min

[0052] A2=Z med -Z max

[0053] If A1>0 and A2<0, jump to process B; otherwise, increase the window size. If the increased window size is < S max , then repeat process A, otherwise, output Z med ;

[0054] B: B1 = Z xy -Z min

[0055] Among them, Z min , Z med , Z max They are rectangular windows S centered at coordinates (x, y). xy The minimum, median, and maximum values ​​of the grayscale values, Z xy is the gray value at the coordinate (x, y), S max For S xy The maximum size allowed.

[0056] Step 2, image segmentation. The purpose of image segmentation is to classify image pixels into several statistically uniform and non-intersecting sub-regions according to certain characteristics of the image, such as grayscale, color, texture, shape, etc., so that each region has consistency, and the attribute characteristics between adjacent regions have obvious differences, thereby separating the target area from the background image. The present invention uses a histogram-based binary threshold for image segmentation, which is suitable for images with obvious double peaks in the grayscale histogram. Through image preprocessing, the grayscale value t=Z of each pixel (x, y) in the image after filtering has been obtained. xy Or t = Z med , then according to the formula Calculate the grayscale histogram of the image, where t k is a gray value, n k is the gray value t in the image k The number of pixels in the image, n is the total number of pixels in the image, g(t k ) is the gray value t in the image k The principle of the image segmentation method based on the histogram binary threshold is to use the minimum value of the valley between two peaks as the global threshold, that is:

[0057]

[0058] Where t1 and t2 are the grayscale values ​​at the two peaks, t * is the desired threshold.

[0059] Step 3, defect extraction, the present invention uses morphological methods to separate the defective area of ​​the worm, including its position and size. The closed operation is used to fill the area where the tooth top part is disconnected and concave inward, and then the filled area is subtracted from the original area to obtain the dark area in the bright area of ​​the tooth top. The opening operation generally smoothes the contour of the object, disconnects the narrow neck and eliminates thin protrusions. The closing operation also smoothes part of the contour, but in contrast to the opening operation, the closing operation can bridge narrow discontinuities and slender grooves, eliminate small holes, and fill the breaks in the contour line.

[0060] The definition of opening and closing operations on a set X using a structural element B is as follows:

[0061]

[0062]

[0063] in and Θ represent expansion and erosion respectively. Let B represent the structural element, X represent the binary region, and the erosion and expansion of the workspace x are defined as:

[0064]

[0065]

[0066] Step 4: Classification and identification.

[0067] It should be noted that the present invention is not limited to detecting small-modulus worm gears, but can also detect other types of worm gears or other mechanical parts or other products that can be positioned on a turntable.

[0068] The above schematically describes the present invention and its embodiments, which are not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it, without departing from the purpose of the invention, other forms of part configurations, drive devices and connection methods, and structures and embodiments similar to the technical solution without creative design should all fall within the scope of protection of the present invention.

Claims

1. A product surface defect detection system based on machine vision, characterized in that: It includes a machine platform, a loading device, a detection device, a manipulator and a material unloading and sorting device; The feeding device includes a motor, a rotating shaft, a motor bracket, a first bearing seat, a second bearing seat, a retaining ring, a turntable and a support plate. The motor bracket is fixedly connected to the machine platform, the motor is fixedly connected to the motor bracket, the rotating shaft is connected to the output shaft of the motor through a coupling, the first bearing seat is fixedly connected to the machine platform through the first bracket, the second bearing seat is fixedly connected to the machine platform through the second bracket, and the two ends of the rotating shaft are respectively connected to the first bearing seat and the second bearing seat; the support plate is fixedly connected to the machine platform, the retaining ring is fixedly connected to the support plate, the retaining ring is provided with a central through hole, and the The support plate is provided with an axial hole, and the rotating shaft passes through the axial hole of the support plate and the central through hole of the retaining ring; the retaining ring surrounds the turntable, and a gap is provided between the outer edge of the turntable and the inner wall of the retaining ring; the retaining ring is provided with a loading port, a bottom discharge port and a top opening; the turntable is provided with a plurality of product receiving grooves uniformly distributed along the circumferential direction and a plurality of plane needle roller bearing receiving chambers uniformly distributed along the circumferential direction corresponding to the number of product receiving grooves to be tested, the bottom surface of the plane needle roller bearing receiving chamber is connected with a positioning cylinder, a plane needle roller bearing is provided in the plane needle roller bearing receiving chamber, and the positioning cylinder passes through the plane needle roller bearing; The detection device comprises a mounting bracket, a linear array camera and a light source, wherein the mounting bracket is fixedly connected to the machine platform, the linear array camera is connected to the mounting bracket, the light source is connected to the mounting bracket, and the lens of the linear array camera faces the top position of the turntable; The manipulator is connected to the machine platform, and is located directly above the top opening of the retaining ring. The manipulator is used to drive the product to be tested placed in the product to be tested containing groove on the top of the turntable to rotate; The unloading and sorting device is connected to the machine platform, and is used to sort the tested products output from the bottom discharge port of the retaining ring into qualified and unqualified categories.

2. The product surface defect detection system based on machine vision according to claim 1, characterized in that: The unloading and sorting device includes a hose connecting plate, a unloading hose, an unqualified discharge hose, a qualified discharge hose, a discharge hose connecting plate and an electric slide, the unloading hose is connected to the hose connecting plate, the unqualified discharge hose and the qualified discharge hose are respectively connected to the discharge hose connecting plate, the discharge hose connecting plate is connected to a slider on the electric slide, the electric slide is fixedly connected to the bottom surface of the machine, the hose connecting plate is fixedly connected to the support plate, the upper inlet of the unloading hose is located directly below the bottom discharge port of the retaining ring, the unloading hose passes through the machine, and the lower outlet of the unloading hose is located above the discharge hose connecting plate.

3. The product surface defect detection system based on machine vision according to claim 1 or 2, characterized in that: The manipulator includes a Z-axis slide, a rotation drive motor, a motor seat, a connecting plate, a push rod, a sleeve, a spring, an infrared sensor, a bushing, and a connecting block. The Z-axis slide is fixedly connected to the machine platform, the connecting plate is fixedly connected to the slider on the Z-axis slide, the motor seat is fixedly connected to the connecting plate, the connecting block is fixedly connected to the connecting plate, the rotation drive motor is fixedly connected to the upper part of the motor seat, the sleeve is fixedly connected to the connecting block, the bushing is connected to the output shaft of the rotation drive motor through a coupling, the upper end of the push rod is connected to the sleeve, the middle part of the push rod is located in the sleeve, the spring is arranged in the sleeve, the spring is sleeved in the middle part of the push rod, the connecting block is provided with a bearing chamber, a plane bearing is arranged in the bearing chamber, the upper part of the push rod passes through the plane bearing, the upper part of the push rod is provided with a shaft shoulder, the shaft shoulder presses down the plane bearing, the lower part of the push rod is connected with a circular plate, the upper end of the spring contacts the bottom surface of the connecting block, the lower end of the spring contacts the circular plate, and the infrared sensor is connected to the circular plate of the push rod; The lower end of the push rod is located just above the top opening of the retaining ring.

4. The product surface defect detection system based on machine vision according to claim 1 or 2, characterized in that: The manipulator includes a Z-axis slide, a connecting plate, a rotation drive motor, a motor seat, a push rod and an infrared sensor. The Z-axis slide is fixedly connected to the machine platform, the connecting plate is fixedly connected to the slider on the Z-axis slide, the motor seat is fixedly connected to the connecting plate, the rotation drive motor is fixedly connected to the motor seat, the push rod is connected to the output shaft of the rotation drive motor through a coupling, and the infrared sensor is connected to the lower part of the push rod.

5. The product surface defect detection system based on machine vision according to claim 2, characterized in that: The product surface defect detection system based on machine vision also includes a conveyor belt device, which is located below the machine platform, and the lower ends of the unqualified discharge hose and the qualified discharge hose of the unloading and sorting device are placed on two conveyor belts of the conveyor belt device.

6. A detection method using the product surface defect detection system based on machine vision according to claim 1, characterized in that: The following steps are involved: Step 1, image preprocessing; Step 2, image segmentation; Step 3, defect extraction; Step 4: Classification and identification.