A method, system and storage medium for automatic detection of battery insulation adhesive wrapping defects
By automatically building the target detection area and preset feature extraction and analysis, the problems of missed detection and missed detection in battery insulating glue packaging inspection are solved, the accuracy and efficiency of detection are improved, the product defect rate is reduced, and the product quality is improved.
Patent Information
- Application Number
- CN202411017067.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-29
AI Technical Summary
When the prior art detects whether there are defects in the battery insulating glue package, it is easy to cause mis-detection or missed inspection due to differences in battery cell size and differences in battery installation, affecting the accuracy of the detection results.
By obtaining the detection image after the battery insulating glue is wrapped, the target detection area is automatically constructed, combined with preset feature extraction and analysis, the area characteristics and defect width characteristics are extracted, and the insulating glue package is judged whether the insulating glue package is qualified.
It improves the accuracy and efficiency of testing, reduces product defect rate, and improves product quality and reliability.
Smart Images

Figure CN118549451B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of battery detection technology, and in particular, relates to a method, system and storage medium for automatically detecting defects in battery insulation glue wrapping. Background Art
[0002] In current industrial production, battery cells need to be wrapped with insulating glue. The main function of the insulating glue is to isolate the battery cells from the external environment to prevent short circuits and leakage. If the insulating glue is not wrapped properly, the battery cells may come into direct contact with external metal or other conductive objects, increasing the risk of short circuits and leakage, which may lead to safety accidents such as battery overheating, fire or explosion. Incomplete insulating glue may cause the battery cells to be affected by the external environment during use, such as humidity, temperature, etc., thereby affecting the performance of the battery, such as reducing battery capacity, charging and discharging efficiency, etc. Therefore, when the insulating glue is not wrapped or there are defects in the wrapping, it will affect the use of the battery. The comparison diagrams of the battery insulation glue wrapping that passes and the battery insulation glue wrapping that fails are shown in the attached figure. Figure 1 and attached Figure 2 As shown in the figure, currently, the fixed detection area method is usually used to detect whether there are defects in the battery insulation glue wrapping, that is, a fixed detection area is set under the battery to detect whether the insulation glue is wrapped properly. However, due to the differences in the consistency of battery cell products and the differences in the tooling and fixtures for installing batteries, among which the battery will be placed in a carrier on the production line first, the fixed detection area method can easily lead to false detection or missed detection, making the detection results inaccurate and affecting the service life of the battery product. Summary of the invention
[0003] In response to the defects of the above-mentioned prior art, the present application provides a method, system and storage medium for automatic detection of battery insulating glue wrapping defects. The method can flexibly and automatically construct a target detection area according to the size of the battery cell, greatly improving the detection effect and compatibility, and combining preset feature extraction analysis to detect the wrapping effect of the insulating glue, thereby improving detection efficiency and accuracy and reducing product defective rate.
[0004] To achieve the above objectives, the present application provides a method for automatically detecting battery insulation adhesive wrapping defects, the method comprising:
[0005] S100: Acquire a detection image of the battery after being wrapped with insulating glue, and extract the battery cell area in the detection image according to a preset rule.
[0006] S200: extracting positioning parameters according to the battery cell area, and calculating a target detection area through the positioning parameters.
[0007] S300: After performing grayscale threshold segmentation on the target detection area to obtain a target image, extracting preset features from the target image, where the preset features at least include area features and defect width features.
[0008] S400: Outputting an insulation glue wrapping pass signal only when the area feature meets the first preset threshold and the defect width feature meets the second preset threshold; otherwise, outputting an insulation glue wrapping fail signal.
[0009] Furthermore, in step S100, the preset rule is specifically:
[0010] The detection image is converted into a grayscale image, and the battery cell area is determined according to a preset grayscale value threshold range; wherein pixels in the grayscale image that meet the preset grayscale value threshold range are marked as the battery cell area.
[0011] In this application, step S200 is specifically:
[0012] A target circumscribed rectangle is generated according to the battery cell area; the positioning parameters include at least a first length, a first width and endpoint coordinates of the target circumscribed rectangle; and the endpoint coordinates are calculated by the first length and the first width of the target circumscribed rectangle.
[0013] According to the endpoint coordinates, and the second length and second width preset for the target detection area, any diagonal coordinate of the target detection area is calculated; the target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a length of the second length and a width of the second width.
[0014] Optionally, the step S200 may also be implemented by other methods, specifically:
[0015] According to the edge lines of the battery cell area, a first side length line, a second side length line and a third side length line are fitted respectively; wherein the first side length line is obtained from the left edge line of the battery cell area, the second side length line is obtained from the right edge line of the battery cell area, and the third side length line is obtained from the bottom edge line of the battery cell area.
[0016] The positioning parameters include at least the length of the third side line and the endpoint coordinates; the length of the third side line is calculated based on the distance between the first side line and the second side line, and the intersection point of the first side line and the third side line is used as the endpoint coordinates.
[0017] Any diagonal coordinate of the target detection area is calculated according to the length of the third side line and the endpoint coordinates; the target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a length of the third length and a width of the third width.
[0018] Optionally, the step S200 may also be implemented by other methods, specifically:
[0019] A battery cell sample area that is wrapped with battery insulation glue and passes the test is obtained, and a center point of the battery cell sample area is marked; wherein the center point of the battery cell sample area is used as the positioning parameter.
[0020] Any diagonal coordinate of the target detection area is calculated according to the center point of the battery cell sample area; the target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a fourth length and a fourth width.
[0021] In the present application, the target detection area is segmented by gray threshold to obtain the target image, specifically:
[0022] Obtain pixel parameters in the target detection area; wherein the pixel parameters include grayscale values of all pixels.
[0023] According to the comparison between the grayscale value of the pixel and the grayscale threshold, when the grayscale value of any pixel is less than the grayscale threshold, the pixel where the grayscale value is located is marked as a background label; when the grayscale value of any pixel is not less than the grayscale threshold, the pixel where the grayscale value is located is marked as the target label; the pixels corresponding to the target label are segmented to obtain the target image.
[0024] In the present application, the preset feature extraction of the target image is specifically:
[0025] The area feature is obtained according to the pixel count in the target image; the regional contour line of the target image is extracted by edge detection; a characteristic pixel point is randomly selected on the regional contour line, and a tangent line of the regional contour line is made through the characteristic pixel point;
[0026] Traverse all pixel points on the area contour line, measure the length of a line segment perpendicular to the area contour line that passes through any pixel point; compare the line segment lengths, and extract the line segment length with the largest distance as the defect width feature.
[0027] To achieve the above purpose, the present application also provides a battery insulation glue package defect automatic detection system, the system comprising:
[0028] An acquisition module, a first processing module, a second processing module and a judgment module.
[0029] The acquisition module is used to acquire the detection image of the battery after being wrapped with insulating glue, and extract the battery cell area in the detection image according to preset rules.
[0030] The first processing module is used to extract positioning parameters according to the battery cell area, and calculate the target detection area through the positioning parameters.
[0031] The second processing module is used to extract preset features from the target image after performing grayscale threshold segmentation on the target detection area to obtain the target image. The preset features include at least area features and defect width features.
[0032] Furthermore, the judgment module is used to output an insulation glue wrapping pass signal only when the area feature meets the first preset threshold and the defect width feature meets the second preset threshold; otherwise, it outputs an insulation glue wrapping fail signal.
[0033] Furthermore, in the acquisition module, the preset rule is specifically:
[0034] The detection image is converted into a grayscale image, and the battery cell area is determined according to a preset grayscale value threshold range; wherein pixels in the grayscale image that meet the preset grayscale value threshold range are marked as the battery cell area.
[0035] To achieve the above objectives, the present application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-described methods for automatically detecting battery insulation glue wrapping defects.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The present application proposes a method, system and storage medium for automatically detecting defects in battery insulating glue wrapping. The method can flexibly adjust according to the size of the battery cell by automatically constructing the target detection area, thereby improving the scope of application and compatibility of the detection. In addition, by combining the preset feature extraction and analysis, the efficiency and accuracy of the detection are effectively improved. Through the analysis of preset features, the wrapping effect of the insulating glue can be more accurately evaluated, thereby reducing false detections and missed detections. The present application reduces product defects caused by poor insulating glue wrapping by improving the detection effect and accuracy, thereby reducing product defective rates and improving product quality and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of a battery being wrapped with insulating adhesive in an embodiment of the present application.
[0039] Figure 2 This is a schematic diagram of a battery with unsatisfactory insulation adhesive wrapping in one embodiment of the present application.
[0040] Figure 3 This is a flow chart of a method for automatically detecting battery insulation adhesive wrapping defects in one embodiment of the present application.
[0041] Figure 4 This is a schematic diagram of a preferred method for calculating a target detection area in an embodiment of the present application.
[0042] Figure 5 This is a schematic diagram of another preferred method for calculating the target detection area in an embodiment of the present application.
[0043] Figure 6 This is a schematic diagram of another preferred method for calculating the target detection area in an embodiment of the present application.
[0044] Figure 7 It is a schematic diagram of grayscale threshold segmentation of a target detection area in one embodiment of the present application.
[0045] Figure 8 This is a framework diagram of an automatic detection system for battery insulation adhesive wrapping defects in one embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme will be clearly and completely described below in conjunction with the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] Embodiment 1:
[0048] As attached Figure 3 As shown, unlike the current method of using a fixed detection area for detection, that is, setting a fixed detection area under the battery to detect whether the insulating glue is wrapped well, the present application provides a method for automatically detecting battery insulating glue wrapping defects, the method comprising:
[0049] S100: Acquire a detection image of the battery after being wrapped with insulating glue, and extract the battery cell area in the detection image according to a preset rule.
[0050] It should be noted that in this embodiment, the detection image of the battery after being wrapped with insulating glue can be obtained in various ways. Preferably, an industrial camera can be installed at an appropriate position on the battery production line to capture the image of the battery after being wrapped with insulating glue, and the camera can be used appropriately according to the actual environment to provide uniform lighting to ensure image quality; the camera can also be connected to an image acquisition card to convert the analog signal into a digital signal so that the data of the detection image can be transmitted to the computer for processing; it can also be implemented in an integrated manner with the control system of the production line, for example, when the battery reaches the detection point, the camera is triggered to shoot by matching the sensor. Among them, the pre-processing process such as image acquisition can use relevant image processing software, such as HALCON, OpenCV, etc., but are not limited to this.
[0051] Furthermore, the acquired images can be sent to a central processing system via Ethernet, USB or other data transmission methods for storage and analysis.
[0052] Through the above method, it is possible to ensure that the inspection image after the insulation glue wrapping is obtained efficiently and accurately during the battery production process, providing data support for subsequent image analysis and quality judgment.
[0053] In this embodiment, the preset rules are specifically:
[0054] The detection image is converted into a grayscale image, and the battery cell area is determined according to a preset grayscale value threshold range; wherein pixels in the grayscale image that meet the preset grayscale value threshold range are marked as the battery cell area.
[0055] It should be noted that the detection image obtained above is a color image, which needs to be converted into a gray image. The grayscale image only has brightness information but no color information, which simplifies the image processing process and makes subsequent image analysis and feature extraction faster and more efficient. Color images usually contain three color channels: red, green, and blue. Each channel needs to be processed separately, while grayscale images have only one channel, which reduces the amount of calculation. In addition, grayscale processing can sometimes enhance the contrast in the image, making the battery cell area easier to distinguish from the background.
[0056] Preferably, the color image can be directly converted into a grayscale image by image processing software, such as OpenCV, MATLAB, etc., but are not limited thereto.
[0057] Preferably, a grayscale value threshold range is preset in the grayscale image, and the selection of the grayscale value threshold range can be automatically generated by constructing and analyzing a grayscale histogram. Specifically, a grayscale histogram is drawn according to the grayscale image to obtain the distribution of grayscale values in the histogram, wherein the histogram shows the frequency of occurrence of each grayscale value, which helps to determine a suitable threshold. For example, the optimal threshold is automatically calculated through algorithms such as the Otsu method and the maximum inter-class variance method, or the technical personnel can adjust the threshold according to actual conditions, but are not limited to this.
[0058] Further, in a grayscale value threshold range, such as [T1, T2]; traverse each pixel in the grayscale image and compare its grayscale value N with the threshold range: if the grayscale value of the pixel is within the threshold range, such as T1 ≤ N < T2, then mark the pixel as part of the battery cell area; otherwise, if the grayscale value of the pixel is not within the threshold range, then mark the pixel as background or other non-target area.
[0059] In other embodiments, morphological operations such as opening and closing operations may be further performed on the marked battery cell regions to remove noise and fill internal holes. Different battery cell regions may also be identified and separated by connected component analysis (CCA) or Blob analysis (Binary large object) according to actual conditions, but are not limited thereto.
[0060] Blob analysis refers to the largest connected region in an image, which usually represents a complete object or feature. Through blob analysis, pixels with the same grayscale value range can be grouped together based on different neighborhood types and regarded as the same detection object.
[0061] This embodiment uses threshold processing to separate the battery cell area from the background, which is convenient for subsequent feature extraction and defect detection. The image can be binarized or segmented into several gray levels, which simplifies image analysis and makes the algorithm easier to identify and classify; the preset threshold range reduces unnecessary calculations and improves the efficiency of image processing. Reasonable threshold selection can reduce the number of wrongly marked pixels and improve the accuracy of detection.
[0062] In summary, this embodiment can adjust the threshold according to different battery types and production environments, has certain adaptability and flexibility, and can effectively extract the battery cell area from the grayscale image, providing a reliable data basis for subsequent quality inspection and defect analysis.
[0063] S200: extracting positioning parameters according to the battery cell area, and calculating a target detection area through the positioning parameters.
[0064] It should be noted that step S200 can be automatically constructed according to the size of the battery cell, and adaptively calculate a more accurate and real-time adjustable target detection area, which is not affected by factors such as human or environmental fluctuations, and reduces interference from human or mechanical inherent faults.
[0065] In this embodiment, automatically constructing the target detection area can reduce manual intervention and improve the automation of the detection process. Adaptive calculation can adjust the detection area in real time according to the actual size of the battery cell to ensure that the detection accuracy is not affected by the change of battery size. Through precise positioning parameters, the position of the battery cell can be determined more accurately, thereby constructing a more accurate target detection area. The problem of inaccurate positioning caused by human judgment or mechanical error is reduced. Because in the production process, environmental fluctuations (such as changes in light, temperature, etc.) may affect the appearance characteristics of the battery cell, and the automatically constructed detection area can reduce the impact of these fluctuations; and human factors, such as operator errors, or inherent mechanical failures, such as positioning deviations caused by equipment wear, may affect the detection results, and the automated detection process in this embodiment can reduce these interferences and improve the stability and reliability of the detection. In addition, the automated detection of this embodiment provides consistent data collection and processing standards, which helps to maintain the consistency of product quality and greatly reduces product recalls and repair costs caused by false detection or missed detection.
[0066] Furthermore, in this embodiment, positioning parameters can be extracted through a variety of different calculation methods, and the target detection area can be obtained through the calculation of the positioning parameters.
[0067] Preferably, the specific calculation steps of step S200 may be:
[0068] A target circumscribed rectangle is generated according to the battery cell area; the positioning parameters include at least a first length, a first width and endpoint coordinates of the target circumscribed rectangle; and the endpoint coordinates are calculated by the first length and the first width of the target circumscribed rectangle.
[0069] According to the endpoint coordinates, and the second length and second width preset for the target detection area, any diagonal coordinate of the target detection area is calculated; the target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a length of the second length and a width of the second width.
[0070] Among them, as attached Figure 4The red rectangle is the target bounding rectangle indicator box generated in this embodiment. The auxiliary lines are displayed on the display screen with custom color lines to facilitate users to observe the automatic generation process. The target bounding rectangle can be obtained by calculating the minimum bounding rectangle of the battery cell area. The minimum bounding rectangle can be achieved in the following ways, for example:
[0071] Bounding Box method: First identify and determine the boundary points of the battery cell area; then find the minimum and maximum x-coordinates, as well as the minimum and maximum y-coordinates of all boundary points; and then calculate the four vertices of the minimum enclosing rectangle based on these coordinates.
[0072] Rotated Rectangle method: Use the minimum enclosing rectangle algorithm, such as the minimum area rotated rectangle, minimum perimeter rotated rectangle, etc., and then use iterative search or optimization algorithms, such as genetic algorithms, to find the best rotation angle to minimize the area or perimeter of the rectangle.
[0073] Contour approximation method: Use a contour approximation algorithm, such as the Douglas-Peucker algorithm, to approximate the contour of the battery cell area; then calculate the minimum circumscribed rectangle based on the approximate contour points.
[0074] Geometric shape fitting method: Use a geometric shape fitting algorithm, such as the least squares method, to fit the point set of the battery cell area; then calculate the minimum circumscribed rectangle based on the fitting results.
[0075] In practical applications, a suitable method may be selected according to specific requirements and conditions to obtain the minimum bounding rectangle of the battery cell area, and the method is not limited thereto.
[0076] Furthermore, the image space coordinate system in this embodiment can be set to take the upper left corner of the target detection area as the coordinate origin, the horizontal direction to the right as the positive X direction, and the vertical direction downward as the positive Y direction, but it is not limited thereto. Among them, the first length, the first width and the endpoint coordinates of the target circumscribed rectangle can be respectively expressed as the length L, the width W, and the coordinates of the lower right corner endpoint , and these three parameters can automatically construct the ROI detection area, as shown in the attached Figure 4 As shown in the green rectangular box in the figure, the target detection area can be confirmed by calculating the coordinates of the upper left corner and the lower right corner of the green detection box. It should be noted that no matter the fine-tuning or displacement of the insulating glue detection area caused by external factors, or the difference in battery specifications, it does not affect the generation and accuracy of the green detection area automatically constructed in this embodiment, thereby realizing adaptive positioning detection.
[0077] Preferably, it is assumed that the preset second length of the target detection area can be one-third of the minimum circumscribed rectangle, and the second width can be one-half of the minimum circumscribed rectangle width, because the green area has covered the range that the insulating glue can wrap, and will not exceed one-third of the width of the battery cell. If it is wider, it will exceed the bottom electrode. This embodiment only needs to cover the area to be detected by the insulating glue. The specific situation can also be adjusted according to the product. Then, the real-time endpoint coordinates of the target detection area are calculated according to the above specific parameters, and finally the real-time target detection area can be generated according to the real-time endpoint coordinates.
[0078] Preferably, the specific calculation process of the real-time endpoint coordinates may be:
[0079] ; .
[0080] It should be noted that the specific endpoint positions of the real-time target detection area represented by X upper left, Y upper left, X lower right and Y lower right are shown in the attached figure. Figure 4 Mark in.
[0081] Through the above calculation process and effects, this embodiment further calculates the coordinate parameters of the real-time target detection area by calculating the minimum circumscribed rectangle of the battery cell area, providing an efficient, accurate and adaptive battery insulating glue detection method, which helps to improve the quality and production efficiency of battery products.
[0082] Optionally, in this embodiment, other calculation methods may be used to automatically generate the target detection area, specifically:
[0083] According to the edge lines of the battery cell area, a first side length line, a second side length line and a third side length line are fitted respectively; wherein the first side length line is obtained from the left edge line of the battery cell area, the second side length line is obtained from the right edge line of the battery cell area, and the third side length line is obtained from the bottom edge line of the battery cell area.
[0084] The positioning parameters include at least the length of the third side line and the endpoint coordinates; the length of the third side line is calculated based on the distance between the first side line and the second side line, and the intersection point of the first side line and the third side line is used as the endpoint coordinates.
[0085] Any diagonal coordinate of the target detection area is calculated according to the length of the third side line and the endpoint coordinates; the target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a length of the third length and a width of the third width.
[0086] Preferably, the first side length line, the second side length line and the third side length line are as shown in the attached figure. Figure 5As shown in the straight lines corresponding to L1, L2 and L3 in FIG, this embodiment can be fitted according to the edge line of the battery cell area by searching and fitting by a straight line search method, which can be specifically:
[0087] Use image processing techniques, such as Canny edge detection and contour extraction, to extract a set of contour points based on the battery cell area; then group the extracted contour points according to their positional relationships, such as left edge points, right edge points, and bottom edge points; then use a straight line fitting algorithm, such as the least squares method, to fit a straight line to each group of contour points, wherein the best fitting straight line can be determined by minimizing the sum of squares of the errors; then solve the equation parameters of the straight line, such as the slope and intercept, based on the straight line obtained after fitting, and use the slope and intercept obtained to represent each side length line; finally, verify the fitted straight lines to confirm that they can accurately represent the edge lines of the battery cell area.
[0088] Through the above steps, this embodiment can effectively extract the first side length line, the second side length line and the third side length line from the edge lines of the battery cell area, and these lines can be used to describe the shape and position of the battery cell.
[0089] Furthermore, the coordinates of the intersection of the two straight lines L2 and L3 can be obtained , the width of the battery cell is calculated from the straight lines L1 and L2: , the ROI detection area can be automatically constructed by combining these two data.
[0090] It should be noted that the coordinates of the intersection of lines L2 and L3 are The horizontal coordinate in can be used as the X lower right coordinate parameter of the real-time target detection area, and the vertical coordinate can be used as the Y upper left coordinate parameter of the real-time target detection area. The distance between the two lines can be obtained by subtracting the horizontal coordinate values of the obtained lines L1 and L2, and this distance can be used as the width L of the battery cell.
[0091] Optionally, based on the above data, the specific calculation process of the real-time endpoint coordinates can be:
[0092] ; .
[0093] It should be noted that the endpoint positions of the real-time target detection area specifically referred to by the X upper left, Y upper left, X lower right, Y lower right, X intersection and Y intersection are shown in the attached figure. Figure 5 wherein, assuming that in the real-time target detection area, the third length is one third of the width L of the battery cell, the third width may be one fifth of the width L of the battery cell, and neither is limited thereto.
[0094] Compared with the calculation and generation method of automatically building a real-time target detection area in the previous embodiment of this invention, this embodiment does not need to generate a target circumscribed rectangle, but directly calculates the real-time coordinate parameters in the spatial coordinate system based on the fitting straight line, thereby updating the endpoint position parameters of the real-time target detection area in real time.
[0095] In summary, this embodiment directly fits the straight line according to the edge line of the battery cell area, which can more accurately describe the shape and position of the battery cell. By calculating the coordinates and distance of the straight line intersection, the error introduced by the circumscribed rectangle is reduced, and the accuracy of the target detection area is improved.
[0096] Optionally, step S200 in this embodiment may also be implemented by the following method, specifically:
[0097] A battery cell sample area that is wrapped with battery insulation glue and passes the test is obtained, and a center point of the battery cell sample area is marked; wherein the center point of the battery cell sample area is used as the positioning parameter.
[0098] Any diagonal coordinate of the target detection area is calculated according to the center point of the battery cell sample area; the target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a fourth length and a fourth width.
[0099] It should be noted that this implementation creates a template by selecting battery insulation glue wrapped samples that meet the confirmation standards from the same batch of tested batteries, and uses the area center point of the qualified template as the positioning parameter. Then, the accurate real-time target detection area can be automatically generated based on the positioning parameter.
[0100] Preferably, as attached Figure 6 As shown, the selected standard battery insulation glue wrapped sample is used as a template, and the template is scanned and virtually marked to obtain the matching center. . Preferably, in this embodiment, a high-precision scanning device, such as a 3D scanner, is used to scan the sample. During the scanning process, the sample is placed in a stable position to avoid movement or deformation. Then, the scanned data is preprocessed, such as denoising and smoothing, to improve data quality. On the scanned 3D model, a computer-aided design (CAD) software or a 3D modeling software is used to virtually mark the center point. The 3D model needs to be placed in the same spatial coordinate system as the above-mentioned coordinate points. Finally, the center point coordinates are extracted according to the displayed coordinate parameters. , are not limited to this.
[0101] In other embodiments, since the image may be skewed after scanning the sample, operations such as image angle correction may be performed according to actual conditions, and the coordinates of the matching center point may be calculated by using geometric algorithms or machine learning algorithms, such as RANSAC, Hough transform, etc. It should be noted that the matching center may be the geometric center or center of gravity of all feature points on the sample, representing the overall position and shape of the sample. The purpose of the embodiment of the present application is to select a certain reference point to facilitate the calculation of the endpoint coordinate parameters of the target detection area.
[0102] Then, according to the coordinates of the matching center point, the vertical coordinate distance value L1 and the horizontal coordinate distance value L2 from the center point to the upper left corner of the target detection area on the template, the length w of the target detection area on the template and the width h of the target detection area on the template are calculated, and then the coordinates of any diagonal endpoint of the target detection area on the template are calculated, so as to obtain the target detection area acquisition process. In the subsequent automatic production process, the real-time target detection area of each battery is automatically constructed according to the template matching center point and L1, L2, w and h.
[0103] Preferably, the specific calculation process of the above real-time target detection area can be:
[0104] ; .
[0105] This embodiment simplifies the calculation process of the target detection area endpoint coordinates by selecting a certain reference point, such as a matching center point. The size of the target detection area can be adaptively adjusted according to actual needs, which improves the accuracy of the detection area, reduces the rework and scrap costs caused by false detection or missed detection, ensures that the real-time target detection area of each battery can accurately correspond to the insulating glue wrapping area, and improves product quality and consistency.
[0106] In summary, regardless of whether the insulating glue detection area is fine-tuned or shifted by external factors, or the battery specifications are different, the automatically constructed target detection area can maintain accuracy and achieve adaptive positioning detection. The target detection area generated according to the real-time endpoint coordinates can be adjusted at any time to adapt to different product specifications and detection requirements. The automatically constructed target detection area reduces the steps of manual adjustment and improves detection efficiency and production efficiency. It reduces the reliance on manual experience and the possibility of human error, thereby reducing the cost caused by false detection or missed detection.
[0107] S300: After performing grayscale threshold segmentation on the target detection area to obtain a target image, extracting preset features from the target image, where the preset features at least include area features and defect width features.
[0108] It should be noted that grayscale threshold segmentation is an image segmentation method based on pixel grayscale values. By setting one or more grayscale thresholds, the pixels in the image are divided into foreground (target) and background. In this embodiment, after the target detection area is segmented by grayscale threshold, the target image, that is, the image wrapped by insulating glue, can be obtained.
[0109] Feature extraction is the process of extracting information from an image that helps distinguish different objects or states. Preset features are usually set based on prior knowledge or experience to describe specific attributes of the target image. In this embodiment, the preset features include at least area features and defect width features.
[0110] The area feature usually refers to the number of pixels occupied by the target image, which can reflect the size or coverage of the insulation glue package. The area feature can be used to determine whether the insulation glue package is missing or too small; the defect width feature refers to the width of the defect (such as cracks, gaps, etc.) in the insulation glue package. The defect width feature can be used to evaluate the quality of the insulation glue package. For example, a defect width exceeding a certain threshold may indicate that the package is unqualified.
[0111] Furthermore, in this embodiment, the target detection area is segmented by grayscale threshold to obtain the target image, specifically:
[0112] Obtain pixel parameters in the target detection area; wherein the pixel parameters include grayscale values of all pixels.
[0113] According to the comparison between the grayscale value of the pixel and the grayscale threshold, when the grayscale value of any pixel is less than the grayscale threshold, the pixel where the grayscale value is located is marked as a background label; when the grayscale value of any pixel is not less than the grayscale threshold, the pixel where the grayscale value is located is marked as the target label; the pixels corresponding to the target label are segmented to obtain the target image.
[0114] It should be noted that the grayscale value of each pixel is extracted from the target detection area, and these grayscale values represent the brightness information of the pixel. According to the grayscale characteristics of the insulating glue package, a suitable grayscale threshold is selected. This threshold can be determined by experimental calculation or user-defined to facilitate the distinction between the insulating glue package and the background, and is not limited thereto.
[0115] The gray value of each pixel is compared with the set gray threshold. If the gray value of the pixel is less than the threshold, the pixel is marked as a background label, indicating that this part of the pixel does not belong to the insulating glue. If the gray value of the pixel is not less than the threshold, the pixel is marked as a target label, indicating that this part of the pixel belongs to the insulating glue.
[0116] Finally, according to the target label, the pixels corresponding to the insulating glue package are segmented from the original image to form the target image.
[0117] Preferably, the grayscale threshold segmentation schematic diagram of this embodiment is as shown in the attached figure. Figure 7 As shown, for ease of observation, the target detection area obtained after grayscale threshold segmentation is represented by red, where the second step shows that the target area in the box in the first step is cropped out to obtain a new image. This embodiment uses grayscale threshold segmentation to extract the target image wrapped in insulating glue from a complex background, which is convenient for subsequent feature analysis and defect detection. Background pixels are excluded, reducing the impact of noise and irrelevant information on feature analysis. Only feature analysis is performed on the target image, which reduces the amount of calculation and improves detection efficiency. The segmented target image has a higher contrast, which makes the features of the insulating glue wrapping more obvious, which is conducive to the identification of defects. Grayscale threshold segmentation can be performed automatically, reducing manual intervention and improving the degree of automation of detection.
[0118] In the present application, the preset feature extraction of the target image is specifically:
[0119] The area feature is obtained according to the pixel count in the target image; the regional contour line of the target image is extracted by edge detection; a characteristic pixel point is randomly selected on the regional contour line, and a tangent line of the regional contour line is made through the characteristic pixel point;
[0120] Traverse all pixel points on the area contour line, measure the length of a line segment perpendicular to the area contour line that passes through any pixel point; compare the line segment lengths, and extract the line segment length with the largest distance as the defect width feature.
[0121] It should be noted that, in this embodiment, the above-mentioned Figure 7 The target detection area indicated by red is pixel counted, that is, the total number of pixels is counted, and this is used as the area feature of this embodiment. This reflects whether the insulating glue wrapping is complete after the insulating glue wrapping, or whether there is enough coverage area, etc. This can be used as a criterion for judging whether the wrapping is qualified.
[0122] The defect width feature can be obtained by using edge detection algorithms, such as Canny edge detector, Sobel edge detector, etc., to detect the edge of the object in the image. For example, the edge detection algorithm is applied to the target image to extract the contour line of the area wrapped by the insulating glue. A feature pixel point is randomly selected on the extracted area contour line. With this feature pixel point as the starting point, the tangent line of the area contour line is drawn.
[0123] Then, all the pixels on the area contour are traversed. For each pixel, the length of the line segment perpendicular to the area contour tangent through the point is measured. All line segment lengths are compared, and the largest line segment length is selected as the defect width feature. Among them, the defect width feature can be used to detect defects on the insulation glue package, such as cracks or gaps.
[0124] Through the above method, these extracted features can be used for subsequent defect detection and quality assessment, which helps to improve the accuracy and efficiency of detection and reduce dependence on manual experience.
[0125] S400: Outputting an insulation glue wrapping pass signal only when the area feature meets the first preset threshold and the defect width feature meets the second preset threshold; otherwise, outputting an insulation glue wrapping fail signal.
[0126] It should be noted that, in this embodiment, the first preset threshold value of the area feature and the second preset threshold value of the defect width feature are set according to actual production standards and quality requirements.
[0127] Preferably, it is assumed that the first preset threshold of the area feature is 3000 pixels and the second preset threshold of the defect width is 120 pixels, but they are not limited thereto.
[0128] The extracted area feature is compared with a first preset threshold, and the extracted defect width feature is compared with a second preset threshold.
[0129] If the area feature is greater than or equal to 3000 pixels, and the defect width feature is greater than or equal to 120 pixels, an insulation glue wrapping failure signal is output; if the area feature is less than 3000 pixels, or the defect width feature is less than 120 pixels, an insulation glue wrapping pass signal is output.
[0130] Preferably, it is assumed that the area feature extracted from the target image is 2500 pixels and the defect width feature is 100 pixels. According to the above judgment process:
[0131] If the area feature (2500 pixels) is smaller than the preset threshold (3000 pixels), or the defect width feature (100 pixels) is smaller than the preset threshold (120 pixels), the system will output a pass signal for the insulation glue package.
[0132] This embodiment can ensure that only insulation glue packages that meet the quality standards are judged as qualified by setting clear thresholds, thereby ensuring the quality of the product. The judgment process is automated, reducing the uncertainty and time cost of human judgment; when the insulation glue package fails to meet the standards, the system can immediately output a signal to notify the operator or automatically adjust the equipment to reduce the generation of defective products.
[0133] In other embodiments, the output signal indicating that the insulating adhesive package fails to meet the standards will continue to trigger subsequent operation instructions, such as rejecting defective products or alarming, but are not limited to this.
[0134] In this way, the quality control system in the production process can effectively monitor the quality of the insulation glue package, ensuring that only products that meet specific quality standards can enter the market, thereby improving the quality control level of the entire production line and the consistency of the products.
[0135] In summary, Example 1 has made a detailed analysis and example description of a battery insulation glue package defect automatic detection method proposed in this application. This application can flexibly adjust the target detection area according to the size of the battery cell by automatically constructing the target detection area, thereby improving the scope of application and compatibility of the detection. In addition, by combining the preset feature extraction analysis, the efficiency and accuracy of the detection are effectively improved.
[0136] Embodiment 2:
[0137] As attached Figure 8 As shown, in order to solve the above technical problems, the present application also proposes a battery insulation glue package defect automatic detection system, the system comprising:
[0138] An acquisition module, a first processing module, a second processing module and a judgment module.
[0139] The acquisition module is used to acquire the detection image of the battery after being wrapped with insulating glue, and extract the battery cell area in the detection image according to preset rules.
[0140] It should be noted that this module is responsible for obtaining the inspection image after the battery insulation glue is wrapped. This can be achieved through a camera or other image acquisition device connected to the production line, which ensures that the system has the latest image data for subsequent processing and is the basis for automatic inspection.
[0141] Furthermore, in the acquisition module, the preset rule is specifically:
[0142] The detection image is converted into a grayscale image, and the battery cell area is determined according to a preset grayscale value threshold range; wherein pixels in the grayscale image that meet the preset grayscale value threshold range are marked as the battery cell area.
[0143] Through grayscale threshold segmentation, the battery cell area can be accurately extracted from the complex image background, providing a basis for subsequent feature extraction and defect detection. Threshold segmentation helps to remove noise and irrelevant areas in the image, thereby improving the accuracy and efficiency of subsequent processing. The preset grayscale threshold range can be adjusted according to the characteristics of the battery cell, so that the entire process can be automated and reduce manual intervention.
[0144] The acquisition module can effectively separate the battery cell area from the inspection image, ensuring that the subsequent processing module can focus on the parts directly related to quality inspection. This automated area extraction method not only improves the inspection speed, but also enhances the reliability of the inspection.
[0145] The first processing module is used to extract positioning parameters according to the battery cell area, and calculate the target detection area through the positioning parameters.
[0146] It should be noted that this module converts the detection image into a grayscale image and determines the battery cell area according to the preset grayscale value threshold range. This usually involves image preprocessing, such as grayscale conversion and threshold segmentation, which accurately extracts the battery cell area and provides a basis for subsequent target detection area calculation.
[0147] The second processing module is used to extract preset features from the target image after performing grayscale threshold segmentation on the target detection area to obtain the target image. The preset features include at least area features and defect width features.
[0148] It should be noted that this module extracts positioning parameters based on the battery cell area and calculates the target detection area. This may involve geometric calculations or machine learning algorithms, such as RANSAC, Hough transform, etc., which generate accurate target detection areas to ensure that subsequent feature extraction and judgment modules only process the parts related to the insulation glue wrapping.
[0149] The module also performs grayscale threshold segmentation on the target detection area to obtain the target image, and extracts preset features from the target image, such as area features and defect width features. Through feature extraction, it converts image information into quantitative indicators that can be used for automatic judgment.
[0150] Furthermore, the judgment module is used to output an insulation glue wrapping pass signal only when the area feature meets the first preset threshold and the defect width feature meets the second preset threshold; otherwise, it outputs an insulation glue wrapping fail signal.
[0151] It should be noted that the module determines whether the area characteristics and defect width characteristics meet the requirements based on the preset threshold. If they meet the requirements, a pass signal is output; otherwise, a fail signal is output, which realizes the automatic judgment of the insulation glue wrapping quality and improves the efficiency and accuracy of the detection.
[0152] In summary, in the present application, through the collaborative work of the above modules, the battery insulation glue package defect automatic detection system can realize the automation of the complete process from image acquisition to quality judgment, reduce manual intervention, and improve production efficiency and product quality. The specific implementation process and principle have been introduced in detail in the first embodiment, and will not be repeated in this embodiment.
[0153] Embodiment three:
[0154] In order to solve the above technical problems, the present application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the automatic detection method for battery insulation glue wrapping defects as described in any of the above.
[0155] Preferably, the storage medium in this embodiment may be a solid state hard disk.
[0156] It should be noted that a solid-state drive (SSD) is a high-speed, durable, and compact storage device that uses flash memory (such as NAND) as a storage medium instead of a traditional mechanical hard disk (HDD).
[0157] In the present application, computer programs are stored on the SSD, which implement all steps of the automatic detection method of battery insulation glue wrapping defects, including image acquisition, preprocessing, feature extraction, judgment, etc.
[0158] When the SSD is connected to a computer or embedded system, and the processor executes a computer program stored on the SSD, the program will run and perform the above-described automatic detection method.
[0159] SSDs have faster read and write speeds than traditional HDDs, which means programs can be loaded and executed quickly, improving the overall performance of the inspection system. Since SSDs have no mechanical moving parts, they are more stable than HDDs, with better shock and vibration resistance, making them suitable for use in dynamic environments such as production lines. SSDs have lower access latency, which is critical for real-time image processing and fast decision-making, ensuring that the inspection system responds and processes image data in a timely manner.
[0160] SSDs have a higher durability and can withstand more read and write cycles, which is an important advantage for automated inspection systems that require frequent access to storage media. SSDs are relatively small and easy to integrate into compact automated equipment, which is beneficial for saving space and reducing system weight. SSDs do not require complex maintenance like HDDs, such as disk defragmentation, which simplifies system maintenance.
[0161] Furthermore, SSDs can include encryption capabilities to ensure the security of stored data, which is critical for protecting sensitive inspection data and results.
[0162] In summary, by using SSD as the storage medium, the battery insulation glue package defect automatic detection system in this embodiment can achieve higher processing speed, better stability and durability, as well as smaller size and easy maintenance. These features make the system more reliable and can meet the production requirements of high efficiency, high stability and real-time performance.
[0163] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0165] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A method for automatically detecting defects in battery insulation glue wrapping, characterized in that: include: S100: Acquire a detection image of the battery wrapped with insulating glue, and extract the battery cell area in the detection image according to a preset rule; S200: extracting positioning parameters according to the battery cell area, and calculating a target detection area through the positioning parameters; S300: After performing grayscale threshold segmentation on the target detection area to obtain a target image, extracting preset features from the target image, wherein the preset features include at least area features and defect width features; S400: Outputting an insulation glue wrapping pass signal only when the area feature meets the first preset threshold value and the defect width feature meets the second preset threshold value; otherwise, outputting an insulation glue wrapping fail signal; Wherein, the step S200 is specifically: Generate a target circumscribed rectangle according to the battery cell area; the positioning parameters at least include a first length, a first width and end point coordinates of the target circumscribed rectangle; The endpoint coordinates are calculated by using the first length and the first width of the target circumscribed rectangle; Calculate any diagonal coordinate of the target detection area according to the endpoint coordinates and a second length and a second width preset for the target detection area; constructing the target detection area according to the diagonal coordinates, wherein the target detection area is a rectangle having a length equal to the second length and a width equal to the second width; or According to the edge line of the battery cell area, a first side length line, a second side length line and a third side length line are respectively fitted; wherein the first side length line is obtained from the left edge line of the battery cell area, the second side length line is obtained from the right edge line of the battery cell area, and the third side length line is obtained from the bottom edge line of the battery cell area; The positioning parameters include at least the length of the third side length line and the coordinates of the endpoints; The length of the third side length line is calculated according to the distance between the first side length line and the second side length line, and the intersection point of the first side length line and the third side length line is used as the endpoint coordinate; Calculate any diagonal coordinate of the target detection area according to the length of the third side line and the coordinates of the endpoints; Constructing the target detection area according to the diagonal coordinates, wherein the target detection area is a rectangle with a third length and a third width; or Obtaining a battery cell sample area that is wrapped with battery insulation glue and passes the test, and marking the center point of the battery cell sample area; wherein the center point of the battery cell sample area is used as the positioning parameter; Calculate any diagonal coordinate of the target detection area according to the center point of the battery cell sample area; The target detection area is constructed according to the diagonal coordinates, wherein the target detection area is a rectangle with a length of a fourth length and a width of a fourth width.
2. The method for automatically detecting battery insulation adhesive wrapping defects according to claim 1, characterized in that: In step S100, the preset rule is specifically: Converting the detected image into a grayscale image, and determining the battery cell area according to a preset grayscale value threshold range; Wherein, pixels in the grayscale image that meet a preset grayscale value threshold range are marked as the battery cell area.
3. The automatic detection method for battery insulation adhesive wrapping defects according to claim 1 is characterized in that: The grayscale threshold segmentation of the target detection area to obtain the target image is specifically: Obtaining pixel parameters in the target detection area; wherein the pixel parameters include grayscale values of all pixels; According to the comparison between the grayscale value of the pixel and the grayscale threshold, when the grayscale value of any pixel is less than the grayscale threshold, the pixel where the grayscale value is located is marked as a background label; when the grayscale value of any pixel is not less than the grayscale threshold, the pixel where the grayscale value is located is marked as a target label; Pixels corresponding to the target label are segmented to obtain the target image.
4. The method for automatically detecting battery insulation adhesive wrapping defects according to claim 1 is characterized in that: The extracting of preset features from the target image is specifically: Obtaining the area feature according to pixel count in the target image; Extract the area contour of the target image through edge detection; Select a feature pixel point at random on the area contour line, and make a tangent line of the area contour line through the feature pixel point; Traversing all pixel points on the area contour line, and measuring the length of a line segment perpendicular to the area contour line that passes through any pixel point; The line segment lengths are compared, and the line segment length with the largest distance is extracted as the defect width feature.
5. A battery insulation glue wrapping defect automatic detection system based on the battery insulation glue wrapping defect automatic detection method according to any one of claims 1 to 4, characterized in that: include: An acquisition module, a first processing module, a second processing module and a judgment module; The acquisition module is used to acquire the detection image of the battery after being wrapped with insulating glue, and extract the battery cell area in the detection image according to a preset rule; The first processing module is used to extract positioning parameters according to the battery cell area, and calculate the target detection area through the positioning parameters; The second processing module is used to extract preset features from the target image after performing grayscale threshold segmentation on the target detection area to obtain the target image, wherein the preset features include at least area features and defect width features; Furthermore, the judgment module is used to output an insulation glue wrapping pass signal only when the area feature meets the first preset threshold and the defect width feature meets the second preset threshold; otherwise, it outputs an insulation glue wrapping fail signal.
6. The automatic detection system for battery insulation adhesive wrapping defects according to claim 5 is characterized in that: In the acquisition module, the preset rules are specifically: Converting the detected image into a grayscale image, and determining the battery cell area according to a preset grayscale value threshold range; Wherein, pixels in the grayscale image that meet a preset grayscale value threshold range are marked as the battery cell area.
7. A storage medium, which is a computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for automatically detecting battery insulation adhesive wrapping defects as described in any one of claims 1-4 is implemented.
