A 3D detection method for automatically detecting the dispensing volume
By analyzing the grayscale value and gradient value of the dispensing image, determining the striped area and deformation area, and performing dispensing exposure possibility evaluation and grayscale value correction, the problem of low accuracy of dispensing quantity detection in traditional detection methods is solved, and a higher precision dispensing quantity detection is achieved.
Patent Information
- Application Number
- CN202510550330.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-04-29
AI Technical Summary
Traditional manual inspection methods are difficult to meet the requirements of high accuracy, high efficiency and high consistency dispensing quantity detection, and structured light projectors are prone to local overexposure when detecting transparent or translucent dispensing, resulting in low accuracy of the detection results.
By analyzing the grayscale value and gradient value of the dispensing image, the striped area and deformation area are determined, the exposure possibility evaluation is performed, the grayscale value of the exposure area is corrected, and the detection result of the dispensing amount is determined based on the modified exposure area.
The accuracy and accuracy of the dispensing amount detection is improved, and the uneven exposure intensity caused by refraction and reflection of light is avoided, thereby achieving more accurate dispensing amount detection.
Smart Images

Figure CN120070451B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a 3D detection method for automatically detecting the dispensing amount. Background Art
[0002] With the rapid development of the electronic manufacturing industry and the 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. The precise control of the dispensing amount is of great significance for ensuring product quality, improving production efficiency and reducing material waste. However, the traditional manual inspection method is 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 the optimization of the production process. As a common 3D detection method, structured light projection technology projects a known pattern of fringe light onto the surface of an object, and then collects 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 is transparent or semi-transparent in texture, the dispensing surface reflects the light, which is prone 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, and the specific technical solution adopted is as follows:
[0005] 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;
[0006] 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;
[0007] 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;
[0008] Correct the gray values of the pixel points in the dispensing exposure regions to obtain the corrected dispensing exposure regions;
[0009] When 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 situation in the corrected dispensing exposure area.
[0010] 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:
[0011] 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;
[0012] 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.
[0013] 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:
[0014] 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;
[0015] 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;
[0016] 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.
[0017] 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:
[0018] Perform corner 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;
[0019] 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;
[0020] According to the dispensing exposure parameters of each target corner point and its adjacent corner points in the corner point diagram in the stripe deformation area, and the curvature of each target corner point and its adjacent corner points in the corner point diagram, evaluate the dispensing properties in the stripe deformation area where the target corner point is located to obtain a dispensing property evaluation coefficient;
[0021] 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.
[0022] Preferably, according to the dispensing exposure parameters of each target corner point and its adjacent corner points in the corner point diagram in the stripe deformation area, and the curvature of each target corner point and its adjacent corner points in the corner point diagram, evaluate the dispensing properties in the stripe deformation area where the target corner point is located to obtain a dispensing property evaluation coefficient, including:
[0023] 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;
[0024] 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;
[0025] Calculate the average value of the curvature of the p-th target corner point and the curvature 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 curvature;
[0026] 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 curvature to obtain the second evaluation coefficient;
[0027] Obtain the dispensing property evaluation coefficient according to the first evaluation coefficient and the second evaluation coefficient; where p is a positive integer.
[0028] Preferably, 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, including:
[0029] 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, determine the stripe characterization;
[0030] When the stripe characterization is not less than a preset stripe characterization threshold, determine the i-th sub-block area in the m-th dispensing image as the stripe area; where i is a positive integer.
[0031] Preferably, according to the gradient value and the gray value of the edge pixel points of the stripe area, determine the stripe deformation area in each dispensing image, including:
[0032] 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;
[0033] 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;
[0034] 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;
[0035] 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.
[0036] Preferably, the method further includes:
[0037] 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.
[0038] Preferably, performing gray value correction on the pixel points of the dispensing exposure area to obtain the corrected dispensing exposure area includes:
[0039] Compare the stripe non-deformation region with the dispensing exposure area to obtain the area to be corrected of the dispensing exposure area;
[0040] Perform gray value correction on the pixel points in the area to be corrected of the 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 gray value of each pixel point in the stripe non-deformation region to obtain the corrected dispensing exposure area.
[0041] Preferably, determining the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure area includes:
[0042] Determine the edge compactness of the corrected dispensing exposure area according to the perimeter and area of the corrected dispensing exposure area; determine the curvature distribution coefficient of the corrected dispensing exposure area according to the variance and mean value of the curvatures of each pixel point in the corrected dispensing exposure area; determine the evaluation coefficient of the dispensing amount according to the edge compactness and the curvature distribution coefficient of the corrected dispensing exposure area;
[0043] When the evaluation coefficient of the dispensing amount is not less than the threshold value of the evaluation coefficient of the dispensing amount, it is detected that the dispensing amount is abnormal;
[0044] When the evaluation coefficient of the dispensing amount is less than the threshold value of the evaluation coefficient of the dispensing amount, it is detected that the dispensing amount is normal.
[0045] The present invention has the following beneficial effects:
[0046] 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 of dispensing exposure of the stripe deformation area is evaluated, and the dispensing exposure area in each dispensing image is determined; 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 amount is determined according to the stripe deformation situation of the corrected dispensing exposure area. In this way, by evaluating the possibility of dispensing exposure of 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 the refraction and reflection of light. 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
[0047] 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 be obtained according to these drawings.
[0048] 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;
[0049] Figure 2 It is a schematic diagram of a multi-dispensing image sequence provided by an embodiment of the present invention;
[0050] 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;
[0051] Figure 4 It is a schematic diagram of the light direction due to the unevenness of the workpiece surface provided by an embodiment of the present invention;
[0052] Figure 5 Schematic diagram of the area to be corrected in the dispensing exposure area provided by an embodiment of the present invention. Detailed implementation manners
[0053] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following combines the accompanying drawings and preferred embodiments to specifically describe a 3D detection method for automatically detecting the dispensing amount proposed according to the present invention, including its specific implementation manners, structures, features and effects, as follows. 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.
[0054] 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.
[0055] The following specifically describes the specific solution of a 3D detection method for automatically detecting the dispensing amount provided by the present invention with reference to the accompanying drawings.
[0056] Please refer to Figure 1 , which shows the method flow chart of a 3D detection method for automatically detecting the dispensing amount provided by an embodiment of the present invention. In an exemplary embodiment, a 3D detection method for automatically detecting the dispensing amount is provided, including:
[0057] 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;
[0058] 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;
[0059] S130. Evaluate the possibility of dispensing exposure for the stripe deformation regions according to the light direction in each dispensing image of the stripe deformation regions, and determine the dispensing exposure regions in each dispensing image;
[0060] S140. Correct the gray values of the pixel points in the dispensing exposure regions to obtain the corrected dispensing exposure regions;
[0061] S150. When 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 dispensing amount according to the stripe deformation conditions in the corrected dispensing exposure regions.
[0062] In step S110, exemplarily, each dispensing image is obtained when an automatic dispenser projects a sine stripe light source onto the dispensing surface simultaneously using a structured light projector during the dispensing process, and a high-resolution camera is used to collect the projected image. Among them, when the automatic dispenser dispenses at a position, it usually moves to the next position for dispensing only after one dispensing is completed to ensure the dispensing accuracy and efficiency.
[0063] Specifically, the automatic dispenser dispenses the workpiece according to the time preset by the program. The high-resolution camera is installed on the automatic dispenser. During the process from when the dispensing drops onto the workpiece to when it solidifies, the camera collects a dispensing image every 0.1 seconds. The several dispensing images collected for each dispensing during this process constitute a single-dispensing image sequence for this dispensing.
[0064] 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 the sine stripe light source onto the solidified dispensing surface, and several dispensing images are collected. The several dispensing images collected during this process constitute a multi-dispensing image sequence for multiple dispensings. In this embodiment, each dispensing image is a dispensing image in the multi-dispensing image sequence.
[0065] It should be noted that when using a structured light projector to project the 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 irradiates 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, and thus the light intensity becomes too high in these areas, resulting in local overexposure. The light stripes may become deformed and irregular in the overexposed areas and cannot 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 in the multi-dispensing image sequence that have stripe deformation areas.
[0066] Specifically, after the sine stripe light source is projected onto the dispensing surface by 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 values in the stripe area of the image show periodic changes. In the bright part of the stripe (where the light intensity is the maximum), the light intensity received by the camera is strong and the gray value is high; while in the dark part of the stripe (where the light intensity is the minimum), the light intensity is weak and the gray value is low. 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 segmented areas, and it is determined whether the segmented area is a stripe area by analyzing the change of the gray values of the pixel points in the segmented area.
[0067] 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 segmented area of the m-th dispensing image, and the average gray value of all the pixel points in the i-th segmented area;
[0068] S1120. When the stripe characterization degree is not less than the preset stripe characterization degree threshold, determine that the i-th segmented area in the m-th dispensing image is a stripe area.
[0069] Further, when the stripe characterization degree is less than the preset stripe characterization degree threshold, determine that the i-th segmented 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.
[0070] Specifically, since the deformation of the stripe needs to be analyzed and the change characteristics of the gray values in the dark and bright parts of the stripe are the same, the dark part of the stripe (low gray value) is selected for analysis, that is, the stripe characterization degree of each segmented area is calculated through the gray value to screen out the stripe area.
[0071] The calculation formula of the stripe characterization degree is as follows:
[0072]
[0073] Wherein, represents the stripe characterization degree of the i-th segmented area; represents the gray value of the -th pixel point in the i-th segmented area; represents the average gray value of all the pixel points in the i-th segmented area; represents the number of pixel points in the i-th segmented area; represents the maximum gray value of the pixel points in the i-th segmented area; Represents the minimum gray value of the pixel points in the i-th sub-block area.
[0074] When the value of is greater than or equal to 0.5, the i-th sub-block area is marked as a stripe area. Further, When the value of is less than 0.5, the i-th sub-block area is marked as a non-stripe area. It can be seen that the larger the stripe characterization value, the more uneven the gray value distribution and the smaller the gray value in the sub-block area, and the more likely it belongs to the stripe area. Thus, determining the gray value distribution according to the stripe characterization can effectively judge whether the sub-block area is a stripe area.
[0075] In step S120, exemplarily, the edge pixel points refer to the outermost pixel points of each stripe area. Specifically, when the stripe area is not deformed, the edge of this area in the image usually presents a regular and smooth straight line form, with fewer turning points at the edge, and the gradient change between adjacent pixel points is small, and the gray value of the image does not fluctuate violently at the edge. However, when the stripe area is deformed, the edge shape will change significantly. The deformation may cause the edge of the stripe area 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 obvious fluctuations; the gradient change between adjacent pixel points will become more intense, and the smoothness and regularity of the edge will be greatly reduced, and new high-gradient areas may appear, indicating mutations or curvature changes of the edge. Therefore, it is determined whether the stripe area is a stripe deformation area through the gray value and gradient value of the edge pixel points.
[0076] Preferably, step S120 includes: S1210. 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 mean value of the gray value differences between each edge pixel point of the d-th stripe area and its adjacent edge pixel points;
[0077] S1220. 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 mean value of the gradient value differences between each edge pixel point of the d-th stripe area and its adjacent edge pixel points;
[0078] S1230. Determine the deformation evaluation coefficient of the d-th stripe area according to the edge gray value fluctuation coefficient of the d-th stripe area and the edge shape fluctuation coefficient of the d-th stripe area;
[0079] S1240. When the deformation evaluation coefficient of the d-th stripe area is not less than the preset deformation evaluation coefficient threshold, determine that the d-th stripe area is a stripe deformation area.
[0080] Further, after step S1240, the 3D detection method for automatically detecting the dispensing amount further includes:
[0081] In the case where the deformation evaluation coefficient of the d-th stripe region is less than the preset deformation evaluation coefficient threshold, it is determined that the d-th stripe region is a stripe non-deformed region. Wherein, the preset deformation evaluation coefficient threshold is a value set according to actual needs and is not limited herein. For example, 0.5.
[0082] Exemplarily, obtain the gray values, gradient values, and quantities of all edge pixel points of the d-th stripe region, and calculate the gradient difference between all edge pixel points of the d-th stripe region and adjacent pixel points, and the gray difference between all edge pixel points of the d-th stripe region and adjacent pixel points.
[0083] The calculation formula for the deformation evaluation coefficient of the d-th stripe region is as follows:
[0084]
[0085] Wherein, 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 of the d-th stripe region and adjacent pixel points; represents the mean value of the gradient difference between all edge pixel points of the d-th stripe region and adjacent pixel points.
[0086] represents the edge gray value fluctuation coefficient of the d-th stripe region; represents the gray difference between the i-th edge pixel point in the d-th stripe region and adjacent pixel points; represents the mean value of the gray differences between all edge pixel points in the d-th stripe region and adjacent pixel points; represents the number of edge pixel points in the d-th stripe region.
[0087] 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 also 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.
[0088] Therefore, When it is greater than or equal to 0.5, the d-th stripe region is recorded as a stripe deformed region; When it is less than 0.5, the d-th stripe region is recorded as a non-stripe deformation region.
[0089] 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 simultaneously, 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 light by the dispensing surface that may cause overexposure and result in 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.
[0090] Preferably, step S130 includes: S1310, evaluating the possibility of dispensing overexposure for the stripe deformation region according to the light direction within each dispensing image of the stripe deformation region, to obtain the dispensing overexposure parameters of each stripe deformation region; S1320, determining the dispensing overexposed region in each dispensing image according to the curvature of each corner point corresponding to the stripe deformation region and the dispensing overexposure parameters of the stripe deformation region where each corner point is located.
[0091] Exemplarily, as Figure 3-4 shown, the automatic dispenser dispenses the workpiece according to the time preset by the program. During the process from the dispensing falling onto the workpiece to solidifying, since the dispensing will spread from the inside to the outside after falling onto the workpiece surface, as time goes by, the stripe deformation region caused by the overexposure of the dispensing surface will change. However, the stripe deformation region caused by the overexposure due to the unevenness of the workpiece surface will not change with time. Therefore, the possibility of dispensing overexposure for the stripe deformation region is evaluated according to the light direction within each dispensing image of the stripe deformation region.
[0092] In addition, when the workpiece moves slightly, there is a light direction for the overexposed region on the workpiece surface along the moving direction of the workpiece, while for the overexposed region on the dispensing surface, there is not only a light direction along the moving direction of the workpiece, but also a circular light direction around itself due to the transparent texture of the dispensing. Therefore, by combining the curvature of each corner point corresponding to the stripe deformation region with the dispensing overexposure parameters of the stripe deformation region where each corner point is located, it is further distinguished whether the overexposure belongs to dispensing overexposure or workpiece overexposure, so as to accurately determine the dispensing overexposed region in the dispensing image.
[0093] 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 distance to obtain the total center line change distance;
[0094] Calculate the variance of the centerline curvature within each dispensing image for the g-th stripe deformation region to obtain the centerline curvature variance;
[0095] Calculate the ratio of the centerline curvature variance to the total sum of the centerline change distances to obtain the dispensing exposure parameter for the g-th stripe deformation region.
[0096] Specifically, by analyzing the g-th stripe deformation region within one of the dispensing images, the corresponding regions within each single dispensing image collected at this dispensing position for this region can be obtained. Obtain the centerline of the g-th stripe deformation region within each image. Among them, the centerline of the stripe deformation region is an extension line made along the longest direction of the stripe passing through the centroid of the stripe deformation region. A change in each centerline indicates that this stripe deformation region may be caused by the exposure of the dispensing surface.
[0097] In this embodiment, use the DTW algorithm to obtain the distance between the centerlines of the g-th stripe deformation region within every two adjacent single dispensing images, and obtain the DTW distance as the centerline change distance.
[0098] The calculation formula for the dispensing exposure parameter of the g-th stripe deformation region is as follows:
[0099]
[0100] Among them, represents the dispensing exposure parameter of the g-th stripe deformation region; represents the distance between the centerline of the g-th stripe deformation region within the m-th dispensing image and the centerline of the g-th stripe deformation region within the (m + 1)-th dispensing image; represents the number of single dispensing images; represents the centerline curvature variance of the g-th stripe deformation region.
[0101] It should be noted that the larger the value of
[0102] , the greater the difference of the g-th stripe deformation region within the single dispensing image, the more the stripe changes, and the greater the possibility that the stripe deformation is caused by the exposure of the dispensing surface.
[0103] Preferably, step S1320 includes: performing corner detection on the m-th dispensing image to determine the corner group corresponding to each stripe deformation region in the m-th dispensing image;
[0104] According to the dispensing exposure parameters of each target corner point and its adjacent corner points in the stripe deformation area of the corner point diagram, and the curvature of each target corner point and its adjacent corner points in the corner point diagram, evaluate the dispensing property in the stripe deformation area where the target corner point is located to obtain a dispensing property evaluation coefficient. It can be understood that the corner point diagram is generated from the target corner points, so the adjacent corner points in the corner point diagram are all target corner points.
[0105] When the dispensing property evaluation coefficient is not less than the preset evaluation threshold, determine the stripe deformation area where the target corner point is located as the dispensing exposure area; when the dispensing property evaluation coefficient is less than the preset evaluation threshold, determine the stripe deformation area where the target corner point is located as the workpiece exposure area; where the preset evaluation threshold is set according to actual needs and is not limited here. For example, 0.5.
[0106] Specifically, each single dispensing image collected when each dispensing solidifies is the multi-dispensing image collected at that dispensing. Perform corner detection on the multi-dispensing image, and the corner points corresponding to each stripe deformation area in each image can be obtained. Group the corner points corresponding to each stripe deformation area, and several corner point groups within the multi-dispensing image can be obtained. Then obtain the center point of the multi-dispensing image, and select the corner point farthest from the center point in each corner point group as the target corner point. Connect all the selected target corner points to obtain a corner point diagram. In this embodiment, a corner point group is composed of multiple pixel points, and each corner point group can be regarded as a small area. Connecting all the target corner points is to connect all the small areas, that is, take the target corner points of each small area and connect them to get a line, and this line is the so-called corner point diagram. The curvature of the corner point is the curvature of the pixel points on the obtained line.
[0107] Furthermore, according to the dispensing exposure parameters of each target corner point and its adjacent corner points in the stripe deformation area of the corner point diagram, and the curvature of each target corner point and its adjacent corner points in the corner point diagram, evaluate the dispensing property in the stripe deformation area where the target corner point is located to obtain a dispensing property evaluation coefficient, including:
[0108] Calculate the average value 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 diagram to obtain the average value of the dispensing exposure parameter; 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 parameter 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 curvature; 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 curvature to obtain the second evaluation coefficient; obtain the dispensing property evaluation coefficient according to the first evaluation coefficient and the second evaluation coefficient.
[0109] It can be understood that when calculating the average value above, the target corner points adjacent to the p-th target corner point on the left and right are selected for calculation, and the non-obtainable adjacent corner points are not selected. In other embodiments, the implementer can make a selection according to the specific implementation scenario, aiming to analyze the parameter mean distribution of the adjacent target corner points around the p-th target corner point.
[0110] Specifically, the calculation formula of the dispensing property evaluation coefficient is as follows:
[0111]
[0112] Wherein, represents the dispensing property evaluation coefficient of the p-th target corner point; represents the first evaluation coefficient; represents the dispensing exposure parameter of the stripe deformation area where the p-th target corner point is located; represents the average value of the dispensing exposure parameters; represents the second evaluation coefficient; represents the curvature of the p-th target corner point in the corner point map; represents the average value of the curvature.
[0113] 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 dispensing exposure.
[0114] Furthermore, the stripe deformation areas where the target corner points generated by dispensing exposure in the corner point map are screened out by using the dispensing property 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.
[0115] In step S140, for example, on the dispensing surface, due to the refraction and reflection of light, and the dispensing presenting a transparent texture, the situation of uneven exposure intensity may occur, and it is necessary to correct the exposure area, thereby completing the detection of the dispensing amount.
[0116] 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;
[0117] S1420. Correcting the gray value of the pixel points in the area to be corrected in the dispensing exposure area according to the average value of the dispensing property evaluation coefficients of all the corner points in the dispensing exposure area and the average gray value of each pixel point in the stripe non-deformation area, to obtain the corrected dispensing exposure area.
[0118] Specifically, the dispensing property evaluation coefficient is used as the correction weight. The greater the dispensing exposure intensity, the greater the correction weight. 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-deformed areas), each dispensing exposure area is compared with the normal stripe area (stripe non-deformed area). The extra area is recorded as the area to be corrected for the dispensing exposure area, and the gray values of the pixel points in the area to be corrected are corrected to obtain the corrected dispensing exposure area. It can be understood that the gray values of all pixel points can be corrected, or the pixel points can be sampled, and the gray values of the sampled pixel points are corrected.
[0119] 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, the following formula is used to obtain the dispensing property evaluation coefficient of each corner point except the target corner point in the corner point group T.
[0120]
[0121] Among them, 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 its corner point group line; represents the average value of the curvatures of the -th corner point and its adjacent corner points in its corner point group.
[0122] The calculation formula for the corrected dispensing exposure area is as follows:
[0123]
[0124] Among them, 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 gray value of the pixel points in the non-striped 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.
[0125] 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 the detection result of the dispensing amount needs to be determined according to the stripe deformation situation of the corrected dispensing exposure area.
[0126] Preferably, determining the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure area includes:
[0127] Determine the edge compactness of the corrected dispensing exposure area according to 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 according to the variance of the curvatures of the respective pixel points of the corrected dispensing exposure area and the mean value of the curvatures of the respective pixel points of the corrected dispensing exposure area; determine the evaluation coefficient of the dispensing amount according to the edge compactness of the corrected dispensing exposure area and the curvature distribution coefficient of the corrected dispensing exposure area;
[0128] 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;
[0129] 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.
[0130]
[0131] 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 curvature variance of all the edge pixel points of the th corrected dispensing exposure area; Represents the curvature mean value of all the edge pixel points of the th corrected dispensing exposure area. It can be understood that the perimeter refers to the The number of the outermost pixel points of the corrected dispensing exposure area. The area refers to the number of all pixel points within the corrected dispensing exposure area;
[0132] Indicates the edge compactness of the corrected dispensing exposure area. The larger this value is, the more irregular the edge of the corrected dispensing exposure area is. Indicates the curvature distribution coefficient of the corrected dispensing exposure area. The larger this value is, the more dispersed the curvature distribution of all edge pixel points of the
[0133] corrected dispensing exposure area is, and the more irregular the edge is. 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, the dispensing amount is abnormal, and the system can automatically adjust the working parameters of the dispenser (such as dispensing speed, pressure, etc.).
[0134] 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 within each dispensing image of the stripe deformation area, a 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; in the case where the gray values of the pixel points in the corrected dispensing exposure area are different from the preset gray value, the detection result of the dispensing amount is determined according to the stripe deformation situation of the corrected dispensing exposure area. In this way, by carrying out a possibility evaluation 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.
[0135] 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 amount. The device may specifically be a chip, a component or a module. The chip may include a connected processor and a memory. Among them, the memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the above-mentioned 3D detection method for automatically detecting the dispensing amount provided by the above embodiment.
[0136] 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 relevant steps to implement the above-mentioned 3D detection method for automatically detecting the dispensing amount provided by the above embodiment.
[0137] 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 relevant method steps to implement the above-mentioned 3D detection method for automatically detecting the dispensing amount provided by the above embodiment.
[0138] 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.
[0139] It should be noted that the above-mentioned sequence 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 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.
[0140] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A 3D detection method for automatically detecting the dispensing amount, characterized in that, The method includes: Determining 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; Determining 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; Evaluating 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 determining the dispensing exposure regions in each dispensing image; Performing gray value correction on the pixel points of the dispensing exposure regions to obtain the corrected dispensing exposure regions; When the gray values of the pixel points in the corrected dispensing exposure regions are different from the preset gray values, determining the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure regions.
2. The 3D detection method for automatically detecting the dispensing amount according to claim 1, characterized in that Evaluating 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 determining the dispensing exposure regions in each dispensing image, including: Evaluating the possibility of dispensing exposure for the stripe deformation regions according to the light direction within each dispensing image of the stripe deformation regions to obtain the dispensing exposure parameters of each stripe deformation region; Determining the dispensing exposure regions in each dispensing image according to the curvatures of the respective corner points corresponding to the stripe deformation regions and the dispensing exposure parameters of the stripe deformation regions where the respective corner points are located.
3. The 3D detection method for automatically detecting the dispensing amount according to claim 2, wherein, Evaluating the possibility of dispensing exposure for the stripe deformation regions according to the light direction within each dispensing image of the stripe deformation regions to obtain the dispensing exposure parameters of each stripe deformation region, including: 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 to obtain 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; where g and m are positive integers.
4. The 3D detection method for automatically detecting the dispensing amount according to claim 3, wherein, Determining the dispensing exposure regions in each dispensing image according to the curvatures of the respective corner points corresponding to the stripe deformation regions and the dispensing exposure parameters of the stripe deformation regions where the respective corner points are located, including: Performing corner point detection on the m-th dispensing image to determine the corner point groups corresponding to the respective stripe deformation regions in the m-th dispensing image; Determining the target corner points in the corner point groups of the respective stripe deformation regions according to the distances from the center point of the m-th dispensing image to the respective corner points in the corner point groups of the respective stripe deformation regions, and generating a corner point map according to the target corner points; Evaluating the dispensing attributes of the stripe deformation region where the target corner points are located to obtain the dispensing attribute evaluation coefficient according to the dispensing exposure parameters of the stripe deformation regions where the respective target corner points and their adjacent corner points in the corner point map are located and the curvatures of the respective target corner points and their adjacent corner points in the corner point map; When the dispensing attribute evaluation coefficient is not less than the preset evaluation threshold, determining the stripe deformation region where the target corner points are located as the dispensing exposure region.
5. The 3D detection method for automatically detecting the dispensing amount according to claim 4, characterized in that, Evaluate the dispensing properties in the stripe deformation region where each target corner point and its adjacent corner points in the corner point diagram are located, based on the dispensing exposure parameters and the curvature of each target corner point and its adjacent corner points in the corner point diagram, to obtain a dispensing property evaluation coefficient, 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 region 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 curvature 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 curvature; Calculate the ratio of the curvature of the stripe deformation region where the p-th target corner point is located to the average value of the curvature, 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.
6. The 3D detection method for automatically detecting the dispensing amount according to claim 1, characterized in that, 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, 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 region of the m-th dispensing image, and the average gray value of all pixel points in the i-th sub-block region; When the stripe characterization degree is not less than the preset stripe characterization degree threshold, determine that the i-th sub-block region in the m-th dispensing image is a stripe region; where i is a positive integer.
7. The 3D detection method for automatically detecting the dispensing amount according to claim 1, wherein 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, including: 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 point, and the average value of the gray value differences between each edge pixel point of the d-th stripe region and its adjacent edge pixel point; 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 point, and the average value of the gradient value differences between each edge pixel point of the d-th stripe region and its adjacent edge pixel point; 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.
8. The 3D detection method for automatically detecting the dispensing amount according to claim 7, characterized in that 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.
9. The 3D detection method for automatically detecting the dispensing amount according to claim 8, wherein, Perform gray value correction on the pixel points in the dispensing exposure region to obtain the corrected dispensing exposure region, including: Perform a region comparison between the stripe non-deformation region and the dispensing exposure region to obtain the region to be corrected in the dispensing exposure region; Based on the mean of the dispensing property evaluation coefficients of all corner points within the dispensing exposure area and the mean of the gray values of each pixel point in the stripe non-deformed area, the gray values of the pixel points in the area to be corrected within the dispensing exposure area are corrected to obtain the corrected dispensing exposure area.
10. The 3D detection method for automatically detecting the dispensing amount according to any one of claims 1-9, characterized in that, Determine the detection result of the dispensing amount according to the stripe deformation situation of the corrected dispensing exposure area, including: Determine the edge compactness of the corrected dispensing exposure area according to 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 according to the variance of the curvature of each pixel point in the corrected dispensing exposure area and the mean of the curvature of each pixel point in the corrected dispensing exposure area; determine the evaluation coefficient of the dispensing amount according to 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 threshold of the evaluation coefficient 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 threshold of the evaluation coefficient of the dispensing amount, it is detected that the dispensing amount is normal.
Citation Information
Patent Citations
LED semiconductor packaging dispensing defect detection method based on optical information
CN116977340A
Sealant abnormal state detection method based on image data
CN117974639A