Gluing detection method and device, computer equipment, readable storage medium and program product

By using image processing technology to binarize and extract the contour of the glue-coated area, the problems of complexity and low efficiency of glue-coated inspection equipment are solved, and fast and accurate glue width measurement is achieved.

CN121329893APending Publication Date: 2026-01-13SUZHOU HUAXING YUANCHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511411445.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing adhesive coating testing equipment has a complex structure and low testing efficiency, making it difficult to accurately control the coating area and amount.

Method used

The image of the object to be detected is acquired and binarized to extract contour data and determine the straight line and arc contour regions. The glue width data is calculated separately, and the arc segmentation template and arc detection algorithm are used for accurate division and measurement.

Benefits of technology

It enables rapid and accurate detection of adhesive width, reduces data processing complexity and volume, improves detection efficiency, and is suitable for various application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121329893A_ABST
    Figure CN121329893A_ABST
Patent Text Reader

Abstract

The invention relates to a gluing detection method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a first image of a to-be-detected object, and carrying out binarization processing on the first image to obtain a second image; extracting contour data in the second image, determining a straight line group corresponding to each contour point in the contour data, and determining a straight line contour area in the contour data according to the straight line group; determining a radian contour area in the contour data according to the contour data and the linear contour area; and respectively determining first glue width data corresponding to the linear contour area and second glue width data corresponding to the radian contour area to obtain target glue width data of the to-be-detected object. By adopting the method, the efficiency and the accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for detecting adhesive coating. Background Technology

[0002] In industrial manufacturing scenarios such as semiconductor production, component assembly is required. In some assembly processes, adhesive is used for bonding. To ensure the quality of the assembled product, the adhesive application area and amount need to be strictly controlled. Therefore, the adhesive application status needs to be inspected after application.

[0003] In related technologies, adhesive width data can be obtained by acquiring and processing 3D point clouds. However, this method places high demands on the structure and data processing capabilities of the testing equipment, resulting in complex equipment structures and low processing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for adhesive coating inspection that can simplify the process and improve efficiency and accuracy in addressing the aforementioned technical problems.

[0005] In a first aspect, this application provides a method for detecting adhesive coating, the method comprising:

[0006] A first image of the object to be detected is acquired, and the first image is binarized to obtain a second image;

[0007] Extract contour data from the second image, determine the line group corresponding to each contour point in the contour data, and determine the line contour region in the contour data based on the line group;

[0008] Based on the contour data and the straight line contour region, determine the arc contour region in the contour data;

[0009] The first adhesive width data corresponding to the straight contour region and the second adhesive width data corresponding to the curved contour region are determined respectively to obtain the target adhesive width data of the object to be detected.

[0010] In one embodiment, determining the arcuate contour region in the contour data based on the contour data and the straight contour region includes:

[0011] Based on the contour data and the straight line contour region, determine the initial arc contour region in the contour data;

[0012] Obtain the arc segmentation template corresponding to the object to be tested, wherein the arc segmentation template is used to divide the arc region in the glued area of ​​the object to be tested into multiple separate arc regions;

[0013] Based on the arc segmentation template, the initial arc contour region is segmented to obtain at least one arc contour region in the contour data.

[0014] In one embodiment, determining the second adhesive width data corresponding to the arcuate contour region includes:

[0015] Based on the arc information corresponding to the arc contour region, determine the centerline arc circle of the arc contour region;

[0016] The second adhesive width data corresponding to the arc contour region is determined based on the intersection point of the straight line with the radius of the point on the centerline arc circle and the arc contour region.

[0017] In one embodiment, determining the centerline arc circle of the arc contour region based on the arc information corresponding to the arc contour region includes:

[0018] Based on the arc detection algorithm, multiple candidate edge circle contours corresponding to the arc contour region are fitted according to the arc information corresponding to the arc contour region.

[0019] The target edge circle corresponding to the arc contour region is obtained based on the overlap points between the multiple candidate edge circle contours and the arc contour region.

[0020] Based on the target edge circle, determine the centerline arc circle corresponding to the arc contour region.

[0021] In one embodiment, determining the first adhesive width data corresponding to the straight contour region includes:

[0022] Determine the centerline of the line corresponding to the linear contour region;

[0023] The first adhesive width data corresponding to the straight profile area is determined based on the intersection point of the perpendicular line from the center line of the straight line and the straight profile area.

[0024] In one embodiment, determining the arcuate contour region in the contour data based on the contour data and the straight contour region includes:

[0025] Based on the contour data and the straight line contour data, determine the candidate radii contour regions in the contour data;

[0026] Based on the curvature information corresponding to the candidate curvature contour region, the candidate curvature contour region whose gradient change corresponding to the curvature information meets the preset conditions is determined as the curvature contour region in the contour region, wherein the preset conditions are determined based on the curvature feature information of the glue application start point and glue application end point.

[0027] In one embodiment, acquiring a first image of the object to be detected and binarizing the first image to obtain a second image includes:

[0028] Obtain the adhesive mask information and the first image corresponding to the object to be detected, wherein the adhesive mask information is determined based on the target adhesive application range corresponding to the object to be detected;

[0029] The adhesive-coated area in the first image is extracted based on the adhesive-coated mask information, and the adhesive-coated area is binarized to obtain the second image.

[0030] Secondly, this application also provides an adhesive coating detection device, characterized in that the device comprises:

[0031] The acquisition module is used to acquire a first image of the object to be detected and to perform binarization processing on the first image to obtain a second image;

[0032] An extraction module is used to extract contour data from the second image, determine the line group corresponding to each contour point in the contour data, and determine the line contour region in the contour data based on the line group.

[0033] The first determining module is used to determine the arc contour region in the contour data based on the contour data and the straight contour region;

[0034] The second determining module is used to determine the first adhesive width data corresponding to the straight contour region and the second adhesive width data corresponding to the arc contour region, respectively, to obtain the target adhesive width data of the object to be detected.

[0035] In one embodiment, the first determining module is further configured to:

[0036] Based on the contour data and the straight line contour region, determine the initial arc contour region in the contour data;

[0037] Obtain the arc segmentation template corresponding to the object to be tested, wherein the arc segmentation template is used to divide the arc region in the glued area of ​​the object to be tested into multiple separate arc regions;

[0038] Based on the arc segmentation template, the initial arc contour region is segmented to obtain at least one arc contour region in the contour data.

[0039] In one embodiment, the second determining module is further configured to:

[0040] Based on the arc information corresponding to the arc contour region, determine the centerline arc circle of the arc contour region;

[0041] The second adhesive width data corresponding to the arc contour region is determined based on the intersection point of the straight line with the radius of the point on the centerline arc circle and the arc contour region.

[0042] In one embodiment, the second determining module is further configured to:

[0043] Based on the arc detection algorithm, multiple candidate edge circle contours corresponding to the arc contour region are fitted according to the arc information corresponding to the arc contour region.

[0044] The target edge circle corresponding to the arc contour region is obtained based on the overlap points between the multiple candidate edge circle contours and the arc contour region.

[0045] Based on the target edge circle, determine the centerline arc circle corresponding to the arc contour region.

[0046] In one embodiment, the second determining module is further configured to:

[0047] Determine the centerline of the line corresponding to the linear contour region;

[0048] The first adhesive width data corresponding to the straight profile area is determined based on the intersection point of the perpendicular line from the center line of the straight line and the straight profile area.

[0049] In one embodiment, the first determining module is further configured to:

[0050] Based on the contour data and the straight line contour data, determine the candidate radii contour regions in the contour data;

[0051] Based on the curvature information corresponding to the candidate curvature contour region, the candidate curvature contour region whose gradient change corresponding to the curvature information meets the preset conditions is determined as the curvature contour region in the contour region, wherein the preset conditions are determined based on the curvature feature information of the glue application start point and glue application end point.

[0052] In one embodiment, the acquisition module is further configured to:

[0053] Obtain the adhesive mask information and the first image corresponding to the object to be detected, wherein the adhesive mask information is determined based on the target adhesive application range corresponding to the object to be detected;

[0054] The adhesive-coated area in the first image is extracted based on the adhesive-coated mask information, and the adhesive-coated area is binarized to obtain the second image.

[0055] Thirdly, embodiments of this disclosure also provide a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in any one of the embodiments of this disclosure.

[0056] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of this disclosure.

[0057] Fifthly, embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in any one of the embodiments of this disclosure.

[0058] The aforementioned adhesive coating detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product, when performing adhesive coating detection, acquire a first image of the object to be detected, and perform binarization processing to obtain a second image. Contour data is extracted from the second image, and the group of straight lines corresponding to each contour point in the contour data is determined to obtain the straight line contour region in the contour data. Then, based on the contour data and the straight line contour region, the arc contour region in the contour data is determined. Adhesive width data is calculated for both the straight line contour region and the arc contour region to obtain the target adhesive width data corresponding to the object to be detected. This quickly and accurately achieves the detection of the adhesive width of the object to be detected. Considering the image difference between the coated and non-coated areas, binarization processing and contour extraction enable the rapid and accurate extraction of the contour of the coated area of ​​the object to be detected based on two-dimensional image data, ensuring the accuracy and reliability of the adhesive area determination and reducing the amount and complexity of data processing. Based on the characteristics of contour points in the contour data, straight contour regions are extracted, and then curved contour regions are determined. This enables the division of different contour types. Adhesive width data is determined separately for different contour types, ensuring the accuracy and reliability of adhesive width data. It also effectively reduces the amount of data processing and improves data processing efficiency. The implementation method is simple, and accurate measurement of adhesive width data can be achieved through simple image acquisition equipment, making it suitable for more application scenarios. Attached Figure Description

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

[0060] Figure 1 This is a flowchart illustrating the adhesive coating detection method in one embodiment;

[0061] Figure 2 This is a schematic diagram of binarization processing in one embodiment;

[0062] Figure 3 This is a schematic diagram of the outline region in one embodiment;

[0063] Figure 4 This is a schematic diagram of the outline region in another embodiment;

[0064] Figure 5 This is a schematic diagram of an arc segmentation template in one embodiment;

[0065] Figure 6 This is a schematic diagram of an arc segmentation template in another embodiment;

[0066] Figure 7 This is a schematic diagram illustrating how the target edge circle is determined in one embodiment;

[0067] Figure 8 This is a schematic diagram of the centerline arc circle in one embodiment;

[0068] Figure 9 This is a schematic diagram of a straight line contour region in one embodiment;

[0069] Figure 10 This is a schematic diagram of binarization processing in another embodiment;

[0070] Figure 11 This is a flowchart illustrating how the straight contour region and the curved contour region are determined in one embodiment;

[0071] Figure 12 This is a flowchart illustrating the adhesive coating detection method in another embodiment;

[0072] Figure 13 This is a structural block diagram of the adhesive coating detection device in one embodiment;

[0073] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0075] In one embodiment, such as Figure 1 As shown, a method for detecting adhesive application is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0076] Step S110: Obtain a first image of the object to be detected, and perform binarization processing on the first image to obtain a second image;

[0077] For example, a first image of the object to be inspected is acquired. The object to be inspected may include components after being coated with adhesive, etc. The first image may be obtained through a preset image acquisition device, and the first image includes the adhesive-coated area on the object to be inspected.

[0078] Optionally, the first image is binarized to obtain the second image. In some examples, a threshold for binarization can be set beforehand based on the difference in pixel grayscale values ​​between the glue-coated area and other areas in the actual application scenario. Binarization is then performed based on the difference between the pixel grayscale value and the threshold, thus distinguishing the pixel grayscale values ​​of the glue-coated area from those of other areas. In some examples, if the pixel grayscale value of the glue-coated area is greater than that of other areas, the grayscale value of areas with pixel grayscale values ​​greater than the threshold can be uniformly set to 255 (white), and the grayscale value of areas with pixel grayscale values ​​less than or equal to the threshold can be uniformly set to 0 (black); conversely, if the pixel grayscale value of the glue-coated area is less than that of other areas, the grayscale value of areas with pixel grayscale values ​​less than the threshold can be uniformly set to 255 (white), and the grayscale value of areas with pixel grayscale values ​​greater than or equal to the threshold can be uniformly set to 0 (black). Figure 2 This is a schematic diagram illustrating a binarization process according to an exemplary embodiment, with reference to... Figure 2 As shown, Figure 2 'a' represents the first image of the object to be detected. Besides the adhesive-coated area, other structures also exist in the image. Figure 2 b is the second image after binarization, where only the outline corresponding to the glued area is retained in the processed second image.

[0079] For example, before binarizing the first image, preprocessing can be performed on the first image to improve the accuracy and reliability of the binarization process. In some possible implementations, when the difference in pixel grayscale values ​​between the glued area and other areas is small, the first image can be processed by contrast enhancement, image denoising, etc., before binarization. When the structure of the object to be detected is complex and the glued area is difficult to distinguish from other areas, the glued area in the first image can be determined by a preset glued mask before binarization. Alternatively, the first image can be preprocessed using other possible image processing methods before subsequent binarization.

[0080] Step S120: Extract contour data from the second image, determine the line group corresponding to each contour point in the contour data, and determine the line contour region in the contour data based on the line group.

[0081] For example, after determining the second image, contour data is extracted from the second image. This contour data can be used to characterize the adhesive coating contour on the object to be detected. The contour data corresponds to multiple contour points, and each contour point corresponds to multiple possible straight lines passing through that contour point, which are determined as the corresponding group of straight lines.

[0082] In some examples, the possible straight lines corresponding to each contour point can be represented in polar coordinates. The polar coordinate parameters of the straight lines in the line group form a sine curve in the ρ-θ coordinate system. Multiple contour points correspond to multiple line groups, that is, multiple sine curves. The intersection of the sine curves indicates that the corresponding two contour points are collinear. By using the intersection of the sine curves between the line groups corresponding to the contour data, the straight line contour region can be determined.

[0083] Optionally, the intersection point (ρ, θ) with the most intersections of the corresponding sine curves can be determined as the straight line profile in the profile data. In some examples, the profile data may include one or more straight line profiles, which can be determined according to the actual application scenario.

[0084] For example, by combining the straight profile and each profile point in the profile data, the straight profile region in the profile data is determined. In some examples, the start and end points of the straight profile can be determined based on each profile point in the profile data, thereby obtaining the straight profile region.

[0085] Step S130: Determine the arc contour region in the contour data based on the contour data and the straight contour region;

[0086] For example, typically, the adhesive application area consists of straight lines and curves. The curved contour area in the contour data can be determined from the straight contour area. In some examples, the data corresponding to non-straight contour areas in the contour data can be identified as curved contour areas; alternatively, the curved contour areas can be obtained by further filtering the non-straight contour area data. This filtering process can include, but is not limited to, removing adhesive application start and end points, and removing minute straight lines, depending on the specific application scenario. In some examples, when filtering curved contour areas, the removed minute straight lines, adhesive application start and end points can be updated to straight contour areas, forming new straight contour areas. Subsequent adhesive width data detection and calculation are then performed according to these new straight contour areas.

[0087] Figure 3 This is a schematic diagram illustrating a contour region according to an exemplary embodiment, with reference to... Figure 3 As shown, taking the S-shaped adhesive application method as an example, Figure 3 a is a schematic diagram corresponding to the arc contour region. Figure 3 b is a schematic diagram of the straight line contour area. Figure 4 This is a schematic diagram illustrating another contour region according to an exemplary embodiment, with reference to... Figure 4 As shown, taking the sealant application method as an example, Figure 4 a is a schematic diagram corresponding to the arc contour region. Figure 4 b is a schematic diagram of the straight line contour area.

[0088] Step S140: Determine the first adhesive width data corresponding to the straight contour region and the second adhesive width data corresponding to the curved contour region respectively to obtain the target adhesive width data of the object to be detected.

[0089] For example, a first adhesive width and a second adhesive width are determined for the straight contour region and the curved contour region, respectively. In some examples, the method of calculating the adhesive width for the straight contour region and the curved contour region may differ due to the different characteristics of the straight line and the curved line. In some examples, the first adhesive width data for the straight contour region and the second adhesive width data for the curved contour region are combined to obtain the adhesive width data for the entire adhesive-coated area on the object to be inspected, i.e., the target adhesive width data.

[0090] Optionally, the glue width data may include, but is not limited to, the average glue width, the maximum glue width, and the minimum glue width, which can be determined according to the actual application scenario.

[0091] In some possible implementations, after obtaining the target adhesive width data, the adhesive coating quality can be judged based on the target adhesive width data. In some examples, the target range can be determined according to the adhesive width required by the actual application scenario, and it can be determined whether the target adhesive width data is within the target range. If it is within the target range, the adhesive coating quality of the coated area of ​​the object to be tested can be considered to meet the requirements; if it is within the target range, the adhesive coating quality of the coated area of ​​the object to be tested can be considered to be poor and does not meet the requirements.

[0092] In this embodiment, during adhesive coating detection, a first image of the object to be detected is acquired, and a second image is obtained after binarization. Contour data is extracted from the second image, and the line group corresponding to each contour point in the contour data is determined to obtain the straight line contour region in the contour data. Then, based on the contour data and the straight line contour region, the arc contour region in the contour data is determined. Adhesive width data is calculated for both the straight line contour region and the arc contour region to obtain the target adhesive width data corresponding to the object to be detected. This quickly and accurately achieves the detection of the adhesive coating width of the object to be detected. Considering the image difference between the coated and non-coated areas, binarization and contour extraction enable the quick and accurate extraction of the contour of the coated area of ​​the object to be detected based on two-dimensional image data, ensuring the accuracy and reliability of the adhesive coating area determination and reducing the amount and complexity of data processing. Based on the characteristics of contour points in the contour data, straight contour regions are extracted, and then curved contour regions are determined. This enables the division of different contour types. Adhesive width data is determined separately for different contour types, ensuring the accuracy and reliability of adhesive width data. It also effectively reduces the amount of data processing and improves data processing efficiency. The implementation method is simple, and accurate measurement of adhesive width data can be achieved through simple image acquisition equipment, making it suitable for more application scenarios.

[0093] In one embodiment, determining the arcuate contour region in the contour data based on the contour data and the straight contour region includes:

[0094] Based on the contour data and the straight line contour region, determine the initial arc contour region in the contour data;

[0095] Obtain the arc segmentation template corresponding to the object to be tested, wherein the arc segmentation template is used to divide the arc region in the glued area of ​​the object to be tested into multiple separate arc regions;

[0096] Based on the arc segmentation template, the initial arc contour region is segmented to obtain at least one arc contour region in the contour data.

[0097] For example, when determining the arc contour region, an arc segmentation template is used for segmentation. In some examples, the initial arc contour region is determined based on contour data and straight contour regions. Due to differences in adhesive application requirements and actual application scenarios, the arc region for adhesive application may include multiple regions formed by connecting different arcs. To ensure the accuracy of adhesive width calculation, an arc segmentation template corresponding to the object to be detected is obtained for segmentation.

[0098] Optionally, the arc segmentation template is determined based on the theoretical adhesive application area information corresponding to the object to be detected, wherein objects with the same theoretical adhesive application area correspond to the same arc segmentation template. In some examples, based on the theoretical adhesive application area information corresponding to the object to be detected, a theoretical arc region can be determined and divided into multiple individual arc regions. In some examples, the arc segmentation template may include one or more segmentation boxes to divide the initial arc contour region into at least one arc contour region, and each arc contour region may correspond to the same edge circle.

[0099] In some possible implementations, such as Figure 5 As shown, considering the accuracy and reliability of the glue width calculation at the arc joint, the dividing frame in the arc segmentation template (such as...) Figure 5 The green dividing box in the middle can divide the area with overlapping parts, for example, with perpendicular lines connecting at the arc (such as...). Figure 5 The intersection of the blue straight line and the contour area is set as an overlapping part. When performing glue width detection, for each arc contour area, the incomplete part of the arc contour is not counted. In some other possible implementations, such as Figure 6 As shown, the division areas in the arc division template do not have overlapping parts, such as... Figure 6 a; When performing adhesive width detection, for each arc contour area, the connection relationship between the arc contour areas can be considered, such as Figure 6 b. Complete the incomplete arc contour to the adjacent arc contour area and then perform glue width detection.

[0100] In this embodiment, an initial arc region is selected from the contour data based on the straight contour region, and then segmented using an arc segmentation template to obtain at least one arc contour region. The arc segmentation template can segment complex arc curves, dividing the initial arc contour region into at least one arc contour region that is easy to measure and calculate. This effectively improves the accuracy and efficiency of subsequent calculation of the second adhesive width data, further reduces the workload of data processing, and improves the efficiency of adhesive width measurement.

[0101] In one embodiment, determining the second adhesive width data corresponding to the arcuate contour region includes:

[0102] Based on the arc information corresponding to the arc contour region, determine the centerline arc circle of the arc contour region;

[0103] The second adhesive width data corresponding to the arc contour region is determined based on the intersection point of the straight line with the radius of the point on the centerline arc circle and the arc contour region.

[0104] For example, when determining the second adhesive width data, for each arc contour region, its corresponding centerline arc circle is determined. Multiple arc contour regions can correspond to multiple centerline arc circles, which can be determined according to the actual application scenario.

[0105] Optionally, the contour width can be determined based on the intersection of the straight line with the radius of a point on the centerline arc circle and the arc contour region, thus obtaining the second adhesive width data. In some examples, a certain number of points can be taken from the centerline arc circle according to a preset number of sampling points, and the intersection of the straight line with the radius of these points and the arc contour region can be calculated to obtain the adhesive width data. In some examples, since the arc contour region can be an incomplete circular arc, its corresponding centerline arc circle can also be a part of a circle, matching the arc contour region.

[0106] In this embodiment, the centerline arc circle is determined based on the arc information of the arc contour region, thereby enabling the second adhesive width data corresponding to the arc contour region to be quickly and accurately determined based on the intersection of the straight line with the radius of the point on the centerline arc circle and the arc contour region.

[0107] In one embodiment, determining the centerline arc circle of the arc contour region based on the arc information corresponding to the arc contour region includes:

[0108] Based on the arc detection algorithm, multiple candidate edge circle contours corresponding to the arc contour region are fitted according to the arc information corresponding to the arc contour region.

[0109] The target edge circle corresponding to the arc contour region is obtained based on the overlap points between the multiple candidate edge circle contours and the arc contour region.

[0110] Based on the target edge circle, determine the centerline arc circle corresponding to the arc contour region.

[0111] For example, based on the radian detection algorithm, multiple candidate edge circle contours corresponding to the radian contour region are fitted according to the radian information corresponding to the radian contour region. In some examples, the radian detection algorithm can be determined according to the actual application scenario; for example, the radian detection algorithm may include the Hough detection algorithm.

[0112] Optionally, based on the curvature information corresponding to the curvature contour region, multiple possible candidate edge circular contours can be fitted. It should be noted that since the glued edge is not in an ideal smooth state, multiple possible candidate edge circular contours will be obtained when fitting the edge circular contour through the curvature detection algorithm, which need to be further screened.

[0113] For example, based on the overlap points between multiple candidate edge circle contours and the arc contour region, the target edge circle corresponding to the arc contour region is obtained, thereby eliminating the interference of outliers on the fitted circle. After determining the target edge circle, the circle between the two edge circles is obtained, which is the centerline arc circle.

[0114] Figure 7 This is a schematic diagram illustrating a method for determining a target edge circle according to an exemplary embodiment, with reference to... Figure 7 As shown, Figure 7 a represents the multiple candidate edge circle contours obtained through fitting. Figure 7 b represents the arc contour region. Figure 7 c is the point of overlap, and the target edge circle can be determined based on the point of overlap.

[0115] Figure 8 This is a schematic diagram illustrating a centerline arc circle according to an exemplary embodiment, with reference to... Figure 8 As shown, the green outline corresponds to the target edge circle, and the blue curve represents the centerline arc circle. Figure 8 a is a schematic diagram showing the condition without burrs or missing parts. Figure 8 b、 Figure 8 c is a schematic diagram showing the case with burrs and missing parts.

[0116] In this embodiment of the disclosure, when determining the centerline arc circle, multiple candidate edge circle contours are fitted according to the arc detection algorithm, and the target edge circle corresponding to the arc contour region is obtained based on the overlap point between the candidate edge circle and the arc contour region. The centerline arc circle is determined based on the target edge circle, which can avoid the problem of incorrect edge circle determination caused by adhesive edge burrs, missing adhesive edges, etc., and improve the accuracy and reliability of target edge circle determination, thereby ensuring the accuracy of subsequent adhesive width detection of the arc contour region.

[0117] In one embodiment, determining the first adhesive width data corresponding to the straight contour region includes:

[0118] Determine the centerline of the line corresponding to the linear contour region;

[0119] The first adhesive width data corresponding to the straight profile area is determined based on the intersection point of the perpendicular line from the center line of the straight line and the straight profile area.

[0120] For example, when determining the adhesive width data corresponding to the straight contour region, the centerline of the straight line corresponding to the straight contour region is first determined. The centerline can be determined based on the actual application scenario. In some possible implementations, a coordinate system can be established, a functional relationship can be constructed corresponding to the contour lines in the straight contour region, and the functional relationship of the centerline can be determined through this functional relationship to obtain the corresponding straight line centerline.

[0121] Optionally, the adhesive width data corresponding to the perpendicular line from the centerline of the straight line to the straight line contour area is determined, thus obtaining the first adhesive width data. In some examples, the sampling interval or number can be set according to the actual application scenario. Points are selected on the centerline of the straight line to draw perpendicular lines, and the corresponding adhesive width data is obtained based on the intersection points. After processing, the first adhesive width data is obtained. In some possible implementations, if the straight line contour area is determined to be horizontal or vertical, the number of pixels in the vertical or horizontal direction of the straight line contour area can be directly counted to obtain the first adhesive width data.

[0122] Figure 9 This is a reference schematic diagram illustrating a straight-line contour region according to an exemplary embodiment. Figure 9 As shown, the blue line is the center line of the line. Figure 9 'a' represents the case where the median is perpendicular. Figure 9 b represents the case where the midline is horizontal. Figure 9 c represents the case where the median of a straight line has a slope.

[0123] In this embodiment, the center line of the straight line corresponding to the straight line contour region is determined, thereby enabling the first adhesive width data corresponding to the straight line contour region to be determined quickly and accurately based on the intersection of the perpendicular line of the center line and the straight line contour region, thus realizing the detection of adhesive width data of the straight line contour region.

[0124] In one embodiment, determining the arc contour region in the contour data based on the contour data and the straight contour region includes:

[0125] Based on the contour data and the straight line contour data, determine the candidate radii contour regions in the contour data;

[0126] Based on the curvature information corresponding to the candidate curvature contour region, the candidate curvature contour region whose gradient change corresponding to the curvature information meets the preset conditions is determined as the curvature contour region in the contour region, wherein the preset conditions are determined based on the curvature feature information of the glue application start point and glue application end point.

[0127] For example, candidate arc contour data is determined from the contour data and straight line contour data. In some examples, due to the properties of the adhesive, there may be irregular arcs at the beginning and end of the adhesive application. In order to ensure the accuracy of the adhesive width data, the beginning and end of the adhesive application need to be removed in this embodiment.

[0128] Optionally, based on the curvature information corresponding to the candidate curvature contour region, the gradient change information corresponding to the curvature information is determined. In some examples, the gradient change of regular curvature is also regular, while the gradient change of the curvature corresponding to the glue application start point and end point is irregular, still showing a slight change in a certain direction overall. Therefore, preset conditions can be set based on the curvature feature information of the glue application start point and end point. In some possible implementations, the preset conditions can be set to the curvature gradient change being a regular change, or other possible filtering conditions, to filter out the curvature contour regions in the candidate curvature contour region excluding the glue application start point and end point.

[0129] In this embodiment, the curved contour regions that meet the conditions are selected based on the gradient changes corresponding to the curved information of the candidate curved contour regions. This allows for the elimination of the starting and ending points of the adhesive application based on the curved feature information of the starting and ending points, avoiding large errors in the calculated adhesive width data caused by irregular adhesive width at the starting and ending points. This further improves the accuracy and reliability of the subsequently determined adhesive width data and is applicable to more application scenarios.

[0130] In one embodiment, acquiring a first image of the object to be detected and binarizing the first image to obtain a second image includes:

[0131] Obtain the adhesive mask information and the first image corresponding to the object to be detected, wherein the adhesive mask information is determined based on the target adhesive application range corresponding to the object to be detected;

[0132] The adhesive-coated area in the first image is extracted based on the adhesive-coated mask information, and the adhesive-coated area is binarized to obtain the second image.

[0133] For example, in some scenarios, the structure of the object to be detected is quite complex. Dividing the coated and uncoated areas using pixel grayscale results in a large amount of computation and low efficiency. Therefore, adhesive mask information can be set. In some examples, the adhesive mask information can be determined based on the theoretical adhesive coating range of the object to be detected. For instance, the adhesive mask information can be used to retain the area corresponding to the theoretical adhesive coating range and a preset area around the theoretical adhesive coating range. The target adhesive coating range is the theoretical adhesive coating range. In some examples, the same target adhesive coating range can correspond to the same adhesive mask information, meaning the adhesive mask information is reusable. In mass production measurement scenarios, adhesive mask information can effectively reduce the amount of data processing.

[0134] Optionally, based on the adhesive mask information, the adhesive-coated area in the first image is extracted, and the adhesive-coated area is binarized to obtain the second image. The binarization process is similar to the scheme in the above embodiments and will not be described in detail here.

[0135] Figure 10 This is a schematic diagram illustrating a binarization process according to an exemplary embodiment, with reference to... Figure 10 As shown, Figure 10 Image 'a' represents the first image, which includes the coated area and other structural components of the object to be detected. Figure 10 b represents the information about the adhesive mask. Figure 10 c represents the adhesive-coated area in the extracted first image. Figure 10 d is the second image after binarization.

[0136] In this embodiment of the present disclosure, when obtaining the second image based on the first image, the adhesive-coated area can be extracted according to the adhesive mask information corresponding to the object to be detected and the first image, and then binarized to obtain the second image. The adhesive-coated area in the image can be extracted and processed through the adhesive mask information, avoiding other parts of the object to be detected that are similar to the adhesive-coated area in features from being identified as adhesive-coated areas, thereby improving the accuracy of the second image and thus improving the accuracy and reliability of adhesive width detection.

[0137] Figure 11 This is a flowchart illustrating a method for determining a straight-line contour region and a curved-line contour region according to an exemplary embodiment. (Refer to...) Figure 11 As shown, the second image is first obtained through binarization. Hough detection is then performed on the second image to remove straight lines. For the remaining candidate arc contour regions, small straight line regions are removed based on the gradient. The retained adhesive-coated beginning and end regions are removed based on contour characteristics. The small straight line regions and adhesive-coated beginning and end regions are then added to the straight contour region. The arc region is then truncated using the contour's bounding rectangle to obtain the arc contour region. The straight contour region is obtained by subtracting the arc contour region from the contour data of the second image.

[0138] Figure 12 This is a schematic flowchart illustrating an adhesive coating detection method according to an exemplary embodiment, with reference to... Figure 12 As shown, firstly, an image of the object to be inspected after applying adhesive is acquired, resulting in the first image. After processing, a second image is obtained. The adhesive type is determined based on the second image, namely, a straight contour region and a curved contour region. For the straight contour region, edge pixels are searched, two straight lines are fitted, and the center line of the line is found. If the center line is vertical / horizontal, the number of pixels in each row / column is directly traversed to obtain the first adhesive width data. If the center line is neither vertical nor horizontal, the distance between the perpendicular line from a preset point on the center line and the intersection point of the contour is calculated to obtain the first adhesive width data.

[0139] For the curved contour region, the curved edge pixels are searched, and Hough detection is used to obtain all possible candidate edge circle contours. The target edge circle is obtained based on the overlapping pixels of the candidate edge circle contours and the curved contour region. The centerline curved circle is then obtained from the target edge circle. The second adhesive width data is determined based on the intersection of the line with the radius of the point on the centerline curved circle and the curved contour region. The target adhesive width data is obtained based on the first and second adhesive width data. In some examples, the average and maximum adhesive widths can be determined based on the first and second adhesive width data to obtain the target adhesive width data; the specific determination can be made according to the actual application scenario.

[0140] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0141] Based on the same inventive concept, this application also provides an adhesive coating detection device for implementing the adhesive coating detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more adhesive coating detection device embodiments provided below can be found in the limitations of the adhesive coating detection method described above, and will not be repeated here.

[0142] In one exemplary embodiment, such as Figure 13 As shown, a glue application detection device 1300 is provided, comprising:

[0143] The acquisition module 1310 is used to acquire a first image of the object to be detected and to perform binarization processing on the first image to obtain a second image;

[0144] The extraction module 1320 is used to extract contour data from the second image, determine the line group corresponding to each contour point in the contour data, and determine the line contour region in the contour data based on the line group.

[0145] The first determining module 1330 is used to determine the arc contour region in the contour data based on the contour data and the straight contour region;

[0146] The second determining module 1340 is used to determine the first adhesive width data corresponding to the straight contour region and the second adhesive width data corresponding to the arc contour region, respectively, to obtain the target adhesive width data of the object to be detected.

[0147] In one embodiment, the first determining module is further configured to:

[0148] Based on the contour data and the straight line contour region, determine the initial arc contour region in the contour data;

[0149] Obtain the arc segmentation template corresponding to the object to be tested, wherein the arc segmentation template is used to divide the arc region in the glued area of ​​the object to be tested into multiple separate arc regions;

[0150] Based on the arc segmentation template, the initial arc contour region is segmented to obtain at least one arc contour region in the contour data.

[0151] In one embodiment, the second determining module is further configured to:

[0152] Based on the arc information corresponding to the arc contour region, determine the centerline arc circle of the arc contour region;

[0153] The second adhesive width data corresponding to the arc contour region is determined based on the intersection point of the straight line with the radius of the point on the centerline arc circle and the arc contour region.

[0154] In one embodiment, the second determining module is further configured to:

[0155] Based on the arc detection algorithm, multiple candidate edge circle contours corresponding to the arc contour region are fitted according to the arc information corresponding to the arc contour region.

[0156] The target edge circle corresponding to the arc contour region is obtained based on the overlap points between the multiple candidate edge circle contours and the arc contour region.

[0157] Based on the target edge circle, determine the centerline arc circle corresponding to the arc contour region.

[0158] In one embodiment, the second determining module is further configured to:

[0159] Determine the centerline of the line corresponding to the linear contour region;

[0160] The first adhesive width data corresponding to the straight profile area is determined based on the intersection point of the perpendicular line from the center line of the straight line and the straight profile area.

[0161] In one embodiment, the first determining module is further configured to:

[0162] Based on the contour data and the straight line contour data, determine the candidate radii contour regions in the contour data;

[0163] Based on the curvature information corresponding to the candidate curvature contour region, the candidate curvature contour region whose gradient change corresponding to the curvature information meets the preset conditions is determined as the curvature contour region in the contour region, wherein the preset conditions are determined based on the curvature feature information of the glue application start point and glue application end point.

[0164] In one embodiment, the acquisition module is further configured to:

[0165] Obtain the adhesive mask information and the first image corresponding to the object to be detected, wherein the adhesive mask information is determined based on the target adhesive application range corresponding to the object to be detected;

[0166] The adhesive-coated area in the first image is extracted based on the adhesive-coated mask information, and the adhesive-coated area is binarized to obtain the second image.

[0167] Each module in the aforementioned adhesive coating detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0168] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores data involved in the methods described in this embodiment, such as the first image. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a glue application detection method.

[0169] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0170] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0171] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0172] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0174] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0175] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0176] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for detecting adhesive coating, characterized in that, The method includes: A first image of the object to be detected is acquired, and the first image is binarized to obtain a second image; Extract contour data from the second image, determine the line group corresponding to each contour point in the contour data, and determine the line contour region in the contour data based on the line group; Based on the contour data and the straight line contour region, determine the arc contour region in the contour data; The first adhesive width data corresponding to the straight contour region and the second adhesive width data corresponding to the curved contour region are determined respectively to obtain the target adhesive width data of the object to be detected.

2. The method according to claim 1, characterized in that, Based on the contour data and the straight line contour region, determining the arc contour region in the contour data includes: Based on the contour data and the straight line contour region, determine the initial arc contour region in the contour data; Obtain the arc segmentation template corresponding to the object to be tested, wherein the arc segmentation template is used to divide the arc region in the glued area of ​​the object to be tested into multiple separate arc regions; Based on the arc segmentation template, the initial arc contour region is segmented to obtain at least one arc contour region in the contour data.

3. The method according to claim 2, characterized in that, Determining the second adhesive width data corresponding to the arc contour region includes: Based on the arc information corresponding to the arc contour region, determine the centerline arc circle of the arc contour region; The second adhesive width data corresponding to the arc contour region is determined based on the intersection point of the straight line with the radius of the point on the centerline arc circle and the arc contour region.

4. The method according to claim 3, characterized in that, The step of determining the centerline arc circle of the arc contour region based on the arc information corresponding to the arc contour region includes: Based on the arc detection algorithm, multiple candidate edge circle contours corresponding to the arc contour region are fitted according to the arc information corresponding to the arc contour region. The target edge circle corresponding to the arc contour region is obtained based on the overlap points between the multiple candidate edge circle contours and the arc contour region. Based on the target edge circle, determine the centerline arc circle corresponding to the arc contour region.

5. The method according to claim 1, characterized in that, Determining the first adhesive width data corresponding to the straight contour region includes: Determine the centerline of the line corresponding to the linear contour region; The first adhesive width data corresponding to the straight profile area is determined based on the intersection point of the perpendicular line from the center line of the straight line and the straight profile area.

6. The method according to claim 1, characterized in that, The step of determining the arc contour region in the contour data based on the contour data and the straight contour region includes: Based on the contour data and the straight line contour data, determine the candidate radii contour regions in the contour data; Based on the curvature information corresponding to the candidate curvature contour region, the candidate curvature contour region whose gradient change corresponding to the curvature information meets the preset conditions is determined as the curvature contour region in the contour region, wherein the preset conditions are determined based on the curvature feature information of the glue application start point and glue application end point.

7. The method according to claim 1, characterized in that, The step of acquiring a first image of the object to be detected and binarizing the first image to obtain a second image includes: Obtain the adhesive mask information and the first image corresponding to the object to be detected, wherein the adhesive mask information is determined based on the target adhesive application range corresponding to the object to be detected; The adhesive-coated area in the first image is extracted based on the adhesive-coated mask information, and the adhesive-coated area is binarized to obtain the second image.

8. A glue coating detection device, characterized in that, The device includes: The acquisition module is used to acquire a first image of the object to be detected and to perform binarization processing on the first image to obtain a second image; An extraction module is used to extract contour data from the second image, determine the line group corresponding to each contour point in the contour data, and determine the line contour region in the contour data based on the line group. The first determining module is used to determine the arc contour region in the contour data based on the contour data and the straight contour region; The second determining module is used to determine the first adhesive width data corresponding to the straight contour region and the second adhesive width data corresponding to the arc contour region, respectively, to obtain the target adhesive width data of the object to be detected.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.