CN115564719A - Battery detection method, controller and computer-readable storage medium - Google Patents
Battery detection method, controller and computer-readable storage medium Download PDFInfo
- Publication number
- CN115564719A CN115564719A CN202211179769.5A CN202211179769A CN115564719A CN 115564719 A CN115564719 A CN 115564719A CN 202211179769 A CN202211179769 A CN 202211179769A CN 115564719 A CN115564719 A CN 115564719A
- Authority
- CN
- China
- Prior art keywords
- image
- battery
- target
- area image
- tab
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 84
- 238000003860 storage Methods 0.000 title claims abstract description 23
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 46
- 238000000034 method Methods 0.000 claims description 29
- 238000012545 processing Methods 0.000 claims description 10
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010998 test method Methods 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 6
- 238000012216 screening Methods 0.000 claims description 5
- 238000012360 testing method Methods 0.000 claims description 5
- 238000005520 cutting process Methods 0.000 claims description 3
- 238000002372 labelling Methods 0.000 claims description 3
- 244000046146 Pueraria lobata Species 0.000 claims description 2
- 235000010575 Pueraria lobata Nutrition 0.000 claims description 2
- 230000004807 localization Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 description 11
- 230000000694 effects Effects 0.000 description 6
- 230000007547 defect Effects 0.000 description 5
- 238000003709 image segmentation Methods 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 5
- 238000003672 processing method Methods 0.000 description 5
- 230000011218 segmentation Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000009966 trimming Methods 0.000 description 3
- WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 description 2
- HBBGRARXTFLTSG-UHFFFAOYSA-N Lithium ion Chemical compound [Li+] HBBGRARXTFLTSG-UHFFFAOYSA-N 0.000 description 2
- PXHVJJICTQNCMI-UHFFFAOYSA-N Nickel Chemical compound [Ni] PXHVJJICTQNCMI-UHFFFAOYSA-N 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000007654 immersion Methods 0.000 description 2
- 229910052744 lithium Inorganic materials 0.000 description 2
- 229910001416 lithium ion Inorganic materials 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 229910000838 Al alloy Inorganic materials 0.000 description 1
- 229910000570 Cupronickel Inorganic materials 0.000 description 1
- 206010047571 Visual impairment Diseases 0.000 description 1
- 239000000956 alloy Substances 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- YOCUPQPZWBBYIX-UHFFFAOYSA-N copper nickel Chemical compound [Ni].[Cu] YOCUPQPZWBBYIX-UHFFFAOYSA-N 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 210000005069 ears Anatomy 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 229910052751 metal Inorganic materials 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 229910052759 nickel Inorganic materials 0.000 description 1
- 238000007747 plating Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000035939 shock Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The application provides a battery detection method, a controller and a computer readable storage medium, wherein the battery detection method comprises the following steps: acquiring a battery image, carrying out area positioning on the battery image, and determining a target area image, wherein the target area image comprises a tab area image and a background area image; then, segmenting a lug region image from the target region image based on a watershed algorithm to obtain a background region image; then, carrying out area marking on the target area image based on a convex hull detection algorithm to obtain a tab outline image; and finally, comparing the background area image with the lug outline image to obtain a target notch. According to the technical scheme of the embodiment of the application, the watershed algorithm is used for segmenting the lug and the background, and the notch is detected according to the convex hull detection algorithm, so that the detection efficiency can be greatly improved, and the false detection rate can be greatly reduced.
Description
Technical Field
The present application relates to a battery detection method, a controller and a computer-readable storage medium, and more particularly, to a battery detection method, a controller and a computer-readable storage medium.
Background
In the related art, in the production process of batteries, in order to avoid the risk of short circuit and fire caused by tab notches, batteries are often required to be detected to screen out the batteries with the tab notches, and the existing image processing method for detecting notches, such as the defect detection method disclosed in CN 201510016568.7-a lithium battery cell defect detection method, has a complex algorithm and has poor processing speed and accuracy for image segmentation and edge contour identification of tabs; because the processing speed and accuracy of image segmentation and edge contour identification are poor, the existing image processing method is difficult to accurately and quickly detect the polar ear notch, thereby greatly influencing the production quality of the battery.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the application provides a battery detection method, a controller and a computer readable storage medium, which not only can greatly improve the detection efficiency, but also can greatly reduce the false detection rate.
In a first aspect, an embodiment of the present application provides a battery detection method, including: acquiring a battery image, carrying out area positioning on the battery image, and determining a target area image, wherein the target area image comprises a tab area image and a background area image; segmenting the lug area image from the target area image based on a watershed algorithm to obtain the background area image; carrying out region marking on the target region image based on a convex hull detection algorithm to obtain a tab contour image; and comparing the background area image with the lug contour image to obtain a target notch.
In some embodiments, the acquiring the battery image comprises: and carrying out image acquisition on the target battery through a CCD image sensor to obtain a battery image corresponding to the target battery.
In some embodiments, the performing region localization on the battery image and determining the target region image includes: extracting the characteristics of the battery image to obtain image characteristic information; and positioning and cutting the battery image according to the image characteristic information to obtain a target area image.
In some embodiments, the segmenting the tab region image from the target region image based on a watershed algorithm to obtain the background region image includes: performing gradient operation on the target area image to obtain a gradient image; performing watershed transformation on the gradient image to obtain a plurality of water collecting basin images, and determining watersheds among the plurality of water collecting basin images; and segmenting the lug area image from the gradient image based on the watershed to obtain the background area image.
In some embodiments, after the obtaining the gradient image, the battery detection method further comprises: acquiring a target threshold; and performing threshold processing on the gradient image based on the target threshold to obtain a processed gradient image so as to perform watershed transformation on the processed gradient image.
In some embodiments, the performing region labeling on the target region image based on a convex hull detection algorithm to obtain a tab contour image includes: performing convex hull detection on the target area image to obtain convex hull points corresponding to the electrode lug outline; and generating a plurality of boundary lines based on the convex hull points, and combining the boundary lines to obtain a tab contour image.
In some embodiments, the convex hull detection algorithm includes one of: incremental algorithm, wrapping method, kudzuvine constant scanning method, single-modulation chain, divide-and-conquer method and fast wrapping method.
In some embodiments, the comparing the background area image and the tab contour image to obtain a target gap includes: performing image subtraction on the lug contour image and the background area image to obtain a suspected gap; and screening the suspected notch to obtain a target notch.
In a second aspect, embodiments of the present application further provide a controller, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the controller executes the battery detection method according to the second aspect.
In a third aspect, embodiments of the present application further provide a computer-readable storage medium storing computer-executable instructions for performing the battery detection method according to the second aspect.
The technical scheme of the embodiment of the application includes but is not limited to the following technical effects: firstly, acquiring a battery image, carrying out area positioning on the battery image, and determining a target area image comprising a tab area image and a background area image; then, segmenting a lug region image from the target region image based on a watershed algorithm to obtain a background region image; then, carrying out area marking on the target area image based on a convex hull detection algorithm to obtain a tab outline image; and finally, comparing the background area image with the lug outline image to obtain a target notch. According to the technical scheme of the embodiment of the application, the watershed algorithm is used for segmenting the lug and the background, and then the notch is detected according to the convex hull detection algorithm, so that the detection efficiency can be greatly improved, and the false detection rate can be greatly reduced.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of a system architecture platform for performing a battery detection method according to an embodiment of the present application;
FIG. 2 is a flow chart of a battery detection method provided in one embodiment of the present application;
FIG. 3 is a flow chart of a battery test method provided in another embodiment of the present application;
FIG. 4 is a flow chart of a battery testing method provided by another embodiment of the present application;
FIG. 5 is a flow chart of a battery testing method provided by another embodiment of the present application;
FIG. 6 is a flow chart of a battery detection method provided in another embodiment of the present application;
FIG. 7 is a flow chart of a battery testing method provided by another embodiment of the present application;
FIG. 8 is a flow chart of a battery testing method provided by another embodiment of the present application;
FIG. 9 is a schematic illustration of a target area image provided by one embodiment of the present application;
FIG. 10 is a schematic illustration of a background area image provided by one embodiment of the present application;
FIG. 11 is a schematic illustration of a suspected gap provided in one embodiment of the present application;
FIG. 12 is a schematic view of a target gap provided by one embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it is to be understood that the positional descriptions, such as the directions of up, down, front, rear, left, right, etc., referred to herein are based on the directions or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operated in a specific direction, and thus, should not be construed as limiting the present application.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and larger, smaller, larger, etc. are understood as excluding the present number, and larger, smaller, inner, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless otherwise specifically limited, terms such as set, installed, connected and the like should be understood broadly, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present application in combination with the specific contents of the technical solutions.
In some cases, in the production process of batteries, in order to avoid the risk of short circuit and fire caused by tab notches, batteries are often required to be detected to screen out the batteries with the tab notches, and the existing image processing method for detecting notches, such as the defect detection method disclosed in CN 201510016568.7-a lithium battery cell defect detection method, has a complex algorithm and has poor processing speed and accuracy for image segmentation and edge contour identification of tabs; because the processing speed and accuracy of image segmentation and edge contour recognition are poor, the existing image processing method is difficult to accurately and quickly detect the polar ear gap, thereby greatly influencing the production quality of the battery.
Based on the above situation, the embodiments of the present application provide a battery detection method, a controller, and a computer-readable storage medium, a watershed algorithm is used to segment a tab from a background, and then a gap is detected according to a convex hull detection algorithm, which not only can greatly improve detection efficiency, but also can greatly reduce false detection rate.
The embodiments of the present application will be further explained with reference to the drawings.
As shown in fig. 1, fig. 1 is a schematic diagram of a system architecture platform for performing a battery detection method according to an embodiment of the present disclosure.
The system architecture platform 100 of the present embodiment includes one or more processors 110 and a memory 120, and fig. 1 illustrates one processor 110 and one memory 120 as an example.
The processor 110 and the memory 120 may be connected by a bus or other means, such as by a bus in FIG. 1.
The memory 120, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the memory 120 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 120 optionally includes memory 120 located remotely from processor 110, which may be connected to system architecture platform 100 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Those skilled in the art will appreciate that the device architecture illustrated in FIG. 1 does not constitute a limitation on system architecture platform 100, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
In the system architecture platform 100 shown in fig. 1, the processor 110 may be configured to call a battery detection program stored in the memory 120, so as to implement the battery detection method.
Based on the hardware structure of the system architecture platform, various embodiments of the battery detection method are provided.
As shown in fig. 2, fig. 2 is a flowchart of a battery detection method according to an embodiment of the present application. The battery detection method includes, but is not limited to, step S100, step S200, step S300, and step S400.
The method comprises the following steps of S100, obtaining a battery image, carrying out area positioning on the battery image, and determining a target area image, wherein the target area image comprises a tab area image and a background area image;
s200, segmenting a lug area image from a target area image based on a watershed algorithm to obtain a background area image;
s300, carrying out area marking on the target area image based on a convex hull detection algorithm to obtain a tab contour image;
and S400, comparing the background area image with the lug contour image to obtain a target notch.
In an embodiment, firstly, a battery image of a whole battery needs to be acquired in the embodiment of the present application, and since it needs to be detected whether a battery tab has a notch, the embodiment of the present application performs area positioning on the battery image, and determines an approximate area position of the battery tab, that is, a target area image including a tab area and a background area; secondly, a polar ear region and a background region in the target region image are segmented by adopting a watershed algorithm, so that a background region image is obtained; then, carrying out area marking from the target area image by adopting a convex hull detection algorithm so as to obtain a tab outline image; and finally, comparing the obtained background area image with the lug contour image to obtain a comparison result, and determining whether the battery lug has a notch meeting the standard according to the comparison result.
The tab of the battery is an important component in a lithium ion battery, and the battery is divided into a positive electrode and a negative electrode, and the tab is a metal conductor which leads the positive electrode and the negative electrode from the battery cell, in other words, the ears of the positive electrode and the negative electrode of the battery are contact points during charging and discharging. In most cases, the positive electrode of the lithium ion battery tab is made of an aluminum alloy material, the negative electrode is made of a nickel material, and the negative electrode can also be made of a copper nickel plating material.
In addition, it should be noted that, the target area image includes a tab area and a background area, where the tab area is a foreground area, and in order to conveniently distinguish the tab area from the background area in the following process, a color that is greatly different from the tab color may be selected as a background color when the battery is photographed, that is, a certain color difference between the tab area and the background area is satisfied; or selecting grains which are different from the grains of the lug as background grains, namely, certain grain difference is required between the lug area and the background area.
It should be noted that, regarding the above watershed algorithm, it is a segmentation method based on mathematical morphology of topological theory, and its basic idea is to regard the image as a topological geomorphology, the gray value of each point pixel in the image represents the altitude of the point, each local minimum and its affected area are called as a catchbasin, and the boundary of the catchbasin forms the watershed. The concept and formation of watershed can be illustrated by simulating the immersion process. And (3) piercing a small hole on the surface of each local minimum value, then slowly immersing the whole model into water, wherein the influence area of each local minimum value is gradually expanded outwards along with the deepening of the immersion, and constructing a dam at the junction of two water collecting basins, namely forming a watershed.
In addition, it is noted that, with respect to the convex hull detection algorithm described above, convex hull is a common concept in computing geometry. For example, given a set of points on a two-dimensional plane, a convex hull is a convex polygon that connects the outermost points, which is a polygon that can contain all of the points in the set. A more useful way to understand the shape or contour of an object is to calculate the convex hull of an object and then its convex defects.
The convex hull detection algorithm may be an incremental algorithm, a wrapping method, a gray constant scanning method, a single modulation chain, a divide and conquer method, or a fast wrapping method.
According to the technical scheme of the embodiment of the application, the watershed algorithm is used for segmenting the lug and the background, and the notch is detected according to the convex hull detection algorithm, so that the detection efficiency can be greatly improved, and the false detection rate can be greatly reduced.
In addition, as shown in fig. 3, fig. 3 is a flowchart of a battery detection method according to another embodiment of the present application. Regarding the acquiring of the battery image in the above step S100, the step S110 is included but not limited.
And S110, acquiring an image of the target battery through the CCD image sensor to obtain a battery image corresponding to the target battery.
Specifically, the CCD image sensor may be used to acquire an image of the target battery, so as to obtain a battery image of the target battery, wherein the CCD image sensor may directly convert the optical signal into an analog current signal, and the current signal is amplified and analog-to-digital converted to obtain, store, transmit, process, and reproduce the image. The remarkable characteristics are as follows: the volume is small and the weight is light; the power consumption is low, the working voltage is low, the shock resistance and the vibration resistance are realized, the performance is stable, and the service life is long; the sensitivity is high, the noise is low, and the dynamic range is large; the response speed is high, the self-scanning function is realized, the image distortion is small, and no afterimage exists; the super-large scale integrated circuit is produced by using a super-large scale integrated circuit process technology, the pixel integration level is high, the size is accurate, and the commercial production cost is low.
In addition, as shown in fig. 4, fig. 4 is a flowchart of a battery detection method according to another embodiment of the present application. Regarding the area location of the battery image in step S100, the target area image is determined, including but not limited to step S120 and step S130.
Step S120, extracting the characteristics of the battery image to obtain image characteristic information;
and S130, positioning and cutting the battery image according to the image characteristic information to obtain a target area image.
Specifically, in order to realize the positioning of the approximate region position of the battery tab, the embodiment of the present application may extract image feature information of each region position in the battery image, determine the approximate region position of the battery tab according to the extracted image feature information, and perform positioning and trimming on the region position line, so as to obtain the target region image, as shown in fig. 9, including a tab region and a background region, where the tab region is a region corresponding to diagonal filling in fig. 9, and the background region is a region corresponding to black filling in fig. 9.
The image feature information may be color feature information, texture feature information, shape feature information, spatial relationship feature information, or other types of feature information, and the embodiment of the present application does not specifically limit the type of the image feature information.
In the above-described registration trimming operation, the shape of the target area image to be trimmed may be a square, a rectangle, a circle, or another shape, and the trimming shape of the target area image is not particularly limited in the embodiment of the present application.
In addition, as shown in fig. 5, fig. 5 is a flowchart of a battery detection method according to another embodiment of the present application. Regarding the above step S200 of segmenting the tab region image from the target region image based on the watershed algorithm to obtain the background region image, the steps include, but are not limited to, step S210, step S230, and step S250.
Step S210, performing gradient operation on the target area image to obtain a gradient image;
step S230, performing watershed transformation on the gradient image to obtain a plurality of water collecting basin images, and determining watershed among the plurality of water collecting basin images;
and S250, segmenting the lug area image from the gradient image based on watershed to obtain a background area image.
The background area image may include only the background area as shown in fig. 10.
In particular, the watershed computation process is an iterative labeling process. Watershed comparison the classical calculation method is proposed by l.vincent. In this algorithm, the watershed computation is performed in two steps, one is a ranking process and one is a flooding process. Firstly, the gray levels of each pixel are sequenced from low to high, and then in the process of realizing submergence from low to high, a first-in first-out structure is adopted to judge and label the influence domain of each local minimum value in the h-order height.
In an embodiment, the watershed transform obtains a basin image of the input image, and the boundary points between the basins are the watershed. It is clear that the watershed represents the input image maximum point. Therefore, to obtain edge information of an image, a gradient image is usually used as an input image, and the gradient image can be obtained by the following formula:
g(x,y)=grad(f(x,y))={[f(x,y)-f(x-1,y)]2[f(x,y)-f(x,y-1)]2}0.5;
wherein f (x, y) represents an original image, and grad { } represents gradient operation.
In addition, as shown in fig. 6, fig. 6 is a flowchart of a battery detection method according to another embodiment of the present application. After obtaining the gradient image in step S210, the battery detection method further includes, but is not limited to, step S221 and step S222.
Step S221, acquiring a target threshold;
step S222, performing threshold processing on the gradient image based on the target threshold to obtain a processed gradient image, and performing watershed transformation on the processed gradient image.
Specifically, the watershed algorithm has a good response to weak edges, and noise in an image and slight gray changes on the surface of an object can generate an over-segmentation phenomenon. But it should be seen that the watershed algorithm has a good response to weak edges, and is guaranteed to close continuous edges. In addition, the closed water collecting basin obtained by the watershed algorithm provides possibility for analyzing the regional characteristics of the image.
In order to eliminate the excessive segmentation generated by the watershed algorithm, two processing methods can be generally adopted, and firstly, the irrelevant edge information is removed by using the priori knowledge. And secondly, the gradient function is modified to enable the water collecting basin to only respond to the target to be detected.
In order to reduce the excessive segmentation caused by the watershed algorithm, the gradient function is usually modified, and a simple method is to threshold the gradient image to eliminate the excessive segmentation caused by the slight change of the gray level, and the gradient image can be thresholded by the following formula:
g (x, y) = max (grad (f (x, y)), g θ), where g θ represents a threshold value.
It should be noted that, a threshold may be used to limit the gradient image to eliminate the excessive segmentation caused by the slight change of the gray value, obtain a proper amount of regions, sort the gray levels of the edge points of these regions from low to high, and then calculate the gradient image by using the Sobel operator in the process of implementing flooding from low to high. When the threshold processing is performed on the gradient image, the selection of a proper threshold has a great influence on the finally segmented image, so that the selection of the threshold is a key to the good or bad image segmentation effect. The disadvantages are that: the actual image may contain weak edges, the numerical difference of the gray scale change is not particularly obvious, and the weak edges may be eliminated if the threshold value is too large.
In addition, as shown in fig. 7, fig. 7 is a flowchart of a battery detection method according to another embodiment of the present application. Regarding the convex hull detection algorithm based on the step S300, performing area marking on the target area image to obtain the tab contour image, including but not limited to the steps S310 and S320.
Step S310, performing convex hull detection on the target area image to obtain convex hull points corresponding to the electrode lug outline;
and step S320, generating a plurality of boundary lines based on the convex hull points, and combining the boundary lines to obtain a tab contour image.
In an embodiment, after performing convex hull detection on the target area image, a plurality of detection points are obtained, where a plurality of convex hull points exist in the plurality of detection points, and the detection points other than the plurality of convex hull points fall within a boundary area defined by the plurality of convex hull points, where the boundary area is the obtained tab contour.
It should be noted that, if the boundary area is a quadrilateral, the number of boundary lines is four; if the border area is a pentagon, the number of the border lines is five, and the number of the border lines is not particularly limited in the embodiment of the present application.
In addition, as shown in fig. 8, fig. 8 is a flowchart of a battery detection method according to another embodiment of the present application. Regarding the comparison between the background area image and the tab outline image in the above step S400 to obtain the target gap, the steps include, but are not limited to, step S410 and step S420.
Step S410, carrying out image subtraction on the auricle image of the epipolar and the background area image to obtain a suspected notch;
and step S420, screening the suspected gaps to obtain target gaps.
In an embodiment, after obtaining the tab contour image and the background area image, performing a difference processing on the two images, so as to obtain an image showing one or more suspected notches, as shown in fig. 11, where it can be seen that a plurality of white areas exist in fig. 11, and the white areas are suspected notches; then, the suspected gaps in the image are screened according to the set parameters, and the target gaps meeting the standard are screened out, as shown in fig. 12, where the black circular area pointed by the arrow in fig. 12 is the target gap.
Specifically, the set parameters of the suspected notch screening process may be screened according to the area of the notch, according to the shape of the notch, or according to other types of parameters, and the type of the set parameters is not specifically limited in the embodiment of the present application.
For example, when screening is performed according to the area of the notch, an area threshold may be set, and when the area of the suspected notch in the image is greater than or equal to the area threshold, the suspected notch is considered as a target notch meeting the standard; and when the area of the suspected notch in the image is smaller than the area threshold, the suspected notch is not the target notch meeting the standard.
Based on the battery detection methods of the above embodiments, embodiments of the controller and the computer-readable storage medium of the present application are separately set forth below.
In addition, an embodiment of the present application provides a controller including: a processor, a memory, and a computer program stored on the memory and executable on the processor.
The processor and memory may be connected by a bus or other means.
It should be noted that the controller in this embodiment may include a processor and a memory as in the embodiment shown in fig. 1, both belong to the same application concept, and therefore both have the same implementation principle and beneficial effect, and are not described in detail herein.
The non-transitory software programs and instructions required to implement the battery detection method of the above-described embodiments are stored in a memory and, when executed by a processor, perform the battery detection method of the above-described embodiments.
According to the technical scheme of the embodiment of the application, the watershed algorithm is used for segmenting the lug and the background, and the notch is detected according to the convex hull detection algorithm, so that the detection efficiency can be greatly improved, and the false detection rate can be greatly reduced.
It is to be noted that, since the controller according to the embodiment of the present application is capable of executing the battery detection method according to the above embodiment, the specific implementation and technical effects of the controller according to the embodiment of the present application can be referred to the specific implementation and technical effects of the battery detection method according to any one of the above embodiments.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to perform the above battery detection method. The method steps in fig. 2 to 8 described above are performed by way of example.
According to the technical scheme of the embodiment of the application, the watershed algorithm is used for segmenting the lug and the background, and the notch is detected according to the convex hull detection algorithm, so that the detection efficiency can be greatly improved, and the false detection rate can be greatly reduced.
It is to be noted that, since the computer-readable storage medium of the embodiment of the present application can implement the battery detection method of the above-mentioned embodiment, the specific implementation and technical effect of the computer-readable storage medium of the embodiment of the present application can be referred to the specific implementation and technical effect of the battery detection method of any one of the above-mentioned embodiments.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as is well known to those skilled in the art.
While the preferred embodiments of the present invention have been described, the present invention is not limited to the above embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and such equivalent modifications or substitutions are to be included in the scope of the present invention defined by the claims.
Claims (10)
1. A battery testing method, comprising:
acquiring a battery image, carrying out area positioning on the battery image, and determining a target area image, wherein the target area image comprises a tab area image and a background area image;
segmenting the lug area image from the target area image based on a watershed algorithm to obtain the background area image;
carrying out region marking on the target region image based on a convex hull detection algorithm to obtain a tab contour image;
and comparing the background area image with the lug contour image to obtain a target notch.
2. The battery test method of claim 1, wherein said obtaining a battery image comprises:
and carrying out image acquisition on the target battery through a CCD image sensor to obtain a battery image corresponding to the target battery.
3. The battery detection method according to claim 1, wherein the performing region localization on the battery image and determining a target region image comprises:
extracting the characteristics of the battery image to obtain image characteristic information;
and positioning and cutting the battery image according to the image characteristic information to obtain a target area image.
4. The battery detection method according to claim 1, wherein the segmenting the tab region image from the target region image based on a watershed algorithm to obtain the background region image comprises:
performing gradient operation on the target area image to obtain a gradient image;
performing watershed transformation on the gradient image to obtain a plurality of water collecting basin images, and determining watersheds among the plurality of water collecting basin images;
and segmenting the lug area image from the gradient image based on the watershed to obtain the background area image.
5. The battery test method of claim 4, wherein after said obtaining a gradient image, said battery test method further comprises:
acquiring a target threshold;
and performing threshold processing on the gradient image based on the target threshold to obtain a processed gradient image so as to perform watershed transformation on the processed gradient image.
6. The battery detection method according to claim 1, wherein the performing region labeling on the target region image based on a convex hull detection algorithm to obtain a tab contour image comprises:
performing convex hull detection on the target area image to obtain convex hull points corresponding to the electrode lug outline;
and generating a plurality of boundary lines based on the convex hull points, and combining the boundary lines to obtain a tab contour image.
7. The battery detection method of claim 6, wherein the convex hull detection algorithm comprises one of: incremental algorithm, wrapping method, kudzuvine constant scanning method, monotone chain, divide and conquer method and fast wrapping method.
8. The battery detection method according to claim 1, wherein the comparing the background region image and the tab contour image to obtain a target gap comprises:
performing image subtraction on the lug contour image and the background area image to obtain a suspected gap;
and screening the suspected notch to obtain a target notch.
9. A controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program when executing the computer program to perform the battery test method of any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon computer-executable instructions for performing the battery test method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211179769.5A CN115564719A (en) | 2022-09-27 | 2022-09-27 | Battery detection method, controller and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211179769.5A CN115564719A (en) | 2022-09-27 | 2022-09-27 | Battery detection method, controller and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115564719A true CN115564719A (en) | 2023-01-03 |
Family
ID=84742179
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211179769.5A Pending CN115564719A (en) | 2022-09-27 | 2022-09-27 | Battery detection method, controller and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115564719A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115861311A (en) * | 2023-02-24 | 2023-03-28 | 广东利元亨智能装备股份有限公司 | Slot stamp detection method, controller, and computer-readable storage medium |
-
2022
- 2022-09-27 CN CN202211179769.5A patent/CN115564719A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115861311A (en) * | 2023-02-24 | 2023-03-28 | 广东利元亨智能装备股份有限公司 | Slot stamp detection method, controller, and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106960446B (en) | Unmanned ship application-oriented water surface target detection and tracking integrated method | |
JP4590471B2 (en) | Method and system for estimating background color | |
CN108489996B (en) | Insulator defect detection method and system and terminal equipment | |
US20150125074A1 (en) | Apparatus and method for extracting skin area to block harmful content image | |
CN115272280A (en) | Defect detection method, device, equipment and storage medium | |
JP2023505663A (en) | Character segmentation method, device and computer readable storage medium | |
Gutzeit et al. | Automatic segmentation of wood logs by combining detection and segmentation | |
CN109712158A (en) | A kind of infrared small target catching method based on target background pixel statistical restraint | |
US20170178341A1 (en) | Single Parameter Segmentation of Images | |
CN111369570B (en) | Multi-target detection tracking method for video image | |
CN117351011B (en) | Screen defect detection method, apparatus, and readable storage medium | |
CN115564719A (en) | Battery detection method, controller and computer-readable storage medium | |
CN115797440A (en) | Battery cell positioning method, controller and computer readable storage medium | |
WO2024016632A1 (en) | Bright spot location method, bright spot location apparatus, electronic device and storage medium | |
CN112633274A (en) | Sonar image target detection method and device and electronic equipment | |
CN115861315B (en) | Defect detection method and device | |
CN107133958B (en) | Optical remote sensing ship slice segmentation method based on block particle size pre-judging balance histogram | |
CN117541585A (en) | Method and device for detecting exposed foil defect of lithium battery pole piece | |
CN110097569B (en) | Oil tank target detection method based on color Markov chain significance model | |
CN115908999B (en) | Method for detecting rust of top hardware fitting of distribution pole tower, medium and edge terminal equipment | |
CN108363958B (en) | Oil tank detection method based on high-resolution optical remote sensing image | |
CN112785550B (en) | Image quality value determining method and device, storage medium and electronic device | |
CN111523583B (en) | Method for automatically identifying and classifying equipment nameplate photos by using unmanned aerial vehicle | |
CN113673362A (en) | Method and device for determining motion state of object, computer equipment and storage medium | |
JP7056401B2 (en) | Boil detection method in continuous casting mold, quality judgment method of continuous casting slab, monitoring method of continuous casting equipment, boil detection device in continuous casting mold |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |