Edge detection method and device for electrode coating

By scanning the pole piece coating image and analyzing the changing trend of the pixels, the edge position of the lithium battery pole piece coating is determined, which solves the problem of difficulty in edge detection in the existing technology and improves battery performance and safety.

CN116740106BActive Publication Date: 2024-10-29TIMACO (JIANGSU) IND TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310594841.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2024-10-29
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

In the lithium battery industry, existing technology is difficult to effectively detect the edges of lithium battery pole plate coatings, which affects the battery's capacity, internal resistance, cycle life and safety.

Method used

The image to be processed is obtained by scanning the pole piece coating, and the change trend is determined based on the position and gray value of the pixel point. The target edge pixel is determined based on the position and trend, and the edge position of the pole piece coating is determined.

Benefits of technology

It achieves accurate detection of the coating edge position of the pole piece and improves the performance and safety of lithium batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740106B_ABST
    Figure CN116740106B_ABST
Patent Text Reader

Abstract

The present invention discloses an edge detection method and device for a pole piece coating, the method comprising: scanning the pole piece coating to obtain an image to be processed; determining the change trend of each pixel point based on the position and grayscale value of each pixel point in the image to be processed; the change trend is whitening, blackening or unchanged; determining the target edge pixel point based on the position, grayscale value and change trend of each pixel point; taking the position of the target edge pixel point as the edge position of the pole piece coating, so that the edge position detection of the pole piece coating can be realized, and the edge of the pole piece coating can be determined more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of lithium batteries, and more specifically, to an edge detection method and device for electrode coating. Background Art

[0002] In the lithium battery industry, the coating of the lithium battery pole piece affects the battery capacity, internal resistance, cycle life and safety. Therefore, testing and adjusting the coating of the lithium battery pole piece can better guarantee the performance of the obtained lithium battery. On this basis, how to detect the edge of the lithium battery pole piece coating is a technical problem that needs to be solved. Summary of the invention

[0003] The embodiments of the present application provide a method and device for detecting the edge of a pole piece coating, which are used to detect the edge of a pole piece coating of a lithium battery.

[0004] In a first aspect, a method for detecting an edge of a pole piece coating is provided, the method comprising:

[0005] Scanning the electrode coating to obtain an image to be processed;

[0006] Based on the position and grayscale value of each pixel in the image to be processed, determining the change trend of each pixel; the change trend is whitening, blackening or unchanged;

[0007] Determine the target edge pixel points based on the position, gray value and change trend of each pixel point;

[0008] The position of the target edge pixel point is used as the edge position of the electrode coating.

[0009] In a second aspect, a device for detecting an edge of a pole piece coating is provided, the device comprising:

[0010] A scanning module, used to scan the electrode coating to obtain an image to be processed;

[0011] A change trend determination module, used to determine the change trend of each pixel point based on the position and gray value of each pixel point in the image to be processed; the change trend is whitening, blackening or unchanged;

[0012] A target edge pixel point determination module, used to determine the target edge pixel point based on the position, gray value and change trend of each pixel point;

[0013] The edge position determination module is used to use the position of the target edge pixel point as the edge position of the electrode coating.

[0014] In a third aspect, an electronic device is provided, the electronic device comprising 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;

[0015] Memory, used to store computer programs;

[0016] The processor is used to implement the steps of the edge detection method for electrode coating as described in the first aspect when executing the program stored in the memory.

[0017] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the edge detection method for electrode coating as described in the first aspect are implemented.

[0018] By applying the above technical scheme, based on the position, pixel and grayscale value of each pixel in the image to be processed obtained by scanning the electrode coating, first determine whether the change trend of each pixel is turning black, turning white or unchanged, and then determine the target edge pixel point based on the position and grayscale value of each pixel point and the change trend of each pixel point. Finally, the position of the target edge pixel point is used as or determined as the edge position of the electrode coating, thereby realizing the edge position detection of the electrode coating and determining the edge of the electrode coating. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A schematic flow chart of an edge detection method for electrode coating proposed in an embodiment of the present invention is shown;

[0021] Figure 2 A schematic diagram showing a process of determining the change trend of all second pixel points in an embodiment of the present invention;

[0022] Figure 3 A schematic diagram showing a process of determining an end pixel point and a start pixel point of an initial edge in an embodiment of the present invention;

[0023] Figure 4 A schematic diagram showing a process of determining target edge pixel points in an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of an edge detection device for electrode coating provided by an embodiment of the present invention is shown;

[0025] Figure 6 A schematic structural diagram of an electronic device proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION

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

[0027] In order to detect the edge position of the electrode coating, the embodiment of the present application provides an edge detection method for the electrode coating, which is applied to any device. Figure 1 As shown, the method includes steps S101-S104:

[0028] Step S101, scanning the electrode coating to obtain an image to be processed.

[0029] Optionally, a line scan camera (or a line array camera) is used to scan the electrode coating to obtain an image to be processed.

[0030] In a possible implementation, a line scan camera is used to scan the actual electrode coating area to obtain an image to be processed.

[0031] Alternatively, in another possible implementation, a line scan camera is used to scan the pre-captured image of the electrode coating to obtain an image to be processed.

[0032] The width of the image to be processed obtained by scanning with a line array camera is very small, for example, a few pixels, but the length of the image to be processed is very long, for example, several thousand pixels.

[0033] Exemplarily, the width of the image to be processed is 1 pixel and the length is 1500 pixels.

[0034] It should be noted that for a detailed introduction to the line scan camera, the scanning method of the line scan camera, and the image obtained by scanning the line scan camera, etc., reference may be made to the prior art and will not be elaborated herein.

[0035] Step S102, determining the change trend of each pixel point based on the position and grayscale value of each pixel point in the image to be processed.

[0036] Among them, the change trend is turning white, turning black or remaining unchanged.

[0037] Optionally, based on a preset distance and the position of each pixel in the image to be processed, the pixel points in the image to be processed are divided into a first pixel point, a second pixel point and a third pixel point, and then the three pixel points are processed separately to determine the change trend of the three pixel points.

[0038] For the first pixel, the change trend of the first pixel is set to whiten.

[0039] For the second pixel point, based on the preset distance, the position of each pixel point and the gray value of each pixel point, the change trend of the second pixel point is calculated and determined.

[0040] For the third pixel point, the change trend of the third pixel point is set to become black.

[0041] It should be noted that the preset distance is related to the position of each pixel in the image to be processed, and can be understood as a preset number of positions.

[0042] In one possible implementation, when dividing the first pixel point, the second pixel point, and the third pixel point, based on the preset distance and the position of each pixel point, the first pixel point and the preset distance pixel point in the image to be processed are divided into the first pixel point, the pixel point in the image to be processed that is located after the preset distance pixel point and before the last preset distance pixel point is divided into the second pixel point, and the pixel point in the image to be processed that is located at the last preset distance pixel point is divided into the third pixel point.

[0043] Exemplarily, the preset distance or the preset number of positions is x. For the n pixels in the image to be processed, the 1st to xth pixels or the first x pixels are divided into first pixels, the x+1th to nxth pixels are divided into second pixels, and the n-x+1th image to the nth pixel or the last x pixels are divided into third pixels.

[0044] That is, the change trend of the pixels at the beginning and the end of the image to be processed is set to the preset change trend. For example, the preset change trend corresponding to the pixels at at least one starting position in the image to be processed is whitening, that is, the change trend of the pixels at at least one starting position is directly set to whitening, and the preset change trend corresponding to the pixels at at least one ending position in the image to be processed is blackening, that is, the change trend of the pixels at at least one ending position is directly set to blackening.

[0045] Exemplarily, taking the preset distance x as an example, the change trend of the first x pixels in the image to be processed is set to whitening, and the change trend of the last x pixels in the image to be processed is set to blackening. In this way, it can better avoid the situation where the first and last x pixels in the image to be processed cannot use the same method as the second pixel to determine the change trend due to position limitations, thereby achieving the effect of determining the change trend of each pixel in the image to be processed, so as to subsequently detect the edge of the electrode coating based on the change trend of each pixel.

[0046] In one possible implementation, when calculating and determining the change trend of the second pixel point, the pixel point that is a preset distance away from the second pixel point is determined as the associated pixel point of the second pixel point, and then the change trend of the second pixel point is determined based on the size of the grayscale value of the associated pixel point of the second pixel point and the grayscale difference between the grayscale values ​​of the associated pixel points.

[0047] There is at least one second pixel point. For ease of understanding, one second pixel point is taken as an example to introduce the process of determining the change trend of the second pixel point.

[0048] It can be understood that, since the second pixel point is a pixel point located in the middle position of the image to be processed, the interval between the second pixel point and the pixels at the first and last positions in the image to be processed is at least a preset distance, and therefore, there are at least two pixels at the preset distance from the second pixel point, one of which is located before the second pixel point and the other is located after the second pixel point. In other words, the associated pixel points of the second pixel point include the first associated pixel point and the second associated pixel point, and the first associated pixel point is located before the second pixel point, and the second associated pixel point is located after the second pixel point.

[0049] At this time, if the grayscale value of the first associated pixel point is less than the grayscale value of the second associated pixel point, and the grayscale difference between the two is greater than the first preset difference threshold, then the change trend of the second pixel point is determined to be whitening; if the grayscale value of the first associated pixel point is less than the grayscale value of the second associated pixel point, and the grayscale difference between the two is less than or equal to the first preset difference threshold, then the change trend of the second pixel point is determined to be unchanged; if the grayscale value of the first associated pixel point is greater than or equal to the grayscale value of the second associated pixel point, and the grayscale difference between the two is greater than the second preset difference threshold, then the change trend of the second pixel point is determined to be blackening; if the grayscale value of the first associated pixel point is greater than or equal to the grayscale value of the second associated pixel point, and the grayscale difference between the two is less than or equal to the second preset difference threshold, then the change trend of the second pixel point is determined to be unchanged.

[0050] Of course, when determining the changing trend of the second pixel point, you can first determine the size relationship between the grayscale values ​​of the first associated pixel point and the second associated pixel point corresponding to the second pixel point, and then determine the size relationship between the grayscale difference between the first associated pixel point and the second associated pixel point and the corresponding preset difference threshold. You can also first determine the size relationship between the grayscale difference between the first associated pixel point and the second associated pixel point corresponding to the second pixel point and the corresponding preset difference threshold, and then determine the size relationship between the grayscale values ​​of the first associated pixel point and the second associated pixel point, as long as both items are judged.

[0051] Generally speaking, the changing trend of the pixels before and after any pixel can reflect the changing trend of the pixel. By comparing the grayscale values ​​of the associated pixels before and after the second pixel, and determining that the changing trend of the second pixel is whitening or blackening after the grayscale difference between the associated pixels exceeds a certain threshold, it is avoided that the misjudgment caused by the scanning error, etc., when the actual grayscale difference is zero but a smaller grayscale difference appears in comparison, thereby ensuring the accuracy of determining the changing trend of the second pixel.

[0052] The values ​​of the first preset difference threshold and the second preset difference threshold may be the same or different.

[0053] For example, the process of determining the change trend of all second pixels in this embodiment may be as follows: Figure 2 As shown. First, take the front and rear pixels with a fixed interval from the current second pixel, that is, the first associated pixel and the second associated pixel whose distance from the current second pixel is the preset distance. Then, determine whether the grayscale difference of the front and rear pixels is greater than the corresponding preset difference threshold. If the grayscale difference of the front and rear pixels is greater than the corresponding preset difference threshold, further determine the grayscale value of the front and rear pixels; if the grayscale difference of the front and rear pixels is less than or equal to the corresponding preset difference threshold, mark the front and rear pixels as the same, that is, the change trend of the current second pixel is unchanged. When further judging the grayscale value of the front and rear pixels, if the grayscale value of the front pixel is less than the grayscale value of the rear pixel, determine the change trend of the current second pixel to be black; if the grayscale value of the front pixel is greater than or equal to the grayscale value of the rear pixel, determine the change trend of the current second pixel to be white. Then, based on the position mark value or number corresponding to the current second pixel, determine whether all second pixels have been processed, that is, whether the change trend of all second pixels is determined. If so, end the process. If not, continue to determine the change trend of the new current second pixel point, add 1 to the number of the current second pixel point, that is, add 1 to the position mark value of the current second pixel point, and obtain the new current second pixel point, or in other words, take the next pixel point of the current second pixel point to replace the current second pixel point.

[0054] Among them, when judging whether to determine the change trend of all second pixel points, if the value of the position mark value corresponding to the new current second pixel point is greater than nx, it means that the change trend of all second pixel points has been determined, and if the value of the position mark value corresponding to the new current second pixel point is less than or equal to nx, it means that the change trend of all second pixel points has not been determined, and the operation of determining the change trend of the new current second pixel point continues. Among them, n is the total number of pixels in the image to be processed, and x is the above-mentioned fixed interval or preset distance.

[0055] Specifically, the change trend of the pixel point can be represented by a numerical value, for example, 255 represents the change trend of whitening, 0 represents the change trend of blackening, and 128 represents the change trend of unchanged. In other words, if the change trend of the pixel point is whitening, the trend information (or direction information) of the pixel point is marked as 255; if the change trend of the pixel point is blackening, the trend information of the pixel point is marked as 0; if the change trend of the pixel point is unchanged, the trend information of the pixel point is marked as 128.

[0056] Exemplarily, based on the specified preset distance x. Select a pixel point start corresponding to a starting position, for example, the pixel point corresponding to the x+1th position in the image to be processed, or the x+1th pixel point, compare the grayscale values ​​of the pixel point start-x with the pixel point start+x, and compare the difference in the grayscale values ​​of the two with the specified threshold (i.e., the corresponding preset difference threshold). At this time, if the grayscale value of the latter is larger than that of the former, and the difference between the two is greater than the corresponding preset difference threshold, it is considered to be a whitening trend, that is, the change trend is whitening, and the trend information of the current pixel point start is marked as 255; similarly, if the difference between the two is less than or equal to the corresponding preset difference threshold, it is considered to be no change, that is, the change trend is unchanged, and the trend information of the current pixel point start is marked as 128. If the grayscale value of the latter is smaller than that of the former or the grayscale values ​​of the two are equal, and the difference between the two (or the relative value) is greater than the corresponding preset difference threshold, it is considered to be a darkening trend, that is, it becomes black when the trend changes, and the trend information of the current pixel is marked as 0; similarly, if the difference between the two is less than the corresponding preset difference threshold, it is considered to be no change, and the trend information of the current pixel is marked as 128.

[0057] Step S103, determining the target edge pixel points based on the position, gray value and change trend of each pixel point.

[0058] Optionally, the starting pixel of the initial edge and the ending pixel of the initial edge are first determined based on the position of each pixel and whether the change trends of adjacent pixels are the same. Subsequently, the change characteristics of the initial edge are calculated based on the change trend and grayscale value of the ending pixel of the initial edge and the grayscale value of the starting pixel of the initial edge. Finally, the target edge pixel is determined based on the change characteristics of the initial edge.

[0059] The change characteristics of the initial edge are similar to the change trends of each pixel point, and the change characteristics of the initial edge are used to indicate whether the initial edge becomes white, becomes black, or remains unchanged.

[0060] In a possible implementation, when determining the starting pixel point of the initial edge and the ending pixel point of the initial edge, based on the position sequence of each pixel point, it is determined in turn whether the change trends of the previous pixel point and the next pixel point in adjacent pixels are the same.

[0061] If the changing trend of the previous pixel point is the same as the changing trend of the next pixel point, the number of identical pixels corresponding to the previous pixel point is increased by 1; if the changing trend of the previous pixel point is different from the changing trend of the next pixel point, the patrol edge mark corresponding to the previous pixel point is set to 1, and after recording the number of identical pixels as the number of identical pixels corresponding to the previous pixel point, the number of identical pixels is cleared to zero.

[0062] Subsequently, after determining in turn whether the change trends of the previous pixel point and the next pixel point in the adjacent pixel points are the same, the pixel point at the patrol edge mark position 1 is determined as the end pixel point of the initial edge, and according to the difference between the position mark value of the end pixel point of the initial edge and the number of the same pixels corresponding to the end pixel point of the initial edge, the pixel point corresponding to the position mark value with the same difference is determined as the starting pixel point of the initial edge.

[0063] The position mark value of a pixel point is used to indicate the position of the pixel point in all pixels of the image to be processed. For example, if the position mark value of a pixel point is 2, it means that the pixel point is the second pixel point in the image to be processed.

[0064] In addition, there are multiple groups of adjacent pixels in the image to be processed. The number of initial edges can also be multiple.

[0065] Specifically, after determining whether the change trends of the previous pixel point and the next pixel point in the current group of adjacent pixel points are the same, the next pixel point in the current group of adjacent pixel points is used as the previous pixel point in the next group of adjacent pixel points, and continue to determine whether the change trends of the previous pixel point and the next pixel point in the next group of adjacent pixel points are the same.

[0066] Or, specifically, after determining whether the change trends of the previous pixel point and the next pixel point in the current group of adjacent pixel points are the same, the previous pixel point and the next pixel point in the next group of adjacent pixel points are determined based on whether the change trends of these two pixel points are the same.

[0067] If it is determined that the previous pixel point and the next pixel point in the current group of adjacent pixel points have the same change trend, the next pixel point in the current group of adjacent pixel points is determined as the previous pixel point in the next group of adjacent pixel points. If it is determined that the previous pixel point and the next pixel point in the current group of adjacent pixel points have different change trends, another pixel point adjacent to and behind the next pixel point in the current group of adjacent pixel points is determined as the previous pixel point in the next group of adjacent pixel points.

[0068] At this time, if the next pixel point in the current group of adjacent pixel points is one of the last three pixel points in the image to be processed, it is determined that the operation of determining whether the change trends of the adjacent previous pixel point and the next pixel point are the same is completed, and then proceed to the next operation, that is, determining the initial edge end pixel point and the starting pixel point.

[0069] In this way, after determining the pixel point as the corresponding border patrol mark position 1, the pixel point that is one position away from the pixel point is used as the previous pixel point of the next group of adjacent pixel points. This can avoid using the pixel point as the end pixel point of the initial edge and the subsequent pixel point adjacent to the pixel point as the starting pixel point of another initial edge. This can make the distinction between the current initial edge and the next initial edge more obvious and avoid confusion.

[0070] Specifically, when judging whether the change trend of the previous pixel point is the same as the change trend of the next pixel point, if the change trends of both pixels are whitening, or both pixels are blackening, or both pixels are unchanged, then the change trends of both pixels are determined to be the same. Otherwise, the change trends of both pixels are determined to be different.

[0071] Alternatively, specifically, in order to avoid errors, when judging that the change trends of the previous pixel point and the next pixel point are different, the change trend of another pixel point located after the next pixel point and adjacent to the next pixel point can be combined to further and more accurately judge whether the change trends of the previous pixel point and the next pixel point are the same.

[0072] When it is determined that the change trends of the previous pixel point and the next pixel point are different, it is further determined whether the change trends of the previous pixel point and the above-mentioned another pixel point are the same. If the change trends of the previous pixel point and the other pixel point are the same, it is determined that the change trends of the previous pixel point and the next pixel point are the same. If the change trends of the previous pixel point and the other pixel point are also different, it is determined that the change trends of the previous pixel point and the next pixel point are different.

[0073] Exemplarily, taking the first four pixels in the image to be processed as an example, these four pixels are a, b, c, and d, first judge whether the change trends of adjacent pixels a and b are the same: if the change trend of a is the same as the change trend of b, then add 1 to the number of identical pixels. It can be understood that a, as the first pixel in the image to be processed, has the same number of pixels as 0 before judgment. At this time, after adding 1 to the number of identical pixels, the number of identical pixels is 1; if the change trend of a is different from the change trend of b, but the change trend of a is the same as the change trend of c, then add 1 to the number of identical pixels, and the number of identical pixels is 1; if the change trend of a is different from the change trend of b, and the change trend of a is different from the change trend of c, then set the border patrol mark position corresponding to a to 1, and record the current number of identical pixels as the number of identical pixels corresponding to a, and clear the number of identical pixels to zero. Afterwards, in a similar manner as described above, judge whether the change trends of adjacent pixels b and c are the same, and then judge whether the change trends of c and d are the same. Finally, based on the above judgment results, the pixel point at the patrol edge mark position 1 corresponding to a, b, and c is determined as the end pixel point of the initial edge.

[0074] For example, in the previous example, it is determined that the change trends of a and b are the same, and the number of identical pixels is increased by 1 to obtain the number of identical pixels as 1. Subsequently, it is determined that the change trends of b and c are the same, and the number of identical pixels is increased by 1 to obtain the number of identical pixels as 2. Finally, it is determined that the change trends of c and d are different, and the patrol edge mark position corresponding to c is set to 1, and after recording the number of identical pixels 2 as the number of identical pixels corresponding to c, the number of identical pixels is cleared, that is, set to 0. After successively determining whether the change trends of the first four pixels ad in the image to be processed are the same, c at the patrol edge mark position 1 is determined as the end pixel of the initial edge, and according to the difference of 1 between the position mark value 3 of c and the number of identical pixels 2 corresponding to c, the pixel corresponding to the position mark value of 1, that is, a, is determined as the starting pixel of the initial edge.

[0075] Specifically, after determining the starting pixel and the ending pixel of the initial edge, that is, after completing the operation of determining in turn whether the change trends of the previous pixel and the next pixel in the adjacent pixels are the same, the initial edge is screened based on the number of identical pixels corresponding to the pixel at the patrol edge mark position 1, and the initial edge that is too short is filtered out, and the longer initial edge is retained for the next operation, that is, the change characteristics of the initial edge are determined to ensure the accuracy of edge recognition while reducing the subsequent workload.

[0076] More specifically, if the number of identical pixels corresponding to the pixel at patrol border mark position 1 is less than the preset number of pixels, the patrol border mark corresponding to the pixel is set to 0, and the number of identical pixels corresponding to the pixel is cleared, that is, the initial edge with the pixel as the end pixel is filtered out.

[0077] For example, the process of determining the end pixel point and the start pixel point of the initial edge can be as follows: Figure 3 As shown, take the previous pixel and the next pixel in the adjacent pixel points, and determine whether the change trend of the previous pixel point is the same as the change trend of the next pixel point. If they are the same, add 1 to the number of identical pixels. If they are different, compare whether the change trend of the previous pixel point is the same as that of another pixel point. If they are the same, add 1 to the number of identical pixels. If they are different, record the number of identical pixels as the number of identical pixels corresponding to the previous pixel point, clear the number of identical pixels, and set the border patrol mark position corresponding to the previous pixel point to 1. Then, based on the position mark values ​​of the previous pixel point and the next pixel point in the adjacent pixel points in the image to be processed, determine whether all adjacent pixel points have been processed. If so, determine whether the number of identical pixels corresponding to the pixel point at the border patrol mark position 1 is greater than the preset number of pixels. If not, determine the next group of adjacent pixel points, and continue to determine the change trend of the next group of adjacent pixel points. The pixel points at each patrol border mark position 1 are judged in turn. If the number of identical pixels corresponding to the pixel point at the patrol border mark position 1 is greater than the preset number of pixels, the patrol border mark position 1 of the pixel point is maintained. If the number of identical pixels corresponding to the pixel point at the patrol border mark position 1 is less than or equal to the preset number of pixels, the patrol border mark position of the pixel point is set to 0, and the number of identical pixels corresponding to the pixel point is cleared. Finally, it is determined whether all the pixel points at the patrol border mark position 1 have been processed. If so, the process ends. If not, the pixel point at the next patrol border mark position 1 is determined, and the pixel point at the next patrol border mark position 1 continues to be processed.

[0078] Exemplarily, taking the 1st to 9th pixel points in the image to be processed as an example, as shown in Table 1 below, the position mark values ​​of these 9 pixel points are 1, 2, 3, 4, 5, 6, 7, 8, 9, respectively, and the grayscale values ​​are 12, 15, 18, 18, 18, 15, 12, 12, 12, respectively. These 9 pixel points are processed in the manner given in the above embodiment. With the preset distance as 1, the trend information of these 9 pixel points is determined to be 255, 255, 255, 128, 0, 0, 0, 128, 0, respectively. That is to say, among these 9 pixel points, the change trend of the 1st to 3rd pixel points is all whitening, the change trend of the 4th and 8th pixel points is unchanged, and the change trend of the 5th, 6th and 9th pixel points is all blackening. When determining the initial edge, the first pixel has the same change trend as the second pixel, and the number of identical pixels is increased by 1, so that the number of identical pixels is 1. The second pixel has the same change trend as the third pixel, and the number of identical pixels is increased by 1, so that the number of identical pixels is 2. The third pixel has a different change trend from the fourth and fifth pixels, so the patrol edge flag of the third pixel is set to 1, and the number of identical pixels is cleared. Similarly, the fifth pixel has the same change trend as the sixth pixel, and the number of identical pixels is increased by 1, so that the number of identical pixels is 1. The sixth pixel has the same change trend as the seventh pixel, and the number of identical pixels is increased by 1, so that the number of identical pixels is 2. The seventh pixel has a different change trend from the eighth and ninth pixels, so the patrol edge flag of the seventh pixel is set to 1. As shown in Table 1, the column of information on the initial edge mainly gives the number of identical pixels or the patrol edge flag value corresponding to each pixel of the initial edge. Finally, based on the above content, the position marking value of the starting pixel point of the initial edge corresponding to the 3rd pixel point is 3-2=1, and the position marking value of the ending pixel point of the initial edge is 3; the position marking value of the starting pixel point of the initial edge corresponding to the 7th pixel point is 7-2=5, and the position marking value of the ending pixel point of the initial edge is 7.

[0079] Table 1

[0080]

[0081] In a possible implementation, when calculating and determining the change feature of the initial edge, if the change trend of the end pixel point of the initial edge is turning white (i.e., the trend information of the end pixel point of the initial edge is 255), and the difference between the gray value of the end pixel point of the initial edge and the gray value of the start pixel point of the initial edge is greater than the product of the gray value of the end pixel point of the initial edge and the preset value, then it is determined that the change feature of the initial edge is turning white. If the change trend of the end pixel point of the initial edge is turning black (i.e., the trend information of the end point of the initial edge is 0), and the difference between the gray value of the end pixel point of the initial edge and the gray value of the start pixel point of the initial edge is less than the product of the gray value of the end pixel point of the initial edge and the preset value, then it is determined that the change feature of the initial edge is turning black. If the change trend of the end pixel point of the initial edge remains unchanged (i.e., the trend information of the end point of the initial edge is 128), then it is determined that the change feature of the initial edge remains unchanged.

[0082] Among them, the preset value can be, for example, 1 / 8 or 1 / 4. The value of this preset value is around 1 - 1 / 9. Generally, the smaller the value of the preset value, the clearer the obtained image, and the clearer and more accurate the detected target edge.

[0083] Specifically, after determining the change feature of the initial edge, the change feature, and the information of the corresponding start pixel point and end pixel point can be saved in the implementation feature array together.

[0084] Exemplarily, if the trend information of the end pixel point a of the initial edge 1 is 255, and the difference between the gray value of a and the gray value of the start pixel point b of the initial edge 1 is A - B = ab, and the product of the gray value of a and the preset value 1 / 8 is A / 8, and ab > A / 8, then it is determined that the change feature of the initial edge 1 is turning white, and the change feature of the initial edge 1, the relevant information of b, the relevant information of a, etc. are saved in the implementation feature group together. Among them, the relevant information includes position marker value, gray value, change trend, etc.

[0085] Exemplarily, if the trend information of the end pixel point c of the initial edge 2 is 0, and the difference between the gray value of c and the gray value of the start pixel point d of the initial edge 2 is C - D = cd, and the product of the gray value of c and the preset value 1 / 8 is C / 8, and cd < C / 8, then it is determined that the change feature of the initial edge 2 is turning black, and the change feature of the initial edge 2, the relevant information of d, the relevant information of c, etc. are saved in the implementation feature group together.

[0086] Exemplarily, if the trend information of the end pixel point e of the initial edge 3 is 128, then it is determined that the change feature of the initial edge 3 remains unchanged, and the change feature of the initial edge 3, the relevant information of e, and the relevant information of f are saved in the implementation feature group together. Wherein, f is the start pixel point of the initial edge 3.

[0087] That is to say, the implementation feature array stores the change features of each initial edge, the related information of the starting pixel point of each initial edge, and the related information of the ending pixel point of each initial edge. It can be understood that in the implementation feature array, the change features of the initial edge, the related information of the starting pixel point of the initial edge, and the related information of the ending pixel point of the initial edge are in one-to-one correspondence.

[0088] It can be understood that, generally, the number of initial edges obtained through the above operation is multiple, that is, multiple end pixel points of the initial edges are obtained.

[0089] In a possible implementation, after the change characteristics of each initial edge are determined, the target edge pixel point may be determined based on the change characteristics of the initial edge.

[0090] Specifically, based on whether the change characteristics of the initial edges are the same, the target edge is determined, and then the middle pixel point of the target edge is determined as the target edge pixel point.

[0091] More specifically, based on whether the change features of the initial edges are the same, adjacent initial edges with the same change features are merged, and the merged initial edge and the adjacent initial edges with different change features are determined as target edges.

[0092] That is, based on whether the change characteristics of the initial edges are the same, adjacent initial edges with the same change characteristics are merged to obtain merged initial edges, and the merged initial edges are determined as target edges; adjacent initial edges with different change characteristics are directly determined as target edges.

[0093] Generally, if the distance between adjacent initial edges is far, there is no need to merge them. Therefore, before merging adjacent initial edges with the same change characteristics, it is necessary to judge the distance between adjacent initial edges. If the distance is less than the preset edge distance (i.e. the number of pixels between them), continue to merge. If the distance is greater than or equal to the preset edge distance, stop merging.

[0094] Among the adjacent initial edges, the distance between the end pixel point of the previous initial edge and the start pixel point of the next initial edge is greater than or equal to the preset edge distance.

[0095] For example, taking the preset edge distance of 3 (that is, the number of interval pixels is 3) as an example, the distance between the end pixel point a of the previous initial edge 1 and the starting pixel point b of the subsequent initial edge 2 is 2, that is, the difference between the position mark value 4 of a and the position mark value 6 of b is 2, 2<3, then the previous initial edge 1 and the subsequent initial edge 2 are merged.

[0096] More specifically, the position mark values ​​of the starting pixel point and the ending pixel point of the target edge are averaged, and the pixel point corresponding to the average, or the pixel point corresponding to the integer of the average, is used as the middle pixel point of the target edge and determined as the target edge pixel point.

[0097] Exemplarily, the position mark value of the starting pixel point a of the target edge is 1, and the position mark value of the ending pixel point b of the target edge is 3. Then the pixel point corresponding to the average 2 of these two position mark values, that is, the pixel point with the position mark value of 2, is taken as the middle pixel point of the target edge and determined as the target edge pixel point.

[0098] Exemplarily, the position mark value of the starting pixel point a of the target edge is 1, and the position mark value of the ending pixel point b of the target edge is 4. The average of these two position mark values ​​2.5 is rounded to 2 or 3, and the pixel point with the position mark value of 2 or 3 is determined as the middle pixel point of the target edge and the target edge pixel point.

[0099] For example, taking the example of merging adjacent initial edges based on whether the distances and change trends between adjacent initial edges are the same, the process of determining the target edge pixel point can be as follows: Figure 4 As shown, take the previous initial edge and the next initial edge of the adjacent initial edge. If the difference c between the position mark value of the end pixel of the previous initial edge and the position mark value of the start pixel of the next initial edge is less than 3, and the change characteristics of the previous and next initial edges are the same, then merge the previous initial edge and the next initial edge to obtain the merged initial edge. After that, determine whether all adjacent initial edges have been processed. If not, determine the next group of adjacent initial edges, and continue to determine whether the next group of adjacent initial edges can be merged; if yes, determine the merged initial edge and the unmerged initial edge as the target edge, and then record and determine the middle pixel of the target edge as the target edge pixel.

[0100] Step S104, taking the position of the target edge pixel point as the edge position of the electrode coating.

[0101] Through the above process, based on the position, pixel and grayscale value of each pixel in the image to be processed obtained by scanning the electrode coating, first determine whether the change trend of each pixel is turning black, turning white or unchanged, and then determine the target edge pixel based on the position and grayscale value of each pixel and the change trend of each pixel. Finally, the position of the target edge pixel is used as or determined as the edge position of the electrode coating, thereby realizing the edge position detection of the electrode coating and determining the edge of the electrode coating.

[0102] In order to detect the edge position of the electrode coating, the embodiment of the present application also provides an edge detection device for the electrode coating, such as Figure 5 As shown, the device includes a scanning module 501 , a change trend determination module 502 , a target edge pixel point determination module 503 and an edge position determination module 504 .

[0103] A scanning module 501 is used to scan the electrode coating to obtain an image to be processed;

[0104] The change trend determination module 502 is used to determine the change trend of each pixel point based on the position and gray value of each pixel point in the image to be processed; the change trend is whitening, blackening or unchanged;

[0105] The target edge pixel point determination module 503 is used to determine the target edge pixel point based on the position, gray value and change trend of each pixel point;

[0106] The edge position determination module 504 is used to use the position of the target edge pixel point as the edge position of the electrode coating.

[0107] like Figure 6 As shown, an embodiment of the present application provides an electronic device, including a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0108] Memory 603, used for storing computer programs;

[0109] In one embodiment of the present application, the processor 601 is used to implement the steps of the edge detection method for electrode coating provided by any of the aforementioned method embodiments when executing the program stored in the memory 603.

[0110] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the edge detection method for electrode coating provided in any of the aforementioned method embodiments are implemented.

[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting the edge of a pole piece coating, characterized in that: Scanning the electrode coating to obtain an image to be processed; Based on the position and grayscale value of each pixel point in the image to be processed, determining the change trend of each pixel point; including: based on a preset distance and the position of each pixel point, dividing the pixel points in the image to be processed into a first pixel point, a second pixel point and a third pixel point; setting the change trend of the first pixel point to whitening; calculating and determining the change trend of the second pixel point based on the preset distance, the position of each pixel point and the grayscale value of each pixel point; setting the change trend of the third pixel point to blackening; The change trend is whitening, blackening or unchanged; Determine the target edge pixel points based on the position, gray value and change trend of each pixel point; The position of the target edge pixel point is used as the edge position of the electrode coating; The calculating and determining the change trend of the second pixel point based on the preset distance, the position of each pixel point and the grayscale value of each pixel point includes: determining a pixel point whose distance from the second pixel point is the preset distance as an associated pixel point of the second pixel point; determining the change trend of the second pixel point based on the magnitude of the grayscale value of the associated pixel point of the second pixel point and the grayscale difference between the grayscale values ​​of the associated pixel points; The associated pixels of the second pixel include a first associated pixel and a second associated pixel; the first associated pixel is located before the second pixel, and the second associated pixel is located after the second pixel; the change trend of the second pixel is determined based on the grayscale values ​​of the associated pixels of the second pixel and the grayscale difference between the grayscale values ​​of the associated pixels, including: if the grayscale value of the first associated pixel is less than the grayscale value of the second associated pixel, and the grayscale difference is greater than a first preset difference threshold, then the change trend of the second pixel is determined to be whitening; if the grayscale value of the first associated pixel is less than the grayscale value of the second associated pixel, and the grayscale difference is less than or equal to the first preset difference threshold, then the change trend of the second pixel is determined to be unchanged; if the grayscale value of the first associated pixel is greater than or equal to the grayscale value of the second associated pixel, and the grayscale difference is greater than the second preset difference threshold, then the change trend of the second pixel is determined to be blackening; if the grayscale value of the first associated pixel is greater than or equal to the grayscale value of the second associated pixel, and the grayscale difference is less than or equal to the second preset difference threshold, then the change trend of the second pixel is determined to be unchanged.

2. The edge detection method of the electrode coating according to claim 1, characterized in that: The step of determining target edge pixel points based on the positions, grayscale values, and change trends of the respective pixel points comprises: Determine a starting pixel point of an initial edge and an ending pixel point of the initial edge based on the positions of the respective pixel points and whether the changing trends of adjacent pixel points are the same; Based on the change trend and grayscale value of the end pixel point of the initial edge and the grayscale value of the start pixel point of the initial edge, the change feature of the initial edge is calculated and determined; Based on the change characteristics of the initial edge, the target edge pixel point is determined.

3. The edge detection method of the electrode coating according to claim 2, characterized in that: The determining the starting pixel point of the initial edge and the ending pixel point of the initial edge based on the positions of the respective pixel points and whether the changing trends of the adjacent pixel points are the same includes: Based on the position sequence of each pixel point, determine in turn whether the change trends of the previous pixel point and the next pixel point in the adjacent pixel points are the same; If the change trend of the previous pixel is the same as the change trend of the next pixel, the number of identical pixels is increased by 1; If the change trend of the previous pixel point is different from the change trend of the next pixel point, the patrol flag position corresponding to the previous pixel point is set to 1, and after recording the number of identical pixels as the number of identical pixels corresponding to the previous pixel point, the number of identical pixels is cleared to zero; After determining in turn whether the change trends of the previous pixel point and the next pixel point in adjacent pixel points are the same, the pixel point at the patrol edge mark position 1 is determined as the end pixel point of the initial edge, and according to the difference between the position mark value of the end pixel point of the initial edge and the number of the same pixels corresponding to the end pixel point of the initial edge, the pixel point corresponding to the position mark value that is the same as the difference is determined as the starting pixel point of the initial edge.

4. The edge detection method of the electrode coating according to claim 2, characterized in that: Based on the change trend and grayscale value of the end pixel of the initial edge and the grayscale value of the start pixel of the initial edge, the change feature of the initial edge is calculated and determined, including: If the change trend of the end pixel of the initial edge is whitening, and the difference between the grayscale value of the end pixel of the initial edge and the start pixel of the initial edge is greater than the product of the grayscale value of the end pixel of the initial edge and a preset value, then it is determined that the change feature of the initial edge is whitening; If the change trend of the end pixel of the initial edge is blackening, and the difference between the grayscale value of the end pixel of the initial edge and the start pixel of the initial edge is less than the product of the grayscale value of the end pixel of the initial edge and a preset value, then it is determined that the change feature of the initial edge is blackening; If the change trend of the end pixel point of the initial edge is unchanged, it is determined that the change feature of the initial edge is unchanged.

5. The edge detection method of the electrode coating according to claim 2, characterized in that: The number of the initial edges is multiple; The step of determining the target edge pixel point based on the change characteristics of the initial edge includes: Determining a target edge based on whether the change characteristics of the initial edges are the same; The middle pixel point of the target edge is determined as the target edge pixel point.

6. The edge detection method of the electrode coating according to claim 5, characterized in that: The determining of the target edge based on whether the change characteristics of the initial edges are the same includes: Adjacent initial edges with the same change characteristics are merged, and the merged initial edges and initial edges with different change characteristics from the adjacent initial edges are determined as target edges.

7. An edge detection device for electrode coating, characterized in that: The device comprises: A scanning module, used to scan the electrode coating to obtain an image to be processed; A change trend determination module, for determining the change trend of each pixel point in the image to be processed based on the position and grayscale value of each pixel point in the image to be processed; the change trend is whitening, blackening or unchanged; specifically for: dividing the pixel points in the image to be processed into a first pixel point, a second pixel point and a third pixel point based on a preset distance and the position of each pixel point; setting the change trend of the first pixel point to whitening; calculating and determining the change trend of the second pixel point based on the preset distance, the position of each pixel point and the grayscale value of each pixel point; setting the change trend of the third pixel point to blackening; also for: determining the pixel point with a distance of the preset distance from the second pixel point as the associated pixel point of the second pixel point; determining the change trend of the second pixel point based on the size of the grayscale value of the associated pixel point of the second pixel point and the grayscale difference between the grayscale values ​​of the associated pixel points; the associated pixel points of the second pixel point include the first associated pixel point and the second associated pixel point; the first associated pixel point is located at the first associated pixel point and the second associated pixel point. The first associated pixel is located before the second associated pixel, and the second associated pixel is located after the second pixel; the change trend of the second pixel is determined based on the size of the grayscale value of the associated pixel of the second pixel and the grayscale difference between the grayscale values ​​of the associated pixel, including: if the grayscale value of the first associated pixel is less than the grayscale value of the second associated pixel, and the grayscale difference is greater than the first preset difference threshold, then the change trend of the second pixel is determined to be whitening; if the grayscale value of the first associated pixel is less than the grayscale value of the second associated pixel, and the grayscale difference is less than or equal to the first preset difference threshold, then the change trend of the second pixel is determined to be unchanged; if the grayscale value of the first associated pixel is greater than or equal to the grayscale value of the second associated pixel, and the grayscale difference is greater than the second preset difference threshold, then the change trend of the second pixel is determined to be blackening; if the grayscale value of the first associated pixel is greater than or equal to the grayscale value of the second associated pixel, and the grayscale difference is less than or equal to the second preset difference threshold, then the change trend of the second pixel is determined to be unchanged; A target edge pixel point determination module, used to determine the target edge pixel point based on the position, gray value and change trend of each pixel point; The edge position determination module is used to use the position of the target edge pixel point as the edge position of the electrode coating.

Citation Information

Patent Citations

  • Carbon plate boundary extraction method and device, storage medium and electronic equipment

    CN113689451A