An automatic ROI method and system for pole piece detection

By using a grayscale histogram in the electrode sheet detection, the grayscale values ​​of the background, coating and foil, the threshold value is calculated and the automatic ROI range is determined, the problem of polar sheet jitter causes the detection target to exceed the field of view is solved, and the goal of 100% burr inspection of the electrode sheet is achieved.

CN119515885BActive Publication Date: 2025-03-28HEFEI I TEK OPTOELECTRONICS CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510104974.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-03-28
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

During the pole slitting process, pole jitter causes the detection target to exceed the camera's field of view, and it is difficult for the prior art to achieve a 100% burr full inspection of pole slitting.

Method used

By obtaining the grayscale histogram of the pole image, counting the grayscale values ​​of the background, coating and foil, calculating the grayscale threshold, determining the relationship between the row grayscale mean and the threshold value line by line, and determining the selection range of automatic ROI.

Benefits of technology

It realizes the rapid acquisition of effective information in high frame rate and high resolution application scenarios, adapts to the requirements of industrial detection, enhances the accuracy and robustness of detection, and avoids the loss of detection targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515885B_ABST
    Figure CN119515885B_ABST
Patent Text Reader

Abstract

The present invention proposes an automatic ROI method and system for pole piece detection. The method includes: statistically calculating the grayscale histogram of the pole piece image; based on the grayscale histogram, respectively obtaining the background grayscale, coating grayscale, and foil grayscale; judging whether the pole piece image is qualified based on the grayscale value relationship of the background grayscale, coating grayscale, and foil grayscale; if qualified, calculating the grayscale threshold based on the background grayscale, coating grayscale, and foil grayscale; judging the relationship between the row grayscale mean and the grayscale threshold of the qualified pole piece image row by row to determine the selection range of the automatic ROI; if unqualified, skipping the automatic ROI selection of the current pole piece image. The method disclosed by the present invention combines the characteristics of the pole piece image, is simple in calculation, and can achieve real-time tracking of the mobile detection target in the application scenario of high frame rate and high resolution to avoid loss; it can also quickly obtain effective information to meet the requirements of industrial detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial detection, and in particular to an automatic ROI method and system for pole piece detection. Background Art

[0002] Pole sheet production is the basic process for manufacturing lithium-ion power batteries. The positive electrode is coated on both sides of copper foil, and the negative electrode is coated on both sides of aluminum foil. The positive and negative pole sheets are separated by a diaphragm. Pole sheet slitting and die-cutting is the process of slitting the rolled battery pole sheets according to the battery specifications, including hardware slitting, die-cutting and laser slitting and die-cutting. The pole sheet coating is a composite material composed of layered metal salt particles or layered carbon particles such as petroleum coke, which has almost no plastic deformation ability. When the internal stress generated by the upper and lower disc knives or the high temperature of the laser is greater than the bonding force between the coating particles, cracks will appear in the coating and eventually expand and separate. This is the pole sheet slitting process. The pole sheets after slitting should not have wrinkles, powder loss, burrs, or dimensional deviations; if the length of the burr exceeds half of the diaphragm, it is possible to pierce the diaphragm to form a short circuit between the positive and negative electrodes, causing a battery safety accident.

[0003] In order to prevent burrs from being generated during the electrode slitting process, the end face burr detection process is added after slitting. The lithium battery burr detection runs fast and has large vibrations. During the detection process, it may deviate from the pre-designed ROI position, resulting in the loss of the detection target, and it is impossible to achieve the goal of 100% burr detection of the electrode.

[0004] Chinese patent CN 113313713 B proposes a method and system for online detection of burrs on lithium battery pole pieces. The patent is based on a system solution that satisfies high-speed online detection of burrs in the high frame rate mode under the ROI of the array camera, but the solution cannot solve the technical problem that the pole piece jitter causes the detection target to exceed the field of view of the array camera.

[0005] Based on the technical problem that the detection target is beyond the camera's field of view due to the jitter of the pole piece, Chinese patent CN115546316 A proposes an automatic ROI setting method for industrial cameras. This patent uses the method of calculating row and column change curves to simultaneously collect multiple ROI intervals. In order to adapt to the output format of industrial cameras, the multiple ROI intervals are merged into a rectangular ROI interval output. This patent provides a new solution for ROI selection and prediction of complex moving targets. However, this patent faces the same threshold setting situation as common ROI selection, and only involves the threshold segmentation of the background and the target to be measured. For complex situations, no solution is proposed for the segmentation of multiple thresholds.

[0006] The selection of threshold is very important for the accuracy and stability of defect detection. Although the principle of threshold segmentation method is simple and easy to implement, the selection of threshold is very difficult. Threshold segmentation method can be further divided into single threshold segmentation and multi-threshold segmentation. Among them, the former (including OTSU segmentation method, maximum entropy segmentation method, etc.) can only extract suspected defects with low grayscale or high grayscale separately, which may lead to the problem of defect omission; while multi-threshold segmentation with more than two thresholds will lead to problems such as complex calculation and low real-time performance, and too many thresholds may also lead to incomplete extracted defect information.

[0007] Chinese patent CN 110288566 B discloses a target defect extraction method, which obtains a standard grayscale histogram by selecting part of the data of the actual grayscale histogram of the target image for fitting, thereby obtaining the intersection of the actual grayscale histogram and the standard grayscale histogram, and finding the minimum threshold and the maximum threshold in the actual grayscale histogram according to the intersection, so as to perform threshold segmentation to obtain suspected defects. The standard grayscale histogram in the patent conforms to the Gaussian distribution law, and the scope of application of this method is limited, and it is not suitable for the application environment proposed in this solution.

[0008] Chinese patent CN 116977302 A provides an image processing method, device, equipment and storage medium. The patent uses standard work as a reference to construct a standard test area, thereby realizing the detection of surface defects of the workpiece to be tested. The technical means recorded in the patent also have limitations and are not suitable for the application environment proposed in this solution. Summary of the invention

[0009] The present invention proposes an automatic ROI method and system for pole piece detection, which can solve at least one of the above technical problems.

[0010] To achieve the above object, the present invention proposes the following technical solutions:

[0011] An automatic ROI method for pole piece detection includes obtaining a pole piece image, wherein the pole piece image includes a background, a coating, and a foil, and further includes:

[0012] Statistical grayscale histogram of the pole piece image;

[0013] Based on the grayscale histogram, the background grayscale, coating grayscale and foil grayscale are obtained respectively;

[0014] Based on the gray value relationship between the background gray, coating gray, and foil gray, determine whether the electrode image is qualified;

[0015] If qualified, the grayscale threshold is calculated based on the background grayscale, coating grayscale, and foil grayscale; the relationship between the row grayscale mean and the grayscale threshold of the qualified electrode image is judged row by row to determine the selection range of the automatic ROI;

[0016] If it fails, the automatic ROI selection of the current polar image is skipped.

[0017] Furthermore, it also includes: under the same acquisition environment, referring to the selection range and jitter parameters of the automatic ROI, setting the selection range of the automatic ROI of the next frame of the polar slice image.

[0018] Furthermore, based on the grayscale histogram, respectively obtaining the background grayscale, coating grayscale, and foil grayscale includes: setting a first grayscale value and a second grayscale value, respectively using the first grayscale value and the second grayscale value as dividing values, and calculating the background grayscale, coating grayscale, and foil grayscale.

[0019] Furthermore, the background grayscale includes: in the grayscale histogram, starting from the starting value of the grayscale value, in order from small to large, screening out a number of continuous points whose number of pixels is not less than the background threshold, and calculating the average of the grayscale values ​​of the several continuous points as the background grayscale; wherein the grayscale value corresponding to the background threshold is the first grayscale value.

[0020] Furthermore, the second grayscale value includes: according to the grayscale value order from large to small, counting the cumulative value of the number of pixels corresponding to a certain grayscale value; if the cumulative value of the number of pixels of the current grayscale value is not less than the theoretical number of pixels in the foil interval, and the cumulative value of the number of pixels of the subsequent grayscale value is less than the theoretical number of pixels in the foil interval, taking the current grayscale value as the second grayscale value; wherein the theoretical number of pixels in the foil interval is the product of the theoretical number of foil rows and the image width, and the theoretical number of foil rows is the ratio of the foil thickness to the pixel accuracy.

[0021] Furthermore, the foil grayscale also includes: in the grayscale histogram, selecting the average of the grayscale values ​​of several points in the foil interval starting from the grayscale value of 255 to the second grayscale value as the foil grayscale.

[0022] Furthermore, the coating grayscale also includes: in the grayscale histogram, the maximum value of the maximum value in the grayscale value of the coating interval from the first grayscale value to the second grayscale value is used as the coating grayscale.

[0023] Furthermore, the relationship between the row grayscale mean and the grayscale threshold of the qualified pole piece images is judged row by row to determine the selection range of the automatic ROI, including: if the grayscale mean of the first row is less than the grayscale threshold, and the grayscale mean of the next row is not less than the grayscale threshold, then the first row is the starting row of the automatic ROI; if the grayscale mean of the second row is not less than the grayscale threshold, and the grayscale mean of the next row is less than the grayscale threshold, then the second row is the ending row of the automatic ROI.

[0024] Based on the same inventive concept, the present invention also proposes an automatic ROI system for pole piece detection, including an image acquisition module for acquiring a pole piece image, and further including:

[0025] Grayscale histogram module, used to calculate the grayscale histogram of the electrode image; obtain the background grayscale, coating grayscale, and foil grayscale respectively;

[0026] The judgment module judges whether the electrode image is qualified based on the gray value relationship between the background gray, coating gray and foil gray. If qualified, the automatic ROI selection module is entered; if unqualified, the automatic ROI selection of the current electrode image is skipped;

[0027] The automatic ROI selection module calculates the grayscale threshold based on the background grayscale, coating grayscale, and foil grayscale; and determines the relationship between the row grayscale mean and the grayscale threshold of the qualified electrode image row by row to determine the selection range of the automatic ROI.

[0028] Furthermore, it also includes: a next frame setting module, which sets the automatic ROI selection range of the next frame of the polar image with reference to the automatic ROI selection range and the jitter parameter under the same acquisition environment.

[0029] The beneficial effects of the present invention are as follows:

[0030] The automatic ROI method for pole piece detection disclosed in the present invention combines the characteristics of pole piece images, takes the background threshold and the cumulative value of the number of pixels in the theoretical foil interval as the judgment condition, and obtains the background grayscale, coating grayscale, and foil grayscale respectively. The calculation adopted by this scheme is simple, and in the application scenario of high frame rate and high resolution, effective information can be quickly obtained to meet the requirements of industrial detection.

[0031] The present invention fully considers the distribution characteristics of grayscale values ​​in the grayscale histogram intervals corresponding to the background interval, foil interval and coating interval, sets the prerequisite judgment conditions of the background grayscale, coating grayscale and foil grayscale respectively, reduces the estimation error and enhances the robustness of the method.

[0032] Based on the background grayscale, coating grayscale, and foil grayscale, on the one hand, it is used to determine whether the electrode image is qualified; on the other hand, it is used to calculate the grayscale threshold, and compare the relationship between the row grayscale mean and the grayscale threshold of the qualified electrode image row by row to determine the selection range of the automatic ROI. The automatic ROI selection process of this solution uses the current behavior of the image as the judgment object, without specifying the ROI area, to achieve real-time tracking of the mobile detection target to avoid loss; at the same time, it can also obtain defect information in a timely manner.

[0033] Under the same acquisition conditions, the present invention can realize automatic ROI parameter setting of the next frame of image based on the automatic ROI acquisition process and jitter parameters of the previous frame of image, so as to realize automatic setting of ROI without repeated calculation and selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the process flow of the automatic ROI method for pole piece detection in the present invention;

[0035] Figure 2 is the pole piece image obtained in the present invention;

[0036] Figure 3 is the pole piece image with burrs obtained in the present invention;

[0037] Figure 4 is a grayscale histogram of the automatic ROI method for pole piece detection in the present invention;

[0038] Figure 5 is the grayscale histogram of the coating interval in special cases;

[0039] Figure 6 It is a schematic diagram of automatic ROI selection in the present invention;

[0040] Figure 7 It is a schematic diagram containing two first grayscale values ​​in the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0042] like Figure 1 As shown, the present invention proposes an automatic ROI method for pole piece detection, comprising:

[0043] The pole piece image is obtained, and the pole piece image includes the background, coating, and foil. The pole piece image obtained in the present invention is an image of the cut end surface of the lithium battery pole piece to detect whether there are burrs on the cut end surface. Figure 2 As shown in the figure, the pole piece image includes the background, coating and foil; the pole piece image with burrs is shown in the figure. Figure 3 shown.

[0044] According to the IEEE1725 battery safety performance review and testing standards, burrs are metal protrusions that extend upward or downward from the foil to the outside of the pole piece with the foil (i.e., the uncoated area) as the baseline; or metal protrusions that extend upward or downward from the coating to the outside of the pole piece in the coated area; the burr size is measured by measuring the vertical height of the burr. If the burr is too large, it is easy to pierce the diaphragm, and then the positive and negative electrodes contact and cause a short circuit. If a short circuit occurs when the battery is fully charged, a large amount of heat will be released immediately inside, causing an explosion, seriously endangering the lives and property of consumers.

[0045] The method further includes:

[0046] Grayscale histogram of statistical pole piece image.

[0047] Grayscale histogram is a function of grayscale distribution, which is a statistic of grayscale distribution in the image of the tested area (pole image). The grayscale histogram of an image describes the statistical characteristics of the image at 256 grayscale levels. Its horizontal axis represents the grayscale value corresponding to the 256 grayscale levels and is 0-255 from left to right, and the vertical axis represents the number of pixels or the frequency of occurrence of pixels at each grayscale value (in this article, the vertical axis represents the number of pixels at each grayscale value).

[0048] If the vertical axis represents the frequency of occurrence of pixels at each grayscale value in the image, the grayscale histogram calculation formula is: p(rk) = nk / MN. Among them, rk is the grayscale level (grayscale value) of the pixel, nk is the number of pixels with grayscale rk (number of pixels), and MN is the total number of pixels in the image.

[0049] In this paper, the ordinate represents the number of pixels of the image at each grayscale value. It is only necessary to count the number of pixels at a certain grayscale value, and there is no need to determine the grayscale histogram of the pole image through this formula.

[0050] like Figure 4 As shown, based on the grayscale histogram, the background grayscale, coating grayscale, and foil grayscale are obtained respectively.

[0051] Based on the distribution characteristics of the background, coating and foil in the electrode image, the first grayscale value and the second grayscale value are set in the grayscale histogram, and the background grayscale, coating grayscale and foil grayscale are calculated using the first grayscale value and the second grayscale value as the dividing values ​​respectively.

[0052] In the grayscale histogram, a background threshold is set, and the grayscale value corresponding to the background threshold is used as the first grayscale value. The background threshold is the minimum value of the number of pixels (vertical coordinate) on the grayscale value set in the background interval, and the specific value depends on the resolution, size, image processing level, etc. of the current acquired polar image.

[0053] In the grayscale histogram, starting from the grayscale starting value, select a number of continuous points whose number of pixels is not less than the background threshold in the order of grayscale value from small to large, that is, the grayscale values ​​(horizontal coordinates) of the continuous points are continuous. Calculate the average of the grayscale values ​​of the continuous points as the background grayscale. The selected points constitute the background interval.

[0054] like Figure 4As shown in the figure, the background interval is a curve with a monotonically decreasing trend. The first boundary point with the ordinate as the background threshold is unique. The starting point of the background interval is the starting point of the gray value of the statistical feature in the gray histogram, that is, the starting value (of the gray value) is used as the beginning of the gray value of the background interval; the first gray value corresponding to the background threshold is used as the end of the gray value of the background interval. The background interval from the starting value to the first gray value is a continuous interval (of the gray value).

[0055] In the grayscale histogram, the process of obtaining the second grayscale value is as follows:

[0056] According to the grayscale value order from large to small, the cumulative value of the number of pixels corresponding to a certain grayscale value is counted. Among them, the cumulative value of the number of pixels is the sum of the number of pixels of the grayscale value and the number of pixels of all subsequent grayscale values. The subsequent grayscale value is a grayscale value greater than the current grayscale value. For example, if the grayscale value 255 is the subsequent grayscale value of the grayscale value 254, the cumulative value of the number of pixels of the grayscale value 254 is the sum of the number of pixels of the grayscale value 255 and the number of pixels of the grayscale value 254.

[0057] The theoretical number of pixels in the foil interval is set as the threshold. If the cumulative value of the number of pixels of the current gray value is not less than the theoretical number of pixels in the foil interval, and the cumulative value of the number of pixels of the subsequent gray value is less than the theoretical number of pixels in the foil interval, the current gray value is used as the second gray value.

[0058] Furthermore, this embodiment will illustrate the cumulative value of the number of pixels corresponding to a certain gray value by example, as follows:

[0059] In order to facilitate the explanation of the calculation process, in this embodiment, the statistical step length of the grayscale value in the grayscale histogram is set to 1.

[0060] by It represents the accumulated value of the number of pixels corresponding to the gray value in the interval [rk,255], nk(rk) represents the number of pixels with gray value rk, rk=0,1,2,3,...,255.

[0061] Taking the gray value of 255 as an example, the cumulative value of the corresponding number of pixels is the number of pixels with a gray value of 255 in the gray histogram nk (255), that is, .

[0062] When the grayscale value is 254, the cumulative value of the corresponding number of pixels is the sum of the number of pixels nk(255) with a grayscale value of 255 and the number of pixels nk(254) with a grayscale value of 254, that is,

[0063] .

[0064] Similarly, when the grayscale value is 253, the cumulative value of the corresponding number of pixels is the sum of the number of pixels with a grayscale value of 255 nk(255), the number of pixels with a grayscale value of 254 nk(254), and the number of pixels with a grayscale value of 253 nk(253), that is, ; ... and so on, when the gray value is 0, the cumulative value of the corresponding number of pixels is .

[0065] If a gray value rk appears, the cumulative value of the number of pixels corresponding to it Not less than the number of pixels in the theoretical foil interval, and the cumulative value of the number of pixels corresponding to the gray value (rk+1) When the number of pixels is less than the theoretical foil interval, rk at this time is used as the second grayscale value.

[0066] In the grayscale histogram, several points in the foil material interval starting from a grayscale value of 255 to a second grayscale value are screened, and the average of the grayscale values ​​of the several points in the foil material interval is calculated as the foil material grayscale.

[0067] The coating grayscale is the grayscale value corresponding to the maximum value of the maximum value in the coating interval.

[0068] The coating interval is the gray value interval between the background interval and the foil interval in the gray histogram. In the continuous interval of gray values ​​from small to large in the coating interval, the interval is from the first gray value to the second gray value.

[0069] The starting point of the gray value in the coating interval is the first gray value. Affected by the gray histogram distribution characteristics of the background interval, the starting part of the gray histogram of the coating interval is also a curve with a monotonically decreasing trend.

[0070] Considering a special case, such as Figure 5 As shown in the figure, in the grayscale histogram of the coating interval, the background threshold is the maximum value of the interval (vertical coordinate), and the first grayscale value is the minimum grayscale value of the coating interval. At this time, if the grayscale value mean or the first grayscale value of the coating interval is used as the coating grayscale, the calculated value of the coating grayscale will be too small, thus affecting the accuracy of automatic ROI selection.

[0071] Therefore, the grayscale value corresponding to the maximum value of the maximum value in the coating interval is selected as the coating grayscale, that is, the ordinate of the coating grayscale is the maximum value of the maximum value, so as to avoid the above estimation error and enhance the robustness of the method.

[0072] The number of pixels in the theoretical foil interval is the product of the theoretical number of foil rows and the image width, and the theoretical number of foil rows is the ratio of the foil thickness to the pixel accuracy. The image width is the number of pixels in the horizontal direction of the image actually collected.

[0073] The pixel accuracy of the acquisition device for the current electrode sheet image is p um / pixel, and the foil thickness is q um. Then the theoretical number of rows of the foil is q / p.

[0074] For example, if the image width is 4000 and the height is 200, generally the theoretical number of rows of the foil is 3, and the number of pixels in the theoretical foil interval is 12000.

[0075] This solution combines the characteristics of the electrode sheet image, with simple calculation. In high-frame-rate and high-resolution application scenarios, it can quickly obtain effective information to meet the requirements of industrial inspection.

[0076] Based on the gray value relationships of the background gray level, coating gray level, and foil gray level, determine whether the electrode sheet image is qualified.

[0077] If it is qualified, then based on the background gray level, coating gray level, and foil gray level, calculate the gray threshold; judge the relationship between the row gray mean value of the qualified electrode sheet image and the gray threshold row by row to determine the selection range of the automatic ROI.

[0078] If it is unqualified, skip the selection of the automatic ROI for the current electrode sheet image.

[0079] In this embodiment, the preset qualified conditions are as follows: G1 < G2 < G3, and (G3 - G2) > (G2 - G1). Wherein, the background gray level is G1, the coating gray level is G2, and the foil gray level is G3. If the preset qualified conditions are not met, it is considered that the object being photographed is not an electrode sheet, and the automatic ROI is not updated and an exception is thrown indicating that there is a problem with the image.

[0080] Preferably, the above preset qualified conditions are only for illustrative purposes, and the preset qualified conditions can be custom-designed according to the actual gray level distribution characteristics of the collected electrode sheet or the collection environment.

[0081] Among them, judging the relationship between the row gray mean value of the qualified electrode sheet image and the gray threshold row by row to determine the selection range of the automatic ROI includes: if the gray mean value of the first row is less than the gray threshold and the gray mean value of the next row is not less than the gray threshold, then the first row is the starting row of the automatic ROI; if the gray mean value of the second row is not less than the gray threshold and the gray mean value of the next row is less than the gray threshold, then the second row is the ending row of the automatic ROI.

[0082] In this embodiment, based on the setting content of the above preset qualified conditions, the calculation formula for the gray threshold T_ROI is given: T_ROI = (1 - a)×G1 + a×G2.

[0083] Among them, a is an empirical coefficient, and generally a = 0.1 is taken.

[0084] Based on the above formula, the relationship between the row grayscale mean and the grayscale threshold of the qualified pole piece image is judged row by row, so as to determine the starting row Y_Start and the ending row Y_End of the automatic ROI in the qualified pole piece image.

[0085] The present invention uses background grayscale, coating grayscale and foil grayscale as representative values ​​of the grayscale values ​​of the corresponding areas. A single calculation process can be used to measure the grayscale distribution of the current image and determine whether the current image is qualified to avoid misjudgment of the result; it can also select the automatic ROI range of the qualified image to achieve real-time analysis and detection of burrs in a new way of target tracking.

[0086] The automatic ROI selection field of the method described in the present invention should be no less than the pole piece jitter range. The content is screened based on the above conditions, that is, the qualified pole piece image in the present invention should include at least one side (upper or lower side) background, two sides (upper volume, lower side) coating and foil, so that the accurate ROI selection range can be obtained through the qualified pole piece image, thereby enhancing the accuracy of the method.

[0087] The method further comprises: under the same acquisition environment, referring to the selection range and jitter parameters of the automatic ROI, setting the start row and the end row of the next frame of the pole piece image.

[0088] like Figure 6 As shown, preferably, based on the above method, the starting row Y_Start and the ending row Y_End of the automatic ROI in the acquired qualified pole piece image are combined with the pole piece jitter parameter offset to set the starting row Y_Start-offset and the ending row Y_End+offset of the next frame pole piece image.

[0089] The jitter parameter offset is determined according to the jitter of the pole piece, which is related to factors such as the pole piece material, pole piece movement speed, motor speed fluctuation, etc. Based on the collected experience value, the default value is generally 64.

[0090] The present invention does not involve any concept of standard workpieces or standard images, does not require screening of standard workpieces (standard images), and does not require comparison (or calculation) of the difference between the current graphic and the standard image.

[0091] However, under the same image acquisition environment, the previous burr detection process (or the detection process of the previous pole piece image) is used as a reference for the next burr detection process (or the detection process of the next pole piece image). Combined with the specific situation of the pole piece jitter, the automatic ROI selection range of the next pole piece image is set, and the burr detection in the pole piece image can be realized in the high frame rate application scenario.

[0092] Preferably, the burr detection in the next frame image may not refer to the parameter settings of the start row and end row of the automatic ROI in the previous frame image, and only repeating the above process can also obtain the relevant parameters of the automatic ROI for burr detection in the next frame image. Example

[0093] In the grayscale histogram, starting from the grayscale starting value, select a number of continuous points whose number of pixels is not less than the background threshold in the order of grayscale value from small to large, that is, the grayscale values ​​(horizontal coordinates) of the continuous points are continuous. Calculate the average of the grayscale values ​​of the continuous points as the background grayscale. The selected points constitute the background interval.

[0094] In addition to the case where the background interval is from the grayscale value starting value to the first grayscale value as shown in Example 1, there may also be the following Figure 7 The situation of multiple first grayscale values ​​is shown.

[0095] If there are multiple first grayscale values ​​corresponding to the background threshold, the screening condition of the background interval is still a number of consecutive points whose number of pixels is not less than the background threshold. At this time, the starting point of the background interval is not the starting value of the grayscale value.

[0096] Based on the above, if Figure 7 As shown, in this embodiment, descriptions of the contents of two first grayscale values ​​are given.

[0097] In the grayscale histogram, the background threshold corresponds to two different grayscale values. The first grayscale value with a small grayscale value is set as point 1, and the first grayscale value with a large grayscale value is set as point 2. At this time, the grayscale value of point 1 is used as the starting value to determine the range of the background interval. The background interval is a continuous interval from point 1 to point 2 from small to large, and the background grayscale is the grayscale value average of the background intervals between the grayscale value of point 1 and the grayscale value of point 2.

[0098] Based on the two first gray values ​​proposed in this embodiment, on the basis of embodiment 1, the starting point of the coating interval is point 2. The coating interval is the gray value interval between the background interval and the foil interval in the gray histogram. In the continuous interval of gray values ​​from small to large in the coating interval, the interval from the first gray value with a large gray value (i.e., the gray value corresponding to point 2) to the second gray value. The coating gray is the average of the gray values ​​in the coating interval.

[0099] Based on the same inventive concept, the present invention also proposes an automatic ROI system for pole piece detection, comprising:

[0100] Image acquisition module, acquires the pole piece image.

[0101] The grayscale histogram module is used to count the grayscale histogram of the electrode image; and obtain the background grayscale, coating grayscale, and foil grayscale respectively.

[0102] The judgment module judges whether the electrode image is qualified based on the gray value relationship between the background gray, coating gray and foil gray. If qualified, it enters the automatic ROI selection module; if unqualified, it skips the automatic ROI selection of the current electrode image.

[0103] The automatic ROI selection module calculates the grayscale threshold based on the background grayscale, coating grayscale, and foil grayscale; and determines the relationship between the row grayscale mean and the grayscale threshold of the qualified electrode image row by row to determine the selection range of the automatic ROI.

[0104] It also includes: a next frame setting module, which sets the start row and end row of the next frame of the pole piece image with reference to the selection range and jitter parameters of the automatic ROI under the same acquisition environment.

[0105] The present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above-mentioned automatic ROI method for pole piece detection.

[0106] The present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the automatic ROI method for pole piece detection as described above.

[0107] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0108] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automatic ROI method for pole piece detection, comprising: obtaining a pole piece image, wherein the pole piece image includes a background, a coating, and a foil, characterized in that: Also includes: Statistical grayscale histogram of the pole piece image; Based on the grayscale histogram, the background grayscale, coating grayscale and foil grayscale are obtained respectively; Based on the gray value relationship between the background gray, coating gray and foil gray, determine whether the electrode image is qualified; If qualified, the grayscale threshold is calculated based on the background grayscale, coating grayscale, and foil grayscale; The relationship between the row grayscale mean and grayscale threshold of qualified pole piece images is judged row by row to determine the selection range of automatic ROI; If it fails, the automatic ROI selection of the current polar image is skipped.

2. The automatic ROI method for pole piece detection according to claim 1, characterized in that: Also includes: Under the same acquisition environment, refer to the selection range and jitter parameters of the automatic ROI to set the selection range of the automatic ROI of the next frame of the polar slice image.

3. The automatic ROI method for pole piece detection according to claim 1 or 2, characterized in that: The method of obtaining the background grayscale, coating grayscale and foil grayscale respectively based on the grayscale histogram includes: setting a first grayscale value and a second grayscale value, taking the first grayscale value and the second grayscale value as demarcation values ​​respectively, and calculating the background grayscale, coating grayscale and foil grayscale.

4. The automatic ROI method for pole piece detection according to claim 3, characterized in that: The background grayscale includes: in the grayscale histogram, starting from the starting value of the grayscale value, in order from small to large, screening out a number of continuous points whose number of pixels is not less than the background threshold, and calculating the average of the grayscale values ​​of the several continuous points as the background grayscale; wherein the grayscale value corresponding to the background threshold is the first grayscale value.

5. The automatic ROI method for pole piece detection according to claim 4, characterized in that: The second grayscale value includes: according to the grayscale value from large to small, counting the cumulative value of the number of pixels corresponding to a certain grayscale value; if the cumulative value of the number of pixels of the current grayscale value is not less than the number of pixels in the theoretical foil interval, and the cumulative value of the number of pixels of the subsequent grayscale value is less than the number of pixels in the theoretical foil interval, taking the current grayscale value as the second grayscale value; wherein the number of pixels in the theoretical foil interval is the product of the theoretical number of foil rows and the image width, and the theoretical number of foil rows is the ratio of the foil thickness to the pixel accuracy.

6. The automatic ROI method for pole piece detection according to claim 5, characterized in that: The foil grayscale also includes: in the grayscale histogram, selecting the average of the grayscale values ​​of several points in the foil interval starting from the grayscale value of 255 to the second grayscale value as the foil grayscale.

7. The automatic ROI method for pole piece detection according to claim 6, characterized in that: The coating grayscale also includes: in the grayscale histogram, the maximum value of the local maximum value in the grayscale value of the coating interval from the first grayscale value to the second grayscale value is used as the coating grayscale.

8. The automatic ROI method for pole piece detection according to claim 1, characterized in that: The relationship between the row grayscale mean and the grayscale threshold of the qualified pole piece image is judged row by row to determine the selection range of the automatic ROI, including: if the grayscale mean of the first row is less than the grayscale threshold, and the grayscale mean of the next row is not less than the grayscale threshold, then the first row is the starting row of the automatic ROI; if the grayscale mean of the second row is not less than the grayscale threshold, and the grayscale mean of the next row is less than the grayscale threshold, then the second row is the ending row of the automatic ROI.

9. An automatic ROI system for pole piece detection, comprising: The image acquisition module acquires the pole piece image, characterized in that it also includes: Grayscale histogram module, used to calculate the grayscale histogram of the electrode image; obtain the background grayscale, coating grayscale, and foil grayscale respectively; The judgment module judges whether the electrode image is qualified based on the gray value relationship between the background gray, coating gray and foil gray. If qualified, the automatic ROI selection module is entered; if unqualified, the automatic ROI selection of the current electrode image is skipped; The automatic ROI selection module calculates the grayscale threshold based on the background grayscale, coating grayscale, and foil grayscale; and determines the relationship between the row grayscale mean and the grayscale threshold of the qualified electrode image row by row to determine the selection range of the automatic ROI.

10. The automatic ROI system for pole piece detection according to claim 9, characterized in that: Also includes: The next frame setting module sets the automatic ROI selection range of the next frame of the polar image with reference to the automatic ROI selection range and jitter parameters under the same acquisition environment.

Citation Information

Patent Citations

  • A method for extracting target defects

    CN110288566B

  • A method and system for online detection of burrs on lithium battery electrode sheets

    CN113313713B

  • Industrial camera automatic ROI setting method

    CN115546316A

  • Image processing method and device, equipment and storage medium

    CN116977302A

  • Polished surface detection method and system based on image processing

    CN106530291A