3D detection method for automatically detecting dispensing amount

By analyzing the striped areas and deformation areas in the dispensing image, and evaluating and correcting the dispensing exposure areas in combination with the light direction, the detection accuracy problems caused by light reflection in traditional detection methods are solved, and higher detection accuracy and accuracy are achieved.

CN120070451AActive Publication Date: 2025-05-30SHENZHEN PENGCHENGTONG ELECTRONIC CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510550330.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-05-30
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

Traditional manual inspection methods are difficult to meet the requirements of high accuracy, high efficiency and high consistency in the dispensing quantity detection. Especially when the dispensing surface is transparent or translucent, the local overexposure caused by light reflection causes the light stripes to deform, reducing the accuracy of the detection results.

Method used

By analyzing the grayscale values ​​of pixels in the blocked area in each dispensing image, the stripe area and the stripe deformation area are determined; the exposure possibility evaluation of the stripe deformation area is determined according to the light direction, and the dispensing exposure area is determined; the grayscale values ​​of the pixels in the exposed area are corrected to obtain the corrected exposure area; and the detection results of the dispensing amount are determined based on the stripe deformation of the corrected area.

Benefits of technology

By evaluating the exposure possibility of the striped deformation area and correcting the grayscale value of the pixel points, the problem of uneven exposure intensity is avoided, and the accuracy and accuracy of the dispensing amount detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070451A_ABST
    Figure CN120070451A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a 3D detection method for automatically detecting the dispensing amount, and the method comprises the steps: determining a stripe region in each dispensing image according to the gray value of a pixel point of each block region in each dispensing image; determining a stripe deformation area in each dispensing image according to the gradient value and the gray value of the edge pixel point of the stripe area; according to the light direction of the stripe deformation area in each dispensing image, carrying out dispensing exposure possibility evaluation on the stripe deformation area, and determining a dispensing exposure area in each dispensing image; carrying out gray value correction on pixel points in the dispensing exposure area to obtain a corrected dispensing exposure area; and under the condition that the corrected pixel point gray value of the dispensing exposure area is different from a preset gray value, determining a detection result of the dispensing amount according to the stripe deformation condition of the corrected dispensing exposure area. According to the invention, the accuracy of the detection result of the dispensing amount is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly relates to a 3D detection method for automatically detecting the dispensing amount. Background Art

[0002] With the rapid development of the electronic manufacturing industry and automated assembly technology, the dispensing technology plays a crucial role in the production process. The dispensing process is widely used in the assembly and encapsulation of electronic products, such as chip packaging, optical components, display panels and other fields. Precise control of the dispensing amount is of great significance for ensuring product quality, improving production efficiency, and reducing material waste. However, traditional manual inspection methods are difficult to meet the requirements of high precision, high efficiency, and high consistency. Therefore, the development of an automated and precise dispensing amount detection technology has become the key to optimizing the production process. Structured light projection technology, as a common 3D detection method, projects a known pattern of fringe light onto the surface of an object, and then captures its deformed image through a camera to reconstruct the three-dimensional information of the surface. During the dispensing process, the structured light projector can scan the shape, size, and height of the glue dots in real time, providing high-precision three-dimensional data. This technology can not only accurately detect the volume and distribution of the glue dots, but also provide real-time feedback on any abnormalities during the dispensing process, ensuring the uniformity and consistency of the dispensing amount.

[0003] However, when using a structured light projector to project a fringe light source onto the dispensing surface simultaneously for 3D automatic detection of the dispensing amount on the workpiece surface, since the dispensed glue presents a transparent or semi-transparent texture and the dispensing surface reflects light, it is easy to produce a phenomenon similar to local overexposure, causing the light fringes to deform, resulting in a low accuracy rate of the detection result of the dispensing amount. Summary of the Invention

[0004] In order to solve the technical problem that it is difficult to detect abnormal users, resulting in low system security, the purpose of the present invention is to provide a 3D detection method for automatically detecting the dispensing amount. The specific technical solution adopted is as follows: Determine the fringe regions in each dispensing image according to the gray values of the pixel points in each sub-block region of each dispensing image; Determine the fringe deformation regions in each dispensing image according to the gradient values and gray values of the edge pixel points of the fringe regions; Evaluate the possibility of dispensing exposure for the fringe deformation regions according to the light direction within each fringe deformation region in each dispensing image, and determine the dispensing exposure regions in each dispensing image; Correct the gray values of the pixel points in the dispensing exposure regions to obtain the corrected dispensing exposure regions; In the case where the gray value of the pixel points in the corrected dispensing exposure area is different from the preset gray value, determine the detection result of the dispensing amount according to the stripe deformation condition in the corrected dispensing exposure area.

[0005] Preferably, evaluate the possibility of dispensing exposure for the stripe deformation area according to the light direction in each dispensing image of the stripe deformation area, and determine the dispensing exposure area in each dispensing image, including: Evaluate the possibility of dispensing exposure for the stripe deformation area according to the light direction in each dispensing image of the stripe deformation area, and obtain the dispensing exposure parameters of each stripe deformation area; Determine the dispensing exposure area in each dispensing image according to the curvature of each corner point corresponding to the stripe deformation area and the dispensing exposure parameters of the stripe deformation area where each corner point is located.

[0006] Preferably, evaluate the possibility of dispensing exposure for the stripe deformation area according to the light direction in each dispensing image of the stripe deformation area, and obtain the dispensing exposure parameters of each stripe deformation area, including: Calculate the distance between the center line of the g-th stripe deformation area in the m-th dispensing image and the center line of the g-th stripe deformation area in the (m + 1)-th dispensing image, obtain the center line change distance, and perform a summation operation on the calculated center line change distance to obtain the total center line change distance; Calculate the variance of the center line curvature of the g-th stripe deformation area in each dispensing image to obtain the center line curvature variance; Calculate the ratio of the center line curvature variance to the total center line change distance to obtain the dispensing exposure parameter of the g-th stripe deformation area; where g and m are positive integers.

[0007] Preferably, determine the dispensing exposure area in each dispensing image according to the curvature of each corner point corresponding to the stripe deformation area and the dispensing exposure parameters of the stripe deformation area where each corner point is located, including: Perform corner point detection on the m-th dispensing image to determine the corner point group corresponding to each stripe deformation area in the m-th dispensing image; According to the distance from the center point of the m-th dispensing image to each corner point in the corner point group of each stripe deformation area, determine the target corner point in the corner point group of each stripe deformation area, and generate a corner point map according to the target corner point; According to the dispensing exposure parameters of the stripe deformation area where each target corner point and its adjacent corner points in the corner point map are located and the curvature of each target corner point and its adjacent corner points in the corner point map, evaluate the dispensing attribute in the stripe deformation area where the target corner point is located to obtain the dispensing attribute evaluation coefficient; When the dispensing property evaluation coefficient is not less than a preset evaluation threshold, determine the stripe deformation area where the target corner point is located as the dispensing exposure area.

[0008] Preferably, evaluate the dispensing property in the stripe deformation area where the target corner point is located to obtain the dispensing property evaluation coefficient according to the dispensing exposure parameters of each target corner point and the adjacent corner points in the corner point diagram and the curvatures of each target corner point and the adjacent corner points in the corner point diagram, including: Calculate the average value of the dispensing exposure parameters of the p-th target corner point and the dispensing exposure parameters of the target corner points adjacent to the p-th target corner point in the corner point diagram to obtain the average value of the dispensing exposure parameters. Calculate the ratio of the dispensing exposure parameter of the stripe deformation area where the p-th target corner point is located to the average value of the dispensing exposure parameters to obtain the first evaluation coefficient. Calculate the average value of the curvature of the p-th target corner point and the curvatures of the target corner points adjacent to the p-th target corner point in the corner point diagram to obtain the average value of the curvatures. Calculate the ratio of the curvature of the stripe deformation area where the p-th target corner point is located to the average value of the curvatures to obtain the second evaluation coefficient. Obtain the dispensing property evaluation coefficient according to the first evaluation coefficient and the second evaluation coefficient; where p is a positive integer.

[0009] Preferably, determine the stripe areas in each dispensing image according to the gray values of the pixel points in each sub-block area of each dispensing image, including: Determine the stripe characterization degree according to the maximum gray value and the minimum gray value of the pixel points in the i-th sub-block area of the m-th dispensing image and the average gray value of all the pixel points in the i-th sub-block area. When the stripe characterization degree is not less than a preset stripe characterization degree threshold, determine the i-th sub-block area in the m-th dispensing image as the stripe area; where i is a positive integer.

[0010] Preferably, determine the stripe deformation areas in each dispensing image according to the gradient values and gray values of the edge pixel points of the stripe areas, including: Determine the edge gray value fluctuation coefficient of the d-th stripe area according to the gray value difference between each edge pixel point of the d-th stripe area and its adjacent edge pixel points and the average value of the gray value differences between each edge pixel point of the d-th stripe area and its adjacent edge pixel points. Determine the edge shape fluctuation coefficient of the d-th stripe area according to the variance of the gradient value differences between each edge pixel point of the d-th stripe area and its adjacent edge pixel points and the average value of the gradient value differences between each edge pixel point of the d-th stripe area and its adjacent edge pixel points. Determine the deformation evaluation coefficient of the d-th stripe region according to the edge gray value fluctuation coefficient and the edge shape fluctuation coefficient of the d-th stripe region; When the deformation evaluation coefficient of the d-th stripe region is not less than the preset deformation evaluation coefficient threshold, determine that the d-th stripe region is a stripe deformation region; where d is a positive integer.

[0011] Preferably, the method further includes: When the deformation evaluation coefficient of the d-th stripe region is less than the preset deformation evaluation coefficient threshold, determine that the d-th stripe region is a stripe non-deformation region.

[0012] Preferably, performing gray value correction on the pixel points of the dispensing exposure region to obtain the corrected dispensing exposure region includes: Compare the stripe non-deformation region with the dispensing exposure region to obtain the region to be corrected in the dispensing exposure region; According to the mean value of the dispensing property evaluation coefficients of all corner points in the dispensing exposure region and the mean gray value of each pixel point in the stripe non-deformation region, perform gray value correction on the pixel points in the region to be corrected in the dispensing exposure region to obtain the corrected dispensing exposure region.

[0013] Preferably, determining the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure region includes: According to the perimeter and area of the corrected dispensing exposure region, determine the edge compactness of the corrected dispensing exposure region; according to the variance and mean value of the curvatures of each pixel point in the corrected dispensing exposure region, determine the curvature distribution coefficient of the corrected dispensing exposure region; according to the edge compactness and the curvature distribution coefficient of the corrected dispensing exposure region, determine the evaluation coefficient of the dispensing amount; When the evaluation coefficient of the dispensing amount is not less than the evaluation coefficient threshold of the dispensing amount, it is detected that the dispensing amount is abnormal; When the evaluation coefficient of the dispensing amount is less than the evaluation coefficient threshold of the dispensing amount, it is detected that the dispensing amount is normal.

[0014] The present invention has the following beneficial effects: According to the gray values of the pixel points in each sub-block area of each dispensing image, determine the stripe area in each dispensing image; according to the gradient value and gray value of the edge pixel points of the stripe area, determine the stripe deformation area in each dispensing image; evaluate the possibility of dispensing exposure for the stripe deformation area according to the light direction within each dispensing image, and determine the dispensing exposure area in each dispensing image; correct the gray values of the pixel points in the dispensing exposure area to obtain the corrected dispensing exposure area; in the case where the gray values of the pixel points in the corrected dispensing exposure area are different from the preset gray value, determine the detection result of the dispensing amount according to the stripe deformation situation in the corrected dispensing exposure area. In this way, by evaluating the possibility of dispensing exposure for the stripe deformation area, the dispensing exposure area is determined, and then the gray values of the pixel points in the dispensing exposure area are corrected, avoiding the situation of uneven exposure intensity in the dispensing exposure area due to light refraction and reflection. In this way, the dispensing amount can be detected more accurately according to the corrected dispensing exposure area, thereby improving the accuracy and precision of the detection result of the dispensing amount. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.

[0016] Figure 1 It is a flowchart of a 3D detection method for automatically detecting the dispensing amount provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of a multi-dispensing image sequence provided by an embodiment of the present invention; Figure 3 It is a schematic diagram of the light direction due to the exposure of the dispensing surface provided by an embodiment of the present invention; Figure 4 It is a schematic diagram of the light direction due to the uneven surface of the workpiece provided by an embodiment of the present invention; Figure 5 It is a schematic diagram of the area to be corrected in the dispensing exposure area provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, a 3D detection method for automatically detecting the amount of dispensed glue according to the present invention, including its specific implementation manner, structure, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.

[0019] The following specifically describes the specific solution of a 3D detection method for automatically detecting the amount of dispensed glue provided by the present invention in conjunction with the accompanying drawings.

[0020] Please refer to Figure 1 , which shows the method flow chart of a 3D detection method for automatically detecting the amount of dispensed glue provided by an embodiment of the present invention. In an exemplary embodiment, a 3D detection method for automatically detecting the amount of dispensed glue is provided, including: S110. Determine the stripe regions in each dispensing image according to the gray values of the pixel points in each sub-block region of each dispensing image; S120. Determine the stripe deformation regions in each dispensing image according to the gradient values and gray values of the edge pixel points of the stripe regions; S130. Evaluate the possibility of dispensing exposure for the stripe deformation regions according to the light direction within each dispensing image of the stripe deformation regions, and determine the dispensing exposure regions in each dispensing image; S140. Correct the gray values of the pixel points in the dispensing exposure regions to obtain the corrected dispensing exposure regions; S150. In the case where the gray values of the pixel points in the corrected dispensing exposure regions are different from the preset gray values, determine the detection result of the amount of dispensed glue according to the stripe deformation situation in the corrected dispensing exposure regions.

[0021] In step S110, exemplarily, each dispensing image is obtained by using a structured light projector to project a sine stripe light source onto the dispensing surface simultaneously during the dispensing process of an automatic dispenser, and using a high-resolution camera to collect the projected image. Among them, when the automatic dispenser dispenses glue at a position point, it usually moves to the next position for dispensing only after one-time dispensing is completed to ensure dispensing accuracy and efficiency.

[0022] Specifically, the automatic dispensing machine dispenses glue on the workpiece according to the preset time in the program. A high-resolution camera is installed on the automatic dispensing machine. During the process from the glue drop landing on the workpiece to solidification, the camera captures dispensing images every 0.1 seconds. A number of dispensing images captured during this process for each dispensing form a single-dispensing image sequence for that dispensing.

[0023] However, as Figure 2 shown, when moving to the next position of the workpiece for dispensing after one dispensing is completed, the structured light projector projects a sine stripe light source onto the surface of the solidified dispensing, and a number of dispensing images are captured. A number of dispensing images captured during this process form a multi-dispensing image sequence for multiple dispensings. In this embodiment, each dispensing image is a dispensing image in the multi-dispensing image sequence.

[0024] It should be noted that when using a structured light projector to project a stripe light source onto the dispensing surface simultaneously for 3D automatic detection of the dispensing amount on the workpiece surface, since the dispensing has a transparent or semi-transparent texture, when the structured light shines on the dispensing surface, part of the light is directly reflected on the dispensing surface and enters the lens for focusing and imaging; another part of the light vertically penetrates into the interior of the dispensing, collides with some irregularly shaped particles, and exits from other cross-sections of non-incident points after single scattering or multiple scattering. This causes the originally uniform light distribution to become uneven in some areas, resulting in too high light intensity in these areas and generating a local overexposure phenomenon. The light stripes may become deformed and irregular in the overexposed areas, unable to maintain their original regular shape, resulting in deformation of the light stripes, and further affecting the accuracy of the dispensing amount detection. Therefore, it is necessary to determine the dispensing images with stripe deformation areas in the multi-dispensing image sequence.

[0025] Specifically, after the sine stripe light source is projected onto the dispensing surface through the structured light projector, a series of light stripes will be formed on the surface. Since the stripe light source is in the shape of a sine wave, the gray value of the stripe area in the image shows periodic changes. At the bright part of the stripe (where the light intensity is the maximum), the light intensity received by the camera is stronger and the gray value is higher; while at the dark part of the stripe (where the light intensity is the minimum), the light intensity is weaker and the gray value is lower. Overall, the gray values of the stripe pixel points will show a certain periodic fluctuation. The non-stripe area usually does not show periodic changes like the stripe area, but shows relatively uniform or small-amplitude changes, and the change of the gray value is relatively stable. Therefore, the multi-threshold segmentation algorithm is used to segment each dispensing image to obtain several sub-block areas, and it is determined whether the sub-block area is a stripe area by analyzing the change of the gray values of the pixel points in the sub-block area.

[0026] Preferably, step S110 includes: S1110. Determine the stripe characterization degree according to the maximum gray value and the minimum gray value of the pixel points in the i-th sub-block area of the m-th dispensing image, and the average gray value of all pixel points in the i-th sub-block area; S1120. When the stripe characterization degree is not less than the preset stripe characterization degree threshold, determine that the i-th sub-block area in the m-th dispensing image is a stripe area.

[0027] Furthermore, when the stripe characterization degree is less than the preset stripe characterization degree threshold, determine that the i-th sub-block area in the m-th dispensing image is a non-stripe area. The preset stripe characterization degree threshold is a value set according to actual needs and is not limited here. For example, 0.5.

[0028] Specifically, since the deformation of the stripe needs to be analyzed and the gray value change characteristics of the dark and bright parts of the stripe are the same, the dark part (low gray value) of the stripe is selected for analysis here, that is, the stripe characterization degree of each sub-block area is calculated through the gray value to screen out the stripe area.

[0029] The calculation formula of the stripe characterization degree is as follows: Among them, represents the stripe characterization degree of the i-th sub-block area; represents the gray value of the -th pixel point in the i-th sub-block area; represents the average gray value of all pixel points in the i-th sub-block area; represents the number of pixel points in the i-th sub-block area; represents the maximum gray value of the pixel points in the i-th sub-block area; represents the minimum gray value of the pixel points in the i-th sub-block area.

[0030] When the value of is greater than or equal to 0.5, the i-th sub-block area is recorded as a stripe area. Furthermore,

[0031] In step S120, by way of example, edge pixel points refer to the outermost pixel points of each stripe region. Specifically, when the stripe region is not deformed, the edge of this region in the image usually presents a regular and smooth straight line form, with fewer turning points at the edge, a relatively small gradient change between adjacent pixel points, and no drastic fluctuation in the gray value of the image at the edge. However, when the stripe region is deformed, the edge shape changes significantly. The deformation may cause the edge of the stripe region to no longer be a smooth straight line, but become curved, distorted, or distorted, and the gray value of the edge pixel points in the image may also show a significant fluctuation; the gradient change between adjacent pixel points becomes more drastic, and the smoothness and regularity of the edge are greatly reduced, and new high-gradient regions may appear, indicating a mutation of the edge or a change in curvature. Therefore, it is determined whether the stripe region is a stripe deformation region based on the gray value and gradient value of the edge pixel points.

[0032] Preferably, step S120 includes: S1210. Determine the edge gray value fluctuation coefficient of the d-th stripe region according to the gray value difference between each edge pixel point of the d-th stripe region and its adjacent edge pixel points and the mean value of the gray value differences between each edge pixel point of the d-th stripe region and its adjacent edge pixel points; S1220. Determine the edge shape fluctuation coefficient of the d-th stripe region according to the variance of the gradient value differences between each edge pixel point of the d-th stripe region and its adjacent edge pixel points and the mean value of the gradient value differences between each edge pixel point of the d-th stripe region and its adjacent edge pixel points; S1230. Determine the deformation evaluation coefficient of the d-th stripe region according to the edge gray value fluctuation coefficient and the edge shape fluctuation coefficient of the d-th stripe region; S1240. When the deformation evaluation coefficient of the d-th stripe region is not less than the preset deformation evaluation coefficient threshold, determine that the d-th stripe region is a stripe deformation region.

[0033] Furthermore, after step S1240, the 3D detection method for automatically detecting the dispensing amount further includes: When the deformation evaluation coefficient of the d-th stripe region is less than the preset deformation evaluation coefficient threshold, determine that the d-th stripe region is a stripe non-deformation region. The preset deformation evaluation coefficient threshold is a value set according to actual needs and is not limited here. For example, 0.5.

[0034] By way of example, obtain the gray values, gradient values, and quantities of all edge pixel points of the d-th stripe region, and calculate the gradient differences between all edge pixel points of the d-th stripe region and adjacent pixel points, as well as the gray differences between all edge pixel points of the d-th stripe region and adjacent pixel points.

[0035] The calculation formula for the deformation evaluation coefficient of the d-th stripe region is as follows: where, represents the deformation evaluation coefficient of the d-th stripe region; represents the edge shape fluctuation coefficient of the d-th stripe region; represents the variance of the gradient difference between all edge pixel points and adjacent pixel points in the d-th stripe region; represents the mean value of the gradient difference between all edge pixel points and adjacent pixel points in the d-th stripe region.

[0036] represents the edge gray value fluctuation coefficient of the d-th stripe region; represents the gray difference between the -th edge pixel point and the adjacent pixel point in the d-th stripe region; represents the mean value of the gray differences between all edge pixel points and adjacent pixel points in the d-th stripe region; represents the number of edge pixel points in the d-th stripe region.

[0037] It should be noted that the larger the edge shape fluctuation coefficient of the d-th stripe region, the greater the gradient change between the edge pixel points of the d-th stripe region, and the edge shape may change. The larger the value of the edge gray value fluctuation coefficient of the d-th stripe region, the more obvious the fluctuation of the gray values of the edge pixel points in the d-th stripe region may be. The larger the value of the deformation evaluation coefficient of the d-th stripe region, the more likely it is that the d-th stripe region has deformation.

[0038] Therefore, when it is greater than or equal to 0.5, the d-th stripe region is recorded as a stripe deformation region; when it is less than 0.5, the d-th stripe region is recorded as a non-stripe deformation region.

[0039] In step S130, exemplarily, during the dispensing process of the automatic dispenser, the structured light projector projects the sine stripe light source onto the dispensing surface at the same time, and then the high-resolution camera captures the projected image. When there is a stripe deformation region in the image, in addition to the reflection of the light by the dispensing surface that may cause overexposure and lead to stripe deformation, the unevenness of the workpiece surface is also a potential factor. Since there may be uneven areas on the workpiece surface, these areas will affect the reflection of light, resulting in additional overexposure, which in turn interferes with and affects the projected stripes, causing the stripes to deform. Therefore, it is necessary to determine whether there is an overexposed region in the dispensing image.

[0040] Preferably, step S130 includes: S1310. Evaluating the possibility of dispensing exposure for the stripe deformation region according to the light direction within each dispensing image of the stripe deformation region, and obtaining the dispensing exposure parameters for each stripe deformation region; S1320. Determining the dispensing exposure region in each dispensing image according to the curvature of each corner point corresponding to the stripe deformation region and the dispensing exposure parameters of the stripe deformation region where each corner point is located.

[0041] Exemplarily, as Figure 3-4 shown, the automatic dispenser dispenses glue on the workpiece according to the time preset by the program. During the process from when the glue drops onto the workpiece to when it solidifies, since the glue will spread from the inside out after dropping onto the workpiece surface, as time goes by, the stripe deformation region caused by the surface exposure of the glue will change. However, the stripe deformation region caused by the exposure due to the unevenness of the workpiece surface will not change with time. Therefore, evaluate the possibility of dispensing exposure for the stripe deformation region according to the light direction within each dispensing image of the stripe deformation region.

[0042] In addition, when the workpiece moves slightly, there is a light direction for the exposure region on the workpiece surface along the moving direction of the workpiece, and for the exposure region on the glue surface, not only is there a light direction along the moving direction of the workpiece, but since the glue is transparent, there is also a circular light direction around itself for the glue itself. Therefore, by combining the curvature of each corner point corresponding to the stripe deformation region with the dispensing exposure parameters of the stripe deformation region where each corner point is located, further distinguish whether the exposure belongs to dispensing exposure or workpiece exposure, so as to accurately determine the dispensing exposure region in the dispensing image.

[0043] Preferably, step S1310 includes: calculating the distance between the center line of the g-th stripe deformation region in the m-th dispensing image and the center line of the g-th stripe deformation region in the (m + 1)-th dispensing image, obtaining the center line change distance, and performing a summation operation on the calculated center line change distances to obtain the total center line change distance; Calculating the variance of the center line curvature of the g-th stripe deformation region in each dispensing image to obtain the center line curvature variance; Calculating the ratio of the center line curvature variance to the total center line change distance to obtain the dispensing exposure parameter of the g-th stripe deformation region.

[0044] Specifically, for the analysis of the g-th stripe deformation region in one of the dispensing images, the corresponding region in each single dispensing image collected at the dispensing position of this region can be obtained. Obtain the center line of the g-th stripe deformation region in each image, where the center line of the stripe deformation region is an extension line made through the centroid of the stripe deformation region along the longest direction of the stripe. Each change in the center line indicates that this stripe deformation region may be caused by the exposure of the glue surface.

[0045] In this embodiment, the DTW algorithm is used to obtain the distance between the centerlines of the g-th stripe deformation region in every two adjacent single-point glue application images, and the DTW distance is obtained as the centerline change distance.

[0046] The calculation formula for the glue application exposure parameter of the g-th stripe deformation region is as follows: Wherein, represents the glue application exposure parameter of the g-th stripe deformation region; represents the distance between the centerline of the g-th stripe deformation region in the m-th glue application image and the centerline of the g-th stripe deformation region in the (m + 1)-th glue application image; represents the number of single-point glue application images; represents the variance of the centerline curvature of the g-th stripe deformation region.

[0047] It should be noted that the larger the value of, the greater the difference of the g-th stripe deformation region in the single-point glue application image, the more the stripe changes, and the greater the possibility that the stripe deformation is caused by the surface exposure of the glue application.

[0048] Preferably, step S1320 includes: performing corner detection on the m-th glue application image to determine the corner group corresponding to each stripe deformation region in the m-th glue application image; According to the distances from the center point of the m-th glue application image to each corner in the corner group of each stripe deformation region, the target corner is determined in the corner group of each stripe deformation region, and a corner map is generated based on the target corner; According to the glue application exposure parameters of the stripe deformation regions where each target corner and its adjacent corners in the corner map are located and the curvatures of each target corner and its adjacent corners in the corner map, the glue application attributes of the stripe deformation region where the target corner is located are evaluated to obtain a glue application attribute evaluation coefficient. It can be understood that since the corner map is generated by the target corner, the adjacent corners in the corner map are all target corners.

[0049] When the glue application attribute evaluation coefficient is not less than the preset evaluation threshold, it is determined that the stripe deformation region where the target corner is located is the glue application exposure region; when the glue application attribute evaluation coefficient is less than the preset evaluation threshold, it is determined that the stripe deformation region where the target corner is located is the workpiece exposure region; wherein, the preset evaluation threshold is set according to actual needs and is not limited here. For example, 0.5.

[0050] Specifically, each single dispensing image collected when the dispensing solidifies is the multi-dispensing image collected at that dispensing point. By performing corner detection on the multi-dispensing image, the corners corresponding to each stripe deformation region within each image can be obtained. Grouping the corners corresponding to each stripe deformation region, several corner groups within the multi-dispensing image can be obtained. Then, the center point of the multi-dispensing image is acquired, and the corner farthest from the center point within each corner group is selected as the target corner. Connecting all the selected target corners results in a corner map. In this embodiment, a corner group consists of multiple pixel points, and each corner group can be regarded as a small region. Connecting all the target corners means connecting all the small regions, that is, taking the target corners of each small region and connecting them to obtain a line, and this line is the so-called corner map. The curvature of the corner is the curvature of the pixel points on the obtained line.

[0051] Further, based on the dispensing exposure parameters of each target corner and its adjacent corners in the corner map within the stripe deformation region and the curvatures of each target corner and its adjacent corners in the corner map, the dispensing property of the stripe deformation region where the target corner is located is evaluated to obtain a dispensing property evaluation coefficient, including: Calculate the average value of the dispensing exposure parameter of the p-th target corner and the dispensing exposure parameter of the target corner adjacent to the p-th target corner in the corner map to obtain the average value of the dispensing exposure parameter; calculate the ratio of the dispensing exposure parameter of the stripe deformation region where the p-th target corner is located to the average value of the dispensing exposure parameter to obtain the first evaluation coefficient; calculate the average value of the curvature of the p-th target corner and the curvature of the target corner adjacent to the p-th target corner in the corner map to obtain the average value of the curvature; calculate the ratio of the curvature of the stripe deformation region where the p-th target corner is located to the average value of the curvature to obtain the second evaluation coefficient; based on the first evaluation coefficient and the second evaluation coefficient, obtain the dispensing property evaluation coefficient.

[0052] It can be understood that when calculating the above average value, the target corners adjacent to the left and right of the p-th target corner are selected for calculation, and the non-acquired adjacent corners are not selected. In other embodiments, the implementer can make a selection according to the specific implementation scenario, aiming to analyze the parameter average value distribution of the adjacent target corners around the p-th target corner.

[0053] Specifically, the calculation formula of the dispensing property evaluation coefficient is as follows: Where, represents the dispensing property evaluation coefficient of the p-th target corner; represents the first evaluation coefficient; represents the dispensing exposure parameter of the stripe deformation region where the p-th target corner is located; represents the average value of the dispensing exposure parameter; represents the second evaluation coefficient; represents the curvature of the p-th target corner point within the corner point map; represents the average curvature.

[0054] It should be noted that the larger the value of, the greater the possibility that the stripe deformation area where the p-th target corner point is located belongs to the dispensing exposure.

[0055] Furthermore, the stripe deformation areas where the target corner points generated by the dispensing exposure in the corner point map are screened out by using the dispensing attribute evaluation coefficient. When is greater than or equal to 0.5, the stripe deformation area where the p-th target corner point is located is recorded as the dispensing exposure area; when is less than 0.5, the stripe deformation area of the p-th target corner point is recorded as the workpiece exposure area.

[0056] In step S140, for example, on the dispensing surface, due to the refraction and reflection of light, and the dispensing showing a transparent texture, the situation of uneven exposure intensity may occur, and the exposure area needs to be corrected, so as to complete the detection of the dispensing amount.

[0057] Preferably, step S140 includes: S1410. Comparing the stripe non-deformation area with the dispensing exposure area to obtain the area to be corrected in the dispensing exposure area; S1420. According to the average value of the dispensing attribute evaluation coefficients of all corner points in the dispensing exposure area and the average gray value of each pixel point in the stripe non-deformation area, correct the gray value of the pixel points in the area to be corrected in the dispensing exposure area to obtain the corrected dispensing exposure area.

[0058] Specifically, taking the dispensing attribute evaluation coefficient as the correction weight, the greater the dispensing exposure intensity, the greater the weight for its correction. As Figure 5 shown (the shaded part is the area to be corrected, the dotted boxed part is the dispensing exposure area, and the two sides of the dispensing exposure area are the stripe non-deformation areas), each dispensing exposure area is compared with the normal stripe area (stripe non-deformation area), and the extra area is recorded as the area to be corrected in the dispensing exposure area, and the gray value of the pixel points in the area to be corrected is corrected to obtain the corrected dispensing exposure area. It can be understood that the gray value of all pixel points can be corrected, or the pixel points can be sampled by sampling, and the gray value of the sampled pixel points is corrected.

[0059] In this embodiment, the calculation method of the dispensing property evaluation coefficient of all corner points except the target corner point in any dispensing exposure area includes: taking the corner point group T where the p-th target corner point is located as an example, connecting the corner points in the corner point group T according to the corner point diagram connection method to obtain the corner point diagram corresponding to the corner point group T. Then, use the following formula to obtain the dispensing property evaluation coefficient of each corner point except the target corner point in the corner point group T.

[0060] Wherein, represents the dispensing property evaluation coefficient of the -th corner point; represents the dispensing exposure parameter of the stripe deformation area where the -th corner point is located; represents the curvature of the -th corner point on the line of its corner point group; represents the average value of the curvatures of the -th corner point and its adjacent corner points in its corner point group.

[0061] The calculation formula of the corrected dispensing exposure area is as follows: Wherein, represents the gray value of the -th pixel point in the area to be corrected of the -th corrected dispensing exposure area; represents the gray value of the -th pixel point in the area to be corrected of the -th dispensing exposure area before correction; represents the average value of the dispensing property evaluations of all corner points in the -th dispensing exposure area; represents the average value of the gray values of the pixel points in the non-stripe deformation area. It should be noted that the final output result of the gray value of the pixel points in the area to be corrected of the corrected dispensing exposure area is the integer part.

[0062] In step S150, exemplarily, after the gray value correction is completed, if the gray value of the corrected pixel point is the same as the gray value of the pixel point that has not been exposed, then the stripe presents a regular shape and no deformation occurs, and the dispensing amount is normal. If the gray value is different from the gray value of the pixel point that has not been exposed, then the corrected stripe is deformed, and it is necessary to determine the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure area.

[0063] Preferably, determining the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure area includes: Determine the edge compactness of the corrected dispensing exposure area based on the perimeter of the corrected dispensing exposure area and the area of the corrected dispensing exposure area; determine the curvature distribution coefficient of the corrected dispensing exposure area based on the variance of the curvatures of the individual pixel points in the corrected dispensing exposure area and the mean of the curvatures of the individual pixel points in the corrected dispensing exposure area; determine the evaluation coefficient of the dispensing amount based on the edge compactness of the corrected dispensing exposure area and the curvature distribution coefficient of the corrected dispensing exposure area; When the evaluation coefficient of the dispensing amount is not less than the evaluation coefficient threshold of the dispensing amount, it is detected that there is an abnormality in the dispensing amount; When the evaluation coefficient of the dispensing amount is less than the evaluation coefficient threshold of the dispensing amount, it is detected that the dispensing amount is normal. Among them, the evaluation coefficient of the dispensing amount is set according to actual needs and is not limited here. For example, 0.3.

[0064] Among them, represents the evaluation coefficient of the dispensing amount of the th corrected dispensing exposure area; represents the perimeter of the th corrected dispensing exposure area; represents the area of the th corrected dispensing exposure area; represents the variance of the curvatures of all the edge pixel points of the th corrected dispensing exposure area; represents the mean of the curvatures of all the edge pixel points of the th corrected dispensing exposure area. It can be understood that the perimeter refers to the number of the outermost pixel points of the th corrected dispensing exposure area, and the area refers to the number of all the pixel points within the th corrected dispensing exposure area; represents the edge compactness of the th corrected dispensing exposure area. The larger this value is, the more irregular the edge of the th corrected dispensing exposure area is. represents the curvature distribution coefficient of the corrected dispensing exposure area. The larger this value is, the more dispersed the curvature distribution of all the edge pixel points of the th corrected dispensing exposure area is, and the more irregular the edge is.

[0065] When the value of is greater than or equal to 0.3, it indicates that an excessive or too small dispensing amount is detected, that is, there is an abnormality in the dispensing amount, and the system can automatically adjust the working parameters of the dispenser (such as dispensing speed, pressure, etc.). When the value is less than 0.3, it indicates that the detected dispensing volume meets the requirements, that is, the dispensing volume is normal.

[0066] In the technical solution of the present application, according to the gray values of the pixel points in each sub-block area of each dispensing image, the stripe area in each dispensing image is determined; according to the gradient value and gray value of the edge pixel points of the stripe area, the stripe deformation area in each dispensing image is determined; according to the light direction of the stripe deformation area in each dispensing image, the possibility evaluation of dispensing exposure for the stripe deformation area is carried out to determine the dispensing exposure area in each dispensing image; the gray values of the pixel points in the dispensing exposure area are corrected to obtain the corrected dispensing exposure area; when the gray values of the pixel points in the corrected dispensing exposure area are different from the preset gray values, the detection result of the dispensing volume is determined according to the stripe deformation situation of the corrected dispensing exposure area. In this way, by evaluating the possibility of dispensing exposure for the stripe deformation area, the dispensing exposure area is determined, and then the gray values of the pixel points in the dispensing exposure area are corrected, avoiding the uneven exposure intensity in the dispensing exposure area due to light refraction and reflection. In this way, the dispensing volume can be detected more accurately according to the corrected dispensing exposure area, thereby improving the accuracy and precision of the detection result of the dispensing volume.

[0067] In other embodiments, a device is further provided, including a memory and a processor. The memory is used to store executable program codes, and the processor is used to call and run the executable program codes from the memory, so that the device executes the above-mentioned 3D detection method for automatically detecting the dispensing volume. The device may specifically be a chip, a component or a module. The chip may include a connected processor and a memory; wherein, the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the above-mentioned 3D detection method provided by the above embodiments.

[0068] In other embodiments, a computer program product is further provided. When the computer program product runs on a computer, the computer is enabled to execute the above-mentioned related steps to implement the above-mentioned 3D detection method for automatically detecting the dispensing volume provided by the above embodiments.

[0069] In other embodiments, a computer-readable storage medium is further provided. The computer-readable storage medium stores computer program codes. When the computer program codes run on a computer, the computer is enabled to execute the above-mentioned related method steps to implement the above-mentioned 3D detection method for automatically detecting the dispensing volume provided by the above embodiments.

[0070] Among them, the provided system, device, computer program product, and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.

[0071] It should be noted that the above order of the embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0072] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. A 3D detection method for automatically detecting the amount of glue dispensed, characterized in that: The method comprises: Determine the stripe area in each dispensing image according to the gray value of the pixel points in each block area in each dispensing image; Determine the stripe deformation area in each dispensing image according to the gradient value and gray value of the edge pixel point of the stripe area; The possibility of performing glue spot exposure on the stripe deformation area is evaluated according to the light direction of the stripe deformation area in each glue spot image, and the glue spot exposure area in each glue spot image is determined; Performing grayscale value correction on the pixel points in the dispensing exposure area to obtain a corrected dispensing exposure area; When the grayscale value of the pixel point in the corrected glue dispensing exposure area is different from the preset grayscale value, the detection result of the glue dispensing amount is determined according to the stripe deformation of the corrected glue dispensing exposure area.

2. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 1, characterized in that: The possibility of dispensing glue exposure in the stripe deformation area is evaluated according to the light direction of the stripe deformation area in each dispensing glue image, and the dispensing glue exposure area in each dispensing glue image is determined, including: The possibility of performing glue dispensing exposure on the stripe deformation area is evaluated according to the light direction of the stripe deformation area in each glue dispensing image, and the glue dispensing exposure parameters of each stripe deformation area are obtained; The glue dispensing exposure area in each glue dispensing image is determined according to the curvature of each corner point corresponding to the stripe deformation area and the glue dispensing exposure parameters of the stripe deformation area where each corner point is located.

3. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 2, characterized in that: The possibility of performing glue dispensing exposure on the stripe deformation area is evaluated according to the light direction of the stripe deformation area in each glue dispensing image, and the glue dispensing exposure parameters of each stripe deformation area are obtained, including: Calculate the distance between the center line of the g-th stripe deformation area in the m-th dispensing image and the center line of the g-th stripe deformation area in the (m+1)-th dispensing image to obtain the center line change distance, and sum the calculated center line change distances to obtain the total center line change distance; The variance of the centerline curvature of the g-th stripe deformation area in each dispensing image is calculated to obtain the centerline curvature variance; The ratio of the centerline curvature variance to the total centerline change distance is calculated to obtain the dispensing exposure parameters of the g-th stripe deformation area; wherein g and m are positive integers.

4. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 3, characterized in that: According to the curvature of each corner point corresponding to the stripe deformation area and the dispensing exposure parameters of the stripe deformation area where each corner point is located, the dispensing exposure area in each dispensing image is determined, including: Performing corner point detection on the m-th glue dispensing image to determine the corner point group corresponding to each stripe deformation area in the m-th glue dispensing image; According to the distance from the center point of the m-th dispensing image to each corner point in the corner point group of each stripe deformation area, a target corner point is determined in the corner point group of each stripe deformation area, and a corner point map is generated according to the target corner point; According to the dispensing exposure parameters of the stripe deformation area where each target corner point and its adjacent corner points in the corner point map are located and the curvature of each target corner point and its adjacent corner points in the corner point map, the dispensing properties in the stripe deformation area where the target corner point is located are evaluated to obtain a dispensing property evaluation coefficient; When the glue dispensing property evaluation coefficient is not less than a preset evaluation threshold, the stripe deformation area where the target corner point is located is determined as the glue dispensing exposure area.

5. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 4, characterized in that: According to the dispensing exposure parameters of the stripe deformation area where each target corner point and its adjacent corner points in the corner point map are located and the curvature of each target corner point and its adjacent corner points in the corner point map, the dispensing properties in the stripe deformation area where the target corner point is located are evaluated to obtain the dispensing property evaluation coefficient, including: Calculate the average of the dispensing exposure parameter of the p-th target corner point and the dispensing exposure parameters of the target corner points adjacent to the p-th target corner point in the corner point map to obtain the dispensing exposure parameter mean; Calculate the ratio of the dispensing exposure parameter of the stripe deformation area where the p-th target corner point is located to the mean value of the dispensing exposure parameter to obtain a first evaluation coefficient; Calculate the curvature of the p-th target corner point and the average of the curvatures of the target corner points adjacent to the p-th target corner point in the corner point map to obtain the curvature mean; Calculate the ratio of the curvature of the stripe deformation area where the p-th target corner point is located to the mean curvature to obtain a second evaluation coefficient; The dispensing property evaluation coefficient is obtained according to the first evaluation coefficient and the second evaluation coefficient, wherein p is a positive integer.

6. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 1, characterized in that: According to the grayscale value of the pixel points in each block area in each dispensing image, the stripe area in each dispensing image is determined, including: Determine the stripe representation degree according to the maximum grayscale value and the minimum grayscale value of the pixel points in the i-th block area in the m-th dispensing image, and the average grayscale value of all the pixel points in the i-th block area; When the stripe representation degree is not less than a preset stripe representation degree threshold, the i-th block area in the m-th dispensing image is determined to be a stripe area; wherein i is a positive integer.

7. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 1, characterized in that: According to the gradient value and gray value of the edge pixel points of the stripe area, the stripe deformation area in each dispensing image is determined, including: Determine the edge gray value fluctuation coefficient of the dth stripe area according to the gray value difference between each edge pixel point of the dth stripe area and its adjacent edge pixel point and the average of the gray value difference between each edge pixel point of the dth stripe area and its adjacent edge pixel point; Determine the edge shape fluctuation coefficient of the dth stripe region according to the variance of the gradient value difference between each edge pixel point of the dth stripe region and its adjacent edge pixel points and the mean of the gradient value difference between each edge pixel point of the dth stripe region and its adjacent edge pixel points; Determine a deformation evaluation coefficient of the d th stripe region according to an edge gray value fluctuation coefficient of the d th stripe region and an edge shape fluctuation coefficient of the d th stripe region; When the deformation evaluation coefficient of the d-th stripe region is not less than a preset deformation evaluation coefficient threshold, the d-th stripe region is determined to be a stripe deformation region; wherein d is a positive integer.

8. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 7, characterized in that: The method further comprises: When the deformation evaluation coefficient of the d-th stripe region is less than a preset deformation evaluation coefficient threshold, the d-th stripe region is determined to be a stripe non-deformation region.

9. The 3D detection method for automatically detecting the amount of glue dispensed according to claim 8, characterized in that: The grayscale value of the pixel points in the dispensing exposure area is corrected to obtain the corrected dispensing exposure area, including: Compare the non-deformed area of ​​the stripes with the glue-dispensing exposure area to obtain the area to be corrected in the glue-dispensing exposure area; According to the mean value of the dispensing property evaluation coefficients of all corner points in the dispensing exposure area and the mean value of the grayscale values ​​of each pixel point in the non-deformed area of ​​the stripe, the grayscale values ​​of the pixel points in the to-be-corrected area of ​​the dispensing exposure area are corrected to obtain the corrected dispensing exposure area.

10. The 3D detection method for automatically detecting the amount of glue dispensed according to any one of claims 1 to 9, characterized in that: The test result of the dispensing amount is determined according to the stripe deformation of the corrected dispensing exposure area, including: Determine the edge compactness of the corrected glue dispensing exposure area according to the perimeter of the corrected glue dispensing exposure area and the area of ​​the corrected glue dispensing exposure area; determine the curvature distribution coefficient of the corrected glue dispensing exposure area according to the variance of the curvature of each pixel point in the corrected glue dispensing exposure area and the mean of the curvature of each pixel point in the corrected glue dispensing exposure area; determine the evaluation coefficient of the glue dispensing amount according to the edge compactness of the corrected glue dispensing exposure area and the curvature distribution coefficient of the corrected glue dispensing exposure area; When the evaluation coefficient of the dispensing amount is not less than the evaluation coefficient threshold of the dispensing amount, it is detected that the dispensing amount is abnormal; When the evaluation coefficient of the dispensing amount is less than the evaluation coefficient threshold of the dispensing amount, it is detected that the dispensing amount is normal.

Citation Information

Patent Citations

  • Method for detecting glue amount by image

    CN102052950A

  • Method for determining dispensing adhesive quantity for packaging

    CN102437259A

  • Dotted glue edge detection method and application thereof

    CN115861273A

  • LED semiconductor packaging dispensing defect detection method based on optical information

    CN116977340A

  • Sealant abnormal state detection method based on image data

    CN117974639A