A method, apparatus and electronic equipment for testing adhesive circuits
By using glue path controls, including center lines and detection line groups, in glue path inspection, drawing and mapping onto the image to be tested, and analyzing glue path defects, the problem of defect detection in glue path is solved, improving the accuracy of inspection and quality control in the production process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN LINGYUN VISION TECH CO LTD
- Filing Date
- 2023-08-21
- Publication Date
- 2026-05-26
AI Technical Summary
During the industrial production process of a product, there may be too much or too little glue in the adhesive path, or even broken areas, which can affect product quality and require an effective detection method.
By defining the glue path controls, including the center line and at least three detection line groups, drawing and mapping them onto the template glue path image, and analyzing the glue path defects, including no glue, insufficient glue, excessive glue, and glue breakage, based on the positional relationship between the glue path controls and the glue path to be detected.
It enables accurate detection of defects in the adhesive path, improving the accuracy of product quality control and real-time detection capabilities during the production process.
Smart Images

Figure CN117074432B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of adhesive circuit testing technology, and particularly relates to an adhesive circuit testing method, apparatus and electronic equipment. Background Technology
[0002] In the industrial production process of products, dispensing technology is frequently used. Through dispensing technology, liquids such as glue can be applied, potted, or dripped onto the product to enable it to perform functions such as adhesion, insulation, or fixation.
[0003] After adhesive is applied to a product, the path formed by the adhesive on the product can be called the adhesive path. Due to limitations in manufacturing processes, there may be defects in the adhesive path, such as too much or too little adhesive, or even broken areas within the adhesive path.
[0004] Since defects in the adhesive lines can affect product quality, there is an urgent need for a solution that can detect adhesive lines. Summary of the Invention
[0005] This application provides a method, apparatus, and electronic device for testing adhesive lines to meet the needs of testing adhesive lines.
[0006] In a first aspect, this application provides a method for detecting adhesive lines, including:
[0007] A glue path control for glue path detection is determined, wherein the glue path control includes: a center line and at least three detection line groups, each detection line group including two detection lines, the center line being located between the two detection lines in each detection line group, the at least three detection line groups including: a first detection line group, a second detection line group, and a third detection line group, wherein the interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines;
[0008] The adhesive path control is drawn on a template image including the template adhesive path, wherein the center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second detection line and the third detection line, and the third detection line is located outside the template adhesive path;
[0009] The adhesive path control in the template image is mapped to the image to be tested, wherein the image to be tested is an image obtained by taking a picture of a product containing the adhesive path to be tested;
[0010] Based on the positional relationship between the adhesive path to be tested and the adhesive path control, it is determined whether there is an adhesive path defect in the adhesive path to be tested.
[0011] In one feasible design, the center line of the adhesive path control has different parameters corresponding to different detection line groups;
[0012] The parameters include at least one of the following: color, thickness, and line type.
[0013] In one feasible design, drawing the adhesive path control on a template image including the template adhesive path includes:
[0014] Draw the initial glue path control in the area where the template glue path is located;
[0015] Based on the edge of the template adhesive path and the center line of the initial adhesive path control, the initial adhesive path control is corrected so that the center line of the corrected initial adhesive path control is located in the middle of the template adhesive path to obtain the adhesive path control.
[0016] In one feasible design, correcting the initial adhesive path control includes:
[0017] Determine the initial coordinates and direction vectors of each pixel in the centerline of the initial adhesive path control;
[0018] Starting from the pixel, search along two directions perpendicular to the template adhesive path to obtain the two edge points on the template adhesive path corresponding to the pixel;
[0019] The correction amount of the pixel is calculated based on the distance between the pixel and the two edge points.
[0020] The corrected coordinates of the pixel are calculated based on the correction amount of the pixel, the initial coordinates, and the direction vector.
[0021] The pixel is adjusted to the position indicated by the corrected coordinates.
[0022] In one feasible design, determining whether there is a glue path defect in the glue path to be tested based on the positional relationship between the glue path to be tested and the glue path control includes:
[0023] By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines.
[0024] If the adhesive path to be tested is not present within the closed area, it is determined that the adhesive path to be tested has an adhesive path defect of no adhesive.
[0025] In one feasible design, determining whether there is a glue path defect in the glue path to be tested based on the positional relationship between the glue path to be tested and the glue path control includes:
[0026] By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines.
[0027] If the adhesive path to be detected exists within the closed area, determine the positional relationship between the distribution area of the adhesive path to be detected and each detection line in the adhesive path control.
[0028] If the entire distribution area is located between the two first detection lines, it is determined that the adhesive path to be tested has an adhesive path defect with insufficient adhesive.
[0029] If the distribution area includes the area between the second detection line and the third detection line, it is determined that the adhesive path to be tested has a multi-adhesive path defect.
[0030] In one feasible design, determining whether there is a glue path defect in the glue path to be tested based on the positional relationship between the glue path to be tested and the glue path control includes:
[0031] By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines.
[0032] If the adhesive path to be tested exists within the closed area, determine whether there is a break in the distribution area of the adhesive path to be tested through which any one of the center line, the first detection line, and the second detection line passes;
[0033] If the fracture point is present, it is determined that the adhesive path to be tested has an adhesive path defect with a break in the adhesive.
[0034] In one feasible design, after mapping the adhesive path control in the template image to the image to be tested, the method further includes:
[0035] Starting from the endpoint of the center line of the adhesive path control, a search is performed in two directions perpendicular to the adhesive path to be detected;
[0036] If the adhesive path to be tested is not found, a new starting point is selected, and the search is performed again in two directions perpendicular to the adhesive path to be tested until the adhesive path to be tested is found. The new starting point is located on the center line and the interval between it and the previously selected starting point is within a preset range.
[0037] If the adhesive path to be detected is found, the search stops, and the length of the adhesive path control is reduced to the length corresponding to the location where the adhesive path to be detected is found.
[0038] Secondly, this application provides a glue path testing device, comprising:
[0039] A control determination module is used to determine a glue path control for glue path detection, wherein the glue path control includes: a center line and at least three detection line groups, each detection line group includes two detection lines, the center line is located between the two detection lines in each detection line group, and the at least three detection line groups include: a first detection line group, a second detection line group, and a third detection line group, wherein the interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines.
[0040] A control drawing module is used to draw the adhesive path control on a template image including the template adhesive path, wherein the center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second detection line and the third detection line, and the third detection line is located outside the template adhesive path;
[0041] The control mapping module is used to map the adhesive path control in the template image to the image to be tested, wherein the image to be tested is an image obtained by taking a picture of a product containing the adhesive path to be tested;
[0042] The adhesive path detection module is used to determine whether there is an adhesive path defect in the adhesive path to be detected based on the positional relationship between the adhesive path to be detected and the adhesive path control.
[0043] Thirdly, this application provides an electronic device, the electronic device comprising:
[0044] A memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0045] This application provides a method, apparatus, and electronic device for adhesive path detection. The method first determines an adhesive path control for detection, which includes a center line and at least three detection line groups. Each detection line group includes two detection lines parallel to the center line and spaced equidistantly from it. The at least three detection line groups include a first detection line group, a second detection line group, and a third detection line group. The interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines. Then, the adhesive path control is drawn on a template image including the template adhesive path. The center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second and third detection lines, and the third detection line is located outside the template adhesive path. Next, the adhesive path control in the template image is mapped onto the image to be tested. Based on the positional relationship between the adhesive path to be tested and the adhesive path control, it is determined whether there is an adhesive path defect in the adhesive path to be tested. Therefore, the method provided by this application can achieve adhesive path detection and meet the requirements for adhesive path detection. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A schematic diagram illustrating the workflow of an adhesive path detection method provided in this application embodiment;
[0048] Figure 2(a) is a schematic diagram of an adhesive circuit control provided in an embodiment of this application;
[0049] Figure 2(b) is a schematic diagram of another adhesive circuit control provided in an embodiment of this application;
[0050] Figure 3 A schematic diagram illustrating the workflow of another adhesive path detection method provided in this application embodiment;
[0051] Figure 4 A schematic diagram illustrating the workflow of another adhesive path detection method provided in this application embodiment;
[0052] Figure 5 This is a schematic diagram of a template adhesive path provided in an embodiment of this application;
[0053] Figure 6(a) is an example diagram of a glue path control before correction provided in an embodiment of this application;
[0054] Figure 6(b) is a schematic diagram of a corrected adhesive path control provided in an embodiment of this application;
[0055] Figure 7(a) is an example diagram of another type of adhesive path control before correction provided in the embodiments of this application;
[0056] Figure 7(b) is a schematic diagram of another type of corrected adhesive path control provided in the embodiments of this application;
[0057] Figure 8 A schematic diagram illustrating the workflow of another adhesive path detection method provided in this application embodiment;
[0058] Figure 9(a) is a scenario example diagram of an adhesive path detection method provided in an embodiment of this application;
[0059] Figure 9(b) is a scenario example of another adhesive path detection method provided in the embodiments of this application;
[0060] Figure 10 A schematic diagram illustrating the workflow of another adhesive path detection method provided in this application embodiment;
[0061] Figure 11(a) is a scenario example of another adhesive path detection method provided in the embodiments of this application;
[0062] Figure 11(b) is a scenario example of another adhesive path detection method provided in the embodiments of this application;
[0063] Figure 12 A schematic diagram illustrating the workflow of another adhesive path detection method provided in this application embodiment;
[0064] Figure 13 A scenario example diagram illustrating another adhesive path detection method provided in this application embodiment;
[0065] Figure 14 A schematic diagram illustrating the workflow of another adhesive path detection method provided in this application embodiment;
[0066] Figure 15(a) is a schematic diagram of a glue path control before length adaptive adjustment provided in an embodiment of this application;
[0067] Figure 15(b) is a schematic diagram of another adhesive path control before length adaptive adjustment provided in the embodiments of this application;
[0068] Figure 15(c) is a schematic diagram of a glue path control with adaptive length adjustment provided in an embodiment of this application;
[0069] Figure 16 This is a schematic diagram of the structure of a glue path detection device provided in an embodiment of this application. Detailed Implementation
[0070] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0071] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.
[0072] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0073] After adhesive is applied to a product, it forms adhesive paths on the product, enabling it to perform functions such as bonding, insulation, or fixation. However, due to limitations in manufacturing processes, defects may exist within these adhesive paths. For example, there may be too little adhesive, or adhesive may be broken in parts of the path, resulting in poor effectiveness of that path; or there may be too much adhesive, causing it to occupy a large area on the product, reducing its aesthetic appeal, and potentially even affecting other components, such as causing them to stick together. In other words, defects in the adhesive paths can affect product quality. Therefore, it is necessary to inspect the adhesive paths for defects.
[0074] To meet this need, embodiments of this application provide a method, apparatus, and electronic device for detecting adhesive paths, thereby enabling the detection of adhesive paths.
[0075] See Figure 1 The flowchart shown in this application illustrates the following steps in the adhesive path detection method provided in this embodiment:
[0076] Step S11: Determine the glue path control used for glue path detection.
[0077] In this embodiment, the adhesive path control includes a center line and at least three detection line groups. Each detection line group includes two detection lines, with the center line located between the two detection lines in each group. The at least three detection line groups include a first detection line group, a second detection line group, and a third detection line group. The interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines.
[0078] The shape of the adhesive path control is usually adapted to the shape of the adhesive path to be detected. Referring to an example diagram of an adhesive path control shown in Figure 2(a), if the adhesive path to be detected is a straight line segment, the adhesive path control can also be a straight line segment. In this case, the center line is a straight line segment, and the two detection lines contained in each detection line group are parallel to the center line.
[0079] Additionally, referring to an example diagram of a glue path control shown in Figure 2(b), if the glue path to be detected is a closed shape, the glue path control can also be a closed shape.
[0080] Of course, if the adhesive path to be tested is of other shapes, the adhesive path control can also be designed to fit other shapes to the adhesive path to be tested.
[0081] To distinguish between different detection line groups, the center line in the adhesive path control has different parameters corresponding to different detection line groups. In one feasible design, these parameters may include at least one of the following: color, thickness, and line type, in order to distinguish the center line from each detection line group. Furthermore, in this design, the parameters of two detection lines within the same detection line group can typically be the same or different; this application does not limit this.
[0082] If the parameter includes color, in one example, the center line of the glue path control can be black, the two first detection lines in the first detection line group are green, the two second detection lines in the second detection line group are blue, and the two third detection lines in the third detection line group are red. In this case, if the center line and the detection lines in each detection line group are referred to as the lines of the glue path control, the lines in the glue path control can be distinguished based on their colors.
[0083] If the parameter includes thickness, then the individual lines in the adhesive control can be distinguished based on the thickness of each line.
[0084] If the parameter includes line type, then each line in the glue path control can be distinguished based on the line type. The line type can include: solid line, dotted line, double line, single line, all dotted line or all solid line, etc.
[0085] Of course, this parameter can also be other parameters that can distinguish different lines, and this application embodiment does not limit this.
[0086] Furthermore, the adhesive path control may also include other variations. For example, in one variation, at least two detection lines within a detection line group can together with corresponding additional lines of each detection line group to form a closed region. In this case, each detection line group includes two additional lines, one of which connects to the endpoints on the same side of the two detection lines within the detection line group at both ends, and the other additional line connects to the endpoints on the other side of the two detection lines within the detection line group at both ends. The closed region can be of various shapes, such as a rounded rectangle, a right rectangle, or other shapes.
[0087] Furthermore, if each detection line group in the adhesive circuit control forms a closed region, the closed region formed by the second detection line group is located outside the closed region formed by the first detection line group, and the closed region formed by the third detection line group is located outside the closed region formed by the second detection line group.
[0088] Step S12: Draw the glue path control on the template image including the template glue path.
[0089] Among them, the center line of the glue path control is located in the middle of the template glue path, the edge of the template glue path is located between the second detection line and the third detection line, and the third detection line is located on the outside of the template glue path.
[0090] In this embodiment, the template adhesive path refers to an adhesive path that does not contain adhesive path defects. Furthermore, the background refers to the area outside the adhesive path in the image. Since the third detection line is located outside the template adhesive path, the area outside the third detection line does not include the template adhesive path. Therefore, during the detection process using the adhesive path detection method provided in this embodiment, only the area within the third detection line needs to be detected.
[0091] Step S13: Map the adhesive path control in the template image to the image to be tested. The image to be tested is an image obtained by taking a picture of the product containing the adhesive path to be tested.
[0092] In a feasible design, the shape of the stencil adhesive path can be similar to or the same as that of the ideal adhesive path to be tested, which refers to the adhesive path to be tested without any defects, so as to map the adhesive path control drawn on the stencil adhesive path to the location of the adhesive path to be tested included in the image to be tested.
[0093] In one possible application scenario of this application, it is desirable to inspect the adhesive path of a product during the production process to determine whether there are defects in the adhesive path. This can be achieved by continuously photographing the products on the production line, acquiring real-time images including the adhesive path to be inspected, and then determining whether adhesive path defects exist in the products at each stage of production by inspecting the adhesive path included in each image. In this scenario, the image to be inspected can be a real-time image of the product.
[0094] Furthermore, after mapping the adhesive path control in the template image onto the image to be tested, if the adhesive path to be tested has no defects, i.e., it is in an ideal state, then the first positional relationship between the adhesive path control and the template adhesive path is the same as the second positional relationship between the adhesive path control and the adhesive path to be tested. Specifically, the first positional relationship between the adhesive path control and the template adhesive path is that the center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second and third detection lines, and the third detection line is located outside the template adhesive path. Since the first positional relationship is the same as the second positional relationship, after the adhesive path control is mapped onto the image to be tested, the center line of the adhesive path control is located in the center of the adhesive path to be tested, the edge of the adhesive path to be tested is located between the second and third detection lines, and the third detection line is located outside the template adhesive path. In this embodiment, whether the adhesive path to be tested conforms to this positional relationship can be used to determine whether there are adhesive path defects, thus achieving adhesive path detection.
[0095] In the embodiments of this application, mapping can be achieved in various ways. In one feasible design, the adhesive path control can be mapped onto the image to be tested using a positioning algorithm (e.g., a geometric positioning algorithm). Of course, positioning can also be achieved in other ways, and this application does not limit this to any particular method.
[0096] Step S14: Determine whether there are any defects in the adhesive path to be tested based on the positional relationship between the adhesive path to be tested and the adhesive path control.
[0097] In this step, based on the positional relationship between the distribution area of the adhesive path to be tested and the area where the adhesive path control is located, it can be determined whether there are adhesive path defects in the adhesive path to be tested, thus realizing the testing of the adhesive path to be tested.
[0098] This application provides a method for adhesive path detection. First, an adhesive path control for detection is determined. This control includes a center line and at least three detection line groups. Each detection line group has two detection lines, with the center line located between the two detection lines. The at least three detection line groups include a first detection line group, a second detection line group, and a third detection line group. The interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines. Then, the adhesive path control is drawn on a template image including the template adhesive path. The center line of the control is located in the middle of the template adhesive path, and the edge of the template adhesive path is located between the second and third detection lines. The third detection line is located outside the template adhesive path. Next, the adhesive path control in the template image is mapped onto the image to be tested. Based on the positional relationship between the adhesive path to be tested and the control, it is determined whether there is an adhesive path defect in the adhesive path to be tested. Therefore, the method provided by this application can achieve adhesive path detection and meet the requirements for adhesive path detection.
[0099] In step S12, an operation is provided to draw adhesive path controls on a template image including the template adhesive path. See also Figure 3 The workflow diagram shown may include the following operations:
[0100] Step S121: Draw the initial glue path control in the area where the template glue path is located.
[0101] Step S122: Based on the edge of the template adhesive path and the center line of the initial adhesive path control, correct the initial adhesive path control so that the center line of the corrected initial adhesive path control is located in the middle of the template adhesive path, so as to obtain the adhesive path control. That is, after correcting the initial adhesive path control, the adhesive path control is obtained.
[0102] In actual glue path inspection, the centerline of the initial glue path control may not be in the middle of the template glue path, which will affect the accuracy of subsequent inspections. For example, the glue path may have curved sections or corners; in such cases, the centerline of the initial glue path control may not be in the middle of the template glue path. Therefore, the solution provided in this application embodiment can be used to correct the initial glue path control, so that the centerline of the corrected glue path control is located in the middle of the template glue path, thereby improving the accuracy of subsequent inspections.
[0103] In a feasible design, see Figure 4 The workflow diagram shown illustrates that correcting the initial adhesive path control may include the following steps:
[0104] Step S1221: Determine the initial coordinates (x0, y0) and direction vectors (Nx, Ny) of each pixel in the center line of the initial adhesive path control.
[0105] Step S1222: Starting from the pixel, search along two directions perpendicular to the template adhesive path to obtain the two edge points on the template adhesive path corresponding to the pixel.
[0106] See Figure 5 The example diagram shows the trajectory of the adhesive path in the middle of the template. The arrows on this path can be seen as the direction of the trajectory of the adhesive path center. The two directions perpendicular to the template adhesive path are the two normal directions perpendicular to the trajectory of the adhesive path center. Figure 5 The diagram shows one normal direction; the other normal direction is the one perpendicular to the line. Figure 5 The direction shown is opposite to the direction of the normal.
[0107] This step allows us to find the two edge points on the template adhesive path corresponding to each pixel on the center line of the initial adhesive path control. The line connecting these two edge points and the pixel is perpendicular to the direction of the template adhesive path.
[0108] Step S1223: Calculate the correction amount of the pixel based on the distance between the pixel and the two edge points.
[0109] This correction amount is the displacement of the pixel used to adjust the initial adhesive path control during correction. In a feasible design, this correction amount can be calculated using the following formula:
[0110] Coorect = (Wr - Wl) * 0.5.
[0111] Where Coorect represents the correction amount of a pixel, and Wr and Wl are the distances between the pixel and the two edge points, respectively.
[0112] Step S1224: Calculate the corrected coordinates (x, y) of the pixel based on the pixel's correction amount, initial coordinates, and direction vector.
[0113] In a feasible design, the corrected coordinates of a pixel can be calculated using the following formula:
[0114] x = x0 + Coorect * Nx;
[0115] y = y0 + Coorect * Ny.
[0116] Step S1225: Adjust the pixel to the position indicated by the corrected coordinates.
[0117] In other words, the pixel with initial coordinates (x0, y0) is adjusted to the position indicated by coordinates (x, y).
[0118] Through the operations of steps S1221 to S1224, the initial glue path control can be corrected so that the center line of the corrected glue path control is located in the middle of the template glue path, thereby improving the accuracy of glue path detection in this application.
[0119] To illustrate the advantages of the embodiments of this application, Figures 6(a) and 6(b), as well as Figures 7(a) and 7(b), are provided.
[0120] Figure 6(a) shows the position of the center line of the glue path control in the template glue path before correction. The two solid lines in the figure are the two edges of the template glue path, and the dashed line is the center line of the glue path control. It can be seen that the center line before correction is not located in the middle of the template glue path.
[0121] In addition, Figure 6(b) is used to indicate the position of the center line of the glue path control after correction in the template glue path. The two solid lines are the two edges of the template glue path, the light-colored dashed line is the center line of the glue path control before correction, and the dark-colored dashed line is the center line of the glue path control after correction.
[0122] Comparing Figure 6(a) and Figure 6(b), it can be seen that by correcting the glue path control, the center line of the glue path control can be located in the middle of the template glue path.
[0123] In another example, Figure 7(a) is used to indicate the position of the center line of the glue path control in the template glue path before correction. The template glue path in this example includes the corner area in the figure. The solid line in the middle of the corner area is the center line of the glue path control, and the other lines with roughly the same trajectory as the center line are the detection lines in each detection line group. It can be seen that the center line before correction is not located in the middle of the template glue path. Figure 7(b) is used to indicate the position of the center line of the glue path control in the template glue path after correction.
[0124] Comparing Figure 7(a) and Figure 7(b), it can be seen that even when the template adhesive path includes corners, the center line of the adhesive path control can still be positioned in the middle of the template adhesive path by correcting the deviation of the adhesive path control.
[0125] In this embodiment, an operation is provided to determine whether there is a defect in the adhesive path to be tested based on the positional relationship between the adhesive path to be tested and the adhesive path control. See also Figure 8 In one feasible design, the operation includes the following steps:
[0126] Step S141: By analyzing the closed area formed by the third detection line group, determine whether there is a glue path to be tested in the closed area. The closed area includes two third detection lines and lines that are connected to the endpoints of the two third detection lines on the same side.
[0127] If the adhesive path control also includes an additional line corresponding to the third detection line group, then the closed area formed by the third detection line group is the closed area formed by the additional line and the detection line in the third detection line group. The closed area can be a rounded rectangle or a right rectangle. Of course, the closed area can also be other shapes, and this application does not limit it.
[0128] Step S142: If there is no adhesive path to be tested within the closed area, it is determined that there is an adhesive path defect without adhesive.
[0129] Furthermore, in this embodiment, the analysis performed within the closed region formed by the third detection line group can be a connected component (i.e., blob) analysis. Of course, other analysis methods can also be used, and this embodiment does not limit this approach.
[0130] For example, if during the analysis process it is determined that the gray levels of all pixels within the closed area are the same, or the difference in gray levels of all pixels is within a preset range, it can be determined that there is no adhesive path to be detected within the closed area. In this case, it can be determined that there is an adhesive path defect without adhesive.
[0131] To clarify the method of adhesive path detection in this embodiment, an example is disclosed. Referring to Figures 9(a) and 9(b), in the example diagram shown in Figure 9(a), the two lines are two third detection lines, and the irregular area between the two third detection lines is adhesive. Therefore, the adhesive path to be detected in this example does not have an adhesive path defect of no adhesive. However, in the example diagram shown in Figure 9(b), there is no adhesive distributed between the two third detection lines. Therefore, the adhesive path to be detected in this example has an adhesive path defect of no adhesive.
[0132] Furthermore, adhesive path defects encompass various types; in some cases, the adhesive path to be tested may contain insufficient or excessive adhesive. For this situation, another feasible design approach is described below. Figure 10 The process of determining whether there are defects in the adhesive path to be inspected based on the positional relationship between the adhesive path and the adhesive path control may include the following steps:
[0133] Step S143: By analyzing the closed area formed by the third detection line group, determine whether there is a glue path to be tested in the closed area. The closed area includes two third detection lines and lines that are connected to the endpoints of the two third detection lines on the same side.
[0134] The implementation process of this step is the same as that of step S141, and they can be referred to each other. It will not be repeated here.
[0135] Step S144: If there is a glue path to be detected within the closed area, determine the positional relationship between the distribution area of the glue path to be detected and each detection line in the glue path control.
[0136] If the adhesive path to be tested exists within the closed area, it indicates that there is adhesive in the adhesive path to be tested. In this case, it can be further determined whether there is an adhesive path defect with insufficient or excessive adhesive.
[0137] Step S145: If the entire distribution area is located between the two first detection lines, it is determined that there is a glue line defect with insufficient glue in the glue line to be tested.
[0138] If the entire distribution area of the adhesive path to be tested is located between the two first detection lines, it indicates that the adhesive path to be tested only has a small amount of adhesive in the middle area, and the adhesive path to be tested has a defect of insufficient adhesive.
[0139] Referring to an example diagram provided in Figure 11(a), the two lines in the diagram are two first detection lines, and the glue path to be detected is an irregular area therein. The glue path to be detected is only distributed between the two first detection lines, so the glue path to be detected has a glue path defect of insufficient glue.
[0140] Step S146: If the distribution area includes the area between the second detection line and the third detection line, it is determined that there is a multi-adhesive defect in the adhesive path to be tested.
[0141] If there are no defects in the adhesive path to be tested, the edge of the adhesive path should be located between the first and second detection lines, and the distribution area of the adhesive path should not extend into the area between the second and third detection lines. Therefore, if the distribution area of the adhesive path to be tested includes the area between the second and third detection lines, it can be determined that the adhesive path to be tested has a multi-adhesive defect.
[0142] Referring to an example diagram provided in Figure 11(b), the two lines in the diagram are two second detection lines, and the adhesive path to be detected is an irregular area therein. In the example corresponding to this diagram, the distribution area of the adhesive path to be detected has extended beyond the second detection lines, that is, the distribution area includes the area between the second detection line and the third detection line. Therefore, the adhesive path to be detected has a defect of multiple adhesives.
[0143] Additionally, the adhesive path to be tested may include defects such as broken adhesive. For this situation, see [link to alternative design]. Figure 12 The process of determining whether there are defects in the adhesive path to be inspected based on the positional relationship between the adhesive path and the adhesive path control may include the following steps:
[0144] Step S147: By analyzing the closed area formed by the third detection line group, determine whether there is a glue path to be detected within the closed area.
[0145] The implementation process of this step is the same as that of step S141, and they can be referred to each other. It will not be repeated here.
[0146] Step S148: If there is a test adhesive path within the closed area, determine whether there is a break in the distribution area of the test adhesive path traversed by any one of the center line, the first test line, and the second test line.
[0147] Step S149: If a break is found, it is determined that there is a defect in the adhesive path to be tested, namely, a broken adhesive path.
[0148] When determining whether a break exists, it can be determined whether there is a target pixel in the distribution area of the adhesive path to be tested, which is traversed by any one of the center line, the first detection line, and the second detection line. A target pixel is a pixel whose gray value is greater than the difference between its gray value and that of its neighboring pixels. If such a target pixel exists, it is the edge of the break. The area formed by all the target pixels is the break in the distribution area of the adhesive path to be tested, and the break is the location of the adhesive break defect in the adhesive path to be tested.
[0149] If the adhesive path to be tested has a defect of broken adhesive, then there is a break in the adhesive path, and the gray value of the break often differs significantly from the gray values of the surrounding pixels. Therefore, in this embodiment, the presence of such a break can be determined by the gray values of each pixel in the adhesive path to be tested, and if it is determined to exist, it can be determined that the adhesive path to be tested has a defect of broken adhesive.
[0150] See Figure 13 The provided example diagram shows two horizontal lines, which are any two of the center line, two first detection lines, and two second detection lines. The dark area represents the break in the adhesive path to be tested. In this case, it can be determined that there is an adhesive path defect with a broken adhesive path.
[0151] The detection schemes provided in the above embodiments can utilize the positional relationship between the adhesive path to be detected and the adhesive path control to detect the adhesive path to be detected, thereby determining whether there are adhesive path defects in the adhesive path to be detected. However, in the actual detection process, the length of the adhesive path to be detected may be inconsistent in different test images. If the length of the adhesive path control corresponding to the adhesive path to be detected is different, there may be a situation where the adhesive path control and the adhesive path to be detected are not compatible. If the adhesive path control and the adhesive path to be detected are not compatible, it will affect the accuracy of the adhesive path detection. For example, if the length of the adhesive path control is greater than the length of the adhesive path to be detected, during the detection process, areas that do not belong to the adhesive path to be detected may also be mistakenly identified as the distribution area of the adhesive path to be detected, and this area may be misdetected as an area where the adhesive path to be detected has a break in the adhesive.
[0152] To address this issue, this application provides another embodiment that adaptively adjusts the length of the adhesive path control. See also... Figure 14The workflow diagram shown includes the following steps after mapping the adhesive path controls in the template image to the image to be tested:
[0153] Step S151: Starting from the endpoint of the center line of the adhesive path control, search in two directions perpendicular to the adhesive path to be detected.
[0154] Among them, the two directions perpendicular to the adhesive path to be tested refer to the two normal directions of the trajectory direction of the adhesive path to be tested.
[0155] Step S152: Determine whether the adhesive path to be detected has been found. If not, proceed to step S153. If yes, proceed to step S154.
[0156] Step S153: If the adhesive path to be tested is not found, select a new starting point and search again in two directions perpendicular to the adhesive path to be tested, and then return to the operation of step S152.
[0157] The new starting point is located on the center line of the adhesive path control, and the interval between it and the previously selected starting point is within a preset range. In other words, if no adhesive path to be detected is found, the pixel on the center line adjacent to the original starting point is used as the new starting point, and the search is performed again with the new starting point.
[0158] This preset range can be set according to the required detection accuracy. Generally, the higher the required detection accuracy, the smaller the preset range, and the closer the selected new starting point is to the previously selected starting point. For example, the new starting point selected each time can be a pixel adjacent to the previously selected starting point.
[0159] If, after step S152, no adhesive path is found in either of the two directions perpendicular to the adhesive path to be detected, it indicates that the length of the adhesive path control is greater than the adhesive path to be detected. Examples of this can be seen in Figures 15(a) and 15(b). In Figures 15(a) and 15(b), the rounded rectangle represents the adhesive path control to be detected. The straight line segment in the middle of the adhesive path control is the center line of the adhesive path control. The two adjacent straight line segments on either side of the center line are the second detection lines, and the top and bottom two straight line segments are the third detection lines.
[0160] In Figure 15(a), if the two endpoints of the center line are used as starting points and the search is performed in both directions perpendicular to the adhesive path to be detected, the adhesive path to be detected cannot be found. In Figure 15(b), if the left endpoint of the center line is used as the starting point and the search is performed in both directions perpendicular to the adhesive path to be detected, the adhesive path to be detected cannot be found. In both examples, the length of the adhesive path control is greater than the length of the adhesive path to be detected.
[0161] Step S154: If the adhesive path to be detected is found, stop the search and reduce the length of the adhesive path control to the length corresponding to the position of the found adhesive path.
[0162] In this process, after reducing the length of the glue path control to the length corresponding to the location of the glue path to be detected, the length of the glue path control is no longer greater than the length of the glue path to be detected. For example, an example diagram after reducing the length of the glue path control can be shown in Figure 15(c).
[0163] The solution of this application embodiment can adaptively adjust the length of the adhesive path control so that the adjusted length of the adhesive path control matches the length of the adhesive path to be detected. This reduces the possibility of mistaking areas that do not belong to the adhesive path to be detected as the distribution area of the adhesive path to be detected, and improves the accuracy of adhesive path detection.
[0164] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0165] This application discloses a device for determining a correlation line, see [link to relevant documentation]. Figure 16 The schematic diagram shown indicates that the device includes: a control determination module 100, a control drawing module 200, a control mapping module 300, and a glue path detection module 400.
[0166] The control determination module 100 is used to determine a glue path control for glue path detection. The glue path control includes a center line and at least three detection line groups. Each detection line group includes two detection lines. The center line is located between the two detection lines in each detection line group. The at least three detection line groups include a first detection line group, a second detection line group, and a third detection line group. The interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group. The interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines.
[0167] The control drawing module 200 is used to draw the adhesive path control on a template image including the template adhesive path, wherein the center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second detection line and the third detection line, and the third detection line is located outside the template adhesive path;
[0168] The control mapping module 300 is used to map the adhesive path control in the template image to the image to be tested, wherein the image to be tested is an image obtained by taking a picture of a product containing the adhesive path to be tested;
[0169] The adhesive path detection module 400 is used to determine whether there is an adhesive path defect in the adhesive path to be detected based on the positional relationship between the adhesive path to be detected and the adhesive path control.
[0170] In one feasible design, the parameters corresponding to the centerline and different detection line groups in the adhesive path control are different;
[0171] The parameters include at least one of the following: color, thickness, and line type.
[0172] In one feasible design, the control drawing module 200 can be used to perform the following operations:
[0173] Draw the initial glue path control in the area where the template glue path is located;
[0174] Based on the edge of the template adhesive path and the center line of the initial adhesive path control, the initial adhesive path control is corrected so that the center line of the corrected initial adhesive path control is located in the middle of the template adhesive path to obtain the adhesive path control.
[0175] In one feasible design, the control drawing module 200 corrects the initial adhesive path control, including:
[0176] Determine the initial coordinates and direction vectors of each pixel in the centerline of the initial adhesive path control;
[0177] Starting from the pixel, search along two directions perpendicular to the template adhesive path to obtain the two edge points on the template adhesive path corresponding to the pixel;
[0178] The correction amount of the pixel is calculated based on the distance between the pixel and the two edge points.
[0179] The corrected coordinates of the pixel are calculated based on the correction amount of the pixel, the initial coordinates, and the direction vector.
[0180] The pixel is adjusted to the position indicated by the corrected coordinates.
[0181] In one feasible design, the adhesive path detection module 400 can be used to perform the following operations:
[0182] By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines.
[0183] If the adhesive path to be tested is not present within the closed area, it is determined that the adhesive path to be tested has an adhesive path defect of no adhesive.
[0184] In one feasible design, the adhesive path detection module 400 can be used to perform the following operations:
[0185] By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines.
[0186] If the adhesive path to be detected exists within the closed area, determine the positional relationship between the distribution area of the adhesive path to be detected and each detection line in the adhesive path control.
[0187] If the entire distribution area is located between the two first detection lines, it is determined that the adhesive path to be tested has an adhesive path defect with insufficient adhesive.
[0188] If the distribution area includes the area between the second detection line and the third detection line, it is determined that the adhesive path to be tested has a multi-adhesive path defect.
[0189] In one feasible design, the adhesive path detection module 400 can be used to perform the following operations:
[0190] By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines.
[0191] If the adhesive path to be tested exists within the closed area, determine whether there is a break in the distribution area of the adhesive path to be tested through which any one of the center line, the first detection line, and the second detection line passes;
[0192] If the fracture point is present, it is determined that the adhesive path to be tested has an adhesive path defect with a break in the adhesive.
[0193] In one feasible design, after mapping the adhesive path control in the template image to the image to be tested, the adhesive path detection device is further configured to perform the following operations:
[0194] Starting from the endpoint of the center line of the adhesive path control, a search is performed in two directions perpendicular to the adhesive path to be detected;
[0195] If the adhesive path to be tested is not found, a new starting point is selected, and the search is performed again in two directions perpendicular to the adhesive path to be tested until the adhesive path to be tested is found. The new starting point is located on the center line and the interval between it and the previously selected starting point is within a preset range.
[0196] If the adhesive path to be detected is found, the search stops, and the length of the adhesive path control is reduced to the length corresponding to the location where the adhesive path to be detected is found.
[0197] The apparatus provided in this application embodiment can realize adhesive path detection and meet the requirements for adhesive path detection.
[0198] Accordingly, this application discloses an electronic device, which includes:
[0199] A processor and a memory, wherein the memory is used to store computer programs;
[0200] The processor is used to call and execute the computer program stored in the memory. When the computer program stored in the memory is executed by the processor, the host computer is executed. Figure 1 , Figure 3 , Figure 4 , Figure 8 , Figure 10 , Figure 12 and Figure 14 All or part of the steps in the corresponding embodiments.
[0201] The electronic device in this application embodiment can correspond to the above. Figure 1 , Figure 3 , Figure 4 , Figure 8 , Figure 10 , Figure 12 and Figure 14 The electronic device in the corresponding embodiment, and the processor and storage in the electronic device can be implemented Figure 1 , Figure 3 , Figure 4 , Figure 8 , Figure 10 , Figure 12 and Figure 14 For the sake of brevity, the functions of the electronic devices in the corresponding embodiments and / or the various steps and methods implemented will not be described in detail here.
[0202] Accordingly, embodiments of this application also provide a computer storage medium storing computer programs or instructions, which, when executed, can achieve... Figure 1 , Figure 3 , Figure 4 , Figure 8 , Figure 10 , Figure 12 and Figure 14 All or part of the steps in the corresponding embodiments.
[0203] The various illustrative logic units and circuits described in the embodiments of this application can be implemented or operate the described functions using a general-purpose processor, digital information processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor; alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented using a combination of computing devices, such as a digital information processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital information processor core, or any other similar configuration.
[0204] The steps of the methods or algorithms described in the embodiments of this application can be directly embedded in hardware, software units executed by a processor, or a combination of both. The software unit can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, removable disks, compact disc read-only memory (CD-ROM), or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and storage medium can be disposed in an ASIC, which can be disposed in a user equipment (UE). Optionally, the processor and storage medium can also be disposed in different components within the UE.
[0205] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0206] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0207] The same or similar parts between the various embodiments in this specification can be referred to interchangeably. Each embodiment focuses on the differences from other embodiments. In particular, the device and system embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to in the description of the method embodiments section.
[0208] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0209] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the embodiments of the road constraint determination device disclosed in this application are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0210] The embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention.
Claims
1. A method for detecting adhesive lines, characterized in that, include: A glue path control for glue path detection is determined, wherein the glue path control includes: a center line and at least three detection line groups, each detection line group including two detection lines, the center line being located between the two detection lines in each detection line group, the at least three detection line groups including: a first detection line group, a second detection line group, and a third detection line group, wherein the interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines; The adhesive path control is drawn on a template image including the template adhesive path, wherein the center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second detection line and the third detection line, and the third detection line is located outside the template adhesive path; The step of drawing the adhesive path control on a template image including the template adhesive path includes: Draw the initial glue path control in the area where the template glue path is located; Based on the edge of the template adhesive path and the center line of the initial adhesive path control, the initial adhesive path control is corrected so that the center line of the corrected initial adhesive path control is located in the middle of the template adhesive path to obtain the adhesive path control. The step of correcting the initial adhesive path control includes: Determine the initial coordinates and direction vectors of each pixel in the centerline of the initial adhesive path control; Starting from the pixel, search along two directions perpendicular to the template adhesive path to obtain the two edge points on the template adhesive path corresponding to the pixel; The correction amount of the pixel is calculated based on the distance between the pixel and the two edge points. The corrected coordinates of the pixel are calculated based on the correction amount of the pixel, the initial coordinates, and the direction vector. Adjust the pixel to the position indicated by the corrected coordinates; The adhesive path control in the template image is mapped to the image to be tested, wherein the image to be tested is an image obtained by taking a picture of a product containing the adhesive path to be tested; Based on the positional relationship between the adhesive path to be tested and the adhesive path control, it is determined whether there is an adhesive path defect in the adhesive path to be tested.
2. The method according to claim 1, characterized in that, The centerline and different detection line groups in the adhesive path control have different parameters; The parameters include at least one of the following: color, thickness, and line type.
3. The method according to claim 1 or 2, characterized in that, The step of determining whether there is a defect in the adhesive path to be tested based on the positional relationship between the adhesive path to be tested and the adhesive path control includes: By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines. If the adhesive path to be tested is not present within the closed area, it is determined that the adhesive path to be tested has an adhesive path defect of no adhesive.
4. The method according to claim 1 or 2, characterized in that, The step of determining whether there is a defect in the adhesive path to be tested based on the positional relationship between the adhesive path to be tested and the adhesive path control includes: By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines. If the adhesive path to be detected exists within the closed area, determine the positional relationship between the distribution area of the adhesive path to be detected and each detection line in the adhesive path control. If the entire distribution area is located between the two first detection lines, it is determined that the adhesive path to be tested has an adhesive path defect with insufficient adhesive. If the distribution area includes the area between the second detection line and the third detection line, it is determined that the adhesive path to be tested has a multi-adhesive path defect.
5. The method according to claim 1 or 2, characterized in that, The step of determining whether there is a defect in the adhesive path to be tested based on the positional relationship between the adhesive path to be tested and the adhesive path control includes: By analyzing the closed area formed by the third detection line group, it is determined whether the adhesive path to be tested exists in the closed area. The closed area includes two third detection lines and lines that are respectively connected to the endpoints on the same side of the two third detection lines. If the adhesive path to be tested exists within the closed area, determine whether there is a break in the distribution area of the adhesive path to be tested through which any one of the center line, the first detection line, and the second detection line passes; If the fracture point is present, it is determined that the adhesive path to be tested has an adhesive path defect with a break in the adhesive.
6. The method according to claim 1, characterized in that, After mapping the adhesive path control in the template image to the image to be tested, the method further includes: Starting from the endpoint of the center line of the adhesive path control, a search is performed in two directions perpendicular to the adhesive path to be detected; If the adhesive path to be tested is not found, a new starting point is selected, and the search is performed again in two directions perpendicular to the adhesive path to be tested until the adhesive path to be tested is found. The new starting point is located on the center line and the interval between it and the previously selected starting point is within a preset range. If the adhesive path to be detected is found, the search stops, and the length of the adhesive path control is reduced to the length corresponding to the location where the adhesive path to be detected is found.
7. A glue path detection device, characterized in that, include: A control determination module is used to determine a glue path control for glue path detection, wherein the glue path control includes: a center line and at least three detection line groups, each detection line group includes two detection lines, the center line is located between the two detection lines in each detection line group, and the at least three detection line groups include: a first detection line group, a second detection line group, and a third detection line group, wherein the interval between the two second detection lines in the second detection line group is greater than the interval between the two first detection lines in the first detection line group, and the interval between the two third detection lines in the third detection line group is greater than the interval between the two second detection lines; A control drawing module is used to draw the adhesive path control on a template image including the template adhesive path, wherein the center line of the adhesive path control is located in the middle of the template adhesive path, the edge of the template adhesive path is located between the second detection line and the third detection line, and the third detection line is located outside the template adhesive path; The step of drawing the adhesive path control on a template image including the template adhesive path includes: Draw the initial glue path control in the area where the template glue path is located; Based on the edge of the template adhesive path and the center line of the initial adhesive path control, the initial adhesive path control is corrected so that the center line of the corrected initial adhesive path control is located in the middle of the template adhesive path to obtain the adhesive path control. The step of correcting the initial adhesive path control includes: Determine the initial coordinates and direction vectors of each pixel in the centerline of the initial adhesive path control; Starting from the pixel, search along two directions perpendicular to the template adhesive path to obtain the two edge points on the template adhesive path corresponding to the pixel; The correction amount of the pixel is calculated based on the distance between the pixel and the two edge points. The corrected coordinates of the pixel are calculated based on the correction amount of the pixel, the initial coordinates, and the direction vector. Adjust the pixel to the position indicated by the corrected coordinates; The control mapping module is used to map the adhesive path control in the template image to the image to be tested, wherein the image to be tested is an image obtained by taking a picture of a product containing the adhesive path to be tested; The adhesive path detection module is used to determine whether there is an adhesive path defect in the adhesive path to be detected based on the positional relationship between the adhesive path to be detected and the adhesive path control.
8. An electronic device, characterized in that, The electronic device includes: A memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the method of any one of claims 1 to 6.