A method for detecting the edge points of glue application

Through dynamic recursive segmentation and stretching of the rectangular area, the problem of low glue detection efficiency and poor accuracy in the prior art is solved, and efficient and accurate edge detection of glue strips without teaching is achieved.

CN115187560BActive Publication Date: 2025-07-25EASY THINKING HANGZHOU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210861892.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2025-07-25
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

The existing glue-coating edge detection method requires a pre-teaching process, which is time-consuming and susceptible to background information, resulting in low detection efficiency and poor accuracy.

Method used

The dynamic recursive glue coating edge point detection method is used to gradually approach the glue strip area by segmenting and stretching the rectangular area, and filtering edge points with adaptive multi-threshold and grayscale information is used to achieve efficient and accurate positioning without pre-teaching.

Benefits of technology

It realizes efficient and accurate positioning of the edge of the rubber strip, reduces manual intervention, improves the real-time and accuracy of detection, and overcomes the interference of background information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115187560B_ABST
    Figure CN115187560B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting the edge points of glue application, including: segmenting the glue strip image to obtain the minimum circumscribed rectangle of the largest connected domain; equally dividing the minimum circumscribed rectangle into two sub-rectangular regions; traversing each pixel point in the sub-rectangular regions, and recording the connected domain where the pixel points with gray values satisfying the threshold condition are located as the suspected glue strip region; obtaining the minimum circumscribed rectangle of the suspected glue strip region; respectively judging whether the extension sides corresponding to each newly obtained minimum circumscribed rectangle are less than a preset value. If not, the minimum circumscribed rectangle is segmented again. If so, the minimum circumscribed rectangle is stretched along the direction perpendicular to the extension side, and multiple dividing lines perpendicular to the extension side are made in the stretched minimum circumscribed rectangle to equally divide it into multiple small rectangular selection frames; edge points are respectively searched in each small rectangular selection frame; this method can directly detect the glue strip, without the need for a pre-teaching process, without manual intervention throughout the process, and has good real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of glue application detection, and particularly to a method for detecting the edge points of glue application. Background Art

[0002] The glue application process has the advantages of improving the product sealing performance, enhancing the product hardness, beautifying the product appearance, and heat insulation and shock absorption. Therefore, in modern industrial production, the glue application process plays a very important role. The quality of glue application will directly affect the stability and reliability of the product, and further affect the user experience, and even affect the user's life safety, such as the glue application quality in the automotive manufacturing industry. In order to evaluate the quality of the glue strip, it is necessary to perform edge detection on the glued strip to ensure that the position, width, and continuity of the glue strip meet the process requirements. The existing glue application edge detection methods require pre-teaching the glue strip trajectory, that is: when the robot applies glue to the first workpiece, it is necessary to manually intervene, view each glue strip image, find the glue strip position in each image, delimit the region of interest, set the selection box, and then perform edge detection on the glue strip in the selection box. The following problems exist in this solution:

[0003] Problem 1: The teaching process takes a long time, which is not conducive to the efficient operation of the glue application production line. When the workpiece to be glued is large, the number of images to be collected will also increase. At this time, the teaching time will increase exponentially.

[0004] Problem 2: The existing glue strip edge detection methods are easily interfered by background information and the threshold segmentation is inaccurate, which easily causes false detection and missed detection of edge points. Summary of the Invention

[0005] In order to solve the above technical problems, the present invention provides a method for detecting the edge points of glue application, aiming to solve the problems of low detection efficiency and poor accuracy of glue application quality in industrial production. This method can directly perform glue strip detection, without the need for a pre-teaching process, without manual intervention throughout the process, and has good real-time performance.

[0006] The technical solution is as follows:

[0007] A method for detecting the edge points of glue application includes the following steps:

[0008] S1. Segment the collected glue application glue strip image to obtain the largest connected domain in the image and the minimum circumscribed rectangle corresponding to the largest connected domain;

[0009] S2. Denote the side along the extension direction of the glue strip in the minimum circumscribed rectangle as the extension side; draw a dividing line perpendicular to the extension side through the geometric center of the minimum circumscribed rectangle to divide the minimum circumscribed rectangle into two sub-rectangle regions evenly;

[0010] The following processing is performed on each sub-rectangle region:

[0011] 1) Traverse each pixel point in the sub-rectangular area, mark the pixel points whose gray values meet the threshold condition as suspected tape points, and mark the connected domain where the suspected tape points are located as the suspected tape area;

[0012] When there are multiple suspected tape areas, calculate the area and length of each suspected tape area, compare them with the reference area value and the reference length value respectively, retain the suspected tape area with the highest similarity degree, and eliminate other suspected tape areas;

[0013] Among them, the reference area value is the product of the diagonal length of the sub-rectangular area and the theoretical tape width;

[0014] The reference length value is the diagonal length of the sub-rectangular area;

[0015] 2) Obtain the minimum bounding rectangle of the suspected tape area;

[0016] S3. Respectively judge whether the extension side corresponding to each newly obtained minimum bounding rectangle is less than the preset value. If so, the currently judged minimum bounding rectangle directly proceeds to step S4; if not, the currently judged minimum bounding rectangle proceeds to step S2 again;

[0017] The preset value is greater than the theoretical tape width and less than 4 times the theoretical tape width;

[0018] S4. Perform the following processing on each newly obtained minimum bounding rectangle respectively:

[0019] Stretch the minimum bounding rectangle along the direction perpendicular to the extension side so that its length value in the direction perpendicular to the extension side is greater than or equal to 2 times the theoretical tape width, and the middle area of the stretched minimum bounding rectangle covers the suspected tape area;

[0020] In the stretched minimum bounding rectangle, make multiple dividing lines perpendicular to the extension side and divide it into multiple small rectangular selection frames;

[0021] Search for edge points in each small rectangular selection frame.

[0022] Furthermore, in step S4, the method of searching for edge points in a single small rectangular selection frame includes the following two types:

[0023] Method 1:

[0024] Take the direction where the extension side is located as the row direction and the direction where the dividing line is located as the column direction;

[0025] Search for the middle row of the small rectangular selection frame and use it as the dividing line to divide the small rectangular selection frame into an upper half area and a lower half area;

[0026] Perform the following processing in the upper half area and the lower half area respectively:

[0027] Take the average gray value of each row of pixel points in the small rectangular selection box as the gray value corresponding to the whole row; then calculate the gray feature value G' corresponding to each row i , i represents the i-th row, i = 0, 1... M, M represents the total number of rows in the upper / lower half area, and G x represents the gray value of the x-th row;

[0028] Find the row corresponding to the maximum gray deviation value and mark it as the row where the edge of the tape is located;

[0029] Record the pixel coordinates of the midpoint of the row where the edge of the tape is located as the edge point.

[0030] Method 2:

[0031] Take the average gray value of each row of pixel points in the small rectangular selection box as the gray value corresponding to the whole row;

[0032] Calculate the gray deviation value corresponding to each row, where the gray deviation value is the difference between the gray value of the current row and the gray value of the previous row;

[0033] Mark the pixel points with gray deviation values greater than the preset threshold as edge points.

[0034] Furthermore, in step 1), the setting method of the threshold condition includes the following two methods:

[0035] Method 1: Sort all pixel points in the sub-rectangular area according to the gray value, and take the gray value of the l-th pixel point as the threshold; where l = the reference area value;

[0036] Method 2: Sort all pixel points in the sub-rectangular area according to the gray value to obtain the gray sequence g i , g i ∈{g1, g2... g m}; then the threshold g is:

[0037]

[0038] where l represents the reference area value and m represents the total number of pixel points in the sub-rectangular area.

[0039] Preferably, in step 1), when there are multiple suspected tape areas, use the following method to calculate the similarity q between a single suspected tape area and the reference area value and the reference length value:

[0040]

[0041] Among them, α represents a proportionality coefficient, α ∈ [0, 1]; areaE represents the difference between the reference area value and the area value of a single suspected glue strip area, l represents the reference area value, lenE represents the difference between the reference length value and the length value of a single suspected glue strip area, and d represents the reference length value.

[0042] Further, in step 1), the area of the suspected glue strip area is: the total number of suspected glue strip points;

[0043] The length of the suspected glue strip area is: the maximum distance value between two points among the suspected glue strip points; or, the length value of the suspected glue strip area is equal to the length of the glue strip arc-shaped line, and its calculation method is: C / 2 - k, where C represents the perimeter of the suspected glue strip area and k represents the glue strip width value in the suspected glue strip area.

[0044] Preferably, in step S3, the preset value = 1.5 to 3 times the theoretical glue strip width.

[0045] Preferably, in step S1, the segmentation of the collected glue strip image includes: image denoising, binary processing, and morphological opening operation.

[0046] Compared with the prior art, this method has the following characteristics:

[0047] 1) Adopting the idea of dynamic recursion to divide the whole glue, first locate the minimum bounding rectangle where the glue strip is located, then divide the minimum bounding rectangle into two, and loop to find the suspected glue strip area, gradually approaching the real glue strip area; then divide multiple small rectangle selection frames from the bounding rectangle approaching the glue strip area, and perform edge detection on the glue strip within the selection frames, realizing the efficient and accurate positioning of the glue strip area, and thus ensuring the effective detection of the glue strip edge;

[0048] 2) When delimiting the suspected glue strip area, through the adaptive multi-threshold setting method, the effective elimination of background information is ensured; then the non-glue strip areas are eliminated by using the glue strip area and length information, achieving the effect of denoising; the correct edge point information is further screened through the gray information, with high accuracy.

[0049] 3) When processing the local glue strip within the small rectangle, the small rectangle is divided into upper and lower half areas, which can more accurately locate the upper and lower edge points of the glue strip, realizing the efficient positioning of the edge. Description of the Drawings

[0050] Figure 1 It is a schematic diagram of the minimum bounding rectangle corresponding to the largest connected domain in the image in the specific implementation manner;

[0051] Figure 2 It is a schematic diagram of the minimum bounding rectangle of the suspected glue strip area in the specific implementation manner;

[0052] Figure 3Schematic diagram of multiple newly obtained minimum bounding rectangles in the specific implementation manner;

[0053] Figure 4 Schematic diagram of dividing small rectangle selection boxes in the minimum bounding rectangle after stretching in the specific implementation manner. Specific implementation manner

[0054] The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0055] A glue application edge point detection method includes the following steps:

[0056] S1. Segment the collected glue application strip image;

[0057] As a preferred implementation manner, in this embodiment, the segmentation of the collected glue application strip image includes: image denoising, binarization processing, and morphological opening operation.

[0058] As Figure 1 shown, obtain the largest connected region in the image and the minimum bounding rectangle corresponding to the largest connected region;

[0059] S2. Denote the side along the extension direction of the glue strip 2 in the minimum bounding rectangle 1 as the extension side; wherein, the glue strip extension direction is the extension direction of the glue application strip;

[0060] Draw a dividing line perpendicular to the extension side through the geometric center of the minimum bounding rectangle 1 to divide the minimum bounding rectangle into two sub-rectangle regions;

[0061] Perform the following processing on each sub-rectangle region:

[0062] 1) Traverse each pixel point in the sub-rectangle region, mark the pixel points whose gray value meets the threshold condition as suspected glue strip points, and mark the connected region where the suspected glue strip points are located as the suspected glue strip region;

[0063] Specifically, in order to obtain more comprehensive suspected glue strip points, the setting method of the threshold condition can select one of the following two methods:

[0064] Method 1: Sort all pixel points in the sub-rectangle region according to the size of the gray value (select sorting from small to large or from large to small according to the actual situation), and use the gray value of the l-th pixel point in the sequence as the threshold; wherein, l = reference area value (product of the diagonal length of the sub-rectangle region and the theoretical glue strip width);

[0065] For example: if the total number of pixel points in the sub-rectangle region is 1024 and l = 300, then take the gray value of the 300th pixel point in the sequence as the threshold.

[0066] Method 2: Sort all the pixel points in the sub-rectangular area according to the gray value to obtain the gray sequence g i , g i ∈{g1, g2... g m}; Then the threshold g is:

[0067]

[0068] where l represents the reference area value and m represents the total number of pixel points in the sub-rectangular area.

[0069] When there are multiple suspected tape areas, in order to remove the noise areas in the sub-rectangular area, the following processing is carried out:

[0070] Statistically calculate the area and length of each suspected tape area, and compare them with the reference area value and the reference length value respectively. Retain the suspected tape area with the highest similarity degree, and eliminate other suspected tape areas;

[0071] where the reference area value is the product of the diagonal length of the sub-rectangular area and the theoretical tape width; the reference length value is the diagonal length of the sub-rectangular area;

[0072] The area of the suspected tape area is: the total number of suspected tape points;

[0073] The length of the suspected tape area is: the maximum distance value between two points among the suspected tape points; or, the length value of the suspected tape area is equal to the length of the tape arc-shaped line, and its calculation method is: C / 2 - k, where C represents the perimeter of the suspected tape area and k represents the tape width value in the suspected tape area.

[0074] Among them, the k value can be obtained by any one of the following two methods:

[0075] Method 1: k = the pixel length value in the direction of the unilateral tape width in the suspected tape area;

[0076] Method 2: k = the theoretical tape width.

[0077] Specifically, in this embodiment, the following method is used to calculate the similarity degree q between a single suspected tape area and the reference area value and the reference length value:

[0078]

[0079] Among them, α represents a proportionality coefficient, α ∈ [0, 1]; areaE represents the difference between the reference area value and the area value of a single suspected glue strip area, l represents the reference area value, lenE represents the difference between the reference length value and the length value of a single suspected glue strip area, and d represents the reference length value. In this embodiment, α = 0.5. In actual applications, it can also be set to 0.3, 0.6, 0.8, etc. according to actual situations and empirical values.

[0080] 2) As Figure 2 shown, obtain the minimum bounding rectangle 1 of the suspected glue strip area;

[0081] S3. Respectively determine whether the extended side corresponding to each newly obtained minimum bounding rectangle is less than a preset value. If so, the currently judged minimum bounding rectangle directly proceeds to step S4; if not, the currently judged minimum bounding rectangle proceeds to step S2 again;

[0082] If so, directly proceed to step S4;

[0083] Among them, the preset value is greater than the theoretical glue strip width and less than 4 times the theoretical glue strip width;

[0084] To obtain a more appropriate number of minimum bounding rectangles, it is more preferably set as: the preset value = 1.5 - 3 times the theoretical glue strip width.

[0085] S4. In this embodiment, through the processing of steps S2 and S3, multiple minimum bounding rectangles that fit the glue strip 2 better are obtained; as Figure 3 shown, four minimum bounding rectangles 1 (after two processes of steps S2 and S3) are shown;

[0086] Perform the following processing on each newly obtained minimum bounding rectangle 1 respectively:

[0087] Stretch the minimum bounding rectangle along the direction perpendicular to the extended side so that its length value in the direction perpendicular to the extended side is greater than or equal to 2 times the theoretical glue strip width, and the middle area of the stretched minimum bounding rectangle covers the suspected glue strip area;

[0088] In the stretched minimum bounding rectangle, make multiple dividing lines perpendicular to the extended side to equally divide it into multiple small rectangular selection frames (for the convenience of observation, Figure 4 3 small rectangular selection frames are shown, and the rest are omitted); among them, the narrow side width of a single small rectangular selection frame is 3 - 20 pixels. In this embodiment, the width value is 10 pixels;

[0089] Search for edge points in each small rectangular selection frame respectively.

[0090] Specifically, in order to quickly obtain edge point information, the methods of searching for edge points in a single small rectangular selection frame include the following two:

[0091] Method 1:

[0092] Take the direction of the extended side as the row direction and the direction of the dividing line as the column direction;

[0093] As shown in Figure 4 Find the middle row of the small rectangular selection box and use it as the dividing line to divide the small rectangular selection box into the upper half area and the lower half area;

[0094] Perform the following processing in the upper half area and the lower half area respectively:

[0095] As shown in Figure 4 take the average gray value of each row of pixel points in the small rectangular selection box as the gray value G corresponding to the whole row i , G i ∈{G1, G2,... G 3w}; 3w is the total number of rows in the small rectangular selection box;

[0096] Then calculate the gray feature value G' corresponding to each row i , i represents the i-th row, i = 0, 1... M, M represents the total number of rows in the upper half area / lower half area (in this embodiment, M = 3w / 2), G x represents the gray value of the x-th row;

[0097] Find the row corresponding to the maximum gray deviation value and mark it as the row where the edge of the tape is located;

[0098] Record the pixel coordinates of the midpoint of the row where the edge of the tape is located as the edge point.

[0099] Method 2:

[0100] Take the average gray value of each row of pixel points in the small rectangular selection box as the gray value corresponding to the whole row;

[0101] Calculate the gray deviation value corresponding to each row, and the gray deviation value is the difference between the gray value of the current row and the gray value of the previous row;

[0102] Mark the pixel points with gray deviation values greater than the preset threshold as edge points. The preset threshold is set according to empirical values.

[0103] Using the distance between the upper and lower edge points, the tape width can be further calculated to evaluate whether the tape width meets the requirements. This method can directly perform tape edge detection without a pre-teaching process, with good real-time performance and high detection efficiency.

[0104] The foregoing description of the specific exemplary embodiments of the present invention has been presented for purposes of illustration and description. The foregoing description is not intended to be exhaustive or to limit the invention to the precise forms disclosed, and obviously many modifications and variations are possible in light of the above teachings. The exemplary embodiments were chosen and described in order to explain specific principles of the invention and its practical application so as to enable others skilled in the art to implement and utilize the invention in various exemplary embodiments and with various alternatives and modifications. The scope of the invention is intended to be defined by the appended claims and their equivalents.

Claims

1. A method for detecting the edge points of glue application, characterized in that, It includes the following steps: S1. Segment the collected glue strip image to obtain the largest connected region in the image and the minimum bounding rectangle corresponding to the largest connected region; S2. Denote the side along the extension direction of the glue strip in the minimum bounding rectangle as the extension side; draw a dividing line perpendicular to the extension side through the geometric center of the minimum bounding rectangle to evenly divide the minimum bounding rectangle into two sub-rectangle regions; The following processing is performed on each sub-rectangle region: 1) Traverse each pixel point in the sub-rectangle region, mark the pixel points whose gray values meet the threshold condition as suspected glue strip points, and mark the connected region where the suspected glue strip points are located as the suspected glue strip region; When there are multiple suspected glue strip regions, calculate the area and length of each suspected glue strip region, compare them with the reference area value and the reference length value respectively, retain the suspected glue strip region with the highest similarity degree, and eliminate other suspected glue strip regions; Wherein, the reference area value is the product of the diagonal length of the sub-rectangle region and the theoretical glue strip width; The reference length value is the diagonal length of the sub-rectangle region; 2) Obtain the minimum bounding rectangle of the suspected glue strip region; S3. Respectively judge whether the extension side corresponding to each newly obtained minimum bounding rectangle is less than a preset value. If so, the currently judged minimum bounding rectangle directly proceeds to step S4; if not, the currently judged minimum bounding rectangle proceeds to step S2 again; The preset value is greater than the theoretical glue strip width and less than 4 times the theoretical glue strip width; S4. The following processing is performed on each newly obtained minimum bounding rectangle respectively: Stretch the minimum bounding rectangle along the direction perpendicular to the extension side so that its length value in the direction perpendicular to the extension side is greater than or equal to 2 times the theoretical glue strip width, and the middle region of the stretched minimum bounding rectangle covers the suspected glue strip region; Draw multiple dividing lines perpendicular to the extension side in the stretched minimum bounding rectangle to equally divide it into multiple small rectangle selection frames; Search for edge points in each small rectangle selection frame.

2. The glue - applying edge point detection method according to claim 1, wherein: In step S4, the method of searching for edge points in a single small rectangle selection frame is as follows: Take the direction where the extension side is located as the row direction and the direction where the dividing line is located as the column direction; Search for the middle row of the small rectangle selection frame, and use it as the dividing line to divide the small rectangle selection frame into an upper half area and a lower half area; The following processing is performed in the upper half area and the lower half area respectively: Take the average gray value of each row of pixel points in the small rectangular selection box as the gray value corresponding to the whole row; then calculate the gray feature value G' corresponding to each row i , i represents the i-th row, i = 0, 1... M, M represents the total number of rows in the upper / lower half area, and G x represents the gray value of the x-th row; Search for the row corresponding to the maximum gray deviation value and mark it as the row where the glue strip edge is located; Record the pixel coordinates of the middle point of the row where the glue strip edge is located as the edge point.

3. The glue application edge point detection method according to claim 1, characterized in that: In step S4, the method of searching for edge points in a single small rectangle selection frame is as follows: Take the average gray value of each row of pixel points in the small rectangle selection frame as the gray value corresponding to the whole row; Calculate the gray deviation value corresponding to each row, and the gray deviation value is the difference between the gray value of the current row and the gray value of the previous row; Mark the pixel points with the gray deviation value greater than the preset threshold as edge points.

4. The glue application edge point detection method according to claim 1, characterized in that: In step 1), the setting method of the threshold condition includes the following two types: Method 1: Sort all pixel points in the sub-rectangle region according to the size of the gray value, and take the gray value of the l-th pixel point as the threshold; wherein, l = reference area value; Method 2: Sort all the pixel points in the sub-rectangular area according to the magnitude of the gray value to obtain a gray sequence g i , g i ∈ {g1, g2... g m}; then the threshold g is: Wherein, l represents the reference area value, and m represents the total number of pixel points in the sub-rectangle region.

5. The glue application edge point detection method according to claim 1, wherein: In step 1), when there are multiple suspected strip regions, the following method is used to calculate the similarity degree q between a single suspected strip region and the reference area value and the reference length value: Among them, α represents the proportionality coefficient, α ∈ [0, 1]; areaE represents the difference between the reference area value and the area value of a single suspected strip region, l represents the reference area value, lenE represents the difference between the reference length value and the length value of a single suspected strip region, and d represents the reference length value.

6. The glue application edge point detection method according to claim 1, characterized in that: In step 1), the area of the suspected strip region is: the total number of suspected strip points; The length of the suspected strip region is: the maximum distance value between two points among the suspected strip points; Alternatively, the length value of the suspected strip region is equal to the length of the strip arc-shaped line, and its calculation method is: C / 2 - k, where C represents the perimeter of the suspected strip region and k represents the strip width value in the suspected strip region.

7. The glue application edge point detection method according to claim 1, characterized in that: In step S3, the preset value = 1.5 to 3 times the theoretical strip width.

8. The glue application edge point detection method according to claim 1, characterized in that: In step S1, the segmentation of the collected glue strip image includes: image denoising, binary processing, and morphological opening operation.

Citation Information

Patent Citations

  • Method for detecting edge of adhesive tape

    CN111862131A

  • Edge detection method for reflective adhesive tape

    CN112085754A