Method for detecting gluing defect and storage medium thereof
By generating point clouds using a line laser sensor and combining point cloud registration and threshold determination, the problems of manual reliance and easy misjudgment of two-dimensional images in glue coating inspection are solved, and accurate identification and efficient detection of glue coating defects are achieved.
Patent Information
- Application Number
- CN202511600579.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2025-12-02
AI Technical Summary
Existing adhesive coating detection methods rely on human experience, resulting in low efficiency and a high false positive rate. Detection based on two-dimensional images is easily affected by factors such as the adhesive material and light source, leading to edge recognition errors.
A line laser sensor is used to scan the workpiece surface to generate point clouds. By combining point cloud registration and threshold determination with point cloud filtering, downsampling and ICP registration algorithms, adhesive coating defects can be accurately identified.
It achieves accurate identification of adhesive coating defects, improves detection efficiency and accuracy, avoids human error in detection, and overcomes the limitations of two-dimensional image detection.
Smart Images

Figure CN121049294A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of adhesive coating inspection technology, and in particular to a method for detecting adhesive coating defects and its storage medium. Background Technology
[0002] Adhesive application, a crucial step in automobile manufacturing, is an important link in the transformation and upgrading of the manufacturing industry. Adhesive application refers to the process of applying adhesive paste to designated locations on a target object according to different requirements such as application speed, amount, and shape. The quality of the adhesive directly affects the sealing, corrosion protection, and shock absorption performance of the automobile. During the adhesive application process, defects such as adhesive breaks, excessively wide or narrow adhesive areas, and uneven thickness often occur due to mechanical vibration and unstable adhesive dispensing. Therefore, adhesive application quality issues have attracted considerable attention.
[0003] Common methods for inspecting the quality of coated adhesives include manual inspection and two-dimensional image-based inspection methods. Manual inspection relies heavily on the experience and skill level of the inspectors, cannot save and quantify inspection data in real time, has high uncertainty, high false negative rate, and low efficiency, making it difficult to meet current production standards. Two-dimensional image-based adhesive quality inspection methods based on machine vision are easily affected by factors such as the material, transparency, light source, shadow, contrast, and reflectivity of the adhesive during image acquisition, resulting in poor image quality and errors in adhesive edge recognition, thus having significant limitations. Summary of the Invention
[0004] The purpose of this invention is to provide a method for detecting adhesive coating defects, and its storage medium can detect adhesive coating defects more accurately and with higher efficiency.
[0005] To achieve the above objectives, the solution of the present invention is as follows: A method for detecting adhesive coating defects includes the following steps: S10: Scan the surface of the glued workpiece using a line laser sensor to obtain the point cloud of the glued workpiece, and scan the standard workpiece without glue to obtain the point cloud of the standard template workpiece; S20: Fit the reference plane of the glue-coated workpiece point cloud and the reference plane of the standard template workpiece point cloud respectively, and based on the reference plane, cut out the glue-coated workpiece point cloud and the template workpiece point cloud to be detected respectively. S30: Perform point cloud registration on the point cloud of the glue-applied area to be inspected and the point cloud of the template to be inspected, so that the point cloud of the glue-applied area to be inspected and the point cloud of the template to be inspected are aligned. S40: After registering the point cloud of the glue-coated area to be tested and the point cloud of the template to be tested, point pairs are obtained. The distance between each pair of points is calculated and compared with the preset point distance threshold. If the distance between the pair of points is greater than the preset point distance threshold, the point is considered to be a pure colloidal point. Other point clouds except pure colloidal points are removed, and pure colloidal points are retained to obtain pure colloidal point clouds. S50: If the cross-sectional profile width and cross-sectional area of the pure colloidal point cloud are less than a preset threshold, the pure colloidal point cloud in that area is deemed unqualified. If a series of pure colloidal point clouds are deemed unqualified, the coating in that area is deemed unqualified.
[0006] Furthermore, after step S10 and before step S20, it is also necessary to remove the point cloud noise of the glued workpiece point cloud.
[0007] Furthermore, statistical filtering algorithm, radius filtering algorithm, and bilateral filtering algorithm are used in sequence to preprocess the point cloud of the glued workpiece to remove point cloud noise.
[0008] Furthermore, the point cloud of the standard template workpiece and the point cloud of the glued workpiece after noise filtering are downsampled to reduce the overall density of the point cloud.
[0009] Furthermore, a voxel downsampling algorithm is used to downsample the point cloud of the standard template workpiece and the point cloud of the glued workpiece after filtering out noise.
[0010] Furthermore, in step S20, the reference plane of the point cloud of the glued workpiece and the reference plane of the point cloud of the standard template workpiece are respectively fitted using the random sampling consensus algorithm.
[0011] Furthermore, in step S30, the point cloud of the glue-coated area to be detected and the point cloud of the template to be detected are registered using the ICP registration algorithm, so that the point cloud of the glue-coated area to be detected and the point cloud of the template to be detected are aligned.
[0012] Furthermore, in step S50, the width of the cross-sectional profile of the pure colloidal point cloud is the difference between the two endpoints of the cross-sectional profile of the pure colloidal point cloud. By connecting each point of the cross-sectional profile of the pure colloidal point cloud in sequence, a closed profile region is formed, and the area of the closed profile region is calculated, which is the cross-sectional area of the pure colloidal point cloud.
[0013] Furthermore, in step S50, the cross-sectional width profile and cross-sectional area of the unqualified pure colloidal point cloud are marked. When consecutive marks appear, the area is determined to be unqualified colloidal.
[0014] The present invention also provides a computer-readable storage medium storing a glue coating defect detection program, which, when executed by a processor, implements the steps of the above-described method for detecting glue coating defects.
[0015] After adopting the above solution, the beneficial effects of the present invention are as follows: This invention effectively overcomes edge recognition errors caused by colloid transparency, reflection, and shadows in two-dimensional image detection by processing three-dimensional spatial data of line laser point clouds. It also achieves accurate segmentation of pure colloidal point clouds by using point cloud registration and point-to-point distance threshold determination. The invention determines that the pure colloidal point cloud in a region is unqualified based on the width and area of the cross-section of the pure colloidal point cloud being less than a preset threshold. When a series of unqualified pure colloidal point clouds appear, the region is considered to have unqualified adhesive coating. This allows for accurate identification of adhesive coating defects. Compared with manual identification, this invention improves detection efficiency, avoids the problem of missed judgments by manual identification, and also improves accuracy. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the overall steps of the present invention; Figure 2 This is a flowchart of the steps between steps S10 and S20 of the present invention; Figure 3 This is a schematic diagram showing the positional relationship between the reference plane and the point cloud of the area to be tested with adhesive coating in this invention; Figure 4 This is a schematic diagram of the point cloud of the area to be tested by the adhesive coating according to the present invention; Figure 5 This is a partially enlarged view of the pure colloidal point cloud of the present invention; Figure 6 This is a schematic diagram of the cross-sectional profile of the pure colloidal point cloud of the present invention; Label Explanation: 10. Reference plane of point cloud of glued workpiece; 20. Point cloud of glued area to be inspected; 30. Point cloud of pure colloid; 31. Cross-sectional profile. Detailed Implementation
[0017] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0018] like Figures 1 to 6 This embodiment provides a method for detecting adhesive coating defects, including the following steps: S10: Scan the surface of the glued workpiece using a line laser sensor to obtain the point cloud of the glued workpiece, and scan the standard workpiece without glue to obtain the point cloud of the standard template workpiece; S20: Fit the reference plane 10 of the glue-coated workpiece point cloud and the reference plane of the standard template workpiece point cloud respectively, and based on the reference plane, cut out the glue-coated workpiece point cloud and the standard template workpiece point cloud respectively. S30: Perform point cloud registration on the point cloud of the glue-applied area to be inspected 20 and the point cloud of the template to be inspected area, so that the point cloud of the glue-applied area to be inspected 20 and the point cloud of the template to be inspected area are aligned. S40: After registering the point cloud 20 of the glue-coated area to be tested and the point cloud of the template area to be tested, point pairs are obtained. The distance between each point pair is calculated and compared with the preset point distance threshold. If the distance between the point pairs is greater than the preset point distance threshold, the point is considered to be a pure colloidal point. Other point clouds except pure colloidal points are removed, and pure colloidal points are retained to obtain pure colloidal point cloud 30. S50: If the width and cross-sectional area of the cross-sectional profile 31 of the pure colloidal point cloud 30 are less than a preset threshold, the pure colloidal point cloud 30 in this area is determined to be unqualified. If a series of pure colloidal point clouds 30 are unqualified, the coating in this area is determined to be unqualified.
[0019] Specifically, a point cloud is a data set composed of a large number of discrete points in three-dimensional space. Each point contains coordinate information (XYZ) and can be attached with attributes such as color and intensity to describe the spatial distribution and surface characteristics of objects or scenes.
[0020] Specifically, the glue-coated inspection area and the template inspection area are the same locations on the two workpieces. The difference is that the glue-coated inspection area has glue applied, while the template inspection area does not.
[0021] Specifically, point cloud registration refers to the process of aligning multiple 3D point cloud datasets acquired from different perspectives or at different times to a unified coordinate system through geometric transformations (rotation, translation). Its essence is to eliminate spatial differences between point clouds and achieve data fusion by estimating transformation parameters (rigid or non-rigid transformation).
[0022] Specifically, in point cloud registration, point-to-point refers to the corresponding point relationship established between the source and target point clouds during the registration process.
[0023] Furthermore, after step S10 and before step S20, it is also necessary to remove the point cloud noise of the glued workpiece point cloud.
[0024] Furthermore, statistical filtering algorithm, radius filtering algorithm, and bilateral filtering algorithm are used in sequence to preprocess the point cloud of the glued workpiece to remove point cloud noise.
[0025] Specifically, the first step involves statistical filtering. The principle is to first calculate the statistical characteristics of the neighborhood. First, the average distance between each point in the point cloud and its k nearest neighbors is calculated. Then, the mean μ and standard deviation σ of the average distances of all points are calculated. Assuming these distances form a Gaussian distribution, their mean μ and standard deviation σ reflect the distribution characteristics of normal points. Next, points are identified as outliers (i.e., noise) and removed if the average distance of their neighborhood exceeds the mean ± 3σ. Finally, optimization is achieved through two iterations: the first iteration calculates the initial μ value for each point, and the second iteration recalculates the μ value based on the optimized point cloud to further remove outliers. Statistical filtering can remove noise over a large area, but further filtering is still needed to remove point cloud noise within a more precise range. The second step utilizes radius filtering, a point cloud data filtering method based on local neighborhoods. It determines a spherical neighborhood by setting a radius threshold. For each point in the point cloud, the algorithm checks the position of its neighbors and other points. If the distance between a point in the neighborhood and the center point is less than or equal to the set radius threshold, then these points will be retained; otherwise, if the distance is greater than the radius threshold, these points will be removed. In this way, the radius filtering algorithm can effectively remove noise points while retaining the main features in the point cloud data. The third step utilizes bilateral filtering, a filtering method based on local neighborhood feature information. Its principle is to smooth point cloud data by combining spatial distance and value domain similarity while preserving edge characteristics. First, the spatial domain weight W of a point within its neighboring points is calculated. s The formula is:
[0026] Where p i p represents the coordinates of a point within the neighborhood. c Let σ be the coordinates of the center point, e be the natural logarithm, and σ be the coordinates of the center point. s Spatial standard deviation; Next, calculate the range weight W. r The formula is:
[0027] Where n i Let n be the normal vector of a point in the neighborhood. c Let σ be the normal vector of the center point. r The standard deviation of the range; Finally, the filtered point position is calculated using the following formula:
[0028] Where N c Let i be the number of neighborhood points, i∈(0,1,2...N). c ).
[0029] By utilizing and setting statistical filtering thresholds, radius filtering thresholds, and bilateral filtering thresholds, the next step of processing will only proceed when each threshold is met, thus achieving efficient removal of point cloud noise.
[0030] Furthermore, the point cloud of the standard template workpiece and the point cloud of the glued workpiece after noise filtering are downsampled to reduce the overall density of the point cloud.
[0031] Specifically, a voxel downsampling algorithm is used to downsample the point cloud of the standard template workpiece and the point cloud of the glued workpiece after filtering out noise.
[0032] Specifically, for the point cloud of the glued workpiece after noise removal, a voxel downsampling algorithm is used to reduce the amount of point cloud data. The principle is to divide the point cloud data into small voxels (3D pixels) and retain only one point within each voxel. The specific steps are as follows: First, determine the size of the voxels according to the required downsampling degree; then, sort the point cloud data according to coordinate position to determine the center point of each voxel; next, select the point closest to the center of the voxel as the representative point and retain it, finally obtaining a glued workpiece point cloud that retains the point cloud feature information but has a significantly reduced data volume; simultaneously, the acquired standard template workpiece point cloud is processed to obtain the downsampled standard template workpiece point cloud.
[0033] like Figures 3-4 Furthermore, in step S20, the reference plane 10 of the glue-coated workpiece point cloud and the reference plane of the standard template workpiece point cloud are respectively fitted using the random sampling consensus algorithm. The glue-coated detection area point cloud 20 and the template detection area point cloud are respectively spaced from the corresponding reference plane.
[0034] Specifically, the random sampling consensus algorithm is adopted. Its core idea is to obtain the best-fit plane through random sampling and iteration. The specific method is to first randomly select 3 points from the point cloud, and use these 3 points to calculate and determine the initial plane model:
[0035] Where the normal vector is (A,B,C) and the intercept is D; Next, iterate through all points and calculate the distance dst from point (xi, yi, zi) to the planar model:
[0036] If the distance dst is less than the set threshold, then mark the point as an interior point and count the total number of interior points in the model. Repeat the above steps N times to select the plane model with the most interior points as the final reference plane. Fit the reference plane 10 of the glue-coated workpiece point cloud and the reference plane of the standard template workpiece point cloud respectively. Cut out a suitable area and separate the glue-coated area to be detected point cloud 20 and the template area to be detected point cloud. For example, perform plane fitting on the point cloud of the workpiece center area to obtain the reference plane. The reference plane is fitted on the bottom surface of the workpiece center. Then, take a certain height upward from the reference plane (this height is the standard specification height of the workpiece to be tested area from the bottom surface of the center) for cutting.
[0037] Furthermore, in step S30, the point cloud 20 of the glue-coated area to be detected and the point cloud of the template to be detected are registered using the ICP registration algorithm, so that the point cloud 20 of the glue-coated area to be detected and the point cloud of the template to be detected are aligned. Specifically, the point cloud of the glue-coated area to be inspected (20) and the point cloud of the template area to be inspected are registered using the ICP registration algorithm. This algorithm is used to estimate the relative pose (i.e., rotation and translation) between the two sets of point clouds. The basic principle of the ICP registration algorithm is to iteratively optimize the correspondence between the two sets of point clouds and calculate the optimal transformation parameters accordingly, so that the two sets of point clouds are aligned as much as possible. The specific steps are as follows: Step 1: Construct the KD tree structure of the point cloud model Q of the template region to be detected; Step 2: Take the registered point cloud as the point cloud to be registered P', and use the KD tree search method to search for the corresponding points in the point cloud model Q of the template region to be detected, and form point pairs; Step 3: Eliminate mismatched point pairs based on the rigid transformation consistency principle; Step 4: Calculate the rotation matrix R and the translation matrix T to minimize the mean square error f(R,T) between corresponding point sets. The formula for calculating f(R,T) is as follows:
[0038] Step 5: Set the distance threshold λ between point clouds and the maximum number of iterations Nummax. The distance between P' and the standard point cloud model Q can be obtained through the transformation matrix. If the distance is less than the distance threshold λ or the maximum number of iterations Nummax is reached, the iteration ends. Otherwise, repeat the above steps until the conditions are met. The relative pose (i.e., the RT transformation matrix) is obtained through the above process. The point cloud 20 of the glue-coated area to be detected can be aligned with the point cloud of the template area to be detected through the transformation matrix operation.
[0039] like Figure 6Furthermore, in step S50, the width of the cross-sectional profile 31 of the pure colloidal point cloud 30 is the difference between the two endpoints of the cross-sectional profile 31 of the pure colloidal point cloud 30. By connecting each point of the cross-sectional profile 31 of the pure colloidal point cloud 30 in sequence, a closed profile region is formed, and the area of the closed profile region is calculated, which is the cross-sectional area of the pure colloidal point cloud 30.
[0040] Specifically, in this embodiment, the colloid is a horizontally placed, approximately rectangular, closed loop. Due to the scanning characteristics of the line laser sensor, the pure colloid point cloud 30 is composed of an array of rows of cross-sectional profiles 31. The difference between the coordinates of the endpoints at both ends of a row of cross-sectional profiles 31 in the horizontal direction is the width of the cross-sectional profile 31. If the cross-sectional profile 31 is taken from the portion of the colloid extending along the Y-axis, the Y-coordinates of the cross-section are the same, and the two endpoints are x and x respectively. s x e The width of the cross-sectional profile 31 is... Similarly, the cross-sectional width of other extended parts can be obtained; By connecting all the points of the cross-sectional profile 31 sequentially to form a closed polygon region, the area can be calculated using Green's formula, i.e., the cross-sectional area of the cross section can be determined. Green's formula is as follows:
[0041] Where X i Y i Let X0 represent the coordinates of the i-th point on the contour, where i ranges from 0 to N-1, and X0 = X... N Y0=Y N .
[0042] Specifically, in step S50, the cross-sectional width and cross-sectional area of the unqualified pure colloidal point cloud 30 are marked. When consecutive marks appear, the area is determined to be unqualified colloidal.
[0043] The present invention also provides a computer-readable storage medium storing a glue coating defect detection program, which, when executed by a processor, implements the steps of the above-described method for detecting glue coating defects.
[0044] The directional terms used in this specification are defined relative to the structures shown in the accompanying drawings. They are relative concepts and may therefore vary depending on their location and usage. Therefore, these or other directional terms should not be interpreted as restrictive.
[0045] The above description is only a preferred embodiment of the present invention and is not intended to limit the design of this case. All equivalent changes made based on the key design features of this case shall fall within the protection scope of this case.
Claims
1. A method for detecting adhesive coating defects, characterized in that: Includes the following steps: S10: Scan the surface of the glued workpiece using a line laser sensor to obtain the point cloud of the glued workpiece, and scan the standard workpiece without glue to obtain the point cloud of the standard template workpiece; S20: Fit the reference plane of the glue-coated workpiece point cloud and the reference plane of the standard template workpiece point cloud respectively, and based on the reference plane, cut out the glue-coated workpiece point cloud and the template workpiece point cloud to be detected respectively. S30: Perform point cloud registration on the point cloud of the glue-applied area to be inspected and the point cloud of the template to be inspected, so that the point cloud of the glue-applied area to be inspected and the point cloud of the template to be inspected are aligned. S40: After registering the point cloud of the glue-coated area to be tested and the point cloud of the template to be tested, point pairs are obtained. The distance between each pair of points is calculated and compared with the preset point distance threshold. If the distance between the pair of points is greater than the preset point distance threshold, the point is considered to be a pure colloidal point. Other point clouds except pure colloidal points are removed, and pure colloidal points are retained to obtain pure colloidal point clouds. S50: If the cross-sectional profile width and cross-sectional area of the pure colloidal point cloud are less than a preset threshold, the pure colloidal point cloud in that area is deemed unqualified. If a series of pure colloidal point clouds are deemed unqualified, the coating in that area is deemed unqualified.
2. The method for detecting adhesive coating defects as described in claim 1, characterized in that: After step S10 and before step S20, it is also necessary to remove the point cloud noise of the glued workpiece point cloud.
3. The method for detecting adhesive coating defects as described in claim 2, characterized in that: The point cloud of the glued workpiece is preprocessed by statistical filtering algorithm, radius filtering algorithm and bilateral filtering algorithm in sequence to remove point cloud noise.
4. The method for detecting adhesive coating defects as described in claim 2, characterized in that: Downsampling processing is performed on the point cloud of the standard template workpiece and the point cloud of the glued workpiece after noise filtering to reduce the overall density of the point cloud.
5. The method for detecting adhesive coating defects as described in claim 4, characterized in that: A voxel downsampling algorithm was used to downsample the point cloud of the standard template workpiece and the point cloud of the glued workpiece after filtering out noise.
6. The method for detecting adhesive coating defects as described in claim 1, characterized in that: In step S20, the reference plane of the point cloud of the glued workpiece and the reference plane of the point cloud of the standard template workpiece are respectively fitted using the random sampling consensus algorithm.
7. The method for detecting adhesive coating defects as described in claim 1, characterized in that: In step S30, the point cloud of the glue-coated area to be detected and the point cloud of the template to be detected are registered using the ICP registration algorithm, so that the point cloud of the glue-coated area to be detected and the point cloud of the template to be detected are aligned.
8. The method for detecting adhesive coating defects as described in claim 1, characterized in that: In step S50, the width of the cross-sectional profile of the pure colloidal point cloud is the difference between the two endpoints of the cross-sectional profile of the pure colloidal point cloud. By connecting each point of the cross-sectional profile of the pure colloidal point cloud in sequence, a closed profile region is formed, and the area of the closed profile region is calculated, which is the cross-sectional area of the pure colloidal point cloud.
9. The method for detecting adhesive coating defects as described in claim 1, characterized in that: In step S50, the cross-sectional width profile and cross-sectional area of the unqualified pure colloidal point cloud are marked. When consecutive marks appear, the region is determined to be unqualified colloidal.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a glue coating defect detection program, which, when executed by a processor, implements the steps of the method for detecting glue coating defects as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Workpiece shape detection method and device
CN109949303A
Three-dimensional point cloud-based surface defect detection method and device and storage medium
CN113205486A
Glue amount detection method and device based on area array laser
CN113251925A
Method for identifying and removing gluing obstacle
CN113313137A
Engine combustion chamber depth dimension detection method and system based on visual detection
CN114241034A
Cited By
OLED (Organic Light Emitting Diode) dispensing coating specification detection method, storage medium and equipment
CN119671990A
An OLED dispensing coating specification detection method, storage medium and device
CN119671990B