Battery overflow detection method and device, computer device, and readable storage medium
By constructing an overflow detection area based on the battery terminal boundary line and combining it with the image of the adhesive coating area for detection, the problems of low accuracy and high false alarm rate of overflow detection caused by metal reflection and complex background of battery terminals are solved, and high accuracy and low false alarm rate of overflow detection are achieved.
Patent Information
- Application Number
- CN202610604150.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-03
Smart Images

Figure CN122336262A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, and readable storage medium for detecting battery adhesive overflow. Background Technology
[0002] In the coating process of new energy battery terminals, precise application of adhesive is required within a defined annular area on the outside of the terminal to ensure sealing or thermal conductivity. However, in actual production, due to factors such as equipment stability and adhesive characteristics, adhesive overflow often occurs, exceeding the allowable range.
[0003] To address this issue, the industry typically employs global threshold segmentation or simple edge detection for adhesive overflow detection. However, battery terminals themselves have a metallic luster, complex backgrounds, and the grayscale of the normal adhesive-coated area and the overflow area may be similar, making it impossible to accurately detect the overflow portion. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, readable storage medium, and computer program product for detecting battery adhesive overflow, which can improve the accuracy and anti-interference ability of battery adhesive overflow detection and reduce the false alarm rate.
[0005] In a first aspect, this application provides a method for detecting adhesive overflow in batteries, comprising: Acquire the target grayscale image corresponding to the terminal side of the battery to be tested, and determine the terminal boundary line formed by the metal edge of the terminal from the target grayscale image; Using the pole boundary line as a reference, the overflow detection area is determined according to the target extension distance, and an overflow detection area image is generated based on the overflow detection area. Generate an identification image of the adhesive coating area corresponding to the electrode post side based on the target grayscale image, and perform adhesive overflow detection on the battery to be tested based on the adhesive overflow detection area image and the adhesive coating area identification image to obtain the adhesive overflow detection result.
[0006] Secondly, this application provides a battery adhesive overflow detection device, comprising: The acquisition module is used to acquire the target grayscale image corresponding to the terminal side of the battery to be tested; The first determining module is used to determine the pole boundary line formed by the metal edge of the pole from the target grayscale image; The second determining module is used to determine the overflow detection area based on the target extension distance, using the pole boundary line as a reference. The glue overflow generation module is used to generate an image of the glue overflow detection area based on the glue overflow detection area. The adhesive generation module is used to generate an identification image of the adhesive application area corresponding to the pole side based on the target grayscale image; The defect detection module is used to perform glue overflow detection on the battery under test based on the glue overflow detection area image and the glue coating area recognition image, and obtain the glue overflow detection result.
[0007] Thirdly, this application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the method described above.
[0008] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method.
[0009] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described above.
[0010] The aforementioned battery adhesive overflow detection method, apparatus, computer equipment, readable storage medium, and computer program product acquire a target grayscale image corresponding to the terminal side of the battery to be tested and determine the terminal boundary line. Using the terminal boundary line as a reference, the adhesive overflow detection area is determined according to the target extension distance and an adhesive overflow detection area image is generated. At the same time, an adhesive coating area recognition image is generated based on the target grayscale image. Finally, the adhesive overflow detection area image and the adhesive coating area recognition image are combined to detect adhesive overflow in the battery to be tested.
[0011] To address the problems of low detection accuracy and high false alarm rate in existing technologies due to metal reflection from battery terminals, complex backgrounds, and similar grayscale levels between adhesive and background, this application establishes an adhesive overflow detection area by defining the terminal boundary line as a benchmark and extending it. This limits the detection range to a key area outside the terminal terminal, and spatial filtering is performed using images of the adhesive-coated area. Analysis is then performed only on images within the adhesive overflow detection area. Therefore, this application effectively eliminates the influence of surface and internal interference factors on the terminal terminal, solving the problem of inaccurate adhesive overflow detection due to similar grayscale levels and complex backgrounds in existing technologies. This improves the accuracy and anti-interference capability of battery adhesive overflow detection and reduces the false alarm rate. Attached Figure Description
[0012] Figure 1 An application environment diagram for a battery adhesive overflow detection method provided in an embodiment of this application; Figure 2 A schematic flowchart illustrating a battery adhesive overflow detection method provided in an embodiment of this application; Figure 3 A schematic diagram of a target grayscale image provided in an embodiment of this application; Figure 4 This is a schematic diagram of an adhesive overflow detection area provided in an embodiment of this application; Figure 5 A schematic diagram of an image of an adhesive overflow detection area provided in an embodiment of this application; Figure 6 This is a schematic diagram of an adhesive application area provided in an embodiment of this application; Figure 7 A schematic diagram of an overflow area feature map provided in an embodiment of this application; Figure 8 A structural block diagram of a battery adhesive overflow detection device provided in an embodiment of this application; Figure 9 An internal structural diagram of a computer device provided in an embodiment of this application; Figure 10 An internal structural diagram of another computer device provided in an embodiment of this application; Figure 11 This is an internal structural diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0014] The battery adhesive overflow detection method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a communication network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0015] like Figure 2 As shown, this application embodiment provides a method for detecting adhesive overflow in batteries, which is applied to... Figure 1 The method will be illustrated using terminal 102 or server 104 as examples. It is understood that the computer device may include at least one of a terminal and a server. The method includes the following steps: S101. Obtain the target grayscale image corresponding to the terminal side of the battery to be tested, and determine the terminal boundary line formed by the metal edge of the terminal from the target grayscale image.
[0016] The battery to be tested refers to a new energy battery that needs to undergo adhesive overflow testing, including but not limited to cylindrical batteries, prismatic batteries, and pouch batteries. The battery to be tested has completed the electrode coating process, and its battery electrodes are coated with a ring of adhesive. It is necessary to determine whether there is an overflow defect of adhesive exceeding a preset area using the method of the embodiments of this application.
[0017] The terminal side refers to the side of the battery under test that contains the battery terminals and is coated with adhesive. For example, for a cylindrical battery, the terminal side is usually the positive terminal; for a prismatic battery, the terminal side is usually the top cover side. The image of the terminal side includes the battery terminals and the annular adhesive-coated area outside the battery terminals, which is the target object of image acquisition in the embodiments of this application.
[0018] A terminal post refers to the positive or negative conductive terminal of a battery, used to connect to an external circuit. Terminal posts are typically cylindrical protrusions with a metallic sheen. In images, terminal posts appear as bright, circular or nearly circular areas, which are the target objects for determining the detection benchmark in this application's embodiments.
[0019] A target grayscale image refers to a single-channel image that reflects the brightness information of the pole side. A target grayscale image can be obtained by capturing a color image and then converting it to grayscale, or it can be directly captured by a grayscale camera.
[0020] The metallic edge of a pole refers to the physical boundary between the pole's own metallic structure and its surrounding environment; this edge is naturally formed by the pole's metallic structure. The pole boundary line refers to the geometric boundary line extracted from the target grayscale image that reflects the pole's outer contour. This boundary line characterizes the position of the pole's metallic edge and serves as the benchmark for subsequently constructing the adhesive overflow detection area.
[0021] In some embodiments, firstly, an original image of the pole side is acquired using an image acquisition device, and the original image is converted into a grayscale image to obtain a target grayscale image. Then, edge detection is performed on the target grayscale image to extract the edge point set corresponding to the pole metal edge. Finally, the extracted edge point set is fitted to generate a circular geometric boundary that matches the pole metal edge, and this geometric boundary is used as the pole boundary line.
[0022] In other embodiments, firstly, a grayscale image of the pole side is directly acquired using a grayscale image acquisition device, which is then used as the target grayscale image. Next, target detection processing is performed on the target grayscale image to identify the region where the pole is located in the image, and the metal edge boundary is extracted based on the identified pole region, which is then used as the pole boundary line.
[0023] like Figure 3 As shown, this application embodiment provides a schematic diagram of a target grayscale image.
[0024] S102. Using the pole boundary line as a reference, determine the overflow detection area according to the target extension distance, and generate an overflow detection area image based on the overflow detection area.
[0025] The target extension distance refers to a preset distance parameter based on the adhesive coating process requirements, used to determine the radial range of the adhesive overflow detection area relative to the electrode boundary line. The target extension distance reflects the maximum radial width of adhesive allowed in the process standard, i.e., the radial distance between the outer boundary of the normal adhesive coating area and the electrode boundary line. The target extension distance can be flexibly configured according to different battery types, adhesive coating specifications, or quality requirements.
[0026] The glue overflow detection area refers to the region defined by extending radially outward and / or inward from the pole boundary line as a reference. This area is typically a ring-shaped region concentric with the pole boundary line. The construction of the glue overflow detection area does not depend on the image content, but is calculated based on the geometric information of the pole boundary line and the preset target extension distance, thus identifying potential risk areas where glue may overflow.
[0027] An overflow detection region image is an image used to identify the location range of the overflow detection region in image space. This image has the same size as the target grayscale image, and the pixel values of each pixel are used to distinguish whether a corresponding location belongs to the overflow detection region. Specifically, this image is generated by mapping the geometric location information of the overflow detection region to image space, such that pixels corresponding to the overflow detection region have a first-type identifier value, and pixels not corresponding to the overflow detection region have a second-type identifier value, with the first-type identifier value being different from the second-type identifier value. This image serves as the spatial filtering basis in subsequent processing, limiting the analysis range so that only pixels located within the overflow detection region participate in the overflow determination.
[0028] In some embodiments, firstly, using the pole boundary line as a reference, one or more extended boundary lines are determined based on the target extension distance. The extended boundary lines can be located in the direction of radial outward expansion of the pole boundary line, or in the direction of radial inward contraction, or may include extended boundary lines in both outward and inward contraction directions simultaneously. Then, the area enclosed by the pole boundary line and the extended boundary lines is defined as the glue overflow detection area. Finally, the geometric location information of the glue overflow detection area is mapped to image space to generate a glue overflow detection area image used to identify the glue overflow detection area.
[0029] In other embodiments, firstly, radial range parameters of the adhesive overflow detection region are determined based on the target extension distance. These radial range parameters include inner boundary parameters and / or outer boundary parameters. The inner boundary parameters define the range by which the adhesive overflow detection region contracts inward relative to the pole boundary line, and the outer boundary parameters define the range by which the adhesive overflow detection region expands outward relative to the pole boundary line. Then, the adhesive overflow detection region is constructed based on the radial range parameters. Finally, the geometrical position information of the adhesive overflow detection region is mapped to image space to generate an image of the adhesive overflow detection region used to identify it.
[0030] By flexibly configuring the glue overflow detection area, it is possible to detect glue overflowing outwards, glue overflowing inwards, or glue overflowing in both directions simultaneously.
[0031] S103. Generate an identification image of the adhesive coating area corresponding to the electrode side based on the target grayscale image, and perform adhesive overflow detection on the battery to be tested based on the adhesive overflow detection area image and the adhesive coating area identification image to obtain the adhesive overflow detection result.
[0032] The glue application area recognition image is used to characterize the distribution of glue areas in the image space. This image has the same size as the target grayscale image, and the pixel value of each pixel is used to indicate whether the corresponding location belongs to the glue area.
[0033] The glue overflow test result is used to indicate whether the battery meets the glue overflow judgment criteria. The glue overflow test result includes two states: if the battery under test has glue overflow, it means that the battery is judged to have glue overflow defect; if the battery under test does not have glue overflow, it means that the battery is judged to not have glue overflow defect.
[0034] In some embodiments, firstly, image analysis processing is performed on the target grayscale image to identify pixels with lower grayscale values as candidate glue regions, and these candidate regions are marked as glue application area recognition images. Then, spatial correlation analysis is performed between the glue overflow detection area image and the glue application area recognition image. Specifically, through pixel-by-pixel spatial filtering, the portion of the glue application area recognition image located outside the glue overflow detection area is masked, retaining only the glue application features located within the glue overflow detection area. Finally, geometric parameter determination is performed on the retained glue application features, extracting the geometric parameters of the glue overflow area, and comparing the geometric parameters with a preset threshold: if the geometric parameters are greater than or equal to the preset threshold, it is determined that the battery under test has glue overflow; if the geometric parameters are less than the preset threshold, it is determined that the battery under test does not have glue overflow.
[0035] In other embodiments, firstly, image analysis processing is performed on the target grayscale image to identify regions with glue characteristics, generating a glue-covered area recognition image. Then, the spatial relationship between the glue overflow detection area image and the glue-covered area recognition image is calculated. Specifically, this is done by analyzing the overlap between the glue spatial distribution reflected in the glue-covered area recognition image and the glue overflow risk area defined by the glue overflow detection area image to determine whether the glue area enters the glue overflow risk area. If the glue area and the glue overflow risk area overlap, the battery under test is determined to have glue overflow; if the glue area and the glue overflow risk area do not overlap, the battery under test is determined not to have glue overflow.
[0036] As can be seen, in this embodiment, by acquiring the target grayscale image on the electrode side and determining the electrode boundary line, using this boundary line as a reference to determine the overflow detection area based on the target extension distance and generating an overflow detection area image, and simultaneously generating an adhesive coating area recognition image based on the target grayscale image, and finally combining the overflow detection area image and the adhesive coating area recognition image to perform overflow detection on the battery under test, the beneficial effects are: Firstly, it effectively eliminates the influence of interference factors on the surface and inside of the battery terminals, solving the problem in the existing technology that it is difficult to accurately detect glue overflow due to the similar grayscale of the glue and the background and the complexity of the background. This improves the accuracy and anti-interference ability of battery glue overflow detection and reduces the false alarm rate.
[0037] Secondly, by limiting the glue overflow detection area to a key region near the pole boundary line, the range of image analysis required is reduced, the amount of invalid pixels processed is decreased, and no complex model training or large amount of computing resources are needed. The processing speed is fast, which can meet the real-time online detection needs in industrial production and is easy to integrate into automated production lines.
[0038] In some embodiments, the "overflow detection area" in S102 is an annular area formed by extending the target extension distance radially outward from the pole boundary line.
[0039] Radial outward expansion refers to the process of pushing the boundary line outward along a radial direction from the center of the pole, using the pole boundary line as a reference. "Radial" refers to the radial direction perpendicular to the pole boundary line, "outward" refers to the direction away from the center of the pole, and "expansion" means moving the pole boundary line outward to form a new boundary.
[0040] The annular region refers to the closed area bounded by the pole boundary line and the outer extension line. The width of the annular region is equal to the target extension distance. This region is used to define the spatial range where adhesive overflow detection is required; that is, pixels located within this region are considered potential adhesive overflow detection areas.
[0041] The outer extension line refers to the new boundary line obtained by extending the target radially outward from the pole boundary line. This boundary line has the same geometric shape as the pole boundary line, such as being circular, and is concentric with the pole boundary line.
[0042] In some embodiments, taking the center of the pole boundary line as a reference, the radius of the pole boundary line is increased by the target extension distance in a radially outward direction to obtain an outer extension line. The area enclosed by the pole boundary line and the outer extension line is then defined as an annular region, serving as the adhesive overflow detection area.
[0043] In other embodiments, firstly, the pole boundary line is used as the inner boundary reference line, and the spatial position of the outer extension line is determined based on the target extension distance, wherein the outer extension line and the pole boundary line maintain the same geometric shape and have a common geometric center. Then, based on the spatial relationship between the pole boundary line and the outer extension line, a closed annular region is constructed, where the inner boundary of the annular region coincides with the pole boundary line, and the outer boundary coincides with the outer extension line. Finally, this annular region is used as the adhesive overflow detection area.
[0044] As can be seen, in this embodiment, by setting the overflow detection area as an annular region formed by radially extending the target extension distance from the pole boundary line, the beneficial effect is: Firstly, this ensures that the constructed annular adhesive overflow detection area remains concentric with the boundary line of the battery terminal. Even if the battery under test experiences slight positional shifts or angular rotations during image acquisition, the adhesive overflow detection area remains relatively fixed in spatial position due to its geometric binding with the battery terminal itself. This avoids offset of the adhesive overflow detection area caused by changes in the battery's orientation, thus guaranteeing the stability and accuracy of adhesive overflow detection.
[0045] Secondly, it allows the detection range to focus on the key area on the outside of the battery terminal, excluding the surface of the battery terminal, the inside of the battery terminal, and the background area far away from the battery terminal from the detection range. This effectively reduces the number of pixels that need to be analyzed in subsequent processing, and also eliminates a large amount of interference information unrelated to glue overflow from the source.
[0046] Thirdly, the process of determining the overflow detection area does not rely on the segmentation or recognition of image content, but rather on a simple radial expansion calculation based on the geometric information of the pole boundary line. This method involves a small amount of computation and a fast processing speed, which can meet the real-time detection needs of industrial production lines and is easy to integrate into automated production processes.
[0047] like Figure 4As shown in the figure, this application embodiment provides a schematic diagram of an adhesive overflow detection area, wherein the red circular line 400 represents the electrode boundary line, the red circular line 401 represents the outer extension line, and the annular area formed between the electrode boundary line 400 and the outer extension line 401 is the adhesive overflow detection area.
[0048] In some embodiments, the target extension distance is determined as follows: Determine the corresponding adhesive coating process requirements for the battery to be tested based on the battery type. Determine the target extension distance based on the adhesive application process requirements.
[0049] The battery type refers to the attribute information used to distinguish different battery specifications, structures, or performance categories. The battery type may include, but is not limited to, the battery's physical form, model specifications, capacity level, or terminal dimensions.
[0050] The adhesive coating process requirements refer to the set of technical parameters used to guide battery adhesive coating operations and determine adhesive overflow. The adhesive coating process requirements must include at least a radial range where adhesive is not allowed to exist; that is, adhesive is not allowed to appear within a certain distance from the terminal boundary line, and this distance is the target extension distance.
[0051] In some embodiments, battery type information of the battery to be tested is obtained. This information can be acquired by identifying the identification code on the battery surface, reading production batch information, or directly transmitting it from a host computer. Based on a preset correspondence between battery type and adhesive coating process requirements, the adhesive coating process requirements corresponding to the battery to be tested are located and determined. For example, taking a certain model of cylindrical battery as an example, the adhesive coating process requirements stipulate that no adhesive is allowed within 0.5 mm outward from the terminal boundary line. According to this process requirement, 0.5 mm is converted to 80 pixels as the target extension distance, and an overflow detection area is constructed by extending 80 pixels outward from the terminal boundary line as a reference.
[0052] As can be seen, in this embodiment, by determining the coating process requirements corresponding to the battery to be tested based on the battery type, and then determining the target extension distance based on the coating process requirements, the beneficial effects are: Firstly, different battery types often correspond to different coating process requirements. By dynamically linking the target extension distance with the coating process requirements, the same detection method can be compatible with multiple battery types and multiple coating process requirements without modifying the core algorithm, demonstrating good process versatility.
[0053] Secondly, the target extension distance can be determined without manual intervention, enabling adaptive adjustment of detection parameters and improving the intelligence and automation level of glue overflow detection.
[0054] Thirdly, since the target extension distance is directly derived from the radial range where glue is not allowed in the gluing process requirements, the criteria for judging glue overflow detection are consistent with the production specifications, thus avoiding misjudgments caused by the disconnect between glue overflow detection standards and gluing process requirements.
[0055] In some embodiments, S102, "generating an image of the glue overflow detection area based on the glue overflow detection area", includes: All pixels in the target grayscale image located outside the glue overflow detection area are set to the first pixel value, and all pixels in the target grayscale image located within the glue overflow detection area are set to the second pixel value, thus obtaining the glue overflow detection area image.
[0056] The first pixel value refers to the pixel value used to identify pixels outside the glue overflow detection area. In the glue overflow detection area image, all pixels located outside the glue overflow detection area are assigned this pixel value. The specific value of the first pixel value can be 0, 1, 255, or other preset values. Its function is to identify and exclude pixels located outside the glue overflow detection area in subsequent processing, so that they are not included in the glue overflow determination.
[0057] The second pixel value refers to the pixel value used to identify pixels within the glue overflow detection area. In the glue overflow detection area image, all pixels located within the detection area are assigned this pixel value. The specific value of the second pixel value can be 0, 1, 255, or other preset values. Its purpose is to identify and retain pixels located within the glue overflow detection area in subsequent processing, allowing them to participate in glue overflow determination.
[0058] The first pixel value and the second pixel value are different to ensure that the image of the glue overflow detection area can clearly distinguish between the inside and outside of the glue overflow detection area. The specific values of the two can be flexibly set according to the needs of subsequent processing, such as different combinations of 0 and 1, 0 and 255, False and True, etc.
[0059] In some embodiments, firstly, a target grayscale image and a determined glue overflow detection area are acquired. Then, each pixel in the target grayscale image is traversed, and for any pixel, it is determined whether the pixel's position is within the glue overflow detection area. If the pixel is within the glue overflow detection area, its pixel value is set to a second pixel value; if the pixel is outside the glue overflow detection area, its pixel value is set to a first pixel value. The first pixel value and the second pixel value are different. Finally, all pixels with the above pixel value settings constitute the glue overflow detection area image.
[0060] For example, suppose the glue overflow detection area is a ring-shaped region enclosed by the pole boundary line and the outer extension line. Traverse all pixels in the target grayscale image, set the pixels within the ring-shaped region to 1 (second pixel value), and set the pixels outside the ring-shaped region to 0 (first pixel value), thereby obtaining a binary mask image that can clearly identify the glue overflow detection area.
[0061] As can be seen, in this embodiment, by setting the pixels outside the glue overflow detection area in the target grayscale image to the first pixel value and setting the pixels within the glue overflow detection area in the target grayscale image to the second pixel value, the glue overflow detection area image is obtained. The beneficial effects are as follows: Firstly, it allows for the precise definition of the glue overflow detection area in the image space. Pixels inside and outside the glue overflow detection area are assigned different pixel values, forming a clear binary distinction, providing a clear spatial selection basis for subsequent processing.
[0062] Secondly, it can shield interference information from non-interested areas such as the surface of the electrode post, the inside of the electrode post, and the background area far away from the electrode post, so that the glue overflow detection result is only affected by the information within the glue overflow detection area, effectively reducing the false alarm rate.
[0063] like Figure 5 As shown in the figure, this application embodiment provides a schematic diagram of an overflow detection area image. The white annular area is the overflow detection area with the pixel value set to the second pixel value, and the black area is the outer area of the overflow detection area with the pixel value set to the first pixel value.
[0064] In some embodiments, "generating an identification image of the coating area corresponding to the pole side based on the target grayscale image" in S103 includes: S1031. Pixels in the target grayscale image whose grayscale value is less than the preset grayscale threshold are identified as first-class pixels, and the first-class pixels are set as the third pixel value.
[0065] Here, grayscale value refers to the brightness value corresponding to each pixel in the target grayscale image. In the embodiments of this application, the coated area usually presents a low grayscale value (darker), while the non-coated area composed of the pole metal and the background area usually presents a high grayscale value (darker).
[0066] The preset grayscale threshold refers to a pre-defined grayscale value boundary point used to distinguish between glued and un-glueed areas. This threshold is determined based on the grayscale distribution characteristics of the adhesive and the background, and is typically selected as a value that effectively separates the two. For example, a preset grayscale threshold of 140 might be set.
[0067] The third pixel value refers to the pixel value used to identify pixels in the glue-coated area. In the glue-coated area recognition image, pixels identified as glue-coated areas are assigned this pixel value. The specific value of the third pixel value can be set according to subsequent processing requirements, for example, it can be set to 0, 1, 255 or other values, and its function is to identify the distribution position of the glue in the image space.
[0068] In some embodiments, firstly, a target grayscale image and a preset grayscale threshold are acquired. Then, each pixel in the target grayscale image is traversed. For any pixel, its grayscale value is acquired and compared with the preset grayscale threshold. If the grayscale value of the pixel is less than the preset grayscale threshold, the pixel is classified as a first-class pixel, and its pixel value is set to a third-class pixel value. This process is repeated for all pixels, marking all pixels with grayscale values below the threshold as third-class pixels.
[0069] S1032. Pixels in the target grayscale image whose grayscale value is greater than or equal to a preset grayscale threshold are identified as second-class pixels, and the second-class pixels are set as the fourth pixel value.
[0070] The fourth pixel value is used to identify pixels in non-adhesive areas. In the adhesive area recognition image, pixels identified as non-adhesive areas are assigned this pixel value. The specific value of the fourth pixel value can be set according to subsequent processing requirements; its function is to distinguish it from the third pixel value, clearly identifying adhesive and non-adhesive areas. The third pixel value and the fourth pixel value are different.
[0071] In some embodiments, firstly, a target grayscale image and a preset grayscale threshold are acquired. Then, each pixel in the target grayscale image is traversed. For any pixel, its grayscale value is acquired and compared with the preset grayscale threshold. If the grayscale value of the pixel is greater than or equal to the preset grayscale threshold, the pixel is classified as a second-class pixel, and its pixel value is set as a fourth-class pixel value. This process is repeated for all pixels, marking all pixels with grayscale values not lower than the threshold as fourth-class pixels.
[0072] S1033. The glue-coated area is formed by the first type of pixels with the third pixel value, and the non-glue-coated area is formed by the second type of pixels with the fourth pixel value, thus obtaining the glue-coated area recognition image.
[0073] The glue-coated area refers to the region in the target grayscale image composed of pixels with grayscale values lower than a preset grayscale threshold. This region corresponds to the part of the pole side actually coated with glue, including the normal glue-coated area and any potential glue overflow areas. In the glue-coated area recognition image, the glue-coated area is composed of first-class pixels set to the third pixel value.
[0074] The non-adhesive-coated area refers to the region in the target grayscale image composed of pixels with grayscale values higher than or equal to a preset grayscale threshold. This region corresponds to the part of the pole side that is not coated with adhesive, including the metal surface of the pole, the interior of the pole, and the background area far from the pole. In the adhesive-coated area recognition image, the non-adhesive-coated area is composed of second-type pixels set to the fourth pixel value.
[0075] In some embodiments, firstly, a target grayscale image with pixel values already set is acquired, wherein first-class pixels with grayscale values less than a preset grayscale threshold are set to third pixel values, and second-class pixels with grayscale values greater than or equal to the preset grayscale threshold are set to fourth pixel values. Then, the set of pixels in the image consisting of all first-class pixels set to third pixel values is determined as the glue-coated region, and the set of pixels in the image consisting of all second-class pixels set to fourth pixel values is determined as the non-glue-coated region. Finally, the image containing both the glue-coated and non-glue-coated regions is output as a glue-coated region recognition image.
[0076] like Figure 6 As shown in the figure, this application embodiment provides a schematic diagram of an adhesive application area, wherein the black area represented by 601 indicates the adhesive application area.
[0077] As can be seen, in this embodiment, pixels with gray values less than a preset gray threshold in the target grayscale image are classified as first-type pixels and assigned a third pixel value, while pixels with gray values greater than or equal to the preset grayscale threshold are classified as second-type pixels and assigned a fourth pixel value. Since the third and fourth pixel values are different, the third pixel value constitutes the coated area, and the fourth pixel value constitutes the uncoated area, thereby obtaining a coated area recognition image. The beneficial effects are: Firstly, by setting a grayscale threshold, the target grayscale image is classified at the pixel level. By utilizing the physical characteristics that the glue is darker (low grayscale value) and the background is brighter (high grayscale value), the glued area is accurately distinguished from the non-glued area, thus solving the problem that the glued area is difficult to identify due to the similar grayscale of the glue and the background and the complexity of the background.
[0078] Secondly, in the generated glue-coated area recognition image, the glue-coated area and the non-glue-coated area are assigned different pixel values, forming a clear binary identifier, which intuitively reflects the actual distribution location of the glue in the image space, providing accurate basic information for subsequent glue overflow detection.
[0079] In some embodiments, S103, "based on the overflow detection area image and the adhesive coating area identification image, performing overflow detection on the battery to be tested and obtaining the overflow detection result", includes: S1034. For any pixel position in the glue overflow detection area image, if the pixel value of that pixel position is the second pixel value, then the pixel value of that pixel position in the glue coating area recognition image shall be used as the pixel value of that pixel position in the glue overflow area feature map.
[0080] S1035. For any pixel location in the glue overflow detection area image, if the pixel value at that location is the first pixel value, then the background pixel value is used as the pixel value at that location in the glue overflow area feature map to generate the glue overflow area feature map.
[0081] The glue overflow area feature map refers to the image generated after spatial filtering based on the glue overflow detection area image and the glue application area recognition image. This image has the same size as the target grayscale image, and the pixel value of each pixel is used to identify the glue overflow area retained after filtering.
[0082] Background pixel values refer to uniform pixel values used to identify non-interested areas (i.e., areas that do not need to be analyzed). In the glue overflow area feature map, all pixels that do not belong to the glue overflow area are set to this pixel value. The specific value of the background pixel value can be set according to subsequent processing requirements, for example, it can be set to 0, 255 or other values.
[0083] In some embodiments, firstly, an image of the glue overflow detection area and an image of the glue coating area recognition are acquired, both having the same size and corresponding pixel positions. Then, each pixel position in the glue overflow detection area image is traversed, and for any given pixel position, its pixel value in the glue overflow detection area image is obtained. If the pixel value is the second pixel value, indicating that the pixel position is within the glue overflow detection area, the pixel value at the same position in the glue coating area recognition image is taken as the pixel value for that pixel position in the glue overflow area feature map; if the pixel value is the first pixel value, indicating that the pixel position is outside the glue overflow detection area, a preset background pixel value is used as the pixel value for that pixel position in the glue overflow area feature map. Finally, all the pixels processed as described above constitute the glue overflow area feature map.
[0084] For example, suppose that in the image of the glue overflow detection area, the pixel value within the annular area is 1 (the second pixel value), and the pixel value outside the annular area is 0 (the first pixel value). In the image of the glue coating area recognition, the pixel value of the glue coating area is 0, and the pixel value of the non-glue coating area is 255.
[0085] The process iterates through all pixels in the glue overflow detection area image: For pixels within the annular region, the corresponding pixel value (0 or 255) from the glue application area identification image is filled into the glue overflow area feature map; for pixels outside the annular region, the background pixel value (e.g., 255) is uniformly filled into the glue overflow area feature map. In the final generated glue overflow area feature map, only the glue distribution information is retained within the annular region, while everything outside the annular region is background.
[0086] Specifically, the feature map of the overflow area is generated using the following formula: ; in, Indicates the pixel position in the image of the glue overflow detection area. pixel values, Indicates the pixel position in the image of the glued area identification. pixel values, The pixel position in the feature map representing the glue overflow area The pixel value is 255, which is the preset background pixel value.
[0087] like Figure 7 As shown in the figure, this application embodiment provides a schematic diagram of the feature map of the overflow area, wherein the black area is the overflow area retained after screening.
[0088] S1036. Perform contour detection on the feature map of the overflow area to obtain the geometric parameters of the overflow area.
[0089] Among them, the glue overflow area refers to the glue distribution area that is determined by detection to be beyond the preset allowable range and constitutes a glue overflow defect.
[0090] The geometric parameters of the glue overflow region refer to the numerical values extracted after contour detection of the glue overflow region feature map, used to quantitatively describe the morphological characteristics of the glue overflow region. Geometric parameters include, but are not limited to, the area, length, width, perimeter, circumscribed rectangle size, and aspect ratio of the glue overflow region.
[0091] In some embodiments, firstly, a feature map of the glue overflow region is obtained; then, contour detection is performed on the feature map of the glue overflow region to extract the contour boundaries of all connected regions in the image, and the geometric parameters corresponding to each contour are calculated. Specifically, contour detection of the glue overflow region feature map can be implemented using the OpenV built-in function cv2.findContours.
[0092] S1037. If the geometric parameter is greater than or equal to the geometric parameter threshold, the overflow detection result is determined to be that the battery under test has overflow.
[0093] The geometric parameter threshold refers to a pre-defined numerical limit used to determine whether an overflowing area constitutes an overflow defect. This threshold corresponds to the geometric parameters extracted from the feature map of the overflowing area, and is used to distinguish between permissible minor glue traces and overflow defects that require attention.
[0094] In some embodiments, firstly, geometric parameters extracted from the feature map of the overflow region and preset geometric parameter thresholds are obtained. The geometric parameters and geometric parameter thresholds are of the same type, meaning they have the same physical meaning and dimensions. For example, if the geometric parameter is the area of the overflow region, then the geometric parameter threshold is the area threshold; if the geometric parameter is the length of the overflow region, then the geometric parameter threshold is the length threshold; if the geometric parameter is the width of the overflow region, then the geometric parameter threshold is the width threshold, and so on. Then, the geometric parameters are compared with the geometric parameter thresholds. If the geometric parameter is greater than or equal to the geometric parameter threshold, the overflow detection result is determined to be that the battery under test has overflow; if the geometric parameter is less than the geometric parameter threshold, the overflow detection result is determined to be that the battery under test does not have overflow.
[0095] For example, suppose the preset area threshold is 100 square pixels. The area of the glue overflow region extracted from the glue overflow region feature map is 150 square pixels. Both are area units and can be directly compared. Since 150 is greater than 100, the system determines that the battery under test has glue overflow. If the extracted area is 50 square pixels, then the system determines that the battery under test does not have glue overflow.
[0096] As can be seen, in this embodiment, by performing conditional replacement on the glue-covered area recognition image based on the pixel values of the glue overflow detection area image to generate a glue overflow area feature map, and then obtaining geometric parameters through contour detection, if the geometric parameters are greater than or equal to a threshold, it is determined that glue overflow exists. The beneficial effects are: Firstly, in the feature map of the glue overflow area generated directly based on pixel-level conditional replacement, only the glue distribution information within the glue overflow detection area is retained, while background interference outside the detection area is completely masked. Furthermore, geometric parameters are used for further judgment to avoid misclassifying small noise points or non-glue overflow traces as glue overflow defects, thus reducing the false alarm rate.
[0097] Secondly, it transforms the original subjective judgment of glue overflow, which relies on human experience, into an objective and quantifiable numerical comparison, eliminating the subjectivity and uncertainty of human judgment and making the glue overflow detection results more objective and consistent.
[0098] Thirdly, by comparing geometric parameters with their threshold values, tiny glue traces or noise points that are too small in area or too short in length can be filtered out. These traces may be caused by glue splatter, slight burrs, or image noise, and do not constitute substantial glue overflow defects. The threshold comparison mechanism makes the detection results more consistent with actual process requirements and reduces the false alarm rate.
[0099] In some embodiments, after determining that the adhesive overflow detection result indicates that the battery under test has adhesive overflow, the method further includes: Based on the results of contour detection, determine the location and grade of the excess glue in the excess glue area; An inspection report is generated based on the location, level, and geometric parameters of the overflow, and an alarm is triggered.
[0100] The location of the glue overflow refers to the coordinate information of the glue overflow area in the image space, which is used to identify the specific location of the glue overflow defect on the pole side. This location information can be characterized by the coordinates of the connected region boundary, centroid coordinates, or circumscribed rectangle coordinates obtained by contour detection.
[0101] Glue overflow grade refers to the severity level classified according to the geometric parameters of the overflow area. This grade is determined by comparing the geometric parameters with several preset grade thresholds to distinguish different types or degrees of glue overflow defects. For example, glue overflow grades can be classified as minor glue overflow, moderate glue overflow, and severe glue overflow.
[0102] A test report is a comprehensive collection of information used to record the results of adhesive overflow testing on a battery under test. This report should at least include the location, grade, and geometric parameters of the overflow, and may further include the test time, battery identification information, testing equipment information, and test conclusions.
[0103] In some embodiments, firstly, the contour information of the effusion region obtained after contour detection is acquired, and then the effusion location is calculated based on the boundary coordinates of the contour, for example, by using the centroid coordinates of the contour or the center point of the smallest bounding rectangle to characterize the orientation of the effusion in the image space.
[0104] Simultaneously, the area, length, or width directly extracted from contour detection are used as geometric parameters of the overflow region. Next, these geometric parameters are compared with multiple preset threshold levels to determine the overflow level of the overflow region.
[0105] Next, the location of the excess adhesive, geometric parameters, the level of excess adhesive, as well as the detection time, battery identification information, detection equipment information, and detection conclusions are integrated to generate a test report. Finally, if the detection determines that excess adhesive is present, an alarm signal is triggered to alert the operator.
[0106] As can be seen, in this embodiment, the location and level of adhesive overflow in the overflow area are determined based on the results of contour detection; a detection report is generated based on the location, level, and geometric parameters, and an alarm is triggered. The beneficial effects are: Firstly, when quality problems occur, the test report can be used to trace the specific battery's adhesive overflow, facilitating the analysis of the cause, improvement of the process, and meeting customers' needs for quality data.
[0107] Secondly, when overflowing adhesive is detected, an alarm is triggered immediately, which can promptly remind on-site operators to isolate defective products at the first time, prevent them from flowing into subsequent processes, reduce batch losses caused by the accumulation of defects, and effectively ensure the yield of the production line.
[0108] In some embodiments, S101, "determining the pole boundary line formed by the metal edge of the pole from the target grayscale image," includes: Metal edge detection is performed on the target grayscale image to obtain the polar boundary points corresponding to the polarity; The polar boundary points are fitted to a standard circle to obtain the polar boundary line.
[0109] Metal edge detection refers to the process of analyzing and processing a target grayscale image to identify and extract pixels whose grayscale values change drastically. In this embodiment, metal edge detection is used to extract the polarity metal edge, i.e., the boundary between the outer contour of the polarity and the background. Metal edge detection can be implemented using algorithms such as gradient calculation, threshold segmentation, or Canny.
[0110] The pole boundary points refer to the pixels located on the outer contour of the pole, extracted through edge detection. These pixels constitute a discrete set of points on the pole boundary, reflecting the edge position information of the pole in the image.
[0111] Fitting to a standard circle refers to the process of using the polar boundary points as input data and employing a mathematical fitting algorithm to calculate a circular geometric model that minimizes the overall deviation from all boundary points. This circular geometric model is the standard circle, with definite center coordinates and radius values. Through fitting processing, discrete noise and local distortions that may exist in edge detection can be eliminated, providing an accurate benchmark for the subsequent construction of the adhesive overflow detection area.
[0112] In some embodiments, this is achieved through the following steps: Step 1: Gradient Calculation The Sobel operator is used to calculate the target grayscale image. horizontal gradient and vertical gradient The Sobel convolution kernel is: ; Horizontal gradient Vertical gradient Where * denotes convolution operation. Then, the gradient magnitude is synthesized. : ; Step 2: Non-maximum suppression and dual threshold detection For gradient magnitude Non-maximum suppression (NMS) is performed to refine edges and remove non-local maxima along the gradient direction. Then, a high threshold is set. and low threshold Perform double threshold detection and edge connection to generate a binary edge map. .
[0113] Step 3: Least Squares Circle Fitting Extracting binary edge maps All edge point sets Assume the general equation of a circle is: ; Wherein, the coordinates of the center are ,radius .
[0114] Each edge point Substituting into the above equations, we obtain a system of overdetermined linear equations for the unknown parameters D, E, and F: ; The above system of equations is solved using the least squares method to obtain the parameters D, E, and F. The center of the circle is then calculated. and radius : ; This standard circle represents the physical edge of the battery terminal, also known as the terminal boundary line.
[0115] As can be seen, in this embodiment, by performing metal edge detection on the target grayscale image, the polarity boundary points corresponding to the polarity are obtained; by fitting the polarity boundary points into a standard circle, the polarity boundary line is obtained. The beneficial effect is as follows: Metal edge detection can extract discrete pixels of the metal edge of the battery terminal, while fitting transforms these discrete points into a standard circle with continuous geometric parameters, eliminating discretization errors and avoiding false detections caused by positioning deviations.
[0116] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0117] Based on the same inventive concept, this application also provides a battery adhesive overflow detection device. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more battery adhesive overflow detection device embodiments provided below can be found in the limitations of the battery adhesive overflow detection method described above, and will not be repeated here.
[0118] like Figure 8 As shown, this application embodiment provides a battery adhesive overflow detection device 800, including: The acquisition module 801 is used to acquire the target grayscale image corresponding to the terminal side of the battery to be tested; The first determining module 802 is used to determine the pole boundary line formed by the metal edge of the pole from the target grayscale image; The second determining module 803 is used to determine the overflow detection area based on the target extension distance, using the pole boundary line as a reference. The glue overflow generation module 804 is used to generate a glue overflow detection area image based on the glue overflow detection area. The adhesive generation module 805 is used to generate an identification image of the adhesive application area corresponding to the pole side based on the target grayscale image. The defect detection module 806 is used to perform overflow detection on the battery to be tested based on the overflow detection area image and the glue coating area recognition image, and obtain the overflow detection result.
[0119] In some embodiments, the overflow detection area is an annular area formed by radially extending the target extension distance from the electrode boundary line; In generating an image of the glue overflow detection area based on the glue overflow detection area, the glue overflow generation module 804 is specifically used for: All pixels in the target grayscale image located outside the glue overflow detection area are set to the first pixel value, and all pixels in the target grayscale image located within the glue overflow detection area are set to the second pixel value, thus obtaining the glue overflow detection area image. The first pixel value is different from the second pixel value.
[0120] In some embodiments, in generating an identification image of the adhesive coating area corresponding to the pole side based on the target grayscale image, the adhesive coating generation module 805 is specifically used for: Pixels in the target grayscale image whose grayscale value is less than the preset grayscale threshold are identified as first-class pixels, and first-class pixels are set as third-class pixel values; Pixels in the target grayscale image whose grayscale value is greater than or equal to a preset grayscale threshold are identified as second-class pixels and set as fourth-class pixels; wherein, the third-class pixel value is different from the fourth-class pixel value. The glue-coated area is formed by the first type of pixels with the third pixel value, and the non-glue-coated area is formed by the second type of pixels with the fourth pixel value, thus obtaining the glue-coated area recognition image.
[0121] In some embodiments, in performing adhesive overflow detection on the battery to be tested based on the adhesive overflow detection area image and the adhesive coating area identification image to obtain the adhesive overflow detection result, the defect detection module 806 is specifically used for: For any pixel location in the glue overflow detection area image, if the pixel value at that location is the second pixel value, then the pixel value at that location in the glue coating area recognition image will be used as the pixel value at that location in the glue overflow area feature map. For any pixel location in the glue overflow detection area image, if the pixel value at that location is the first pixel value, then the background pixel value is used as the pixel value at that location in the glue overflow area feature map to generate the glue overflow area feature map. Contour detection is performed on the feature map of the overflow area to obtain the geometric parameters of the overflow area; If the geometric parameter is greater than or equal to the geometric parameter threshold, the overflow detection result is determined to be that the battery under test has overflow.
[0122] In some embodiments, the apparatus further includes a test report generation module, for: Based on the results of contour detection, determine the location and grade of the excess glue in the excess glue area; An inspection report is generated based on the location, level, and geometric parameters of the overflow, and an alarm is triggered.
[0123] In some embodiments, in determining the pole boundary line formed by the metal edge of the pole from the target grayscale image, the first determining module 802 is specifically configured to: Metal edge detection is performed on the target grayscale image to obtain the polar boundary points corresponding to the polarity; The polar boundary points are fitted to a standard circle to obtain the polar boundary line.
[0124] In some embodiments, the target extension distance is determined as follows: Determine the corresponding adhesive coating process requirements for the battery to be tested based on the battery type. Determine the target extension distance based on the adhesive application process requirements.
[0125] Each module in the aforementioned battery adhesive overflow detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0126] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the battery adhesive overflow detection method. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the aforementioned battery adhesive overflow detection method.
[0127] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the steps in the aforementioned battery adhesive overflow detection method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen; the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs or touchpads set on the casing of the computer device, or external keyboards, touchpads or mice, etc.
[0128] Those skilled in the art will understand that Figure 9 or Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0129] In some embodiments, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0130] In some embodiments, such as Figure 11 The diagram shows the internal structure of a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the above-described method embodiments.
[0131] In some embodiments, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0134] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0135] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting adhesive overflow in batteries, characterized in that, include: Acquire a target grayscale image corresponding to the terminal side of the battery to be tested, and determine the terminal boundary line formed by the metal edge of the terminal from the target grayscale image; Using the pole boundary line as a reference, the overflow detection area is determined according to the target extension distance, and an overflow detection area image is generated based on the overflow detection area. Generate a glue-coated area recognition image corresponding to the electrode side based on the target grayscale image, and perform glue overflow detection on the battery to be tested based on the glue overflow detection area image and the glue-coated area recognition image to obtain the glue overflow detection result.
2. The method according to claim 1, characterized in that, The overflow detection area is an annular area formed by radially extending the target extension distance from the boundary line of the pole post. The step of generating an image of the glue overflow detection area based on the glue overflow detection area includes: All pixels in the target grayscale image located outside the glue overflow detection area are set to the first pixel value, and all pixels in the target grayscale image located within the glue overflow detection area are set to the second pixel value, thus obtaining the glue overflow detection area image. The first pixel value is different from the second pixel value.
3. The method according to claim 1, characterized in that, The step of generating the adhesive-coated area recognition image corresponding to the pole side based on the target grayscale image includes: Pixels in the target grayscale image whose grayscale value is less than a preset grayscale threshold are identified as first-class pixels, and the first-class pixels are set as third-class pixels. Pixels in the target grayscale image whose grayscale value is greater than or equal to the preset grayscale threshold are identified as second-type pixels, and the second-type pixels are set as fourth-type pixel values; wherein, the third-type pixel value is different from the fourth-type pixel value; The first type of pixels, which are set to the third pixel value, constitute the glue-coated area, and the second type of pixels, which are set to the fourth pixel value, constitute the non-glue-coated area, thus obtaining a glue-coated area recognition image.
4. The method according to claim 3, characterized in that, The step of performing adhesive overflow detection on the battery under test based on the adhesive overflow detection area image and the adhesive coating area recognition image to obtain the adhesive overflow detection result includes: For any pixel location in the glue overflow detection area image, if the pixel value at that pixel location is the second pixel value, then the pixel value at that pixel location in the glue application area identification image is used as the pixel value at that pixel location in the glue overflow area feature map. For any pixel location in the overflow detection area image, if the pixel value at that location is the first pixel value, then the background pixel value is used as the pixel value at that location in the overflow area feature map to generate the overflow area feature map. Contour detection is performed on the feature map of the overflow area to obtain the geometric parameters of the overflow area; If the geometric parameter is greater than or equal to the geometric parameter threshold, then the overflow detection result is determined to be that the battery under test has overflow.
5. The method according to claim 4, characterized in that, After determining that the battery under test has excess adhesive, the method further includes: Based on the results of the contour detection, the location and level of the excess glue in the excess glue area are determined; A detection report is generated based on the location of the overflow, the level of the overflow, and the geometric parameters, and an alarm is triggered.
6. The method according to claim 1, characterized in that, The step of determining the polar boundary line formed by the metal edge of the polarity from the target grayscale image includes: Metal edge detection is performed on the target grayscale image to obtain the pole boundary points corresponding to the poles; The polar boundary points are fitted into a standard circle to obtain the polar boundary line.
7. The method according to claim 1, characterized in that, The target extension distance is determined in the following manner: Based on the battery type of the battery to be tested, determine the corresponding adhesive coating process requirements for the battery to be tested; The target extension distance is determined according to the adhesive application process requirements.
8. A battery adhesive overflow detection device, characterized in that, include: The acquisition module is used to acquire the target grayscale image corresponding to the terminal side of the battery to be tested; The first determining module is used to determine the pole boundary line formed by the metal edge of the pole from the target grayscale image; The second determining module is used to determine the overflow detection area based on the target extension distance, using the pole boundary line as a reference. An overflow generation module is used to generate an overflow detection area image based on the overflow detection area. The adhesive generation module is used to generate an adhesive region recognition image corresponding to the pole side based on the target grayscale image. The defect detection module is used to perform adhesive overflow detection on the battery to be tested based on the adhesive overflow detection area image and the adhesive coating area recognition image, and obtain the adhesive overflow detection result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.