A workpiece appearance detection method and detection equipment based on visual detection

Through visual detection technology, the movement and shape analysis of reflected light spots are solved, and the problem that the existing technology cannot detect the dispensing shape of the workpiece is achieved, and the accurate judgment of the dispensing thickness and shape of the workpiece is improved, and the detection speed and accuracy are improved.

CN118706847BActive Publication Date: 2024-11-08XIAMEN SOFTWARE VOCATIONAL & TECH COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art cannot effectively detect whether the shape of the workpiece dispensing is qualified, especially when the dispensing size is small and easy to deform, it is impossible to accurately judge the thickness and shape of the colloid.

Method used

Using a visual detection method, the position and movement of the reflected spot on the workpiece surface can be captured through the camera and a movable light source, and the movement speed and change rate of the reflected spot are calculated. Combined with shape analysis and threshold judgment, we can determine whether the thickness and shape of the dispensing are Comply with preset standards.

Benefits of technology

Accurate identification and judgment of the thickness and shape of the workpiece dispensing is achieved, and expensive 3D scanning equipment is avoided, detection speed and accuracy are improved, and different dispensing shapes are adapted to obtain more accurate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118706847B_ABST
    Figure CN118706847B_ABST
Patent Text Reader

Abstract

The present invention relates to a workpiece appearance detection method and detection equipment based on visual detection, comprising the following steps: S1, placing a workpiece to be detected after glue dispensing is placed directly below a camera; S2, lighting and controlling a light source to move a distance at a uniform speed horizontally above the workpiece to be detected with one side of the camera as a starting point; S3, in the process of the movement of the light source, capturing the image of the workpiece to be detected by the camera at intervals, and analyzing the position of each reflection spot in the image of the workpiece to be detected; S4, calculating the total moving distance of the reflection spot, if the total moving distance meets the preset total moving distance interval, calculating the moving speed of the reflection spot, analyzing the moving speed change rate of the reflection spot, if the moving speed change rate of the reflection spot meets the preset change rate interval, determining that the workpiece to be detected is qualified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of workpiece appearance detection, and in particular to a workpiece appearance detection method and detection equipment based on visual detection. Background Art

[0002] A workpiece is a product component in the manufacturing process. A workpiece can be a single part or a combination of several parts fixed together. The processing of a workpiece involves multiple steps, one of which is dispensing glue on the workpiece.

[0003] In order to detect the glue dispensing effect of the workpiece, it is necessary to inspect the workpiece to obtain the thickness, shape, etc. of the glue dispensing on the workpiece. Since the size of the glue dispensing on the workpiece is small, generally only a few millimeters, it is difficult to use 3D scanning and other technologies to collect the shape of the glue dispensing. At this time, visual inspection is required. The existing technology for visual inspection of glue dispensing, such as the existing application with publication number CN114354494A and the name of a LED semiconductor packaging glue dispensing defect detection device and detection method, uses a light source to illuminate the side of the glue dispensing, and forms an incident angle α between the side light and the reference surface of the product to judge whether the product after glue encapsulation is in a state of more glue or less glue. After the colloid is output, it solidifies to form a glue dispensing package. After the glue dispensing mechanism finishes outputting the colloid, the workpiece or the glue dispensing mechanism needs to be removed. This process will pull the colloid, and the colloid may be deformed, skewed, concave, wire-drawing, etc. The above-mentioned existing technology cannot detect whether the shape of the colloid is qualified.

[0004] The purpose of the present invention is to design a workpiece appearance inspection method and inspection equipment based on visual inspection in view of the above-mentioned problems in the prior art. Summary of the invention

[0005] In view of the problems existing in the above-mentioned prior art, the present invention provides a workpiece appearance inspection method and inspection equipment based on visual inspection, which can effectively solve at least one problem existing in the above-mentioned prior art.

[0006] The technical solution of the present invention is:

[0007] A method for detecting the appearance of a workpiece based on visual inspection comprises the following steps:

[0008] S1, place the workpiece to be inspected after dispensing directly under the camera;

[0009] S2, lighting up and controlling the light source to move a certain distance horizontally at a uniform speed starting from one side of the camera above the workpiece to be inspected;

[0010] S3, in the process of the light source moving, the camera captures the image of the workpiece to be detected at intervals, and analyzes and obtains the position of the reflected light spot in each image of the workpiece to be detected;

[0011] S4, calculating the total moving distance of the reflected light spot. If the total moving distance meets the preset total moving distance interval, calculating the moving speed of the reflected light spot, analyzing the moving speed change rate of the reflected light spot. If the moving speed change rate of the reflected light spot meets the preset change rate interval, determining that the workpiece to be inspected is qualified.

[0012] Furthermore, after S1 and before S2, execute:

[0013] Acquire an initial image of the workpiece to be inspected, perform shape analysis on the initial image, and extract the contour of the glue dispensing location;

[0014] If the glue spot is in the shape of a long strip, the outline of the glue spot is identified as a square, and the width of the glue spot is calculated. If the width of the glue spot meets the preset width threshold range, enter S2;

[0015] If the dispensing location is circular, the contour of the dispensing location is identified as a circle, and the diameter of the dispensing location is calculated. If the diameter of the dispensing location meets the preset diameter threshold range, the process enters S2.

[0016] Furthermore, in step S1, after the workpiece to be inspected that has been glued is placed directly below the camera, the following steps are performed: translating the workpiece to be inspected so that the shooting center of the camera coincides with the center of the glue-dispensing location of the workpiece to be inspected;

[0017] If the glue spot is in the shape of a long strip, the workpiece to be inspected is rotated so that the glue spot is perpendicular to the moving direction of the light source.

[0018] Furthermore, after S1 and before S2, execute:

[0019] Parking the light source at a position close to the camera, and capturing the image of the workpiece to be inspected through the camera;

[0020] If the glue spot is in the shape of a long strip, the position of the reflected light spot in the image of the workpiece to be detected is analyzed, and a straight line is fitted to each reflected light spot. If the distance between the straight line and the center line of the glue spot is less than a first preset threshold, step S2 is entered;

[0021] If the glue spot is circular, the position of the reflected light spot in the image of the workpiece to be detected is analyzed and obtained. If the distance between the reflected light spot and the center of the glue spot is less than a second preset threshold, step S2 is entered.

[0022] Furthermore, the light source and the camera are arranged at the same height, and the moving distance of the light source is 2 to 3 times the distance from the camera to the workpiece to be detected.

[0023] Furthermore, the positions of the reflected light spots in the images of the workpieces to be inspected are analyzed and obtained, for example:

[0024] The workpiece to be inspected is covered by a preset mask, wherein the preset mask is partially hollowed out at the glue dispensing location;

[0025] Obtaining the exposed area of ​​the image of each of the workpieces to be inspected after being blocked by the preset mask;

[0026] The exposed area is binarized with a preset grayscale threshold to obtain a binary dispensing image, a white portion of the binary dispensing image is extracted, and the center of the white portion is calculated as the position of the reflected light spot.

[0027] Further provided is a workpiece appearance inspection device based on visual inspection, comprising:

[0028] A frame, wherein the frame is provided with a detection station;

[0029] A camera is arranged directly above the detection station;

[0030] An illumination assembly, the illumination assembly comprising a light source and a driving member, the driving member driving the light source to move laterally on one side of the camera;

[0031] The control system realizes the workpiece appearance detection method based on visual detection when working.

[0032] Furthermore, a detection station adjustment mechanism is included, and the detection station adjustment mechanism includes:

[0033] A dual-axis driving device, arranged on the frame;

[0034] The rotating device is driven by the dual-axis driving device, and the rotating device drives the detection station to rotate.

[0035] Furthermore, one end of the driving member is close to the camera, and the maximum driving distance of the driving member is 2 to 3 times the distance from the camera to the workpiece to be detected.

[0036] Furthermore, if the glue spot is in the shape of an elongated strip, the light source is an elongated strip light source, and if the glue spot is in the shape of a circle, the light source is a single lamp bead.

[0037] Therefore, the present invention provides the following effects and / or advantages:

[0038] The present application utilizes the different reflection effects of the surfaces of glue spots with different thicknesses and surface shapes on light, and realizes the movement of the reflected light spot on the surface of the glue spot of the workpiece to be detected by uniformly translating the light source above the workpiece, and detecting the movement amount and the rate of change of the movement speed of the reflected light spot. If the rate of change of the movement speed of the reflected light spot meets the preset requirements, that is, the movement speed of the reflected light spot gradually decreases with the center of the glue spot as the starting point, it indicates that the surface of the glue spot is smooth and there is no distortion or skewness.

[0039] The present application avoids the need in the prior art to use 3D scanning equipment to achieve shape scanning of the glue dot point on the workpiece surface, which is slow and the equipment is expensive. Only a camera and a movable light source are needed to recognize and judge the thickness and shape of the glue dot point through the method provided in the present application.

[0040] This application adopts different judgment methods for different dispensing shapes, which can adapt to the corresponding dispensing shapes to obtain more accurate detection results.

[0041] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.

[0042] It is to be understood that both the foregoing general description and the following detailed description of the present invention are exemplary and explanatory and are intended to provide further explanation of the invention as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 The present invention provides a schematic flow chart of the method.

[0044] Figure 2 This is a schematic diagram of the reflected light spot produced by the glue-dispensing reflected light source, where the glue-dispensing is thicker.

[0045] Figure 3 Schematic diagram of the reflected light spot produced by the glue-dispensing reflected light source, where the glue-dispensing is relatively thin.

[0046] Figure 4 This is a schematic diagram of the shape of the reflected light spot produced by the long strip of glue dispensing and its fitting straight line result.

[0047] Figure 5 A schematic diagram of the structure of the device provided by the present invention.

[0048] Description of reference numerals:

[0049] Frame 1, detection station 101, camera 2, lighting assembly 3, light source 301, driving member 302, detection station adjustment mechanism 4, dual-axis driving device 401, rotating device 402. DETAILED DESCRIPTION

[0050] In order to facilitate understanding by those skilled in the art, the structure of the present invention is further described in detail with reference to the embodiments in conjunction with the accompanying drawings:

[0051] refer to Figure 1 , a workpiece appearance detection method based on visual detection, comprising the following steps:

[0052] S1, placing the workpiece to be inspected after dispensing is placed directly under camera 2;

[0053] S2, lighting up and controlling the light source 301 to move a certain distance horizontally at a uniform speed above the workpiece to be inspected, starting from one side of the camera 2;

[0054] S3, during the movement of the light source 301, the camera 2 captures the image of the workpiece to be detected at intervals, and analyzes and obtains the position of the reflected light spot in each image of the workpiece to be detected;

[0055] After the glue dispenser outputs the glue on the workpiece, it is generally round or long strip. The glue has a certain viscosity and is liquid before drying. At this time, the surface of the glue is smooth and has a certain reflectivity. The cross-section of the glue is an arched shape. According to the thickness, uniformity of distribution and other characteristics of the glue, the cross-section of the glue is also an arched structure of a corresponding shape. In addition, the surface of the glue has different reflection angles for light, so that a reflected light spot can be formed in the image captured by the camera 2. The reflected light spot is generally a small dot focused on the glue.

[0056] Since the light source 301 in this embodiment works horizontally for a certain distance, the position of the reflected light spot at the glue dispensing location will also change with the position of the light source 301. Figure 2 , the cross section of the glue dot can be assumed to be a semi-elliptical shape. The greater the thickness of the glue dot, the greater the short diameter of the semi-ellipse corresponding to the cross section, and the greater the arch of the ellipse. The reflected light spot can be understood as one of the beams of light emitted by the light source 301 being reflected by the mirror at a certain point on the surface of the glue dot as the tangent direction, and then shining towards the camera 2, so that the camera 2 can capture the effect of the light spot. When the position of the light source 301 remains unchanged, the greater the thickness of the glue dot, the closer the reflected light spot is to the midpoint of the glue dot, which is ultimately reflected as, after the light source 301 completes a certain distance of lateral movement, the greater the thickness of the glue dot, the closer the reflected light spot is to the center of the glue dot.

[0057] like Figure 2 , 3 As shown, Figure 2 The dispensing thickness is greater than Figure 3When camera 2 is shooting from above the workpiece to be inspected, the reflected light spot appears to move the center of the glue spot by distances d1 and d2 respectively. Therefore, the distance can be used to determine the thickness of the glue spot. Figure 2 , 3 If d1 is less than d2, then we can judge Figure 2 The dispensing thickness is greater than Figure 3 Dispensing thickness.

[0058] S4, calculating the total moving distance of the reflected light spot. If the total moving distance meets the preset total moving distance interval, calculating the moving speed of the reflected light spot, analyzing the moving speed change rate of the reflected light spot. If the moving speed change rate of the reflected light spot meets the preset change rate interval, determining that the workpiece to be inspected is qualified.

[0059] In this step, the total moving distance of the reflected light spot is the distance difference between the reflected light spot generated by the end of the light source 301 close to the camera 2 and the reflected light spot generated by the light source 301 after horizontally moving a certain distance. As explained above, the moving distance of the reflected light spot is negatively correlated with the thickness of the glue dispensed. At this time, the thickness of the glue dispensed can be reversely deduced by the total moving distance of the reflected light spot. If the total moving distance meets the preset total moving distance range, the thickness of the surface glue dispensed meets the preset.

[0060] After that, if the thickness of the glue is qualified, the shape of the glue needs to be judged. A qualified glue should have a cross-section similar to an ellipse. At this time, further judgment is needed based on its characteristics to exclude the glue thickness that is qualified but the glue is skewed, damaged, twisted, etc.

[0061] Specifically, when the surface of the glue spot is similar to an elliptical shape, the tangent direction of the surface of the glue spot should gradually change from the center of the glue spot to the two sides of the glue spot. In terms of the moving speed on the reflected light spot, it is shown that the reflected light spot starts from the center of the glue spot and the moving speed gradually decreases. At this time, the reflected light spot can be considered to be a deceleration motion with a gradually decreasing acceleration. By analyzing the positions of the reflected light spots in the images of multiple workpieces to be detected and labeling them according to the number of captured frames of camera 2, the moving speed of the reflected light spot is the moving path of the reflected light spot in the i+1th frame image and the i-th frame image divided by the interval time. The acceleration can be calculated by the change in the moving speed of the reflected light spot in adjacent time intervals, and the change in the acceleration of the reflected light spot in adjacent time intervals. If the moving speed change rate of the reflected light spot meets the preset value, it indicates that the surface of the glue spot is smooth and there is no distortion or skew.

[0062] At this point, the workpiece to be inspected can be determined to be qualified.

[0063] Furthermore, after S1 and before S2, execute:

[0064] Acquire an initial image of the workpiece to be inspected, perform shape analysis on the initial image, and extract the contour of the glue dispensing location;

[0065] In this embodiment, the workpiece to be inspected may have circular or long strips of glue dispensed thereon. In order to further analyze according to the actual situation, the shapes of the glue dispensed thereon may be differentiated and treated in the following steps.

[0066] If the glue spot is in the shape of a long strip, the outline of the glue spot is identified as a square, and the width of the glue spot is calculated. If the width of the glue spot meets the preset width threshold range, enter S2;

[0067] If the dispensing location is circular, the contour of the dispensing location is identified as a circle, and the diameter of the dispensing location is calculated. If the diameter of the dispensing location meets the preset diameter threshold range, the process enters S2.

[0068] In this step, the contour can be obtained by using the Canny algorithm.

[0069] The number of vertices is calculated to be 4 through the approximate contour approx algorithm in OpenCV Python. The square contour of the glue dot is circled on the image, and the width of the glue dot is measured by measuring the width of the square contour.

[0070] Alternatively, the circular contour of the dispensing can be obtained by using the find_circles algorithm in OpenCV Python, and then the diameter of the dispensing can be obtained by measuring the diameter of the circular contour.

[0071] In this step, the outline of the glue dots is calculated first, so as to calculate whether the width or diameter of the glue dots meets the requirements, thereby avoiding the situation where the glue dots are not fully covered.

[0072] Furthermore, in step S1, after the workpiece to be inspected that has been glued is placed directly below the camera 2, the following steps are performed: translating the workpiece to be inspected so that the shooting center of the camera 2 coincides with the center of the glue-dispensing location of the workpiece to be inspected;

[0073] If the glue spot is in the shape of a long strip, the workpiece to be inspected is rotated so that the glue spot is perpendicular to the moving direction of the light source 301 .

[0074] In this step, the position of the glue spot is adjusted to be directly below the camera 2, so that the camera 2 can obtain an orthographic projection image of the glue spot, and then the light source 301 starts to translate to a position close to the top of the glue spot.

[0075] Furthermore, if the glue spot is in the shape of a long strip, in order to make the moving path of the light source 301 be toward the arched side of the glue spot, that is, the two sides of the long strip of glue spot, the long strip of glue spot needs to be rotated.

[0076] Furthermore, after S1 and before S2, execute:

[0077] The light source 301 is parked at a position close to the camera 2, and the image of the workpiece to be inspected is captured by the camera 2;

[0078] Preferably, the light source 301 and the camera 2 of this embodiment are arranged at the same height, so as to better illuminate and photograph the workpiece to be inspected.

[0079] If the glue spot is in the shape of a long strip, the position of the reflected light spot in the image of the workpiece to be detected is analyzed, and a straight line is fitted to each reflected light spot. If the distance between the straight line and the center line of the glue spot is less than a first preset threshold, step S2 is entered;

[0080] If the glue spot is circular, the position of the reflected light spot in the image of the workpiece to be detected is analyzed and obtained. If the distance between the reflected light spot and the center of the glue spot is less than a second preset threshold, step S2 is entered.

[0081] This step is used to determine whether the highest point of the glue spot is located at the center of the glue spot. When the light source 301 is parked near the camera 2, the reflected light spot should be located near the center of the glue spot. By determining the position of the reflected light spot on the glue spot, it can be determined whether the glue spot is of a qualified shape.

[0082] At the same time, this step further distinguishes the shape of the glue dots. Since the thickness of the glue dots may vary slightly, if the glue dots are long strips, the position of the reflected light spot may deviate slightly from the center of the glue dots. Figure 4 , where the bold line is the shape of the reflected light spot, and the dotted line is the result of the fitted straight line. At this time, the reflected light spot is in the shape of a long strip, and may be discontinuous, and the shape is an irregular curved shape. At this time, the reflected light spot is fitted into a straight line. If the distance between the straight line and the center line of the dispensing location is less than the first preset threshold, it indicates that the location of the maximum thickness of the dispensing location is qualified. And the center line of the dispensing location can be obtained by taking the center line of the square contour obtained by the above-mentioned square detection.

[0083] Similarly, if the glue spot is circular and the distance between the reflected light spot and the center of the glue spot is less than the second preset threshold, it can be determined that the thickest part of the circular glue spot meets the requirements. The center of the glue spot can be obtained by the above-mentioned circle recognition algorithm.

[0084] Furthermore, the light source 301 and the camera 2 are arranged at the same height, and the moving distance of the light source 301 is 2 to 3 times the distance from the camera 2 to the workpiece to be detected.

[0085] In this embodiment, if the moving distance of the light source 301 is too long, the reflected light spot is already at the edge of the glue spot. At this time, the total moving distance of the reflected light spots of glue spots with different thicknesses is slightly different, and it is difficult to identify and infer the thickness of the glue spot through this value.

[0086] Furthermore, the positions of the reflected light spots in the images of the workpieces to be inspected are analyzed and obtained, for example:

[0087] The workpiece to be inspected is covered by a preset mask, wherein the preset mask is partially hollowed out at the glue dispensing location;

[0088] Obtaining the exposed area of ​​the image of each of the workpieces to be inspected after being blocked by the preset mask;

[0089] The exposed area is binarized with a preset grayscale threshold to obtain a binary dispensing image, a white portion of the binary dispensing image is extracted, and the center of the white portion is calculated as the position of the reflected light spot.

[0090] In this embodiment, the preset mask can block the image of the workpiece to be inspected and only expose the corresponding area, thereby eliminating other areas except the glue dots in the workpiece to be inspected, and preventing workpieces made of reflective materials such as glass and plastic from generating reflected light spots and interfering with the detection results.

[0091] Then, by reasonably presetting the grayscale threshold, all locations outside the area where the dispensing produces the reflected light spot can be converted to black, leaving a small area of ​​the reflected light spot as white. Then, by calculating the center of the white part, it can be used as the location of the reflected light spot.

[0092] refer to Figure 5 , further providing a workpiece appearance inspection device based on visual inspection, comprising:

[0093] A frame 1, wherein the frame is provided with a detection station 101;

[0094] The camera 2 is arranged directly above the detection station 101;

[0095] An illumination assembly 3, the illumination assembly 3 comprising a light source 301 and a driving member 302, the driving member 302 driving the light source 301 to move laterally on one side of the camera 2;

[0096] The control system realizes the workpiece appearance detection method based on visual detection when working.

[0097] In this embodiment, the detection station 101 is preferably a disc-shaped structure, so that the workpiece to be detected can be placed on its upper end, and at the same time, one of the basic structures for rotating the workpiece to be detected is realized. The light source 301 can be a strip light or a single lamp bead. Among them, the driving member 302 of this embodiment uses a screw assembly, so that the light source 301 can be driven to move left and right. At the same time, one end of the screw assembly is set at a position close to the camera 2, so that the light source 301 can start to move from one side of the camera 2, and the screw assembly is parallel to the detection station 101.

[0098] The working principle of the control system can refer to a workpiece appearance detection method based on visual inspection.

[0099] Furthermore, it includes a detection station adjustment mechanism 4, and the detection station adjustment mechanism 4 includes:

[0100] A dual-axis driving device 401 is arranged on the frame 1;

[0101] The rotating device 402 is driven by the dual-axis driving device 401 , and the rotating device 402 drives the detection station 101 to rotate.

[0102] In this embodiment, the dual-axis driving device 401 is directly adopted from the prior art; the rotating device 402 includes a rotating disk, and a circle of racks are arranged on the outer circumference of the rotating disk. The racks are driven by a corresponding rotating motor to drive the rotating disk to rotate. The rotating device 402 can also be directly adopted from other prior art structures.

[0103] Furthermore, one end of the driving member 302 is close to the camera 2 , and the maximum driving distance of the driving member 302 is 2 to 3 times the distance from the camera 2 to the workpiece to be detected.

[0104] Furthermore, if the glue spot is in the shape of a long strip, the light source 301 is a long strip light source, and if the glue spot is in the shape of a circle, the light source 301 is a single lamp bead.

[0105] In this embodiment, the long strip light source can be a long strip light source formed by a combination of multiple lamp beads and a diffuser plate. By using different shapes of light sources 301 for different shapes of glue spots, a reflection spot of a corresponding shape can be formed on the surface of the glue spot to obtain a better detection result.

[0106] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0107] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0108] 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.

[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

Claims

1. A method for detecting the appearance of a workpiece based on visual inspection, Features: The following steps are involved: S1, place the workpiece to be inspected after dispensing directly under the camera; S2, lighting up and controlling the light source to move a certain distance horizontally at a uniform speed starting from one side of the camera above the workpiece to be inspected; S3, in the process of the light source moving, the camera captures the image of the workpiece to be detected at intervals, and analyzes and obtains the position of the reflected light spot in each image of the workpiece to be detected; S4, calculating the total moving distance of the reflected light spot, if the total moving distance meets the preset total moving distance interval, calculating the moving speed of the reflected light spot, analyzing the moving speed change rate of the reflected light spot, if the moving speed change rate of the reflected light spot meets the preset change rate interval, determining that the workpiece to be inspected is qualified; In step S1, after the workpiece to be inspected that has been glued is placed directly below the camera, the following steps are performed: translating the workpiece to be inspected so that the shooting center of the camera coincides with the center of the glue-dispensing location of the workpiece to be inspected; If the glue spot is in the shape of a long strip, rotate the workpiece to be inspected so that the glue spot is perpendicular to the moving direction of the light source; After S1 and before S2, execute: Parking the light source at a position close to the camera, and capturing the image of the workpiece to be inspected through the camera; If the glue spot is in the shape of a long strip, the position of the reflected light spot in the image of the workpiece to be detected is analyzed, and a straight line is fitted to each reflected light spot. If the distance between the straight line and the center line of the glue spot is less than a first preset threshold, step S2 is entered; If the glue spot is circular, the position of the reflected light spot in the image of the workpiece to be inspected is obtained by analysis, and if the distance between the reflected light spot and the center of the glue spot is less than a second preset threshold, step S2 is entered; The light source and the camera are arranged at the same height, and the moving distance of the light source is 2 to 3 times the distance from the camera to the workpiece to be detected.

2. A method for detecting the appearance of a workpiece based on visual inspection according to claim 1, Features: After S1 and before S2, execute: Acquire an initial image of the workpiece to be inspected, perform shape analysis on the initial image, and extract the contour of the glue dispensing location; If the glue spot is in the shape of a long strip, the outline of the glue spot is identified as a square, and the width of the glue spot is calculated. If the width of the glue spot meets the preset width threshold range, enter S2; If the dispensing location is circular, the contour of the dispensing location is identified as a circle, and the diameter of the dispensing location is calculated. If the diameter of the dispensing location meets the preset diameter threshold range, the process enters S2.

3. A method for detecting the appearance of a workpiece based on visual inspection according to claim 1, Features: The positions of the reflected light spots in the images of the workpieces to be inspected are analyzed and obtained by: The workpiece to be inspected is covered by a preset mask, wherein the preset mask is partially hollowed out at the glue dispensing location; Obtaining the exposed area of ​​the image of each of the workpieces to be inspected after being blocked by the preset mask; The exposed area is binarized with a preset grayscale threshold to obtain a binary dispensing image, a white portion of the binary dispensing image is extracted, and the center of the white portion is calculated as the position of the reflected light spot.

4. A workpiece appearance inspection device based on visual inspection, Features: include: A frame, wherein the frame is provided with a detection station; A camera is arranged directly above the detection station; An illumination assembly, the illumination assembly comprising a light source and a driving member, the driving member driving the light source to move laterally on one side of the camera; A control system, which, when in operation, implements a workpiece appearance detection method based on visual detection as described in any one of claims 1 to 3.

5. A workpiece appearance inspection device based on visual inspection according to claim 4, Features: It includes a detection station adjustment mechanism, and the detection station adjustment mechanism includes: A dual-axis driving device, arranged on the frame; The rotating device is driven by the dual-axis driving device, and the rotating device drives the detection station to rotate.

6. A workpiece appearance inspection device based on visual inspection according to claim 4, Features: One end of the driving member is close to the camera, and the maximum driving distance of the driving member is 2 to 3 times the distance from the camera to the workpiece to be detected.

7. A workpiece appearance inspection device based on visual inspection according to claim 4, Features: If the glue spot is in the shape of a long strip, the light source is a long strip light source; if the glue spot is in the shape of a circle, the light source is a single lamp bead.