A method, system, computer-readable storage medium, and computer program product for measuring clear point glue volume

By using a line laser scanning camera and depth map processing technology, combined with complementary color metal sheets and 3D reconstruction algorithms, the accuracy and efficiency issues of transparent dispensing volume measurement were solved, thus improving the quality control of the dispensing process.

CN120212867BActive Publication Date: 2026-11-24GUANGDONG AOPUTE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510527086.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2026-11-24
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

Traditional methods are difficult to accurately measure the volume of transparent adhesive dispensing, especially for complex shapes and transparent objects, where there are large errors, affecting product quality and production efficiency.

Method used

A line laser scanning camera was used in conjunction with grayscale gradient analysis and depth map processing. The three-dimensional depth distribution model of transparent adhesive was reconstructed through the laser triangulation principle. Complementary color metal sheets were used to reduce light scattering interference. The volume was calculated by combining principal component analysis and three-dimensional connected domain analysis.

Benefits of technology

It enables high-speed and high-precision measurement of transparent dispensing volume, improves the quality control capability of the dispensing process, and reduces problems such as glue overflow and insufficient bonding strength.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120212867B_ABST
    Figure CN120212867B_ABST
Patent Text Reader

Abstract

This invention relates to the field of three-dimensional measurement technology, and discloses a method, system, computer-readable storage medium, and computer program product for measuring the volume of transparent adhesive dispensing. The method includes: placing transparent adhesive on a predetermined metal sheet and capturing cross-sectional contour image data of the transparent adhesive; extracting the center contour line of the laser stripes from a two-dimensional contour slice; reconstructing a complete three-dimensional depth distribution model to obtain an adhesive dispensing depth map; performing planar pose correction to achieve fitting; performing three-dimensional connected component analysis on the fitted adhesive dispensing depth map to filter out the adhesive dispensing volume measurement region; and calculating the adhesive dispensing volume within the measurement region using a projection method. This invention, combined with a depth map processing algorithm, achieves high-speed and high-precision measurement of adhesive dispensing volume, enabling precise control of the amount of adhesive dispensed before dispensing, which is of great significance for product quality control in the dispensing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of three-dimensional measurement technology, and in particular to a method, system, computer-readable storage medium, and computer program product for measuring the volume of transparent adhesive dots. Background Technology

[0002] Traditional manual dispensing suffers from inconsistent quality and low efficiency, and remains prevalent in fields such as electronic packaging and precision component manufacturing, severely hindering the high-quality development of the manufacturing industry. Dispensing machines, as automated equipment, utilize high-precision control technology to accurately apply adhesives, paints, and other liquids to product surfaces in dots, lines, or to coat complex shapes, effectively solving the aforementioned problems. They are widely used in precision manufacturing processes in electronics, automotive, and medical fields, improving production efficiency and product quality.

[0003] In the precision assembly of automotive, consumer goods, and electronic components, adhesive application, bonding, and adhesion processes have become the preferred choice for manufacturers. With the widespread application of these processes, manufacturers have placed higher demands on the stability of adhesive dispensing volume to ensure product consistency and reliability, meeting market demands for high-quality products. Traditional pneumatic dispensing machines control the dispensing volume through air pressure and opening / closing time, but due to air pressure fluctuations, it is difficult to guarantee uniform dispensing. Excessive dispensing leads to overflow, while insufficient dispensing may result in insufficient bonding strength or poor airtightness, causing product performance failure and affecting quality. Furthermore, inaccurate dispensing volume can lead to rework and material waste, increasing production costs. Therefore, accurately measuring the dispensing volume to provide data guidance and real-time feedback for dispensing head calibration is a crucial step in effectively controlling dispensing volume and improving product quality and production efficiency.

[0004] Currently, methods for measuring dispensing volume mainly include traditional manual measurement, ultrasonic methods, electrochemical methods, and optical non-contact three-dimensional measurement methods. Traditional manual measurement uses an electronic ruler to measure the piston's movement trajectory and calculates the amount of adhesive by combining the volume and proportion of the adhesive. However, this method is time-consuming, prone to errors, and has high labor costs, making it difficult to meet the demands for high precision and efficiency. Ultrasonic methods, based on the propagation characteristics of ultrasound, indirectly estimate the adhesive volume by measuring propagation time, reflected signals, or attenuation. However, its accuracy is greatly affected by the adhesive's properties and the environment, and its ability to measure complex shapes and transparent adhesives is limited. Furthermore, the equipment is expensive and the measurement speed is slow. Electrochemical methods are less commonly used, mainly because adhesives are often insulators or lack electrochemical activity. They suffer from low accuracy, sensitivity to adhesive composition, complex equipment, and high costs, making them difficult to meet the requirements for real-time and complex shape measurements.

[0005] With the development of machine vision technology, traditional two-dimensional vision technology, lacking depth perception capabilities, struggles to meet a wider range of application needs. The rapid advancement of optical imaging technology has made three-dimensional vision inspection technology a research hotspot. Optical non-contact 3D measurement, as a high-precision, real-time, and non-contact 3D vision measurement technology, acquires geometric, object, and optical feature information by capturing light reflection signals from the object's surface. Based on this information, it reconstructs a 3D model, generating high-precision 3D data. Combining image processing and 3D data processing algorithms, this method can meet diverse measurement needs and is widely used in areas such as object volume measurement and industrial defect detection. Compared to other methods, optical non-contact 3D measurement solves problems such as low accuracy and poor stability, and is particularly suitable for high-precision 3D reconstruction and volume calculation of non-transparent objects.

[0006] Traditional optical 3D measurement methods (such as time-of-flight, structured light projection, photometric stereo methods, and stereo vision) perform poorly when measuring transparent objects, often exhibiting significant errors or even failing to achieve complete reconstruction. This is because transparent surfaces do not satisfy the diffuse reflection assumption upon which traditional methods rely, making them unsuitable for direct application in the 3D reconstruction of transparent objects. The interaction between transparent objects and light is complex, involving multiple reflections and refractions, making light path tracing difficult. Furthermore, transparent objects lack local appearance features, their surfaces appearing through distortion of the surrounding environment, making them susceptible to viewpoint and environmental interference. Their refractive behavior also depends on unknown and potentially non-uniform refractive indices, further increasing the difficulty of light path analysis. These factors complicate 3D information acquisition, feature matching, and data processing, posing significant challenges to the 3D reconstruction and volume measurement of transparent adhesives. The complex and irregular shapes formed after adhesive dispensing (such as cones, arcs, and circles) further increase the measurement difficulty, placing extremely high demands on the imaging capabilities of 3D cameras and anti-interference algorithms. Therefore, developing an optical 3D measurement technology that can effectively solve the above problems is crucial for achieving volume measurement of transparent adhesive dispensing. Summary of the Invention

[0007] The purpose of this invention is to provide a method, system, computer-readable storage medium, and computer program product for measuring the volume of transparent adhesive dispensing, so as to solve or at least partially solve the technical problems mentioned in the background art.

[0008] To achieve this objective, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for measuring the volume of transparent adhesive dispensing, comprising: Transparent adhesive is placed on a predetermined metal sheet, and the cross-sectional contour image data of the transparent adhesive is acquired by a line laser scanning camera; wherein, the cross-sectional contour image data of the transparent adhesive includes multiple two-dimensional contour slices, and the color of the laser used by the line laser scanning camera is complementary to the background color of the metal sheet. Extract the center contour line of the laser stripe of the two-dimensional contour slice; The height of each contour point in the center contour line of the laser stripe is calculated by the laser triangulation principle. Then, all the center contour lines of the laser stripe are combined and input into the depth map space to reconstruct a complete three-dimensional depth distribution model and obtain the dispensing depth map. Select the measurement reference plane area point set in the dispensing depth map, and use the fitting plane algorithm based on principal component analysis to solve the optimal plane equation. Then, perform plane posture correction to achieve fitting. Three-dimensional connected component analysis was performed on the fitted dispensing depth map to screen out the dispensing volume measurement region. The dispensing volume within the measurement area is calculated using the projection method.

[0009] Optionally, extracting the laser stripe center contour line of the two-dimensional contour slice specifically includes: The cross-sectional contour image data of the transparent adhesive is preprocessed to obtain the corresponding grayscale image; A gray-level gradient analysis method combined with a sliding window mechanism is used to locate the sub-pixel level multi-peak candidate center point set by the gray-level centroid method. A multi-factor constraint algorithm based on a dynamic weighted scoring model is used to initially screen the points in the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set. The continuity of neighborhood coordinates of the initial screening points is evaluated by position offset and continuous length constraints. Abnormal jump points are removed and discrete broken line segments that do not meet the continuous length requirements are filtered out to obtain a one-dimensional point set of the screening center. The missing center breakpoints caused by screening are repaired by linear interpolation algorithm, and continuous and smooth laser stripe center lines are generated by adaptive smoothing filtering.

[0010] Optionally, the step of using gray-level gradient analysis combined with a sliding window mechanism to locate a sub-pixel level multi-peak candidate center point set through the gray-level centroid method specifically includes: Vertically scan the pixels in each row of the grayscale image to obtain several candidate line segments; The boundary of candidate line segments is detected by using a sliding window based on the gray-level gradient change rate. The edge detection sensitivity is controlled by a transition length threshold. The rising edge of gray level is used as the starting point and the falling edge of gray level is used as the ending point of the line segment to determine the corresponding candidate region. A gray-level density weighted model is used to increase the weight of high gray-level pixels within the candidate region; the gray-level density weighted model is as follows: Where w is the weighting coefficient, I x It is the pixel grayscale value; The positions of each point in the sub-pixel level multi-peak candidate center point set are calculated and located in the candidate region using the gray-level centroid method. The calculation method is as follows: Assume the range of points in the candidate region is The coordinates y of the sub-pixel weighted center candidate point in the candidate region center for: , where y x These are pixel row coordinates; Finally, peak effective value filtering verification is performed, that is, abnormal candidate points in each row of the sub-pixel level multi-peak candidate center point set and peak candidate points in abnormal width candidate regions are filtered out. The abnormal candidate point is a candidate point whose gray value is less than a predetermined ratio to the maximum gray value of the row in which the abnormal candidate point is located, and the abnormal width candidate region is a candidate region whose line segment width is greater than a predetermined width.

[0011] Optionally, the preliminary screening of points in the sub-pixel level multi-peak candidate center point set using a multi-factor constraint algorithm based on a dynamic weighted scoring model to obtain a preliminary screening point set specifically includes: A continuity analysis is performed on the points in the sub-pixel level multi-peak candidate center point set. For each point in the sub-pixel level multi-peak candidate center point set, a forward and backward search is performed along the vertical direction, and the number of consecutive occurrences L that satisfy the position offset constraint is counted. k ; Calculate the normalized continuity score of the subpixel level multi-peak candidate center point set. Gray intensity evaluation score and the historical location constraint score of the candidate points ; The final score of the subpixel-level multi-peak candidate center point concentration points is calculated using a dynamic weighted comprehensive scoring model. , The calculation method is as follows: ;in, , and These are weight parameters that are pre-set according to the usage scenario; Select the point with the highest final score in each column of the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set; The normalized continuity score of the subpixel-level multi-peak candidate center point set is calculated. Gray intensity evaluation score and the historical location constraint score of the candidate points Specifically, it includes: The position offset constraint is calculated as follows: ;in, It is the coordinate of the k-th point in the sub-pixel level multi-peak candidate center point set, X neighbor These are the coordinates of the points adjacent to the k-th point in the rows before and after it. , and The calculation methods are as follows: , , ; Where max(L) is the maximum consecutive count among all points in the row containing the k-th point of the sub-pixel level multi-peak candidate center point set, I (k) It is the gray value of the k-th point, I max X is the maximum gray value among all points in the column containing the k-th point of the sub-pixel level multi-peak candidate center point set. prev R represents the coordinates of the final selected point in the row preceding the k-th point, and R is the normalization coefficient.

[0012] Optionally, the evaluation of the continuity of neighborhood coordinates of the initial screening point set through position offset and continuous length constraints, the elimination of abnormal jump points and the filtering of discrete broken line segments that do not meet the continuous length requirements, to obtain a one-dimensional point set of the screening center, includes: The continuity of neighborhood coordinates is re-evaluated by using position offset constraints, that is, it is determined whether the adjacent coordinate positions of the points in the initial screening point set in the vertical direction are greater than zValue. If so, treat the point as an abnormal jump point and eliminate it; If not, a sliding window detection is then used to eliminate regions where the continuous length of points in the initial screening point set is less than the preset minimum continuous length. Then, the obtained one-dimensional point set data of the screening center is filtered by the sliding mean to obtain the one-dimensional point set data of the screening center.

[0013] Optionally, the step of repairing the missing center breakpoints caused by the screening using a linear interpolation algorithm, and generating a continuous and smooth laser stripe centerline by combining adaptive smoothing filtering, includes: Based on the assumption of spatial continuity between adjacent valid data points, a local linear model is established to interpolate and repair discontinuous regions of the laser profile; specifically including: Detect the interruption area of ​​the contour line and locate the two breakpoints P1(x1,y1) and P2(x2,y2); Determine whether the number of invalid points between the endpoints of two breakpoints is greater than or equal to the preset interpolation threshold; If not, connect the two breakpoints directly. If so, construct the parameterized line equation: ,in ; After constructing the parameterized linear equation, the following is also included: Calculate the coordinates of the missing points based on the sampling interval: , , i=1,2,...,N-1; By supplementing point (x) i ,y i Reconstruct the geometrically continuous complete centerline profile.

[0014] Optionally, the height of each contour point in the center contour line of the laser stripe is calculated using the laser triangulation principle, and then all the center contour lines of the laser stripe are combined and input into the depth map space to reconstruct a complete three-dimensional depth distribution model, thereby obtaining the dispensing depth map. Specifically, this includes: The height information of each contour point in the center contour line of the laser stripe is calculated by the principle of direct-fire oblique-receive laser triangulation. Based on the measurement range of the transparent adhesive surface and the preset spatial resolution parameters, the spatial structure of the depth map matrix is ​​initialized to obtain the original depth map; By synchronizing the data of all the two-dimensional contour slices in time, the column coordinates of the center point of the laser stripe center line are mapped to the grid coordinates corresponding to the original depth map according to the scanning row order, and its height information is stored in the matrix internal space of the original depth map to construct a complete three-dimensional depth distribution model and obtain the dispensing depth map.

[0015] Optionally, the step of selecting a set of points in the measurement reference surface region of the dispensing depth map, solving for the optimal plane equation using a fitting plane algorithm based on principal component analysis, and performing plane attitude correction to achieve fitting specifically includes: First, the measurement reference plane in the dispensing depth map is selected using the Area of ​​Interest (ROI). Then, all points in the ROI are transformed into a set of three-dimensional points: ; where (x i ,y i ) represents the image coordinates of a pixel, z i This is the depth value, and n is the total number of points in the ROI; The centroid of the 3D point set is calculated by centering the point set. Then, subtract the centroid from each point in the 3D point set to obtain the centered point set: ; The centered point set is represented as an n×3 matrix X, where each row represents the three-dimensional coordinates of a point: ; For the centered point set X, its covariance matrix C is defined as: ; Perform SVD decomposition on matrix X: ; Where U is an n×n orthogonal matrix, representing the spatial distribution of the input data; It is an n×3 diagonal matrix whose diagonal elements are singular values, arranged in descending order; the right singular vector matrix V is a 3×3 orthogonal matrix whose column vectors are the principal component directions of the point set, and are also the covariance matrix X. T The eigenvectors of X; Using the relationship between the covariance matrix and the right singular vector, X T Diagonalize X and adjust the covariance matrix X T X is decomposed into eigenvalues, and the right singular vector matrix V is calculated. The normal vector of the fitted plane based on the calculated right singular vector matrix V is: Where v3 is the principal component direction corresponding to the minimum singular value σ3; Based on the normal vector n and centroid of the fitted plane Construct the equations for the fitted plane: Simplified, we get: ;in: It is the distance from the plane to the origin; By using the rigid body transformation matrix T, each point in the dispensing depth map is transformed... Transform to a new coordinate system: Where p' is the transformed point; The method for obtaining the rigid body transformation matrix T is as follows: The plane is normalized using a rotation matrix. Based on the relationship between the normal vector n of the fitted plane and the z-axis of the world coordinate system, the rotation matrix R is generated. The expression for R is: Where: I is the identity matrix; K is an antisymmetric matrix constructed from the rotation axis k; ; The translation vector t is: ; The rigid body transformation matrix T is in the form of: .

[0016] Optionally, the step of performing three-dimensional connected component analysis on the fitted dispensing depth map to filter out the dispensing volume measurement region specifically includes: The fitted dispensing depth map was binarized into 3D using the OTSU algorithm to obtain the dispensing binary map. Connectivity analysis and connection of dispensing binary graphs are performed using run-length encoding technology; Based on depth feature filtering, convex three-dimensional connected domains that meet the predetermined depth threshold conditions are segmented to obtain the dispensing volume measurement area.

[0017] Optionally, the calculation of the dispensing volume within the dispensing volume measurement area using the projection method specifically includes: By using the projection method, each pixel in the dispensing volume measurement area is considered as an independent cuboid, and the base of these cuboids is determined by the spatial resolution of the pixels. The height is determined by the depth value z. xy Decide; By summing the volumes of all the cuboids, the dispensing volume V within the measurement area is calculated using the following formula: .

[0018] In a second aspect, the present invention provides a system for measuring the volume of transparent adhesive dispensing, comprising: A line laser scanning camera is used to capture the cross-sectional contour of a transparent adhesive placed on a predetermined metal sheet, and to obtain cross-sectional contour image data of the transparent adhesive; wherein, the cross-sectional contour image data of the transparent adhesive includes multiple two-dimensional contour slices, and the color of the laser used by the line laser scanning camera and the background color of the metal sheet are complementary colors. The contour line extraction module is electrically connected to the line laser scanning camera and is used to extract the center contour line of the laser stripes of the two-dimensional contour slice; The depth map construction module is electrically connected to the contour line extraction module. It is used to calculate the height of each contour point in the center contour line of the laser stripe through the laser triangulation principle, and then combine all the center contour lines of the laser stripe into the depth map space to reconstruct a complete three-dimensional depth distribution model and obtain the dispensing depth map. The fitting module is electrically connected to the depth map construction module. It is used to select the measurement reference surface area point set in the dispensing depth map, solve the optimal plane equation by performing a fitting plane algorithm based on principal component analysis, and perform plane posture correction to achieve fitting. The screening module is electrically connected to the fitting module and is used to perform three-dimensional connected component analysis on the fitted dispensing depth map to screen out the dispensing volume measurement area. The volume calculation module is electrically connected to the screening module and is used to calculate the dispensing volume within the dispensing volume measurement area using the projection method.

[0019] Optionally, the contour extraction module is specifically used for: The cross-sectional contour image data of the transparent adhesive is preprocessed to obtain the corresponding grayscale image; A gray-level gradient analysis method combined with a sliding window mechanism is used to locate the sub-pixel level multi-peak candidate center point set by the gray-level centroid method. A multi-factor constraint algorithm based on a dynamic weighted scoring model is used to initially screen the points in the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set. The continuity of neighborhood coordinates of the initial screening points is evaluated by position offset and continuous length constraints. Abnormal jump points are removed and discrete broken line segments that do not meet the continuous length requirements are filtered out to obtain a one-dimensional point set of the screening center. The missing center breakpoints caused by screening are repaired by linear interpolation algorithm, and continuous and smooth laser stripe center lines are generated by adaptive smoothing filtering.

[0020] Optionally, the step of using gray-level gradient analysis combined with a sliding window mechanism to locate a sub-pixel level multi-peak candidate center point set through the gray-level centroid method specifically includes: Vertically scan the pixels in each row of the grayscale image to obtain several candidate line segments; The boundary of candidate line segments is detected by using a sliding window based on the gray-level gradient change rate. The edge detection sensitivity is controlled by a transition length threshold. The rising edge of gray level is used as the starting point and the falling edge of gray level is used as the ending point of the line segment to determine the corresponding candidate region. A gray-level density weighted model is used to increase the weight of high gray-level pixels within the candidate region; the gray-level density weighted model is as follows: Where w is the weighting coefficient, I x It is the pixel grayscale value; The positions of each point in the sub-pixel level multi-peak candidate center point set are calculated and located in the candidate region using the gray-level centroid method. The calculation method is as follows: Assume the range of points in the candidate region is The coordinates y of the sub-pixel weighted center candidate point in the candidate region center for: , where y x These are pixel row coordinates; Finally, peak effective value filtering verification is performed, that is, abnormal candidate points in each row of the sub-pixel level multi-peak candidate center point set and peak candidate points in abnormal width candidate regions are filtered out. The abnormal candidate point is a candidate point whose gray value is less than a predetermined ratio to the maximum gray value of the row in which the abnormal candidate point is located, and the abnormal width candidate region is a candidate region whose line segment width is greater than a predetermined width.

[0021] Optionally, the preliminary screening of points in the sub-pixel level multi-peak candidate center point set using a multi-factor constraint algorithm based on a dynamic weighted scoring model to obtain a preliminary screening point set specifically includes: A continuity analysis is performed on the points in the sub-pixel level multi-peak candidate center point set. For each point in the sub-pixel level multi-peak candidate center point set, a forward and backward search is performed along the vertical direction, and the number of consecutive occurrences L that satisfy the position offset constraint is counted. k ; Calculate the normalized continuity score of the subpixel level multi-peak candidate center point set. Gray intensity evaluation score and the historical location constraint score of the candidate points ; The final score of the subpixel-level multi-peak candidate center point concentration points is calculated using a dynamic weighted comprehensive scoring model. , The calculation method is as follows: ;in, , and These are weight parameters that are pre-set according to the usage scenario; Select the point with the highest final score in each column of the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set; The normalized continuity score of the subpixel-level multi-peak candidate center point set is calculated. Gray intensity evaluation score and the historical location constraint score of the candidate points Specifically, it includes: The position offset constraint is calculated as follows: ;in, It is the coordinate of the k-th point in the sub-pixel level multi-peak candidate center point set, X neighbor These are the coordinates of the points adjacent to the k-th point in the rows before and after it. , and The calculation methods are as follows: , , ; Where max(L) is the maximum consecutive count among all points in the row containing the k-th point of the sub-pixel level multi-peak candidate center point set, I (k) It is the gray value of the k-th point, I max X is the maximum gray value among all points in the column containing the k-th point of the sub-pixel level multi-peak candidate center point set. prev R represents the coordinates of the final selected point in the row preceding the k-th point, and R is the normalization coefficient.

[0022] Optionally, the evaluation of the continuity of neighborhood coordinates of the initial screening point set through position offset and continuous length constraints, the elimination of abnormal jump points and the filtering of discrete broken line segments that do not meet the continuous length requirements, to obtain a one-dimensional point set of the screening center, includes: The continuity of neighborhood coordinates is re-evaluated by using position offset constraints, that is, it is determined whether the adjacent coordinate positions of the points in the initial screening point set in the vertical direction are greater than zValue. If so, treat the point as an abnormal jump point and eliminate it; If not, a sliding window detection is then used to eliminate regions where the continuous length of points in the initial screening point set is less than the preset minimum continuous length. Then, the obtained one-dimensional point set data of the screening center is filtered by the sliding mean to obtain the one-dimensional point set data of the screening center.

[0023] Optionally, the step of repairing the missing center breakpoints caused by the screening using a linear interpolation algorithm, and generating a continuous and smooth laser stripe centerline by combining adaptive smoothing filtering, includes: Based on the assumption of spatial continuity between adjacent valid data points, a local linear model is established to interpolate and repair discontinuous regions of the laser profile; specifically including: Detect the interruption area of ​​the contour line and locate the two breakpoints P1(x1,y1) and P2(x2,y2); Determine whether the number of invalid points between the endpoints of two breakpoints is greater than or equal to the preset interpolation threshold; If not, connect the two breakpoints directly. If so, construct the parameterized line equation: ,in ; After constructing the parameterized linear equation, the following is also included: Calculate the coordinates of the missing points based on the sampling interval: , , i=1,2,...,N-1; By supplementing point (x) i ,y i Reconstruct the geometrically continuous complete centerline profile.

[0024] Optionally, the depth map construction module is specifically used for: The height information of each contour point in the center contour line of the laser stripe is calculated by the principle of direct-fire oblique-receive laser triangulation. Based on the measurement range of the transparent adhesive surface and the preset spatial resolution parameters, the spatial structure of the depth map matrix is ​​initialized to obtain the original depth map; By synchronizing the data of all the two-dimensional contour slices in time, the column coordinates of the center point of the laser stripe center line are mapped to the grid coordinates corresponding to the original depth map according to the scanning row order, and its height information is stored in the matrix internal space of the original depth map to construct a complete three-dimensional depth distribution model and obtain the dispensing depth map.

[0025] Optionally, the fitting module is specifically used for: First, the measurement reference plane in the dispensing depth map is selected using the Area of ​​Interest (ROI). Then, all points in the ROI are transformed into a set of three-dimensional points: ; where (x i ,y i ) represents the image coordinates of a pixel, z i This is the depth value, and n is the total number of points in the ROI; The centroid of the 3D point set is calculated by centering the point set. Then, subtract the centroid from each point in the 3D point set to obtain the centered point set: ; The centered point set is represented as an n×3 matrix X, where each row represents the three-dimensional coordinates of a point: ; For the centered point set X, its covariance matrix C is defined as: ; Perform SVD decomposition on matrix X: ; Where U is an n×n orthogonal matrix, representing the spatial distribution of the input data; It is an n×3 diagonal matrix whose diagonal elements are singular values, arranged in descending order; the right singular vector matrix V is a 3×3 orthogonal matrix whose column vectors are the principal component directions of the point set, and are also the covariance matrix X. T The eigenvectors of X; Using the relationship between the covariance matrix and the right singular vector, X T Diagonalize X and adjust the covariance matrix X T X is decomposed into eigenvalues, and the right singular vector matrix V is calculated. The normal vector of the fitted plane based on the calculated right singular vector matrix V is: Where v3 is the principal component direction corresponding to the minimum singular value σ3; Based on the normal vector n and centroid of the fitted plane Construct the equations for the fitted plane: Simplified, we get: ;in: It is the distance from the plane to the origin; By using the rigid body transformation matrix T, each point in the dispensing depth map is transformed... Transform to a new coordinate system: Where p' is the transformed point; The method for obtaining the rigid body transformation matrix T is as follows: The plane is normalized using a rotation matrix. Based on the relationship between the normal vector n of the fitted plane and the z-axis of the world coordinate system, the rotation matrix R is generated. The expression for R is: Where: I is the identity matrix; K is an antisymmetric matrix constructed from the rotation axis k; ; The translation vector t is: ; The rigid body transformation matrix T is in the form of: .

[0026] Optionally, the filtering module is specifically used for: The fitted dispensing depth map was binarized into 3D using the OTSU algorithm to obtain the dispensing binary map. Connectivity analysis and connection of dispensing binary graphs are performed using run-length encoding technology; Based on depth feature filtering, convex three-dimensional connected domains that meet the predetermined depth threshold conditions are segmented to obtain the dispensing volume measurement area.

[0027] Optionally, the volume calculation module is specifically used for: By using the projection method, each pixel in the dispensing volume measurement area is considered as an independent cuboid, and the base of these cuboids is determined by the spatial resolution of the pixels. The height is determined by the depth value z. xy Decide; By summing the volumes of all the cuboids, the dispensing volume V within the measurement area is calculated using the following formula: .

[0028] Optionally, the line laser scanning camera uses a 405nm wavelength violet laser, and the background color of the metal sheet is yellow-green.

[0029] Thirdly, the present invention also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement a method for measuring the volume of transparent dispensing as described above.

[0030] Fourthly, the present invention also provides a computer program product, including a computer program / instructions, characterized in that, when the computer program / instructions are executed by a processor, they implement the method for measuring the volume of transparent adhesive dispensing described above.

[0031] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes a method for measuring the volume of transparent adhesive dispensing. The background color of the metal sheet is complementary to the laser color. By utilizing the characteristic of absorbing complementary transmitted light, the scattering and reflection interference of transmitted light are reduced, which greatly improves the imaging effect of the transparent adhesive. Combined with a depth map processing algorithm, high-speed and high-precision measurement of the volume of transparent adhesive dispensing is achieved, which enables more precise control of the amount of adhesive dispensed before dispensing. This is of great significance for product quality control in the dispensing process. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart of a method for measuring the volume of transparent adhesive dispensing, provided as an embodiment of the present invention.

[0034] Figure 2 This is a schematic diagram of the architecture of a system for measuring the volume of transparent adhesive dispensing, provided as an embodiment of the present invention.

[0035] Figure 3 This is a diagram showing the correspondence between the color of an object and the color of the light it absorbs.

[0036] Figure 4 A 3x3 pixel perspective view provided for an embodiment of the invention.

[0037] Figure 5 This is a schematic diagram of the structure of a dispensing head provided in an embodiment of the present invention.

[0038] Figure 6 To utilize Figure 5 The diagram shows the transparent adhesive extruded from the dispensing head and placed on four different colored metal sheets.

[0039] Figure 7 This is a rendering of the laser stripe center contour line extracted in an embodiment of the present invention.

[0040] Figure 8 This is a depth diagram of transparent adhesive dots on a yellow-green metal plate provided in an embodiment of the present invention.

[0041] Figure 9 This is a schematic diagram illustrating the principle of the direct-fire oblique-receiving laser triangulation method provided in an embodiment of the present invention.

[0042] Figure 10 This is a schematic diagram of the measurement reference surface provided in an embodiment of the present invention.

[0043] Figure 11 The diagram shows the effect of the three-dimensional connected component analysis algorithm provided in the embodiment of the present invention.

[0044] Figure 12 The dispensing volume measurement results are provided for embodiments of the present invention.

[0045] Figure 13 The volume error ratio comparison measurement results provided in the embodiments of the present invention. Detailed Implementation

[0046] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0047] Example 1: Please refer to Figure 1 , Figure 1 A flowchart of a method for measuring the volume of transparent adhesive dispensing provided in an embodiment of the present invention, the method specifically including: Step 110: Place the transparent adhesive onto the predetermined metal sheet and capture the cross-sectional contour image data of the transparent adhesive using a line laser scanning camera.

[0048] In a preferred embodiment, the color of the laser used in the line laser scanning camera is complementary to the background color of the metal sheet; such as Figure 3 As shown, Figure 3 This is a diagram showing the correspondence between the color of an object and the color of the light it absorbs. Furthermore, in order to test which complementary color is the best combination, this embodiment uses a dispensing head to extrude transparent glue in strip form onto four different base colors (including: yellow-green, blue, pink, and purple) metal sheets respectively; According to the principle of selective absorption of light (the absorption of light by matter is wavelength-dependent, meaning that it only absorbs light within a specific wavelength range, while allowing light of other wavelengths to pass through or be reflected), atoms or molecules in matter have discrete energy levels (ground state and excited state). When the energy of a photon matches the energy difference between the two energy levels, an electron absorbs the photon and transitions to the higher energy state; therefore, the energy level difference between different substances... Unlike other light sources, it absorbs only specific wavelengths of light, forming unique complementary absorption light. The photon energy E is: , ; Where f is the frequency of light, h is Planck's constant, and c is the speed of light. The wavelength of the absorbed light.

[0049] Please refer to Figure 5 and Figure 6 , Figure 5 This is a schematic diagram of the structure of a dispensing head provided in an embodiment of the present invention. Figure 6 To utilize Figure 5 A diagram showing the transparent adhesive extruded from the dispensing head and placed on four different colored metal sheets. Figure 6 In the diagram, (a) corresponds to a green metal piece, (b) corresponds to a blue metal piece, (c) corresponds to a pink metal piece, and (d) corresponds to a purple metal piece.

[0050] Experiments have shown that yellow-green objects have a strong absorption of 405nm violet light. Therefore, in this embodiment, the background color of the metal sheet is yellow-green, and the laser uses 405nm violet light. By utilizing the complementary transmission light absorption characteristics of the background color of the metal sheet, the scattering and reflection interference of transmitted light can be reduced, which can greatly improve the imaging effect of the transparent adhesive. In this embodiment, after the adhesive is extruded and dispensed, the weight of the adhesive is measured by a precision electronic balance and recorded as a reference value. The cured adhesive sample is fixed on a three-dimensional motion platform and the imaging height and spatial pose of the 3D line laser scanning camera are calibrated. Then, the movement range of the motion platform is set so that the line laser scanning camera can completely cover the adhesive area for scanning and data acquisition, thereby obtaining the cross-sectional contour image data of the transparent adhesive. It should be noted that in this embodiment, the cross-sectional contour image data of the transparent adhesive includes multiple two-dimensional contour slices.

[0051] Step 120: Extract the center contour line of the laser stripe of the two-dimensional contour slice.

[0052] Specifically, step 120 includes: Step 121: Preprocess the cross-sectional contour image data of the transparent adhesive to obtain the corresponding grayscale image.

[0053] More specifically, in step 121, firstly, a weighted average algorithm is used to convert the RGB (red, green, yellow) three-channel information into a single-channel grayscale image and compress the color information to retain continuous grayscale values ​​(range 0~255). Subsequently, the grayscale image is smoothed using a mean filtering algorithm to effectively suppress noise interference. Finally, a matrix transpose operation is performed to convert the column-major storage structure to a row-major storage mode. This leverages the principle of locality of reference in the CPU (Central Processing Unit) cache to optimize data access efficiency, thereby improving overall processing speed. The grayscale conversion formula for the weighted average method is as follows: Where R, G, and B are the three channel values ​​of the input image, with weight coefficients of 0.299, 0.587, and 0.114, respectively; Next, image smoothing and noise removal are required: First, the boundary is mirror-filled based on the principle of symmetric reflection. By mirroring the pixels of the image edge neighborhood with the boundary as the axis of symmetry, virtual boundary pixels are generated to ensure the continuity of the edge region during image processing. For example, suppose the input image is The output image is The filter window size is The calculation method for the mean filtering method is as follows: ; Where (x,y) is the position of the current pixel, and k is the radius of the filtering window (i.e., half the window size, for example, a 3×3 window corresponds to k=1). This represents the grayscale value of the pixel in the neighborhood centered at (x,y); (2k+1) 2 This is the total number of pixels within the filtering window; If the input image is a two-dimensional matrix I of size M×N, then the transposed image I T If the size is N×M, then the image transpose operation is as follows: ; Where: I(j,i) is the pixel value in the i-th row and j-th column of the original image; I T (i,j) represents the pixel value in the i-th row and j-th column of the transposed image.

[0054] Step 122: Using gray-level gradient analysis combined with a sliding window mechanism, the sub-pixel level multi-peak candidate center point set is located by gray-level centroid method.

[0055] Specifically, step 122 includes: Step 1221: Vertically scan the pixels in each row of the grayscale image to obtain several candidate line segments.

[0056] By vertically scanning the pixels in each row of the image, multi-stage gradient analysis is used to accurately locate the start and end points and peak points of candidate line segments.

[0057] Step 1222: Detect the boundaries of candidate line segments using a sliding window based on the gray-level gradient change rate. Use a transition length threshold to control the edge detection sensitivity. Take the rising edge of gray level as the starting point and the falling edge of gray level as the ending point of the line segment to determine the corresponding candidate region.

[0058] Step 1223: Use a gray-density weighted model to increase the weight of high gray-value pixels in the candidate region.

[0059] Applying a gray-scale density weighted model to each candidate point within the candidate region allows high gray-scale pixels to receive exponentially increased weight, thereby highlighting the salient features of the target region and improving positioning accuracy.

[0060] The gray-scale density weighted model is as follows: Where w is the weighting coefficient, I x It is the pixel grayscale value; Step 1224: Calculate and locate the positions of each point in the sub-pixel level multi-peak candidate center point set using the gray-scale centroid method within the candidate region. The calculation method is as follows: Assume the range of points in the candidate region is The coordinates y of the sub-pixel weighted center candidate point in the candidate region center for: , where y x These are pixel row coordinates.

[0061] Step 1225: Finally, perform peak RMS value filtering verification. That is: Filter out abnormal candidate points in each row of the subpixel-level multi-peak candidate center point set, as well as peak candidate points in abnormal width candidate regions; Among them, abnormal candidate points are candidate points whose gray value is less than the ratio of the gray value to the maximum gray value of the row where the abnormal candidate point is located, and abnormal width candidate regions are candidate regions whose line segment width is greater than the predetermined width.

[0062] For example, candidate points with gray values ​​less than 10% of the maximum gray value and peak candidate points of abnormally wide candidate regions with line segments greater than 20 pixels in a row can be filtered out to obtain the center candidate points in each row, for example, 2-3.

[0063] Step 123: Using a multi-factor constraint algorithm based on a dynamic weighted scoring model, the points in the sub-pixel level multi-peak candidate center point set are initially screened to obtain the initial screening point set.

[0064] Specifically, steps 123 include: Step 1231: Perform continuity analysis on the points in the sub-pixel level multi-peak candidate center point set. For each point in the sub-pixel level multi-peak candidate center point set, search forward and backward along the vertical direction, and count the number of consecutive occurrences L that satisfy the position offset constraint. k ; Step 1232: Calculate the normalized continuity score of the sub-pixel level multi-peak candidate center point concentration points. Gray intensity evaluation score and the historical location constraint score of the candidate points ; Step 1233: Use a dynamic weighted comprehensive scoring model to calculate the final score of the sub-pixel level multi-peak candidate center point concentration points. , The calculation method is as follows: ; in, , and These are weight parameters pre-set according to the usage scenario; the weight parameters can be dynamically adjusted according to the usage scenario. For example, in this embodiment, they are set as follows: =0.5, =0.1, =0.4.

[0065] Steps 1, 2, 3, and 4: Select the point with the highest final score in each column of the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set; Specifically, the calculation method for the position offset constraint is as follows: ;in, It is the coordinate of the k-th point in the sub-pixel level multi-peak candidate center point set, X neighbor These are the coordinates of the points adjacent to the k-th point in the rows before and after it. , and The calculation methods are as follows: , , ; Where max(L) is the maximum consecutive count among all points in the row containing the k-th point of the sub-pixel level multi-peak candidate center point set, I (k) It is the gray value of the k-th point, I max X is the maximum gray value among all points in the column containing the k-th point of the sub-pixel level multi-peak candidate center point set. prevR represents the coordinates of the final selected point in the row preceding the k-th point, and R is the normalization coefficient.

[0066] Step 124: Evaluate the continuity of neighborhood coordinates of the initial screening point set by position offset and continuous length constraint, remove abnormal jump points and filter out discrete broken line segments that do not meet the continuous length requirement, and obtain the one-dimensional point set of the screening center.

[0067] Specifically, step 124 includes: Step 1241: Re-evaluate the continuity of neighborhood coordinates by using position offset constraints, that is, determine whether the adjacent coordinate positions of the points in the initial screening point set in the vertical direction are greater than zValue; if yes, proceed to step 1242; if no, proceed to step 1243. Step 1242: Treat this point as an abnormal jump point and eliminate it; Step 1243: If not, use a sliding window to detect and eliminate regions where the continuous length of points in the initial screening point set is less than the preset minimum continuous length. Then, apply a sliding mean filter to the obtained one-dimensional point set data of the screening center to obtain the one-dimensional point set data of the screening center.

[0068] After the initial screening is completed, post-processing is required. First, points with insufficient continuity in the vertical direction should be removed. Then, the continuity of the neighborhood coordinates should be re-evaluated by using position offset constraints to eliminate abnormal jump points. When the adjacent coordinate position is greater than zValue, the point is regarded as an abnormal jump point and then eliminated. Then, by using a sliding window to detect and determine the continuous length of the center point, areas that are less than the minimum continuous length condition (e.g., 5-6 pixels) will be cleared to filter out discrete broken line segments that do not meet the length requirements. Finally, the obtained one-dimensional point set data of the selection center is subjected to moving mean filtering, which is a simple and fast way to remove noise. The calculation method of moving mean filtering for one-dimensional data is as follows: ; Assuming the input data is I(1,y) and the output data is O(1,y), the filter window size is 1×(2k+1), (1,y) is the position of the current pixel; k is the radius of the filter window (i.e., half the window size, for example, a 1×3 window corresponds to k=1); I(1,y+i) represents the gray value of the pixel in the neighborhood centered at (1,y); 2k+1 is the total number of pixels in the filter window.

[0069] like Figure 4 As shown, Figure 4 A 3x3 pixel perspective view provided for an embodiment of the invention.

[0070] Step 125: Repair the missing center breakpoints caused by screening using a linear interpolation algorithm, and generate a continuous and smooth laser stripe center line by combining adaptive smoothing filtering.

[0071] Specifically, step 125 is implemented as follows: Based on the assumption of spatial continuity between adjacent valid data points, a local linear model is established to interpolate and repair discontinuous regions of the laser profile; specifically including: Detect the interruption area of ​​the contour line and locate the two breakpoints P1(x1,y1) and P2(x2,y2); Determine whether the number of invalid points between the endpoints of two breakpoints is greater than or equal to the preset interpolation threshold; If not, connect the two breakpoints directly. If so, construct the parameterized line equation: ,in ; After constructing the parametric linear equation, the following steps are also included: Calculate the coordinates of the missing points based on the sampling interval: , , i=1,2,...,N-1; By supplementing point (x) i ,y i Reconstruct the geometrically continuous complete centerline profile.

[0072] It should be noted that when the number of invalid values ​​at the breakpoint interval is greater than or equal to the interpolation threshold, the breakpoints at that point are not connected to avoid generating false interpolation points in areas without real data support; this method uses... Slope constraints ensure spatial consistency of interpolation points.

[0073] Please refer to Figure 7 , Figure 7 The image shows the extracted center outline of the laser stripe.

[0074] Step 130: Calculate the height of each contour point in the center contour line of the laser stripe using the laser triangulation principle, then combine all the center contour lines of the laser stripe and input them into the depth map space to reconstruct a complete three-dimensional depth distribution model and obtain the dispensing depth map.

[0075] Step 130 includes: Step 131: Calculate the height information of each contour point in the center contour line of the laser stripe using the principle of direct-fire oblique-receive laser triangulation.

[0076] Please refer to Figure 8 and Figure 9 , Figure 8This is a depth map of the transparent adhesive dots on a yellow-green background metal plate provided in an embodiment of the present invention. Figure 9 This is a schematic diagram illustrating the principle of the direct-fire oblique-receiving laser triangulation method provided in an embodiment of the present invention; For example, such as Figure 9 As shown, let θ be the angle between the extension of the imaging lens center and the normal to the surface of the object being measured, and let a be the object distance. In the focused imaging state, when the distance OB is taken as the focal length f and the height of the object being measured is h, the aberration on the imaging element is x. Draw CD perpendicular to the extension of the object distance, and it is easy to obtain... and Similar, therefore: ; From the above formula, we can deduce: ; By using the above formula, the height h of each contour point can be calculated, thus obtaining the height information of each contour point.

[0077] Step 132: Based on the measurement range of the transparent adhesive surface and the preset spatial resolution parameters, initialize the spatial structure of the depth map matrix to obtain the original depth map.

[0078] By synchronizing the data of all 2D contour slices in time, the column coordinates of the center point of the laser stripe centerline are mapped to the corresponding grid coordinates of the original depth map according to the scan row order, and its height information is stored in the matrix space of the original depth map to construct a complete 3D depth distribution model, thus obtaining the dispensing depth map, such as... Figure 8 As shown.

[0079] Step 140: Select the measurement reference plane area point set in the dispensing depth map, use the fitting plane algorithm based on principal component analysis to solve the optimal plane equation, and perform plane posture correction to achieve fitting.

[0080] Step 140 includes: Step 141: First, use the ROI to select the measurement reference plane in the dispensing depth map, and then convert all the points in the ROI into a set of three-dimensional points.

[0081] The three-dimensional point set is represented as: ; where (x i ,y i ) represents the image coordinates of a pixel, z i This is the depth value, and n is the total number of points in the ROI; Step 142: Center the 3D point set and calculate its centroid. Then, subtract the centroid from each point in the three-dimensional point set to obtain the centered point set.

[0082] The method for calculating the centroid (mean point) of a point set is as follows: ; The centralized point set is represented as: .

[0083] Step 143: Represent the centered point set as an n×3 matrix X, and define its covariance matrix C.

[0084] Matrix X is represented as: In matrix X, each row represents the three-dimensional coordinates of a point.

[0085] The covariance matrix C is: ; Then, SVD decomposition is performed on matrix X.

[0086] Since directly calculating the covariance matrix may involve a large amount of computation, we perform SVD decomposition on matrix X to directly extract principal component information. ; Where U is an n×n orthogonal matrix, representing the spatial distribution of the input data; It is an n×3 diagonal matrix whose diagonal elements are singular values, arranged in descending order; the right singular vector matrix V is a 3×3 orthogonal matrix whose column vectors are the principal component directions of the point set, and are also the covariance matrix X. T The eigenvectors of X; Then, using the relationship between the covariance matrix and the right singular vector, X T Diagonalize X and adjust the covariance matrix X T Eigenvalue decomposition is performed on X to calculate the right singular vector matrix V.

[0087] Step 144: The normal vector of the fitted plane is obtained from the calculated right singular vector matrix V: Where v3 is the principal component direction corresponding to the minimum singular value σ3; Based on the normal vector n and centroid of the fitted plane Construct the equations for the fitted plane: Simplified, we get: ;in: It is the distance from the plane to the origin; By using the rigid body transformation matrix T, each point in the dispensing depth map is transformed... Transform to a new coordinate system: ; where p' is the transformed point.

[0088] Step 145: Use the rotation matrix to orthogonalize the plane. Generate the rotation matrix R based on the relationship between the normal vector n of the fitted plane and the z-axis of the world coordinate system.

[0089] The R expression is: Where: I is the identity matrix; K is an antisymmetric matrix constructed from the rotation axis k; ; The translation vector t is: ; The rigid body transformation matrix T is in the form of: .

[0090] Finally, to evaluate the fitting effect, the sum of squared residuals from the point set to the fitting plane can be calculated: The smaller the calculated residual, the better the fit.

[0091] Step 150: Perform three-dimensional connected component analysis on the fitted dispensing depth map to screen out the dispensing volume measurement region.

[0092] Step 150 includes: Step 151: Use the OTSU algorithm to perform 3D binarization on the fitted dispensing depth map to obtain the dispensing binary map.

[0093] First, the depth histogram H(z) is statistically analyzed and normalized to calculate the normalized probability distribution P(z); Then, each candidate depth threshold is iterated through, and the background probability P0(T), foreground probability P1(T), and average depth values ​​of the background and foreground are calculated. and The overall mean of the depth map Finally, the inter-class variance of the candidate depth threshold is calculated. ; The threshold with the largest inter-class variance is selected as the optimal threshold. The depth value of the region with a value greater than this threshold is set to 255, and the other regions are filled with invalid values ​​to distinguish between objects and the background.

[0094] For example, suppose the depth value range of the depth map is... , where z min and z max Let Z be the minimum and maximum depth values ​​in the depth map, respectively. Then, the depth histogram H(z) can be represented as: Where: H(z) is the number of pixels with depth value z; D(x,y) is the depth value of pixel (x,y) in the depth map; To facilitate subsequent calculations, the depth histogram is usually normalized to a probability distribution: ; Where: P(z) is the probability of the depth value z occurring; N is the total number of pixels in the depth map. ; For each candidate threshold P0(T) and P1(T) are defined as follows: ; and They are respectively: ; Overall mean of depth map point set for: ; Finally, inter-class variance was utilized. The method for calculating between-class variance to measure the difference between the background and foreground is as follows: ; in, and These represent the deviations of the background and foreground from the overall mean, respectively.

[0095] Step 152: Perform connected component analysis and connection on the dispensing binary graph using run-length encoding technology.

[0096] Specifically, after obtaining the binary image, the starting position and length of consecutive identical values ​​in each row are recorded using efficient run-length encoding compression and connectivity detection techniques. Based on run-length encoding, connected regions can be labeled using the following steps: First, an equivalence table is initialized, creating an empty equivalence table to record the connectivity relationships between different runs. Then, the binary image is traversed in row-major order, encoding the runs in each row and checking if the current run overlaps with the run in the previous row: if they overlap, they are labeled as the same connected region; otherwise, a new label is assigned. Next, equivalence labels are merged: labels with the same connectivity relationship are merged using the equivalence table. Finally, a connected region label matrix is ​​generated to connect the same connected regions: ultimately, a label matrix L(x,y) is obtained, where the value of each pixel represents the connected region number it belongs to.

[0097] For example, suppose the run-length encoding is represented as , where: x k It is the starting column coordinate of the run; l k Let R be the length of the run. For two runs, R... i and R jThey are considered to belong to the same connected region L(x,y) if they satisfy one of the following conditions: Horizontal adjacency conditions: and ; Vertical adjacency condition: R i and R j They are located in two adjacent rows and have overlapping parts.

[0098] Step 153: Based on depth features, filter and segment out convex three-dimensional connected regions that meet the predetermined depth threshold conditions to obtain the dispensing volume measurement area.

[0099] Specifically, after completing the connected component analysis and connection, the average depth feature of the connected components is then analyzed. The calculation is performed as follows: ;in, It represents the total number of pixels in the connected components.

[0100] Finally, in order to filter out 3D convex connected components that meet specific depth threshold conditions, depth filtering is performed based on the following conditions: Among them, T depth It is a set depth threshold used to exclude background areas.

[0101] Please refer to Figure 11 , Figure 11 The diagram shows the effect of the three-dimensional connected component analysis algorithm provided in the embodiment of the present invention.

[0102] Step 160: Calculate the dispensing volume within the dispensing volume measurement area using the projection method.

[0103] By using the projection method, each pixel in the dispensing volume measurement area is considered as an independent cuboid, and the base of these cuboids is determined by the spatial resolution of the pixels. The height is determined by the depth value z. xy Decide; By summing the volumes of all the cuboids, the dispensing volume V within the measurement area is calculated using the following formula: .

[0104] The experiment used the weight comparison method, assuming the dispensing volume measurement value is V and the dispensing density value is... By calculating weight The volume measurement error ratio can be obtained by calculating the error ratio with the actual weight. Among them, the yellow-green background metal sheet has the lowest volume error ratio in dispensing measurement, with a volume error rate of about 1.5%. This proves that the yellow-green background is better than other colors in reducing the scattering and reflection interference of transmitted light. Using the yellow-green background as the background color can effectively improve the imaging effect of transparent dispensing.

[0105] Please refer to Figure 12 and Figure 13 , Figure 12 The dispensing volume measurement results provided in the embodiments of the present invention are as follows: Figure 13 The volume error ratio comparison measurement results provided in the embodiments of the present invention.

[0106] In summary, compared with the prior art, the present invention has at least the following advantages: (1) The background color of the metal sheet is a color complementary to the laser color. By utilizing its characteristic of absorbing complementary transmitted light, the scattering and reflection interference of transmitted light are reduced, which greatly improves the imaging effect of transparent glue and provides more complete depth map data for subsequent volume measurement. The imaging effect of transparent glue is optimized without the need for other auxiliary measurement technologies or equipment. (2) The multi-factor constraint algorithm based on the dynamic weighted scoring model is used to initially screen the central candidate extraction points, which enhances the stability and accuracy of the screening process and reduces the judgment error caused by ignoring other important factors due to a single variable; (3) By selecting a set of points in the fitting reference plane, performing fitting plane calculations and combining them with the attitude correction algorithm, higher precision plane fitting is achieved, providing a high precision measurement reference plane; (4) The three-dimensional connected component analysis algorithm can more accurately screen out the dispensing volume measurement area, thus improving the accuracy of subsequent dispensing volume measurement.

[0107] Example 2: Please refer to Figure 2 , Figure 2 This is a schematic diagram of the architecture of a system for measuring the volume of transparent adhesive dispensing, provided as an embodiment of the present invention. The system specifically includes: A line laser scanning camera 10 is used to capture the cross-sectional contour of a transparent adhesive placed on a predetermined metal sheet, and to acquire cross-sectional contour image data of the transparent adhesive; wherein, the cross-sectional contour image data of the transparent adhesive includes multiple two-dimensional contour slices, and the color of the laser used by the line laser scanning camera and the background color of the metal sheet are complementary colors. Contour line extraction module 20, electrically connected laser scanning camera 10, used to extract the center contour line of laser stripes of two-dimensional contour slices; The depth map construction module 30 and the electrical connection contour extraction module 20 are used to calculate the height of each contour point in the laser stripe center contour line through the laser triangulation principle, and then combine all the laser stripe center contour lines and input them into the depth map space to reconstruct a complete three-dimensional depth distribution model and obtain the dispensing depth map. The fitting module 40 and the electrical connection depth map construction module 30 are used to select the measurement reference surface area point set in the dispensing depth map, solve the optimal plane equation by performing a fitting plane algorithm based on principal component analysis, and perform plane attitude correction to achieve fitting. The filtering module 50 and the electrical connection fitting module 40 are used to perform three-dimensional connected domain analysis on the fitted dispensing depth map to filter out the dispensing volume measurement area. The volume calculation module 60 and the electrical connection screening module 50 are used to calculate the dispensing volume within the dispensing volume measurement area using the projection method.

[0108] Since the method for measuring the volume of transparent adhesive dispensing has been described in detail in Example 1, it will not be repeated in this example.

[0109] This embodiment presents a system for measuring the volume of transparent adhesive dispensing. This system can be applied to the dispensing process to provide accurate data support and real-time feedback for the calibration of adhesive volume at the dispensing head, thereby effectively optimizing the control of adhesive dispensing volume before dispensing. This is of great significance for product quality control and improving production efficiency in the dispensing process.

[0110] Example 3: This embodiment also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement a method for measuring the volume of transparent adhesive dispensing as described in Embodiment 1.

[0111] Since the method for measuring the volume of transparent adhesive dispensing has been described in detail in Example 1, it will not be repeated in this example.

[0112] Example 4: The present invention also provides a computer program product, including a computer program / instructions, characterized in that, when the computer program / instructions are executed by a processor, a method for measuring the volume of transparent adhesive dispensing as described in Embodiment 1 is implemented.

[0113] Since the method for measuring the volume of transparent adhesive dispensing has been described in detail in Example 1, it will not be repeated in this example.

[0114] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0115] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring the volume of transparent adhesive dispensing, characterized in that, include: Transparent adhesive is placed on a predetermined metal sheet, and the cross-sectional contour image data of the transparent adhesive is acquired by a line laser scanning camera; wherein, the cross-sectional contour image data of the transparent adhesive includes multiple two-dimensional contour slices, and the color of the laser used by the line laser scanning camera is complementary to the background color of the metal sheet. Extract the center contour line of the laser stripe of the two-dimensional contour slice; The height of each contour point in the center contour line of the laser stripe is calculated by the laser triangulation principle. Then, all the center contour lines of the laser stripe are combined and input into the depth map space to reconstruct a complete three-dimensional depth distribution model and obtain the dispensing depth map. Select the measurement reference plane area point set in the dispensing depth map, and use the fitting plane algorithm based on principal component analysis to solve the optimal plane equation. Then, perform plane posture correction to achieve fitting. Three-dimensional connected component analysis was performed on the fitted dispensing depth map to screen out the dispensing volume measurement region. The dispensing volume within the measurement area is calculated using the projection method.

2. The method for measuring the volume of transparent adhesive dispensing according to claim 1, characterized in that, The extraction of the laser stripe center contour line from the two-dimensional contour slice specifically includes: The cross-sectional contour image data of the transparent adhesive is preprocessed to obtain the corresponding grayscale image; A gray-level gradient analysis method combined with a sliding window mechanism is used to locate the sub-pixel level multi-peak candidate center point set by the gray-level centroid method. A multi-factor constraint algorithm based on a dynamic weighted scoring model is used to initially screen the points in the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set. The continuity of neighborhood coordinates of the initial screening points is evaluated by position offset and continuous length constraints. Abnormal jump points are removed and discrete broken line segments that do not meet the continuous length requirements are filtered out to obtain a one-dimensional point set of the screening center. The missing center breakpoints caused by screening are repaired by linear interpolation algorithm, and continuous and smooth laser stripe center lines are generated by adaptive smoothing filtering.

3. The method for measuring the volume of transparent adhesive dispensing according to claim 2, characterized in that, The method employs gray-level gradient analysis combined with a sliding window mechanism to locate a sub-pixel level multi-peak candidate center point set using the gray-level centroid method. Specifically, this includes: Vertically scan the pixels in each row of the grayscale image to obtain several candidate line segments; The boundary of candidate line segments is detected by using a sliding window based on the gray-level gradient change rate. The edge detection sensitivity is controlled by a transition length threshold. The rising edge of gray level is used as the starting point and the falling edge of gray level is used as the ending point of the line segment to determine the corresponding candidate region. A gray-level density weighted model is used to increase the weight of high gray-level pixels within the candidate region; the gray-level density weighted model is as follows: Where w is the weighting coefficient, I x It is the pixel grayscale value; The positions of each point in the sub-pixel level multi-peak candidate center point set are calculated and located in the candidate region using the gray-level centroid method. The calculation method is as follows: Assume the range of points in the candidate region is The coordinates y of the sub-pixel weighted center candidate point in the candidate region center for: , where y x These are pixel row coordinates; Finally, peak effective value filtering verification is performed, that is, abnormal candidate points in each row of the sub-pixel level multi-peak candidate center point set and peak candidate points in abnormal width candidate regions are filtered out. The abnormal candidate point is a candidate point whose gray value is less than a predetermined ratio to the maximum gray value of the row in which the abnormal candidate point is located, and the abnormal width candidate region is a candidate region whose line segment width is greater than a predetermined width.

4. The method for measuring the volume of transparent adhesive dispensing according to claim 3, characterized in that, The process involves using a multi-factor constraint algorithm based on a dynamic weighted scoring model to initially screen points in the sub-pixel level multi-peak candidate center point set, resulting in a preliminary set of screened points. Specifically, this includes: The continuity of the points in the sub-pixel multi-peak candidate center point set is analyzed, and for each point in the sub-pixel multi-peak candidate center point set, the number of continuous appearances L that satisfy the position offset constraint is counted by searching forward and backward along the vertical direction k ; Calculate the normalized continuity score of the subpixel level multi-peak candidate center point set. Gray intensity evaluation score and the historical location constraint score of the candidate points ; The final score of the subpixel-level multi-peak candidate center point concentration points is calculated using a dynamic weighted comprehensive scoring model. , The calculation method is as follows: ;in, , and These are weight parameters that are pre-set according to the usage scenario; Select the point with the highest final score in each column of the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set; The normalized continuity score of the subpixel-level multi-peak candidate center point set is calculated. Gray intensity evaluation score and the historical location constraint score of the candidate points Specifically, it includes: The position offset constraint is calculated as follows: ;in, It is the coordinate of the k-th point in the sub-pixel level multi-peak candidate center point set, X neighbor These are the coordinates of the points adjacent to the k-th point in the rows before and after it. , and The calculation methods are as follows: , , ; where max(L) is the maximum continuous number of points in the row of the kth point of the sub-pixel level multi-peak candidate center point set, I (k) is the gray value of the kth point, I max is the maximum gray value of all points in the column of the kth point of the sub-pixel level multi-peak candidate center point set, X prev is the coordinate of the final selected point in the previous row of the kth point, and R is a normalization coefficient.

5. The method for measuring the volume of transparent adhesive dispensing according to claim 4, characterized in that, The evaluation of the neighborhood coordinate continuity of the initial screening point set through position offset and continuous length constraints, the elimination of abnormal jump points and the filtering of discrete broken line segments that do not meet the continuous length requirements, yields a one-dimensional point set of the screening center, including: The continuity of neighborhood coordinates is re-evaluated by using position offset constraints, that is, it is determined whether the adjacent coordinate positions of the points in the initial screening point set in the vertical direction are greater than zValue. If so, treat the point as an abnormal jump point and eliminate it; If not, a sliding window detection is then used to eliminate regions where the continuous length of points in the initial screening point set is less than the preset minimum continuous length. Then, the obtained one-dimensional point set data of the screening center is filtered by the sliding mean to obtain the one-dimensional point set data of the screening center.

6. The method for measuring the volume of transparent adhesive dispensing according to claim 5, characterized in that, The step of repairing the missing center breakpoints caused by the screening process using a linear interpolation algorithm, and generating continuous and smooth laser stripe center lines by combining adaptive smoothing filtering, includes: Based on the assumption of spatial continuity between adjacent valid data points, a local linear model is established to interpolate and repair discontinuous regions of the laser profile; specifically including: Detect the interruption area of ​​the contour line and locate the two breakpoints P1(x1,y1) and P2(x2,y2); Determine whether the number of invalid points between the endpoints of two breakpoints is greater than or equal to the preset interpolation threshold; If not, connect the two breakpoints directly. If so, construct the parameterized line equation: ,in ; After constructing the parameterized linear equation, the following is also included: Calculate the coordinates of the missing points based on the sampling interval: , ,i=1,2,...,N-1; By supplementing point (x) i ,y i Reconstruct the geometrically continuous complete centerline profile.

7. The method for measuring the volume of transparent adhesive dispensing according to claim 6, characterized in that, The height of each contour point in the center contour line of the laser stripe is calculated using the laser triangulation principle. Then, all the laser stripe center contour lines are combined and input into the depth map space to reconstruct a complete three-dimensional depth distribution model, resulting in a dispensing depth map. Specifically, this includes: The height information of each contour point in the center contour line of the laser stripe is calculated by the principle of direct-fire oblique-receive laser triangulation. Based on the measurement range of the transparent adhesive surface and the preset spatial resolution parameters, the spatial structure of the depth map matrix is ​​initialized to obtain the original depth map; By synchronizing the data of all the two-dimensional contour slices in time, the column coordinates of the center point of the laser stripe center line are mapped to the grid coordinates corresponding to the original depth map according to the scanning row order, and its height information is stored in the matrix internal space of the original depth map to construct a complete three-dimensional depth distribution model and obtain the dispensing depth map.

8. The method for measuring the volume of transparent adhesive dispensing according to claim 7, characterized in that, The process involves selecting a set of measurement reference surface points from the dispensing depth map, using a principal component analysis-based fitting plane algorithm to solve for the optimal plane equation, and then performing plane pose correction to achieve the fitting. Specifically, this includes: First, the measurement reference plane in the dispensing depth map is selected using the Area of ​​Interest (ROI). Then, all points in the ROI are transformed into a set of three-dimensional points: ; where (x i ,y i ) represents the image coordinates of a pixel, z i This is the depth value, and n is the total number of points in the ROI; The centroid of the 3D point set is calculated by centering the point set. Then, subtract the centroid from each point in the 3D point set to obtain the centered point set: ; The centered point set is represented as an n×3 matrix X, where each row represents the three-dimensional coordinates of a point: ; For the centered point set X, its covariance matrix C is defined as: ; Perform SVD decomposition on matrix X: ; Where U is an n×n orthogonal matrix, representing the spatial distribution of the input data; It is an n×3 diagonal matrix whose diagonal elements are singular values, arranged in descending order; the right singular vector matrix V is a 3×3 orthogonal matrix whose column vectors are the principal component directions of the point set, and are also the covariance matrix X. T The eigenvectors of X; Using the relationship between the covariance matrix and the right singular vector, X T Diagonalize X and adjust the covariance matrix X T X is decomposed into eigenvalues, and the right singular vector matrix V is calculated. The normal vector of the fitted plane based on the calculated right singular vector matrix V is: Where v3 is the principal component direction corresponding to the minimum singular value σ3; Based on the normal vector n and centroid of the fitted plane Construct the equations for the fitted plane: Simplified, we get: ;in: It is the distance from the plane to the origin; By using the rigid body transformation matrix T, each point in the dispensing depth map is transformed... Transform to a new coordinate system: Where p' is the transformed point; The method for obtaining the rigid body transformation matrix T is as follows: The plane is normalized using a rotation matrix. Based on the relationship between the normal vector n of the fitted plane and the z-axis of the world coordinate system, the rotation matrix R is generated. The expression for R is: Where: I is the identity matrix; K is an antisymmetric matrix constructed from the rotation axis k; ; The translation vector t is: ; The rigid body transformation matrix T is in the form of: 。 9. The method for measuring the volume of transparent adhesive dispensing according to claim 8, characterized in that, The step of performing three-dimensional connected component analysis on the fitted dispensing depth map to screen out the dispensing volume measurement region specifically includes: The fitted dispensing depth map was binarized into 3D using the OTSU algorithm to obtain the dispensing binary map. Connectivity analysis and connection of dispensing binary graphs are performed using run-length encoding technology; Based on depth feature filtering, convex three-dimensional connected domains that meet the predetermined depth threshold conditions are segmented to obtain the dispensing volume measurement area.

10. The method for measuring the volume of transparent adhesive dispensing according to claim 9, characterized in that, The calculation of the dispensing volume within the measurement area using the projection method specifically includes: By using the projection method, each pixel in the dispensing volume measurement area is considered as an independent cuboid, and the base of these cuboids is determined by the spatial resolution of the pixels. The height is determined by the depth value z. xy Decide; By summing the volumes of all the cuboids, the dispensing volume V within the measurement area is calculated using the following formula: 。 11. A system for measuring the volume of transparent adhesive dispensing, characterized in that, include: A line laser scanning camera is used to capture the cross-sectional contour of a transparent adhesive placed on a predetermined metal sheet, and to obtain cross-sectional contour image data of the transparent adhesive; wherein, the cross-sectional contour image data of the transparent adhesive includes multiple two-dimensional contour slices, and the color of the laser used by the line laser scanning camera and the background color of the metal sheet are complementary colors. The contour line extraction module is electrically connected to the line laser scanning camera and is used to extract the center contour line of the laser stripes of the two-dimensional contour slice; The depth map construction module is electrically connected to the contour line extraction module. It is used to calculate the height of each contour point in the center contour line of the laser stripe using the laser triangulation principle, and then combine all the center contour lines of the laser stripe into the depth map space to reconstruct a complete three-dimensional depth distribution model and obtain the dispensing depth map. The fitting module is electrically connected to the depth map construction module. It is used to select the measurement reference surface area point set in the dispensing depth map, perform a fitting plane algorithm based on principal component analysis to solve the optimal plane equation, and perform plane posture correction to achieve fitting. The screening module is electrically connected to the fitting module and is used to perform three-dimensional connected component analysis on the fitted dispensing depth map to screen out the dispensing volume measurement area. The volume calculation module is electrically connected to the screening module and is used to calculate the dispensing volume within the dispensing volume measurement area using the projection method.

12. The system for measuring the volume of transparent adhesive dispensing according to claim 11, characterized in that, The contour extraction module is specifically used for: The cross-sectional contour image data of the transparent adhesive is preprocessed to obtain the corresponding grayscale image; A gray-level gradient analysis method combined with a sliding window mechanism is used to locate the sub-pixel level multi-peak candidate center point set by the gray-level centroid method. A multi-factor constraint algorithm based on a dynamic weighted scoring model is used to initially screen the points in the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set. The continuity of neighborhood coordinates of the initial screening points is evaluated by position offset and continuous length constraints. Abnormal jump points are removed and discrete broken line segments that do not meet the continuous length requirements are filtered out to obtain a one-dimensional point set of the screening center. The missing center breakpoints caused by screening are repaired by linear interpolation algorithm, and continuous and smooth laser stripe center lines are generated by adaptive smoothing filtering.

13. The system for measuring the volume of transparent adhesive dispensing according to claim 12, characterized in that, The method employs gray-level gradient analysis combined with a sliding window mechanism to locate a sub-pixel level multi-peak candidate center point set using the gray-level centroid method. Specifically, this includes: Vertically scan the pixels in each row of the grayscale image to obtain several candidate line segments; The boundary of candidate line segments is detected by using a sliding window based on the gray-level gradient change rate. The edge detection sensitivity is controlled by a transition length threshold. The rising edge of gray level is used as the starting point and the falling edge of gray level is used as the ending point of the line segment to determine the corresponding candidate region. A gray-level density weighted model is used to increase the weight of high gray-level pixels within the candidate region; the gray-level density weighted model is as follows: Where w is the weighting coefficient, I x It is the pixel grayscale value; The positions of each point in the sub-pixel level multi-peak candidate center point set are calculated and located in the candidate region using the gray-level centroid method. The calculation method is as follows: Assume the range of points in the candidate region is The coordinates y of the sub-pixel weighted center candidate point in the candidate region center for: , where y x These are pixel row coordinates; Finally, peak effective value filtering verification is performed, that is, abnormal candidate points in each row of the sub-pixel level multi-peak candidate center point set and peak candidate points in abnormal width candidate regions are filtered out. The abnormal candidate point is a candidate point whose gray value is less than a predetermined ratio to the maximum gray value of the row in which the abnormal candidate point is located, and the abnormal width candidate region is a candidate region whose line segment width is greater than a predetermined width.

14. The system for measuring the volume of transparent adhesive dispensing according to claim 13, characterized in that, The process involves using a multi-factor constraint algorithm based on a dynamic weighted scoring model to initially screen points in the sub-pixel level multi-peak candidate center point set, resulting in a preliminary set of screened points. Specifically, this includes: A continuity analysis is performed on the points in the sub-pixel level multi-peak candidate center point set. For each point in the sub-pixel level multi-peak candidate center point set, a forward and backward search is performed along the vertical direction, and the number of consecutive occurrences L that satisfy the position offset constraint is counted. k ; Calculate the normalized continuity score of the subpixel level multi-peak candidate center point set. Gray intensity evaluation score and the historical location constraint score of the candidate points ; The final score of the subpixel-level multi-peak candidate center point concentration points is calculated using a dynamic weighted comprehensive scoring model. , The calculation method is as follows: ;in, , and These are weight parameters that are pre-set according to the usage scenario; Select the point with the highest final score in each column of the sub-pixel level multi-peak candidate center point set to obtain the initial screening point set; The normalized continuity score of the subpixel-level multi-peak candidate center point set is calculated. Gray intensity evaluation score and the historical location constraint score of the candidate points Specifically, it includes: The position offset constraint is calculated as follows: ;in, It is the coordinate of the k-th point in the sub-pixel level multi-peak candidate center point set, X neighbor These are the coordinates of the points adjacent to the k-th point in the rows before and after it. , and The calculation methods are as follows: , , ; Where max(L) is the maximum consecutive count among all points in the row containing the k-th point of the sub-pixel level multi-peak candidate center point set, I (k) It is the gray value of the k-th point, I max X is the maximum gray value among all points in the column containing the k-th point of the sub-pixel level multi-peak candidate center point set. prev R represents the coordinates of the final selected point in the row preceding the k-th point, and R is the normalization coefficient.

15. The system for measuring the volume of transparent adhesive dispensing according to claim 14, characterized in that, The evaluation of the neighborhood coordinate continuity of the initial screening point set through position offset and continuous length constraints, the elimination of abnormal jump points and the filtering of discrete broken line segments that do not meet the continuous length requirements, yields a one-dimensional point set of the screening center, including: The continuity of neighborhood coordinates is re-evaluated by using position offset constraints, that is, it is determined whether the adjacent coordinate positions of the points in the initial screening point set in the vertical direction are greater than zValue. If so, treat the point as an abnormal jump point and eliminate it; If not, a sliding window detection is then used to eliminate regions where the continuous length of points in the initial screening point set is less than the preset minimum continuous length. Then, the obtained one-dimensional point set data of the screening center is filtered by the sliding mean to obtain the one-dimensional point set data of the screening center.

16. The system for measuring the volume of transparent adhesive dispensing according to claim 15, characterized in that, The step of repairing the missing center breakpoints caused by the screening process using a linear interpolation algorithm, and generating continuous and smooth laser stripe center lines by combining adaptive smoothing filtering, includes: Based on the assumption of spatial continuity between adjacent valid data points, a local linear model is established to interpolate and repair discontinuous regions of the laser profile; specifically including: Detect the interruption area of ​​the contour line and locate the two breakpoints P1(x1,y1) and P2(x2,y2); Determine whether the number of invalid points between the endpoints of two breakpoints is greater than or equal to the preset interpolation threshold; If not, connect the two breakpoints directly. If so, construct the parameterized line equation: ,in ; After constructing the parameterized linear equation, the following is also included: Calculate the coordinates of the missing points based on the sampling interval: , ,i=1,2,...,N-1; By supplementing point (x) i ,y i Reconstruct the geometrically continuous complete centerline profile.

17. A system for measuring the volume of transparent adhesive dispensing according to claim 16, characterized in that, The depth map construction module is specifically used for: The height information of each contour point in the center contour line of the laser stripe is calculated by the principle of direct-fire oblique-receive laser triangulation. Based on the measurement range of the transparent adhesive surface and the preset spatial resolution parameters, the spatial structure of the depth map matrix is ​​initialized to obtain the original depth map; By synchronizing the data of all the two-dimensional contour slices in time, the column coordinates of the center point of the laser stripe center line are mapped to the grid coordinates corresponding to the original depth map according to the scanning row order, and its height information is stored in the matrix internal space of the original depth map to construct a complete three-dimensional depth distribution model and obtain the dispensing depth map.

18. A system for measuring the volume of transparent adhesive dispensing according to claim 17, characterized in that, The fitting module is specifically used for: First, the measurement reference plane in the dispensing depth map is selected using the Area of ​​Interest (ROI). Then, all points in the ROI are transformed into a set of three-dimensional points: ; where (x i ,y i ) represents the image coordinates of a pixel, z i This is the depth value, and n is the total number of points in the ROI; The centroid of the 3D point set is calculated by centering the point set. Then, subtract the centroid from each point in the 3D point set to obtain the centered point set: ; The centered point set is represented as an n×3 matrix X, where each row represents the three-dimensional coordinates of a point: ; For the centered point set X, its covariance matrix C is defined as: ; Perform SVD decomposition on matrix X: ; Where U is an n×n orthogonal matrix, representing the spatial distribution of the input data; It is an n×3 diagonal matrix whose diagonal elements are singular values, arranged in descending order; the right singular vector matrix V is a 3×3 orthogonal matrix whose column vectors are the principal component directions of the point set, and are also the covariance matrix X. T The eigenvectors of X; Using the relationship between the covariance matrix and the right singular vector, X T Diagonalize X and adjust the covariance matrix X T X is decomposed into eigenvalues, and the right singular vector matrix V is calculated. The normal vector of the fitted plane based on the calculated right singular vector matrix V is: Where v3 is the principal component direction corresponding to the minimum singular value σ3; Based on the normal vector n and centroid of the fitted plane Construct the equations for the fitted plane: Simplified, we get: ;in: It is the distance from the plane to the origin; By using the rigid body transformation matrix T, each point in the dispensing depth map is transformed... Transform to a new coordinate system: Where p' is the transformed point; The method for obtaining the rigid body transformation matrix T is as follows: The plane is normalized using a rotation matrix. Based on the relationship between the normal vector n of the fitted plane and the z-axis of the world coordinate system, the rotation matrix R is generated. The expression for R is: Where: I is the identity matrix; K is an antisymmetric matrix constructed from the rotation axis k; ; The translation vector t is: ; The rigid body transformation matrix T is in the form of: 。 19. A system for measuring the volume of transparent adhesive dispensing according to claim 18, characterized in that, The filtering module is specifically used for: The fitted dispensing depth map was binarized into 3D using the OTSU algorithm to obtain the dispensing binary map. Connectivity analysis and connection of dispensing binary graphs are performed using run-length encoding technology; Based on depth feature filtering, convex three-dimensional connected domains that meet the predetermined depth threshold conditions are segmented to obtain the dispensing volume measurement area.

20. A system for measuring the volume of transparent adhesive dispensing according to claim 19, characterized in that, The volume calculation module is specifically used for: By using the projection method, each pixel in the dispensing volume measurement area is considered as an independent cuboid, and the base of these cuboids is determined by the spatial resolution of the pixels. The height is determined by the depth value z. xy Decide; By summing the volumes of all the cuboids, the dispensing volume V within the measurement area is calculated using the following formula: 。 21. The system for measuring the volume of transparent adhesive dispensing according to claim 11, characterized in that, The line laser scanning camera uses a 405nm wavelength violet laser, and the metal sheet has a yellow-green background.

22. A computer-readable storage medium storing at least one instruction, characterized in that, The instructions are loaded and executed by the processor to implement a method for measuring the volume of transparent dispensing as described in any one of claims 1-10.

23. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, a method for measuring the volume of transparent adhesive dispensing as described in any one of claims 1-10 is implemented.

Citation Information

Patent Citations

  • Circuit board dispensing detection method and device and computer readable storage medium

    CN113866171A

  • Packing box geometric dimension measuring method based on structured light camera

    CN115682941A