Gluing flaw detection method and system
By using a ring light source and a wide-angle lens to take ring images, combined with intelligent recognition methods, the glue coating quality of the inner wall of the barrel-type workpiece is automatically detected, solving the problems of low detection efficiency and high cost in the existing technology, and achieving efficient and automated glue coating defect detection.
Patent Information
- Application Number
- CN202411816943.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art has problems of low production efficiency, misjudgment of manual fatigue and high labor costs when detecting glue coating defects, making it difficult to achieve automated, efficient and cost-effective detection methods.
The inner wall of the barrel-shaped workpiece is lighted by a ring light source, the ring image is taken through a wide-angle lens, and the glue quality is automatically identified through intelligent recognition methods to judge the glue quality or defects.
Automatic inspection of the glue coating quality of barrel-type workpiece inner walls is achieved, which improves production efficiency, reduces human errors, and reduces operating costs.
Smart Images

Figure CN119643563A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method and system for detecting glue coating defects. Background Art
[0002] In the field of quality inspection, especially in the manufacturing industry, the inspection of glue coating quality is a key link. Existing technologies usually rely on operators to use human eyes to judge whether the glue coating is complete. This method involves directly observing the inner wall of the barrel-shaped workpiece to determine whether there are defects in the glue coating, such as broken glue, no glue, too much glue or insufficient glue width. Operators must have certain experience and skills to accurately identify glue coating defects.
[0003] Although the manual inspection method is still applicable in some cases, it has obvious limitations. First, the production efficiency of manual inspection is relatively low because the operator needs to spend a lot of time carefully checking each workpiece. Secondly, long working hours will cause operator fatigue, which not only affects work efficiency, but may also lead to misjudgment, thus affecting product quality. In addition, labor costs are also an important factor. With the rise in labor costs, methods that rely on manual inspection are becoming more and more expensive. Therefore, the existing technology urgently needs an automated, efficient and cost-effective method for gluing defect detection to improve production efficiency, reduce human errors, and reduce long-term operating costs. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a method and system for detecting glue coating defects to solve the above problems existing in the prior art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for detecting glue coating defects, comprising:
[0006] Using an annular light source to illuminate the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product;
[0007] According to the lighting range, the inner wall of the barrel-shaped workpiece is photographed through a wide-angle lens to obtain a ring image;
[0008] According to the annular image, the glue coating quality of the inner wall of the barrel-shaped workpiece is automatically identified by an intelligent identification method to obtain a glue coating detection result, wherein the glue coating detection result includes: qualified glue coating and glue coating defects.
[0009] Preferably, after obtaining the annular image, the method further includes:
[0010] The annular image is subjected to interference point filtering processing to obtain an annular image with the least interference; wherein the interference point filtering processing includes binarization, corrosion, expansion, filling, particle analysis and masking.
[0011] Preferably, automatically identifying the glue coating quality of the inner wall of the barrel-shaped workpiece by an intelligent identification method includes:
[0012] Obtaining the glue coating width of the annular image and setting a width threshold;
[0013] The glue coating width is judged according to the width threshold to obtain a glue coating detection result.
[0014] Preferably, obtaining the glue coating width of the annular image includes:
[0015] Calculating the center of the ring according to the outer circle contour points of the ring image;
[0016] According to the ring center, a first radius array from the outer ring edge to the ring center and a second radius array from the inner ring edge to the ring center are calculated;
[0017] According to the first radius array and the second radius array, a radius distance difference array is obtained, which is the glue coating width.
[0018] Preferably, the types of glue coating defects include glue breakage, no glue, excess glue, and insufficient glue coating width.
[0019] In a second aspect, the present invention further provides a system for detecting glue defects, comprising:
[0020] A light source lighting module, used to use a ring light source to light the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product;
[0021] The workpiece photographing module is used to photograph the inner wall of the barrel-shaped workpiece through a wide-angle lens according to the lighting range to obtain a ring image;
[0022] The glue coating detection module is used to automatically identify the glue coating quality of the inner wall of the barrel-shaped workpiece according to the annular image through an intelligent recognition method to obtain a glue coating detection result, wherein the glue coating detection result includes: qualified glue coating and glue coating defects.
[0023] In a third aspect, the present invention further discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.
[0024] In a fourth aspect, the present invention further discloses a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processor.
[0025] In a fifth aspect, the present invention further discloses a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0026] Compared with the prior art, the present invention has the following advantages and technical effects:
[0027] The present invention provides a method for detecting glue defects. First, an annular light source is used to illuminate the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product; secondly, according to the lighting range, the inner wall of the barrel-shaped workpiece is photographed through a wide-angle lens to obtain an annular image; finally, according to the annular image, the glue quality of the inner wall of the barrel-shaped workpiece is automatically identified through an intelligent recognition method to obtain a glue detection result, wherein the glue detection result includes: qualified glue coating and glue coating defects.
[0028] The present invention effectively solves the problems of low production efficiency, fatigue misjudgment caused by long working hours and high labor costs in manual detection, and can automatically detect the glue coating quality of the inner wall of a barrel-shaped workpiece. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0030] Figure 1 This is a specific implementation flow chart of the method for detecting glue coating defects according to an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of gluing defect detection according to an embodiment of the present invention;
[0032] Figure 3 Schematic diagram of the difference between an OK glue-coated product and an NG glue-coated product according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0034] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] First, the technical terms involved in the following embodiments are explained.
[0036] (1) Ring light source is a ring-shaped LED light source for machine vision, mainly used in machine vision systems. It is installed on the circuit board through LED lamp beads to form a ring-shaped illumination area, which is suitable for various machine vision application scenarios.
[0037] The main feature of the ring light source is that its irradiation angle can be changed, including 0-degree, low-angle and high-angle ring light sources. The direct direction of the lamp beads of the 0-degree ring light source is parallel to the observation plane, which is suitable for scenes that require high-brightness direct light; the direct direction of the lamp beads of the low-angle ring light source is at an angle of less than 45 degrees to the observation plane, which is suitable for scenes that need to highlight the uneven parts of the object; the direct direction of the lamp beads of the high-angle ring light source is at an angle of more than 45 degrees to the observation plane, which is suitable for scenes that require a larger irradiation range.
[0038] The parameters of the ring light source include diameter, angle and color. The diameter refers to the diameter of the outermost circle of the ring shape of the light source. Common diameters are 50mm, 70mm, 90mm, 120mm, 150mm, 180mm, etc. The larger the diameter of the light source, the wider the irradiation range, but the central brightness may decrease and the uniformity will also decrease. The angle refers to the angle between the main optical axis of the LED lamp bead and the reference base plate of the light source or the normal of the reference base plate after it is installed on the circuit board. Different angles will affect the working distance and irradiation effect of the light source.
[0039] Ring light sources are widely used in various machine vision inspection tasks, including inspection of printed characters on IC chips, inspection of components on circuit boards, inspection of labels, inspection of marks on LCD glass substrates, inspection of trademarks and patterns on bottle caps, etc. Its unique illumination mode and adjustable angle make it excellent in edge detection, metal surface lettering and damage detection.
[0040] In summary, ring light sources play an important role in machine vision systems due to their unique ring design and adjustable illumination angle, and are widely used in various inspection tasks.
[0041] (2) A wide-angle lens is a photographic lens with a shorter focal length and a wider viewing angle than a standard lens. Its focal length is usually between 20-35 mm, and its viewing angle is relatively large, so it can capture a wider scene at a shorter shooting distance. Wide-angle lenses are divided into ordinary wide-angle lenses and ultra-wide-angle lenses. The focal length of an ordinary wide-angle lens is generally 38-24 mm, and the viewing angle is 60-84 degrees; the focal length of an ultra-wide-angle lens is 20-13 mm, and the viewing angle is 94-118 degrees.
[0042] The main features of wide-angle lenses include large viewing angle, wide field of view, and long depth of field. Due to its short focal length, it can show a larger clear range when shooting wide scenes, and is suitable for shooting large areas such as landscapes and buildings. In addition, wide-angle lenses can emphasize the foreground and highlight the contrast between near and far, producing a strong perspective effect, and are often used in photography that needs to show the open momentum of large scenes.
[0043] In practical applications, wide-angle lenses are widely used in photojournalism, landscape photography, etc. Because they can include more scenery and are suitable for shooting in narrow and chaotic environments, they are also known as the standard lens for journalists.
[0044] This embodiment provides a method for detecting glue coating defects, including:
[0045] S1. Using an annular light source to illuminate the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product;
[0046] Specifically, the object of inspection in this embodiment is a barrel-shaped hollow product, and a circle of glue is applied at a certain height of its inner wall for use in the next process. However, during the process of gluing, due to the influence of certain factors such as the mechanism or control, accidents such as glue breakage, no glue, excess glue, and insufficient glue width may occur, resulting in poor production. If this situation flows into the next station assembly, it will cause product defects, so the quality of glue coating should be inspected here.
[0047] As an additional implementation manner, according to the characteristics of the barrel-shaped product, the light source used in the present invention is annular, and the light hits the glue at a certain angle, so that the glue is evenly illuminated in a range of 360 degrees.
[0048] S2. According to the lighting range, take a picture of the inner wall of the barrel-shaped workpiece through a wide-angle lens to obtain a ring image;
[0049] As an additional implementation method, the lens used in the present invention is a wide-angle lens, which photographs the inner wall of the barrel-shaped product at a certain angle, so as to maximize the image width of the glue. Ordinary lenses take pictures vertically from top to bottom and can only capture a narrow line, which cannot solve the above defects.
[0050] Furthermore, the annular image is subjected to binary, erosion, expansion, filling, particle analysis, masking and other processing to filter out interference points on the image, thereby obtaining an annular image with the least interference.
[0051] S3. According to the annular image, the glue coating quality of the inner wall of the barrel-shaped workpiece is automatically identified by an intelligent identification method to obtain a glue coating detection result, wherein the glue coating detection result includes: qualified glue coating and glue coating defect.
[0052] Furthermore, the automatic identification of the glue coating quality of the inner wall of the barrel-shaped workpiece by the intelligent identification method includes:
[0053] S301, obtaining the glue coating width of the annular image and setting a width threshold;
[0054] As an additional implementation manner, obtaining the glue coating width of the annular image includes:
[0055] S3011, calculating the center of the ring according to the outer contour points of the ring of the ring image;
[0056] Specifically, first obtain the coordinates of the annular outer circle contour points (x1, y1), (x2, y2), ... (xn, yn);
[0057] Then calculate the average value of all coordinate points (X1, Y1);
[0058] X1=(x1+x2+……xn) / n;
[0059] Y1=(y1+y2+…yn) / n;
[0060] Then use the point distance formula to calculate the radius d of each contour to (X1, Y1);
[0061] d1=[(X1-x1)^2+(Y1-y1)^2]^1 / 2;
[0062] …
[0063] dn=[(Xn-xn)^2+(Yn-yn)^2]^1 / 2;
[0064] Insert the radius d into the coordinates of the contour point to obtain the three-dimensional array k1 = (x1, y1, d1), k2 = (x2, y2, d2), ... k3 = (xn, yn, dn);
[0065] Sort all d from small to large to get a new array p (p1, p2, ... pn), then p = (x, y, d) Delete the first 20% of the data and the last 20% of the data in the array p to get the middle 60% array h (h1, h2, ... hm), (m = 0.6n, h = (x, y, d)), and then calculate the average value D1 of d in h;
[0066] D1=(d1+d2+……dm) / m;
[0067] Calculate the average value of x and y in array h;
[0068] Hx=(x1+x2+……xm) / m;
[0069] Hy=(y1+y2+……ym) / m;
[0070] Then D1 is the radius of the ring, and (Hx, Hy) is the center of the ring.
[0071] S3012, calculating, according to the ring center, a first radius array from the outer ring edge to the ring center and a second radius array from the inner ring edge to the ring center;
[0072] Specifically, the distance from the center of the ring (Hx, Hy) to each h point (x, y) in the array h (h1, h2, ... hm) is calculated using the point distance formula, that is, the distance value W from the center of the ring to the edge of the ring is obtained;
[0073] W1=[(Hx-x1)^2+(Hy-y1)^2]^1 / 2;
[0074] W2=[(Hx-x2)^2+(Hy-y2)^2]^1 / 2;
[0075] …
[0076] Wm=[(Hx-xm)^2+(Hy-ym)^2]^1 / 2;
[0077] Get the array W (W1, W2, ... Wn), which is the radius array from the edge of the outer ring to the center of the ring
[0078] The same method as above can be used to obtain the radius array R (R1, R2, ... Rm) from the inner ring to the center of the ring.
[0079] S3013. Obtain a radius distance difference array according to the first radius array and the second radius array, which is the glue coating width.
[0080] Specifically, the difference L between the radius R and W is calculated;
[0081] L1=|R1-W1|;
[0082] L2=|R2-W2|;
[0083] …
[0084] Lm=|Rm-Wm|;
[0085] Get the array L (L1, L2, ...Lm) of radius distance differences.
[0086] S302: judging the gluing width according to the width threshold, and obtaining a gluing detection result.
[0087] In this embodiment, a distance range [Lmin, Lmax] is set. If Lmin < L < Lmax, it is considered that the glue application here is normal, that is, the glue application is qualified; otherwise, there is a glue application defect.
[0088] Furthermore, the types of glue application defects include glue breakage, no glue, excessive glue, and insufficient glue application width.
[0089] Specifically, with the center of the circular image as the center of the circle, the width of the circle is measured every 1 degree along the radial direction to obtain the glue application width values at 360 degrees of the circumference.
[0090] Set the value of the number of times of lack of glue. When the ROI rotates 360 times, count how many times the glue application width value is 0. If it is greater than the value of the number of times of lack of glue, it is a glue application defect (NG), which is used as the final result judgment.
[0091] According to the parameter requirements of the product, set a minimum width value. If there are a certain number of consecutive width values that are all less than the minimum width value, it is determined that the glue application width here is insufficient; if there are a certain number of consecutive width values that are all 0, it is determined that the glue is broken here; if all 360 values are 0, it is determined that there is no glue on this workpiece.
[0092] According to the parameter requirements of the product, set a maximum width value. If there are a certain number of consecutive width values that are all greater than the maximum width value, it is determined that there is excessive glue application here.
[0093] Count all the measured values of the number of times of lack of glue. If the quantity is greater than the value of the number of times of lack of glue, it is judged as a defective product. If a defective product is found, the robotic arm removes the defective product.
[0094] As Figure 1 shown, this embodiment provides a specific implementation process of a glue application defect detection method, including:
[0095] Step S100, the detection object moves to the detection position.
[0096] Step S200, the camera captures an image.
[0097] Step S300, set the detection and positioning area, which requires the center position of the detection object, and set the glue application recognition width area to prevent interference with the actual measurement effect.
[0098] Step S400, set the masking area to mask the interference points on the image.
[0099] Step S500, set the value of the glue application width recognition area.
[0100] Step S600, set the value of the number of times of lack of glue. When the ROI rotates 360 times, count how many times the glue application width value is 0. If it is greater than the value of the number of times of lack of glue, it is NG, which is used as the final result judgment.
[0101] Step S700, judging the result, all the measured times of glue shortage are counted, if the number is greater than the glue shortage value, it is judged as a defective product.
[0102] Step S800: If defective products are found, the robot arm removes the defective products.
[0103] Figure 2 It is a schematic diagram of gluing defect detection provided by an embodiment of the present invention.
[0104] The imaging system is composed of an area array industrial camera, an industrial lens and a visual light source. When the machine is running, the camera detects defects in the glue coating. As long as the glue coating of the inspected object has defects, it is considered a defective product, and the robot arm will then remove the defective products.
[0105] Figure 3 This is the difference between a good gluing product and a bad gluing product provided by an embodiment of the present invention. A bad gluing product is generally caused by incomplete gluing or insufficient gluing width.
[0106] Embodiment 2
[0107] Based on the same inventive concept, this embodiment also provides a gluing defect detection system, including:
[0108] A light source lighting module, used to use a ring light source to light the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product;
[0109] The workpiece photographing module is used to photograph the inner wall of the barrel-shaped workpiece through a wide-angle lens according to the lighting range to obtain a ring image;
[0110] The glue coating detection module is used to automatically identify the glue coating quality of the inner wall of the barrel-shaped workpiece according to the annular image through an intelligent recognition method to obtain a glue coating detection result, wherein the glue coating detection result includes: qualified glue coating and glue coating defects.
[0111] The glue coating defect detection system provided in this embodiment has all the advantages of the glue coating defect detection method provided in the first embodiment.
[0112] Embodiment 3
[0113] This embodiment further discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first embodiment.
[0114] Embodiment 4
[0115] This embodiment further discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first embodiment are implemented.
[0116] Embodiment 5
[0117] This embodiment also discloses a computer program product, including a computer program, which implements the steps of the method described in the first embodiment when executed by a processor.
[0118] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting glue defects, characterized in that: The following steps are involved: Using an annular light source to illuminate the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product; According to the lighting range, the inner wall of the barrel-shaped workpiece is photographed through a wide-angle lens to obtain a ring image; According to the annular image, the glue coating quality of the inner wall of the barrel-shaped workpiece is automatically identified by an intelligent identification method to obtain a glue coating detection result, wherein the glue coating detection result includes: qualified glue coating and glue coating defects.
2. The method according to claim 1, characterized in that After obtaining the ring image, it also includes: The annular image is subjected to interference point filtering processing to obtain an annular image with the least interference; wherein the interference point filtering processing includes binarization, corrosion, expansion, filling, particle analysis and masking.
3. The method according to claim 1, characterized in that Automatic identification of the glue coating quality on the inner wall of barrel-shaped workpieces by intelligent identification methods includes: Obtaining the glue coating width of the annular image and setting a width threshold; The glue coating width is judged according to the width threshold to obtain a glue coating detection result.
4. The method according to claim 3, characterized in that Obtaining the glue coating width of the annular image includes: Calculating the center of the ring according to the outer circle contour points of the ring image; According to the ring center, a first radius array from the outer ring edge to the ring center and a second radius array from the inner ring edge to the ring center are calculated; According to the first radius array and the second radius array, a radius distance difference array is obtained, which is the glue coating width.
5. The method according to claim 1, characterized in that The types of glue coating defects include broken glue, no glue, excessive glue, and insufficient glue coating width.
6. A glue coating defect detection system, characterized in that: include: A light source lighting module, used to use a ring light source to light the inner wall of a barrel-shaped workpiece, wherein the barrel-shaped workpiece is a hollow product; The workpiece photographing module is used to photograph the inner wall of the barrel-shaped workpiece through a wide-angle lens according to the lighting range to obtain a ring image; The glue coating detection module is used to automatically identify the glue coating quality of the inner wall of the barrel-shaped workpiece according to the annular image through an intelligent recognition method to obtain a glue coating detection result, wherein the glue coating detection result includes: qualified glue coating and glue coating defects.
7. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claims 1 to 5 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claims 1 to 5 are implemented.
Citation Information
Patent Citations
3D visual inspection system and inspection method of gluing quality
CN107883879A
Medical detection circuit board gluing multi-angle detection system and detection method thereof
CN115980012A
Quality auxiliary detection visual system based on automatic gluing
CN116297453A
Apparatus and method for visually inspecting hollow bodies
EP1457770A1
Inspection device, inspection method and program for inspection device
JP2019066309A