Method, device and electronic device for determining width information

By automatically identifying edges in the glued image and calculating pixel distances, the problem of large manual measurement errors is solved, and efficient and accurate measurement of glued area width information is achieved.

CN115439426BActive Publication Date: 2025-09-23BEIJING BOE TECH DEV CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211024084.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2025-09-23
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

In the prior art, the measurement of glue coating width relies on manual means, which leads to large measurement errors and makes it impossible to accurately determine the width information of the glue coating area.

Method used

By acquiring the glued image, identifying the first edge and the second edge of the glued area, and automatically calculating the width information of the glued area based on the distance information between the pixel point and the matching pixel point.

Benefits of technology

It realizes the determination of width information at the pixel level, improves the accuracy and efficiency of measurement, and reduces the cost of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115439426B_ABST
    Figure CN115439426B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method, device, and electronic device for determining width information, which are applied to the field of image processing technology. The method includes: obtaining a glued image containing a glued area, wherein the glued area is an area in a glued component that has been glued; performing edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area; based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, determining the width information between the first edge and the second edge as the width information of the glued area; wherein the matching pixel point corresponding to each pixel point is: a pixel point that belongs to a different edge from the pixel point and has the smallest distance. Through this solution, the width information of the glue can be accurately measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and electronic device for determining width information. Background Art

[0002] The screen panel production process involves a gluing process. In order to detect the quality of the gluing process, it is necessary to measure the width of the gluing area of ​​the gluing component to determine the width information of the gluing area, and then evaluate the quality of the gluing process based on the measured width information.

[0003] At present, the measurement of glue coating width mainly relies on manual means, that is, measuring the width information of the glue coating through manual measurement. Specifically, after obtaining the glue coating image, the operator selects measurement points on the two edges of the glue coating in the glue coating image based on experience, and then the computing equipment calculates the straight-line distance between the measurement points selected by the operator as the glue coating width information.

[0004] However, the measurement points selected based on experience are often inaccurate, so the width information determined by manual means often has large errors and is inaccurate. Summary of the Invention

[0005] The purpose of the embodiments of the present invention is to provide a method, device, and electronic device for determining width information to accurately measure the width information of the glue coating. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for determining width information, the method comprising:

[0007] Acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued;

[0008] Performing edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area;

[0009] Determining, based on distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, width information between the first edge and the second edge as width information of the glue-coated area;

[0010] The matching pixel point corresponding to each pixel point is: a pixel point that belongs to a different edge from the pixel point and has the smallest distance.

[0011] Optionally, determining width information between the first edge and the second edge as width information of the glued area based on distance information between each pixel point and a corresponding matching pixel point in the first edge and the second edge includes:

[0012] performing edge correction on the first edge and the second edge based on edge endpoints of the first edge and the second edge;

[0013] Based on the distance information between each pixel point and the corresponding matching pixel point in the first edge after edge correction and the second edge after edge correction, the width information between the first edge and the second edge is determined as the width information of the glued area.

[0014] Optionally, the edge endpoints include: a first endpoint and a second endpoint of the first edge, and a third endpoint and a fourth endpoint of the second edge;

[0015] The performing edge correction on the first edge and the second edge based on the edge endpoints of the first edge and the second edge includes:

[0016] performing edge correction on the first edge based on the third endpoint and the fourth endpoint;

[0017] Perform edge correction on the second edge based on the first endpoint and the second endpoint.

[0018] Optionally, performing edge correction on the first edge based on the third endpoint and the fourth endpoint includes:

[0019] From the pixels included in the first edge, determine the pixel with the shortest distance from the third endpoint as the first candidate pixel point, and determine the pixel with the shortest distance from the fourth endpoint as the second candidate pixel point;

[0020] Determining, among the pixels included in the first edge, pixels that are not within the range where the first candidate pixel and the second candidate pixel are located as redundant pixels in the first edge;

[0021] Eliminating redundant pixels from the pixels included in the first edge;

[0022] The performing edge correction on the second edge based on the first endpoint and the second endpoint includes:

[0023] From the pixels included in the second edge, determine the pixel with the shortest distance from the first endpoint as a third candidate pixel point, and determine the pixel with the shortest distance from the second endpoint as a fourth candidate pixel point;

[0024] Determine, among the pixels included in the second edge, the pixels that are not within the range where the third candidate pixel and the fourth candidate pixel are located as redundant pixels in the second edge;

[0025] Redundant pixels in the pixels included in the second edge are eliminated.

[0026] Optionally, the determining, based on distance information between each pixel and a corresponding matching pixel in the edge-corrected first edge and the edge-corrected second edge, width information between the first edge and the second edge as the width information of the glued area includes:

[0027] Based on the distance information between each pixel point after removing redundant pixels in the first edge and the second edge and the corresponding matching pixel point, the width information between the first edge and the second edge is determined as the width information of the glue-coated area.

[0028] Optionally, before determining the width information between the first edge and the second edge based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge as the width information of the glued area, the method further includes:

[0029] Determining distance information between each pixel point in the first edge and each pixel point in the second edge;

[0030] For each pixel point in the first edge and the second edge, the minimum distance information is determined from the distance information between the pixel point and the corresponding pixel points to be filtered, as the distance information between the pixel point and the corresponding matching pixel point, wherein the pixel point to be filtered corresponding to each pixel point is a pixel point belonging to a different edge from the pixel point.

[0031] Optionally, for each pixel point in the first edge and the second edge, determining minimum distance information from distance information between the pixel point and corresponding pixels to be screened, as the distance information between the pixel point and the corresponding matching pixel point, includes:

[0032] Based on the distance information between each pixel in the first edge and each pixel in the second edge, a distance information matrix d is constructed:

[0033]

[0034] Where n is the number of pixels included in the first edge, m is the number of pixels included in the second edge, and each d in the distance information matrix d uv Represents the distance information between the u-th pixel point in the first edge and the v-th pixel point in the second edge;

[0035] Determine the minimum distance information in each row of the distance information matrix d as the distance information between the pixel point in the row and the corresponding matching pixel point;

[0036] The minimum distance information in each column of the distance information matrix d is determined as the distance information between the pixel points in the column and the corresponding matching pixel points.

[0037] Optionally, determining width information between the first edge and the second edge as width information of the glued area based on distance information between each pixel point and a corresponding matching pixel point in the first edge and the second edge includes:

[0038] Determining minimum distance information from distance information between each pixel and the corresponding matching pixel in the first edge and the second edge, and using the distance represented by the determined distance information as the minimum width of the glue-coated area; and / or,

[0039] Determining maximum distance information from distance information between each pixel and the corresponding matching pixel in the first edge and the second edge, and using the distance represented by the determined distance information as the maximum width of the glue-coated area;

[0040] The minimum width and / or maximum width is used as the width information of the glue-coated area.

[0041] Optionally, before performing edge recognition on the glued area in the glued image to obtain the first edge and the second edge of the glued area, the method further includes:

[0042] Performing glue area recognition on the glued image to determine the glued area in the glued image.

[0043] In a second aspect, an embodiment of the present invention provides a device for determining width information, the device comprising:

[0044] An image acquisition module, configured to acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued;

[0045] an edge recognition module, configured to perform edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area;

[0046] An information determination module is used to determine the width information between the first edge and the second edge as the width information of the glued area based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge; wherein the matching pixel point corresponding to each pixel point is: a pixel point that belongs to a different edge from the pixel point and has the smallest distance.

[0047] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0048] Memory for storing computer programs;

[0049] The processor is configured to implement any of the method steps described in the first aspect when executing a program stored in the memory.

[0050] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0051] Beneficial effects of the embodiments of the present invention:

[0052] The embodiments of the present invention provide a method, device, and electronic device for determining width information. The method can obtain a glued image containing a glued area, and then perform edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area. Based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, the width information between the first edge and the second edge is determined as the width information of the glued area. Since the first edge and the second edge of the glued area are first identified after obtaining the glued image, and then the distance information between each pixel point and the matching pixel point in the first edge and the second edge is used to determine the width information between the first edge and the second edge, pixel-level distance recognition can be achieved, making the determined width information more accurate.

[0053] Furthermore, since the embodiment of the present invention can automatically measure the width information after obtaining the glue coating image, it is more efficient than manual measurement, and since no operator is required to select measurement points, the cost of width information measurement can also be reduced.

[0054] Of course, it is not necessary to achieve all of the advantages described above simultaneously in order to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0056] Figure 1A flow chart of a width information method provided by an embodiment of the present invention;

[0057] FIG2( a ) is a schematic diagram of a glued image provided by an embodiment of the present invention;

[0058] FIG2( b ) is another schematic diagram of a glued image provided by an embodiment of the present invention;

[0059] FIG3( a ) is a schematic diagram of edge recognition provided by an embodiment of the present invention;

[0060] FIG3( b ) is a schematic diagram of edge recognition provided by an embodiment of the present invention;

[0061] Figure 4 A schematic diagram of an edge in a glued image provided by an embodiment of the present invention;

[0062] Figure 5 A flowchart of another method for determining width information provided by an embodiment of the present invention;

[0063] Figure 6 A schematic structural diagram of a device for determining width information provided by an embodiment of the present invention;

[0064] Figure 7 This is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of the present invention.

[0066] In order to accurately measure the width information of the glue coating, embodiments of the present invention provide a method, device and electronic device for determining the width information.

[0067] It should be noted that, in specific applications, the embodiments of the present invention can be applied to various electronic devices, such as personal computers, servers, mobile phones, and other devices with data processing capabilities. Furthermore, the width information determination method provided by the embodiments of the present invention can be implemented through software, hardware, or a combination of software and hardware.

[0068] A method for determining width information provided by an embodiment of the present invention may include:

[0069] Acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued;

[0070] Performing edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area;

[0071] Based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, the width information between the first edge and the second edge is determined as the width information of the glued area; wherein, the matching pixel point corresponding to each pixel point is: the pixel point that belongs to a different edge from the pixel point and has the smallest distance.

[0072] In the above-mentioned scheme of the embodiment of the present invention, after obtaining the glued image, the first edge and the second edge of the glued area can be first identified, and then the distance information between each pixel point and the matching pixel point in the first edge and the second edge can be used to determine the width information between the first edge and the second edge. This can achieve pixel-level distance recognition, making the determined width information more accurate. Furthermore, since the embodiment of the present invention can automatically measure the width information after obtaining the glued image, it is more efficient than manual measurement, and since it does not require an operator to select the measurement points, it can also reduce the cost of measuring the width information.

[0073] The width information determination method provided by the embodiment of the present invention will be described in detail below with reference to the accompanying drawings.

[0074] like Figure 1 As shown, an embodiment of the present invention provides a method for determining width information, including steps S101-S103, wherein:

[0075] S101, acquiring a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued;

[0076] The glue-coated components may be components involved in the production process of the screen panel, such as components of the screen panel, such as the backlight module, polarizer, and glass substrate. During the production process of the screen panel, a glue coating process needs to be applied to some or all of the components of the screen panel to enable them to adhere to other components. In the embodiment of the present invention, the glue-coated area of ​​the glue-coated component is referred to as the glue-coated area.

[0077] It should be emphasized that in the production process of other devices, the gluing process and the measurement of the gluing width information may also be involved. The width information method provided in the embodiment of the present invention is also applicable here. The screen panel mentioned in the embodiment of the present invention is only used as an example for illustration and does not constitute a limitation of the present invention.

[0078] The above-mentioned glued image can be obtained by collecting data from the glued component after the glued component is subjected to the glue coating process. In different scenarios, due to the different sizes and requirements of the glued components involved, the above-mentioned glued image can be an image involving the entire glued area of ​​the glued component, or it can be an image involving only a local glued area in the glued component. For example, as shown in Figure 2(a), an embodiment of the present invention provides a schematic diagram of a glued image, and the image in Figure 2(a) is a glued image involving the entire glued area of ​​the glued component. As shown in Figure 2(b), an embodiment of the present invention provides another schematic diagram of a glued image, and the image in Figure 2(b) is a glued image involving a local glued area in the glued component. The gray areas in Figures 2(a) and 2(b) are glued areas. Compared with the glued image of the entire glued area, the glued image involving the local glued area can show more details. Therefore, in scenarios with higher accuracy requirements, glued images involving local glued areas are often used to confirm width information.

[0079] In this step, the glued image can be obtained in combination with the actual application scenario or demand. For example, in one implementation, the camera for collecting the glued image can be independent of the execution subject of the embodiment of the present invention. In this case, the glued image can be read from the camera, or the glued image collected by the camera can be pre-acquired by other electronic devices and further transmitted to the execution subject of the embodiment of the present invention in the form of tasks, instructions, etc. At this time, the execution subject of the embodiment of the present invention can receive the width information to determine the task or instruction, and then read the glued image carried by the task or instruction, or read the glued image from the storage location specified by the task or instruction. This is all possible. In another implementation, the execution subject of the embodiment of the present invention can include a camera for collecting glued images. In this case, this step can be to control the camera to collect glued images to obtain the glued images collected by the camera.

[0080] S102, performing edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area;

[0081] In order to determine the width information of the glued area, after obtaining the glued image, the edge of the glued area in the glued image can be identified. In this step, the edge of the glued area can be identified in a variety of ways. For example, in one implementation, the glued image can be processed using an edge detection algorithm to obtain the first edge and the second edge of the glued area in the glued image. The edge detection algorithm used can include an algorithm that uses first-order operators and second-order operators for edge recognition, such as a cross differential operator. In another implementation, a neural network model can also be used. Specifically, a neural network model for edge recognition can be pre-trained, and then the pre-trained neural network model can be used to process the glued image to obtain the first edge and the second edge of the glued area in the glued image. Since the neural network model can be trained using images collected in the glue process scenario during training, compared to the edge detection algorithm, the neural network model can be more suitable for edge recognition in the glue process scenario, thereby improving the accuracy of edge recognition.

[0082] In order to more accurately perform edge recognition of the glued area, in one implementation method, before performing edge recognition on the glued area in the glued image to obtain the first edge and the second edge of the glued area, the glued image can also be preprocessed, for example, by performing glued area recognition on the glued image to determine the glued area in the glued image.

[0083] In embodiments of the present invention, various methods can be used to identify the glued area in a glued image. For example, the glued image can be segmented and then the texture features within the different regions can be used to identify the glued area from the multiple segmented regions. Alternatively, a pre-trained neural network model for glued area identification can be used to process the glued image and determine the glued area from the glued image.

[0084] After the glued area is identified from the glued image, the step of performing glued area identification on the glued image to determine the glued area in the glued image may be performed.

[0085] For example, as shown in FIG3(a), a schematic diagram of edge recognition provided by an embodiment of the present invention, the first edge and the second edge in the glued image in FIG3(a) are obtained by edge recognition of the glued area in the glued image in FIG2(a). As shown in FIG3(b), another schematic diagram of edge recognition provided by an embodiment of the present invention, the first edge and the second edge in the glued image in FIG3(b) are obtained by edge recognition of the glued area in the glued image in FIG2(b).

[0086] S103, determining width information between the first edge and the second edge based on distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, as width information of the glue-coated area;

[0087] After determining the first edge and the second edge, the width between the first edge and the second edge can be determined based on the distance information between each pixel and the corresponding matching pixel in the first edge and the second edge, and the determined width information can be used as the width information of the glued area. The distance information can be the pixel distance between the two pixels, or the square of the pixel distance, or other information that can reflect the length of the distance.

[0088] The matching pixel point corresponding to each of the above-mentioned pixel points is: the pixel point that belongs to a different edge from the pixel point and has the smallest distance. In simple terms, for each pixel point in the first edge, its corresponding matching pixel point must be a pixel point in the second edge. Specifically, the pixel point is the pixel point with the smallest distance from the pixel point in the first edge among the pixels contained in the second edge. For example, the first edge contains pixel point 1 and pixel point 2, and the second edge contains pixel point 3 and pixel point 4, wherein the distance between pixel point 1 and pixel point 3 is less than the distance between pixel point 1 and pixel point 4, and the distance between pixel point 2 and pixel point 3 is greater than the distance between pixel point 2 and pixel point 4, then the matching pixel point of pixel point 1 is pixel point 3, and the matching pixel point of pixel point 2 is pixel point 4. Similarly, the matching pixel point of pixel point 3 is pixel point 1, and the matching pixel point of pixel point 4 is pixel point 2.

[0089] It should be noted that, generally speaking, for pixels in the first and second edges, the pixels and their matching pixels are often mutually matching pixels, such as pixel 1 and pixel 3, and pixel 2 and pixel 4 mentioned above. However, in special cases, there may be a matching pixel for a certain pixel whose matching pixel is not the matching pixel of that pixel. For example, the matching pixel of pixel 5 in the first edge is pixel 6 in the second edge, while the matching pixel of pixel 6 may not be pixel 5 in the first edge, but may be pixel 7 in the first edge, for example.

[0090] Because each pixel's matching pixel is the pixel on a different edge from that pixel and with the smallest distance, the distance information between each pixel and its matching pixel can represent the width of the glued area at that pixel's location. Therefore, after determining the first and second edges, the width between the first and second edges can be determined based on the distance information between each pixel and its corresponding matching pixel, serving as the width of the glued area.

[0091] In embodiments of the present invention, there are multiple ways to determine the width information between the first edge and the second edge. For example, in one implementation, a target pixel can be selected from the pixels included in the first edge and the second edge, and the distance information between the target pixel and its matching pixel can be used as the width information between the first edge and the second edge. Alternatively, the average value represented by the distance information between each pixel and its matching pixel can be used as the width information between the first edge and the second edge.

[0092] In order to make the determined width information reflect the quality of the gluing process more accurately and comprehensively, in an embodiment of the present invention, the width information of the gluing area may be the maximum width and / or minimum width between the first edge and the second edge.

[0093] In this case, the following methods can be used to determine:

[0094] Determine the minimum distance information from the distance information between each pixel and the corresponding matching pixel in the first edge and the second edge, and use the distance represented by the determined distance information as the minimum width of the glue-coated area; and / or,

[0095] Determine the maximum distance information from the distance information between each pixel point and the corresponding matching pixel point on the first edge and the second edge, and use the distance represented by the determined distance information as the maximum width of the glue-coated area;

[0096] Use the minimum width and / or maximum width as the width information of the glue area.

[0097] Exemplarily, the first edge includes pixel a, pixel b, and pixel c, and the second edge includes pixel d, pixel e, and pixel f, wherein pixel a and pixel d are matching pixels with distance information of distance ad, pixel b and pixel e are matching pixels with distance information of distance be, and pixel c and pixel f are matching pixels with distance information of distance cf, wherein distance ad < distance cf < distance be, the minimum distance information is determined to be distance ad, i.e., the minimum width of the glued area is distance ad, and the maximum distance information is determined to be distance be, i.e., the maximum width of the glued area is distance be. At this time, the width information of the glued area determined is pseudo: minimum width: distance ad, and / or maximum width: distance be.

[0098] In the above-mentioned scheme of the embodiment of the present invention, after obtaining the glued image, the first edge and the second edge of the glued area can be first identified, and then the distance information between each pixel point and the matching pixel point in the first edge and the second edge can be used to determine the width information between the first edge and the second edge. This can achieve pixel-level distance recognition, making the determined width information more accurate. Furthermore, since the embodiment of the present invention can automatically measure the width information after obtaining the glued image, it is more efficient than manual measurement, and since it does not require an operator to select the measurement points, it can also reduce the cost of measuring the width information.

[0099] In order to further improve the accuracy of the acquired width information, in an embodiment of the present invention, in one implementation method of the above-mentioned step S103, edge correction can be performed on the first edge and the second edge based on the edge endpoints of the first edge and the second edge, and then based on the distance information between each pixel point and the corresponding matching pixel point in the first edge after edge correction and the second edge after edge correction, the width information between the first edge and the second edge is determined as the width information of the glued area.

[0100] Among them, the edge endpoints of the first edge and the second edge can be the starting point or the ending point of the first edge and the second edge, such as the intersection point of the first edge and the second edge with the edge of the image in the glued image shown in Figure 3 (b). Edge correction of the first edge and the second edge may include smoothing the edges, optimizing breakpoints, etc. Optionally, when the glued image only involves a local glued area, the first edge and the second edge often have endpoints with the image edge camera, and for the pixel points near the endpoints, the distance information between them and the corresponding matching pixel points is often too large. In order to eliminate this error, in an embodiment of the present invention, the above-mentioned edge correction of the first edge and the second edge may also include the elimination of redundant pixel points, wherein the redundant pixel points refer to the pixel points in the first edge and the second edge that are close to the image edge, and the distance information between them and the corresponding matching pixel points is often too large. For example, if Figure 4 As shown, an embodiment of the present invention provides an edge schematic diagram in a glued image, which includes a first edge AB and a second edge CD. Due to the limitation of the sampling range of the glued image, for the pixel point C in the second edge, its corresponding matching pixel point is pixel point A. Therefore, the distance between it and the matching pixel point is distance AC, which is obviously too large. Therefore, pixel point C is a redundant pixel point.

[0101] Since the pixel points in the corrected first edge and the second edge are more accurate, the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge after edge correction can be used to determine the width information between the first edge and the second edge, which can improve the accuracy of the width information determination.

[0102] In one implementation, the edge endpoints referred to in the embodiment of the present invention may include: a first endpoint and a second endpoint of a first edge, and a third endpoint and a fourth endpoint of a second edge. Figure 4 For example, the first endpoint is A, the second endpoint is B, the third endpoint is C, and the fourth endpoint is D.

[0103] In this case, edge correction can be performed on the first edge based on the third endpoint and the fourth endpoint. For example, from each pixel point included in the first edge, the pixel point with the smallest distance from the third endpoint is determined as the first candidate pixel point, and the pixel point with the smallest distance from the fourth endpoint is determined as the second candidate pixel point. Then, among each pixel point included in the first edge, the pixel points that do not fall within the range of the first candidate pixel point and the second candidate pixel point are determined as redundant pixel points in the first edge. Finally, the redundant pixel points in each pixel point included in the first edge are eliminated.

[0104] Furthermore, edge correction can be performed on the second edge based on the first endpoint and the second endpoint. For example, from among the pixels included in the second edge, the pixel with the smallest distance from the first endpoint is determined as the third candidate pixel, and the pixel with the smallest distance from the second endpoint is determined as the fourth candidate pixel. Furthermore, among the pixels included in the second edge, the pixels that do not fall within the range of the third candidate pixel and the fourth candidate pixel are determined as redundant pixels in the second edge, and the redundant pixels in the pixels included in the second edge are eliminated.

[0105] by Figure 4 For illustration purposes, the example shown here shows that for the first edge, the matching pixel for the first endpoint A is pixel E, the matching pixel for the second endpoint B is pixel F, the matching pixel for the third endpoint is pixel A, and the matching pixel for the fourth endpoint D is pixel B. Therefore, the first edge contains no redundant pixels and is identical before and after correction. For the second edge, the modified second edge only contains the pixels within line segment EF. The pixels within line segments CE and FD are removed as redundant pixels.

[0106] In one implementation, the pixel point set method can be combined. Specifically, the pixel point set of the first edge can be set as p1, the pixel point set of the second edge can be set as p2, and:

[0107] p1=[p11 , p 12 ,...,p 1(n-2) , p 1(n-1) ]

[0108] p2=[p 21 , p 22 ,...,p 2(m-2) , p 2(m-1) ]

[0109] Wherein, n is the number of pixels included in the first edge, and m is the number of pixels included in the second edge.

[0110] Let the first endpoint be p 10 , the second endpoint is p 1(n-1) and the third endpoint is p 20 , the fourth endpoint is p 2(m-1) , calculate the first endpoint p 10 The distance information to all pixels in the pixel set p2, for example, for the convenience of calculation, the distance information can be the square of the distance, that is,

[0111]

[0112] And calculate the minimum value among them:

[0113] (where i = 0, 1, ..., m-2, m-1)

[0114] Then record the index position i of the coordinate point in the pixel point set p2, and similarly calculate the endpoint p 1(n-1) The square of the distance to all points in the pixel set p2, endpoint p 20 The square of the distance to all points in the pixel set p1, endpoint p 2(m-1) The square of the distance to all points in the pixel set p1, and calculate the minimum value:

[0115] (where j = 0, 1, ..., m-2, m-1)

[0116] (where k = 0, 1, ..., n-2, n-1)

[0117] (where l = 0, 1, ..., n-2, n-1)

[0118] The index positions j, k, and l of the coordinate points in the corresponding pixel point set p1 and pixel point set p2 are further recorded.

[0119] Since the correspondence between the endpoints of the pixel set and the edge endpoints of the image glue is uncertain, it is necessary to compare i and j. Specifically:

[0120] If i < j, then all the pixels with index positions from i to j are taken out from the pixel set p2 as valid pixels, that is,

[0121] p 2i , p 2(i+1) ,…,p 2(j-1) , p 2j

[0122] The remaining pixels in the pixel set p2 are redundant pixels;

[0123] If j < i, then all the pixels with index positions j to i are taken from the pixel set p2 as valid pixels, that is,

[0124] P 2j , p 2(j+1) ,…,p 2(i-1) , P 2i

[0125] The remaining pixels in the pixel set p2 are redundant pixels;

[0126] Similarly, by comparing k and l, we can get the pixel point set p1 after removing redundant pixels:

[0127] p 1k , P 1(k+1) ,…,p 1(l-1) , p 1l or p 1l , p 1(l+1) ,…,p 1(k-1) , P 1k

[0128] Since the comparison results of i and j and k and l do not affect the width calculation below, in order to more clearly illustrate this solution, this application will subsequently record the pixel point set of the corrected first edge after removing redundant pixels and the pixel point set of the corrected second edge as:

[0129] p1′=[p 1k , p 1(k+1) ,…,p 1(l-1) , p 1l ]

[0130] p2′=[p 2i , p 2(i+1) ,…,p 2(j-1) , p 2j ]

[0131] After removing redundant pixels in the first edge and the second edge, the width information between the first edge and the second edge can be determined based on the distance information between each pixel after removing redundant pixels and the corresponding matching pixel points in the first edge and the second edge, as the width information of the glued area. For example, the width information is confirmed using each pixel in the above-mentioned p1′ and p2′. The specific implementation process is the same or similar to step S103, and the embodiments of the present invention will not be repeated here.

[0132] In the above-described embodiment of the present invention, after obtaining the glued image, the accuracy of width information determination can be improved, the efficiency is higher, and the cost of width information measurement can be reduced. Furthermore, before determining the width information, the accuracy of the width information can be further improved by correcting the first edge and the second edge.

[0133] In one embodiment, before executing step S103, the distance information between each pixel point in the first edge and the second edge and the corresponding matching pixel point may be determined. It should be emphasized that in this embodiment, the first edge and the second edge targeted may be the corrected first edge and the second edge obtained after the aforementioned edge correction, or may be the first edge and the second edge that have not undergone edge correction. Both are acceptable.

[0134] Optionally, before executing step S103, the distance information between each pixel point in the first edge and each pixel point in the second edge can be determined, and then for each pixel point in the first edge and the second edge, the minimum distance information can be determined from the distance information between the pixel point and the corresponding pixel points to be filtered, as the distance information between the pixel point and the corresponding matching pixel point, wherein the pixel point to be filtered corresponding to each pixel point is a pixel point belonging to a different edge from the pixel point.

[0135] In one implementation, a distance information matrix d may be constructed based on the distance information between each pixel in the first edge and each pixel in the second edge:

[0136]

[0137] Among them, n is the number of pixels contained in the first edge, m is the number of pixels contained in the second edge, and each d in the distance information matrix d uv Represents the distance information between the u-th pixel point in the first edge and the v-th pixel point in the second edge, where 1≤u≤n and 1≤v≤m.

[0138] Then, the minimum distance information in each row of the distance information matrix d is determined as the distance information between the pixel point in the row and the corresponding matching pixel point, and the minimum distance information in each column of the distance information matrix d is determined as the distance information between the pixel point in the column and the corresponding matching pixel point.

[0139] In order to facilitate subsequent calculations, the first distance information matrix d can be constructed after determining the minimum distance information in each row of the distance information matrix d. row :

[0140] d row =[d 1row , d 2row ,…,d (n-1)row , d nrow ]

[0141] Among them, the first distance information matrix d row Each d urow Represents the minimum distance information in the u-th row of the distance information matrix d;

[0142] After determining the minimum distance information in each column of the distance information matrix d, construct the second distance information matrix d col :

[0143] d col =[d 1col , d 2col ,…,d (m-1)col , d mcol ]

[0144] Among them, the second distance information matrix d col Each d vcol Represents the minimum distance information in the vth column of the distance information matrix d;

[0145] In this case, the above-mentioned determination of the width information between the first edge and the second edge based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge as the width information of the glued area may include determining the first distance information matrix d row and the second distance information matrix d col The minimum distance information and maximum distance information in are respectively recorded as d rowmin d rowmax and DC olmin d colmax , then calculate d rowmin and d colmin The minimum value in is recorded as d min , calculate d rowmax and d colmax The maximum value is recorded as d max, and finally d min and d max Serves as the width information of the glue area.

[0146] It should be emphasized that the distance information can be the pixel distance between two pixels or the square of the pixel distance between two pixels. If the distance information is the square of the pixel distance, then after determining the minimum distance information and the maximum distance information, the minimum distance information and / or the maximum distance information can also be used as the width information of the glue-coated area.

[0147] In the above-described embodiment of the present invention, after obtaining the glued image, the accuracy of width information determination can be improved, the efficiency can be increased, and the cost of width information measurement can be reduced. Furthermore, before determining the width information, by determining the distance information between each pixel point in the first edge and the second edge and the corresponding matching pixel point, a basis for improving accuracy can be provided.

[0148] like Figure 5 As shown, an embodiment of the present invention further provides a method for determining width information, which may include the following steps:

[0149] S501, original image acquisition; this step can acquire a glued image, also called an original image;

[0150] S502, image preprocessing: This step can preprocess the glued image, for example, identify the glued area;

[0151] S503, edge extraction: This step can perform edge extraction on the glued area in the glued image to obtain a set of pixel points corresponding to two edges (the first edge and the second edge), which are set as:

[0152] p1=[p 11 , p 12 ,...,p 1(n-2) , p 1(n-1) ]

[0153] p2=[p 21 , p 22 ,...,p 2(m-2) , p 2(m-1) ]

[0154] Assume that the horizontal and vertical coordinates of the pixel point sets p1 and p2 are:

[0155] p 1r .x、p 1r .y、p 2s .x、p 2s .y, where r = 0, 1, ..., n-2, n-1, s = 0, 1, ..., m-2, m-1

[0156] Then the distance and the square of the distance from the pixel point set p1 to each pixel point in the pixel point set p2 are set as:

[0157]

[0158]

[0159] S504, redundant pixel elimination; after edge extraction, redundant pixel elimination can be performed on the first edge and the second edge. Optionally, the endpoints of the pixel point sets p1 and p2, i.e., the endpoints of the two edges, are set to be p 10 、p 1(n-1) and p 20 、p 2(m-1) , calculate the endpoint p 10 The square of the distance to all points in the pixel set p2, that is

[0160]

[0161] And calculate the minimum value among them:

[0162] (where i = 0, 1, ..., m-2, m-1)

[0163] At the same time, record the index position i of the coordinate point in the corresponding pixel point set p2, and similarly calculate the endpoint p 1(n-1) The square of the distance to all points in the pixel set p2, endpoint p 20 The square of the distance to all points in the pixel set p1, endpoint p 2(m-1) The square of the distance to all points in the pixel set p1, and calculate the minimum value:

[0164] (where j = 0, 1, ..., m-2, m-1)

[0165] (where k = 0, 1, ..., n-2, n-1)

[0166] (where l = 0, 1, ..., n-2, n-1)

[0167] At the same time, record the index positions j, k, and l of the coordinate points in the corresponding pixel point sets p1 and p2. Since the correspondence between the endpoints of the pixel point set and the edge endpoints of the image glue is uncertain, it is necessary to compare i and j. If i < j, then take out all points with index positions i to j in the pixel point set p2, that is,

[0168] p 2i , p2(i+1) ,…,p 2(j-1) , p 2j

[0169] The remaining points are redundant points; if j < i, then all points with index positions j to i are taken from the pixel point set p2, that is,

[0170] p 2j , p 2(j+1) ,…,p 2(i-1) , p 2i

[0171] The remaining points are redundant points. Similarly, by comparing k and l, we can get the pixel point set p1 after removing redundant points:

[0172] p 1k , p 1(k+1) ,…,p 1(l-1) , p 1l or p 1l , p 1(l+1) ,…,p 1(k-1) , p 1k

[0173] The comparison results of i and j and k and l will not affect the following width calculation. Therefore, in order to facilitate the introduction of the algorithm, the result after comparison, that is, the set of pixels without redundant points, is recorded as one of the comparison results, that is,

[0174] p1′=[p 1k , p 1(k+1) ,…,p 1(l-1) , p 1l ]

[0175] p2′=[p 2i , p 2(i+1) ,…,p 2(j-1) , p 2j ]

[0176] S505, width information calculation;

[0177] After removing redundant points, the width can be calculated. Optionally, the square of the distance from each point in p1′ to all points in p2′ can be calculated to obtain the matrix d 2 :

[0178]

[0179] Then the matrix d 2 In the data, the hth row represents the square of the distance from the hth point in p1′ to all points in p2′, and the fth column represents the square of the distance from the fth point in p2′ to all points in p1′.

[0180] Calculate the minimum value of each row. In a physical sense, the minimum value represents the distance from a point in p1′ to the edge corresponding to p2′. The calculation result is recorded as:

[0181]

[0182] Calculate the minimum value of each column. In a physical sense, the minimum value represents the distance from a point in p2′ to the edge corresponding to p1′. The calculation result is recorded as:

[0183]

[0184] Calculate separately and The minimum and maximum values ​​in are denoted as and Then calculate and The minimum value in calculate and The maximum value of The minimum distance and maximum distance of the glue coating area are respectively d min and d max ,but:

[0185]

[0186]

[0187] Then d min and d max Serves as the width information of the glue area.

[0188] In the above-mentioned scheme of the embodiment of the present invention, after obtaining the glued image, the first edge and the second edge of the glued area can be first identified, and then the distance information between each pixel point and the matching pixel point in the first edge and the second edge can be used to determine the width information between the first edge and the second edge. This can achieve pixel-level distance recognition, making the determined width information more accurate. Furthermore, since the embodiment of the present invention can automatically measure the width information after obtaining the glued image, it is more efficient than manual measurement, and since it does not require an operator to select the measurement points, it can also reduce the cost of measuring the width information.

[0189] Corresponding to the width information determination method provided by the above embodiment of the present invention, as shown in FIG. Figure 6 As shown, an embodiment of the present invention further provides a device for determining width information, the device comprising:

[0190] An image acquisition module 601 is used to acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued;

[0191] An edge recognition module 602 is configured to perform edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area;

[0192] The information determination module 603 is used to determine the width information between the first edge and the second edge based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, as the width information of the glued area; wherein the matching pixel point corresponding to each pixel point is: the pixel point that belongs to a different edge from the pixel point and has the smallest distance.

[0193] Optionally, the information determination module is specifically used to perform edge correction on the first edge and the second edge based on the edge endpoints of the first edge and the second edge; and determine the width information between the first edge and the second edge based on the distance information between each pixel point and the corresponding matching pixel point in the first edge after edge correction and the second edge after edge correction, as the width information of the glue-coated area.

[0194] Optionally, the edge endpoints include: a first endpoint and a second endpoint of the first edge, and a third endpoint and a fourth endpoint of the second edge;

[0195] The information determination module is specifically configured to perform edge correction on the first edge based on the third endpoint and the fourth endpoint; and perform edge correction on the second edge based on the first endpoint and the second endpoint.

[0196] Optionally, the information determination module includes:

[0197] a first correction submodule, configured to determine, from among the pixels included in the first edge, a pixel point having the smallest distance from the third endpoint as a first candidate pixel point, and to determine, from among the pixels included in the first edge, a pixel point having the smallest distance from the fourth endpoint as a second candidate pixel point; determine, among the pixels included in the first edge, pixels that are not within a range between the first candidate pixel point and the second candidate pixel point as redundant pixels in the first edge; and eliminate redundant pixels from among the pixels included in the first edge;

[0198] The second correction submodule is used to determine, from the pixel points included in the second edge, the pixel point with the smallest distance from the first endpoint as the third candidate pixel point, and to determine the pixel point with the smallest distance from the second endpoint as the fourth candidate pixel point; determine, among the pixel points included in the second edge, the pixel points that do not fall within the range of the third candidate pixel point and the fourth candidate pixel point as redundant pixel points in the second edge; and eliminate the redundant pixel points among the pixel points included in the second edge.

[0199] Optionally, the information determination module is specifically used to determine the width information between the first edge and the second edge as the width information of the glued area based on the distance information between each pixel point and the corresponding matching pixel point after removing redundant pixels in the first edge and the second edge.

[0200] Optionally, the information determination module is also used to determine the distance information between each pixel point in the first edge and each pixel point in the second edge based on the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, before determining the width information between the first edge and the second edge as the width information of the glued area; for each pixel point in the first edge and the second edge, determine the minimum distance information from the distance information between the pixel point and the corresponding pixel points to be filtered, as the distance information between the pixel point and the corresponding matching pixel point, wherein the pixel point to be filtered corresponding to each pixel point is a pixel point belonging to a different edge from the pixel point.

[0201] Optionally, the information determination module is specifically configured to construct a distance information matrix d based on distance information between each pixel point in the first edge and each pixel point in the second edge:

[0202]

[0203] Where n is the number of pixels included in the first edge, m is the number of pixels included in the second edge, and each d in the distance information matrix d uv Represents the distance information between the u-th pixel point in the first edge and the v-th pixel point in the second edge;

[0204] Determine the minimum distance information in each row of the distance information matrix d as the distance information between the pixel point in the row and the corresponding matching pixel point; determine the minimum distance information in each column of the distance information matrix d as the distance information between the pixel point in the column and the corresponding matching pixel point.

[0205] Optionally, the information determination module is specifically used to determine the minimum distance information from the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, and use the distance represented by the determined distance information as the minimum width of the glued area; and / or determine the maximum distance information from the distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, and use the distance represented by the determined distance information as the maximum width of the glued area; use the minimum width and / or maximum width as the width information of the glued area.

[0206] Optionally, the edge recognition module is further used to perform glue area recognition on the glued image before performing edge recognition on the glued area in the glued image to obtain the first edge and the second edge of the glued area, so as to determine the glued area in the glued image.

[0207] In the above-mentioned scheme of the embodiment of the present invention, after obtaining the glued image, the first edge and the second edge of the glued area can be first identified, and then the distance information between each pixel point and the matching pixel point in the first edge and the second edge can be used to determine the width information between the first edge and the second edge. This can achieve pixel-level distance recognition, making the determined width information more accurate. Furthermore, since the embodiment of the present invention can automatically measure the width information after obtaining the glued image, it is more efficient than manual measurement, and since it does not require an operator to select the measurement points, it can also reduce the cost of measuring the width information.

[0208] The embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0209] Memory 703, for storing computer programs;

[0210] The processor 701 is configured to execute the program stored in the memory 703, and implement the following steps:

[0211] Acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued;

[0212] Performing edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area;

[0213] Determining, based on distance information between each pixel point and the corresponding matching pixel point in the first edge and the second edge, width information between the first edge and the second edge as width information of the glue-coated area;

[0214] The matching pixel point corresponding to each pixel point is: the pixel point that belongs to a different edge from the pixel point and has the smallest distance.

[0215] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0216] The communication interface is used for communication between the above electronic device and other devices.

[0217] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0218] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0219] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned width information determination methods are implemented.

[0220] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer is enabled to execute any one of the width information determination methods in the above embodiments.

[0221] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented 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 the present invention 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 computer-readable storage medium. 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 a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0222] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0223] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, since the apparatus, electronic device, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, their descriptions are relatively simplified. For related portions, reference can be made to the descriptions of the method embodiments.

[0224] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A method for determining width information, characterized in that: The method comprises: Acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued; Performing edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area; the first edge includes a first endpoint and a second endpoint, and the second edge includes a third endpoint and a fourth endpoint; From the pixels included in the first edge, determine the pixel with the shortest distance from the third endpoint as the first candidate pixel point, and determine the pixel with the shortest distance from the fourth endpoint as the second candidate pixel point; Determining, among the pixels included in the first edge, pixels that are not within the range where the first candidate pixel and the second candidate pixel are located as redundant pixels in the first edge; Eliminating redundant pixels from the pixels included in the first edge; From the pixels included in the second edge, determine the pixel with the shortest distance from the first endpoint as a third candidate pixel point, and determine the pixel with the shortest distance from the second endpoint as a fourth candidate pixel point; Determine, among the pixels included in the second edge, the pixels that are not within the range where the third candidate pixel and the fourth candidate pixel are located as redundant pixels in the second edge; Eliminating redundant pixels from the pixels included in the second edge; Based on the distance information between each pixel point and the corresponding matching pixel point after eliminating redundant pixels in the first edge and the second edge, the width information between the first edge and the second edge is determined as the width information of the glued area; wherein the matching pixel point corresponding to each pixel point is: the pixel point that belongs to a different edge from the pixel point and has the smallest distance.

2. The method according to claim 1, characterized in that Before determining the width information between the first edge and the second edge as the width information of the glued area based on the distance information between each pixel after removing redundant pixels and the corresponding matching pixel in the first edge and the second edge, the method further includes: Determining distance information between each pixel point in the first edge and each pixel point in the second edge; For each pixel point in the first edge and the second edge, the minimum distance information is determined from the distance information between the pixel point and the corresponding pixel points to be filtered, as the distance information between the pixel point and the corresponding matching pixel point, wherein the pixel point to be filtered corresponding to each pixel point is a pixel point belonging to a different edge from the pixel point.

3. The method according to claim 2, characterized in that The step of determining, for each pixel point in the first edge and the second edge, minimum distance information from distance information between the pixel point and corresponding pixels to be screened, as distance information between the pixel point and the corresponding matching pixel point, includes: Based on the distance information between each pixel in the first edge and each pixel in the second edge, a distance information matrix d is constructed: Where n is the number of pixels included in the first edge, m is the number of pixels included in the second edge, and each d in the distance information matrix d uv Represents the distance information between the u-th pixel point in the first edge and the v-th pixel point in the second edge; Determine the minimum distance information in each row of the distance information matrix d as the distance information between the pixel point in the row and the corresponding matching pixel point; The minimum distance information in each column of the distance information matrix d is determined as the distance information between the pixel points in the column and the corresponding matching pixel points.

4. The method according to any one of claims 1 to 3, characterized in that Before performing edge recognition on the glued area in the glued image to obtain the first edge and the second edge of the glued area, the method further includes: Performing glue area recognition on the glued image to determine the glued area in the glued image.

5. A width information determination device, characterized in that: The device comprises: An image acquisition module, configured to acquire a glue-coated image including a glue-coated area, wherein the glue-coated area is an area of ​​the glue-coated component that has been glued; an edge recognition module, configured to perform edge recognition on the glued area in the glued image to obtain a first edge and a second edge of the glued area; the first edge includes a first endpoint and a second endpoint, and the second edge includes a third endpoint and a fourth endpoint; An information determination module is used to determine, from each pixel point included in the first edge, the pixel point with the smallest distance from the third endpoint as the first candidate pixel point, and determine the pixel point with the smallest distance from the fourth endpoint as the second candidate pixel point; determine, from each pixel point included in the first edge, the pixel points that are not within the range of the first candidate pixel point and the second candidate pixel point as redundant pixel points in the first edge; eliminate the redundant pixel points in each pixel point included in the first edge; determine, from each pixel point included in the second edge, the pixel point with the smallest distance from the first endpoint as the third candidate pixel point, and determine the pixel point with the smallest distance from the second endpoint as the third candidate pixel point. The smallest pixel point is used as the fourth candidate pixel point; the pixel points in the second edge that do not belong to the range of the third candidate pixel point and the fourth candidate pixel point are determined as redundant pixel points in the second edge; the redundant pixel points in the pixel points contained in the second edge are eliminated; based on the distance information between each pixel point after eliminating the redundant pixel points and the corresponding matching pixel points in the first edge and the second edge, the width information between the first edge and the second edge is determined as the width information of the glued area; wherein the matching pixel point corresponding to each pixel point is: a pixel point that belongs to a different edge from the pixel point and has the smallest distance.

6. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 4 when executing a program stored in a memory.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Image correction method and device, and storage medium

    CN108320270A

  • Tunnel structure crack identification method based on gray scale and gradient fusion

    CN110378950A

  • Screening method of adhesive tape edge points

    CN114120051A