An online detection method for quality of aluminum shell battery package film based on machine vision

CN122510273BActive Publication Date: 2026-10-27TIANJIN HAOCHEN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611002052.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-07
Publication Date
2026-10-27
Estimated Expiration
2046-07-07

AI Technical Summary

Technical Problem

[0005]本申请的目的是提供一种基于机器视觉的铝壳电池包膜质量在线检测方法,用以解决现有技术由于依赖单帧静态图像分析且对高反光复杂成像条件适应性较差,同时缺乏对包膜过程缺陷时序连续性与空间位移信息的统一分析,导致包膜过程中膜料跑偏、断裂及持续性扩展缺陷难以被稳定识别、缺陷演化趋势无法准确刻画以及在线检测误检与漏检率较高的问题

Benefits of technology

[0009]通过在包膜工位设置工业相机对铝壳电池包膜过程进行连续图像采集,并结合输送位移信息与工艺位置信息实现时空同步映射,使包膜过程中的缺陷信息能够在统一时空基准下进行关联分析,从而提升缺陷定位的准确性与连续追踪能力。通过引入单帧高动态范围成像处理与相位一致性增强处理,有效改善铝壳表面高反光及局部亮度不均对图像质量的影响,使气泡、褶皱及微小划痕等细微缺陷特征能够在复杂光照条件下稳定呈现,提高缺陷特征提取的鲁棒性与稳定性。同时,本申请通过对连续时间帧进行帧差分析与连通域分析,实现包膜过程动态变化信息的提取,并结合缺陷目标区域的空间匹配与重定位机制,使缺陷在时间维度上的演化过程能够被连续跟踪与刻画,提升对膜料跑偏、断裂及持续性扩展类异常的识别能力。进一步地,通过对缺陷区域进行连通域提取、轮廓处理及形态学细化,构建缺陷骨架结构,并在此基础上分析缺陷主方向向量及方向一致性特征,实现对缺陷扩展方向稳定性的量化表征,从而增强对复杂形态缺陷的结构化理解能力。此外,本申请通过对缺陷区域面积变化率及骨架长度变化率的联合分析,实现对缺陷增长速率的多维度刻画,并结合方向偏转特征构建缺陷演化稳定性判定指标,使系统能够区分持续性扩展缺陷与瞬时干扰性伪缺陷,提高检测结果的可靠性与抗干扰能力。整体方案实现了包膜质量检测从静态识别向时空演化分析的提升,显著提高了在线检测的准确性、连续性与工程适用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510273B_ABST
    Figure CN122510273B_ABST
Patent Text Reader

Abstract

The application provides an aluminum shell battery package film quality online detection method based on machine vision, relates to the technical field of machine vision detection, and comprises the following steps: acquiring conveying displacement information and package film process position information, obtaining package film detection images with invariant illumination, constructing a corresponding defect feature parameter set, identifying film material deviation, film material fracture, surface foreign matter and package film stagnation abnormalities, mapping the identified defect areas to corresponding package film process positions, identifying continuous abnormal states in the package film process, and outputting package film quality judgment results and abnormal area positioning information in combination with reinspection results. The application solves the problems of single-frame static analysis-dependent package film defect detection, unstable recognition under complex illumination and lack of process tracking, realizes continuous defect detection, dynamic analysis and process position mapping, significantly improves detection real-time performance, accuracy and complex environment robustness, and improves the ability to distinguish continuous abnormalities and instantaneous false defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision inspection technology, and in particular to an online inspection method for the quality of aluminum-cased battery packs based on machine vision. Background Technology

[0002] With the widespread application of lithium-ion batteries in new energy vehicles and energy storage, aluminum-cased batteries, as one of the mainstream packaging forms, have a significant impact on the battery's appearance quality, structural stability, and insulation safety during the coating process. Common defects during coating, such as bubbles, wrinkles, film misalignment, uneven coverage, and poor edge adhesion, can all lead to subsequent assembly problems or even affect battery safety. Therefore, online, continuous, and stable testing of coating quality is of significant engineering importance.

[0003] In existing technologies, machine vision inspection methods based on single-frame images are mostly used to assess the quality of the coating surface, typically relying on grayscale thresholding, edge detection, or simple feature extraction algorithms to identify defects. However, due to the high reflectivity of the aluminum shell surface and the texture variations in the coating material, overexposure or underexposure is prone to occur under single exposure conditions, making it difficult to accurately identify minute defects. At the same time, static image analysis methods are insufficient to reflect the dynamic changes during the coating process, and their ability to detect defects such as film deviation, breakage, and continuous expansion is inadequate.

[0004] In summary, existing technologies typically only make independent judgments on local areas during defect analysis, lacking continuous correlation analysis of defects over time. They also fail to effectively combine transport displacement information to achieve unified modeling of spatial positioning and temporal evolution. As a result, the defect identification results are difficult to reflect the true expansion trend and evolution law, and are prone to false detection or missed detection, especially under complex working conditions, thus affecting the stability and reliability of the overall detection. Summary of the Invention

[0005] The purpose of this application is to provide an online inspection method for aluminum-cased battery coating quality based on machine vision, in order to solve the problems of existing technologies that rely on single-frame static image analysis and have poor adaptability to complex imaging conditions with high reflectivity. At the same time, they lack unified analysis of the temporal continuity and spatial displacement information of defects in the coating process, which makes it difficult to stably identify defects such as film deviation, breakage and continuous expansion during the coating process, and the defect evolution trend cannot be accurately depicted. The online detection also has a high rate of false detection and false negative.

[0006] In view of the above problems, this application provides an online inspection method for the quality of aluminum-cased battery packs based on machine vision.

[0007] This application provides an online inspection method for the quality of aluminum-cased battery coating based on machine vision. The method includes: continuously acquiring image sequences of the aluminum-cased battery coating surface using an industrial camera set at the coating station, and simultaneously acquiring conveying displacement information and coating process position information; performing single-frame high dynamic range fusion processing on the image sequence, and performing phase consistency enhancement processing on the fused image to obtain a coating inspection image with illumination invariance; extracting film integrity features, bubble features, wrinkle features, and surface texture continuity features based on the enhanced coating inspection image, and constructing a corresponding defect feature parameter set; performing frame difference analysis and connected component analysis on the coating images between consecutive time frames to extract dynamic continuity features of the film layer, and identifying film material deviation and film material breakage based on the morphological distribution of the difference region. Surface foreign matter and coating stagnation anomalies are detected. Polar coordinate transformation is performed on the edge area of ​​the aluminum-cased battery to unfold the circumferential edge area into a rectangular strip structure. The edge bonding gap, bonding uniformity, and edge coverage continuity of the film layer are analyzed based on the unfolded edge trajectory. A synchronous mapping relationship is established between image acquisition time, transport displacement coordinates, and coating process position, and the identified defect areas are mapped to the corresponding coating process positions. Based on the defect detection results under continuous time series, the defect evolution trajectory is constructed, and the area change rate, length change rate, and expansion direction of the defect area are analyzed to identify the continuous abnormal state in the coating process. When a suspected abnormal area is detected, local enhanced acquisition and online re-inspection processing are performed on the corresponding area, and the coating quality judgment result and abnormal area location information are output in combination with the re-inspection results.

[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0009] By setting up an industrial camera at the coating station to continuously acquire images of the aluminum-cased battery coating process, and combining this with transport displacement information and process position information to achieve spatiotemporal synchronous mapping, defect information during the coating process can be correlated and analyzed under a unified spatiotemporal reference, thereby improving the accuracy of defect location and continuous tracking capability. By introducing single-frame high dynamic range imaging processing and phase consistency enhancement processing, the impact of high reflectivity and uneven local brightness on the aluminum shell surface on image quality is effectively mitigated. This allows subtle defect features such as bubbles, wrinkles, and micro-scratches to be stably presented under complex lighting conditions, improving the robustness and stability of defect feature extraction. Simultaneously, this application extracts dynamic change information of the coating process by performing frame difference analysis and connected component analysis on continuous time frames. Combined with a spatial matching and relocation mechanism for defect target areas, the evolution of defects in the temporal dimension can be continuously tracked and characterized, improving the ability to identify anomalies such as film material deviation, breakage, and continuous expansion. Furthermore, by extracting connected components, processing contours, and refining morphology within the defect region, a defect skeleton structure is constructed. Based on this, the main direction vector and directional consistency characteristics of the defect are analyzed to achieve a quantitative characterization of the stability of the defect expansion direction, thereby enhancing the structured understanding of complex-shaped defects. In addition, this application achieves a multi-dimensional characterization of the defect growth rate through joint analysis of the defect region area change rate and the skeleton length change rate. Furthermore, by combining directional deflection characteristics, a defect evolution stability judgment index is constructed, enabling the system to distinguish between continuously expanding defects and transient, interfering pseudo-defects, improving the reliability and anti-interference capability of the detection results. The overall scheme realizes an upgrade in envelope quality detection from static identification to spatiotemporal evolution analysis, significantly improving the accuracy, continuity, and engineering applicability of online detection.

[0010] The above description is merely an overview of the technical solution of this application. To better understand the technical means of this application and to facilitate its implementation according to the description, and to make the above and other objects, features, and advantages of this application more apparent, specific embodiments of this application are described below. It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent through the following description. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0012] Figure 1This is a flowchart illustrating an online inspection method for the quality of aluminum-cased battery packs based on machine vision, as described in this application. Detailed Implementation

[0013] This application provides an online inspection method for aluminum-cased battery coating quality based on machine vision. It solves the problems in existing technologies, such as reliance on single-frame static image analysis, lack of image stabilization and enhancement mechanisms under complex imaging conditions with high reflectivity, and insufficient ability to coordinate the analysis of defect temporal continuity and spatial displacement information. These problems lead to difficulties in the stable identification of film material deviation, breakage, and minor defects during the coating process, inaccurate characterization of defect evolution, and high false detection and false negative rates in online detection. The method achieves highly robust enhancement processing of coating process images and spatiotemporal integrated continuous tracking analysis of defects, thereby realizing real-time, stable, and continuous detection of coating quality. It significantly improves the accuracy of defect identification, adaptability to complex working conditions, and reliability of defect evolution analysis.

[0014] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. It should be understood that this application is not limited to the exemplary embodiments described herein. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. It should also be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all of them.

[0015] Example 1

[0016] Please see the appendix Figure 1 This application provides an online inspection method for the quality of aluminum-cased battery packs based on machine vision, the method specifically including the following steps:

[0017] S1: The industrial camera set at the coating station continuously acquires image sequences of the aluminum-cased battery coating surface, and simultaneously obtains conveying displacement information and coating process position information.

[0018] Specifically, to achieve continuous online monitoring of the aluminum-cased battery coating process, an industrial camera is installed at the coating station corresponding to the coating conveyor line to continuously acquire images of the aluminum-cased battery surface passing through the coating area. The industrial camera can be an area array camera or a line array camera, and the corresponding sampling frame rate is configured according to the conveying speed to ensure a stable temporal correlation between consecutive time frames. Preferably, the industrial camera is positioned above the coating conveying direction or at an inclined observation position to cover the complete imaging range of the film surface and edge areas. To reduce the impact of high reflectivity on the aluminum shell surface on image acquisition quality, this embodiment can use a ring light source, a strip light source, or a diffuse reflection light source, and adjust the incident angle and brightness parameters according to the surface reflection characteristics of the coating material to ensure stable grayscale difference characteristics at the film edges, bubble areas, and wrinkled areas. The images acquired by the industrial camera form a continuous image sequence in chronological order, serving as the data basis for subsequent defect detection and dynamic analysis. Simultaneously, to achieve correlation analysis between defect locations and the coating process, this embodiment simultaneously acquires conveying displacement information and coating process location information. The conveying displacement information can be acquired by encoders, speed measuring devices, or servo drive feedback modules on the conveying mechanism, and is used to characterize the real-time positional changes of the aluminum-cased battery in the conveying direction. The coating process position information is used to characterize the coating process stage or execution position corresponding to the current image, such as the unwinding area, bonding area, pressing area, and edge coating area. During image acquisition, the industrial camera acquisition time, conveying displacement information, and coating process position information are synchronously recorded using a unified time reference, thereby establishing a correspondence between image frames and conveying spatial positions. This method allows subsequently identified defect target areas to be accurately mapped to the corresponding coating process positions, providing fundamental data support for subsequent anomaly localization, defect evolution analysis, and coating process adjustment.

[0019] S2: Perform single-frame high dynamic range fusion processing on the image sequence, and perform phase consistency enhancement processing on the fused image to obtain a membrane detection image with illumination invariance.

[0020] Furthermore, step S2 of this application performs single-frame high dynamic range fusion processing on the image sequence, including:

[0021] Images of the aluminum-cased battery pack surface are acquired using a CMOS image sensor with pixel-level exposure control capabilities. Different pixel regions in the same frame are exposed using different integration times. De-mosaic processing is performed on the acquired raw Bayer array images to obtain image data with different exposure responses. Based on the brightness distribution and grayscale saturation state of different exposure response regions, exposure fusion processing is performed on high-exposure and low-exposure regions to generate a high dynamic range (HDR) pack detection image. Brightness equalization and reflection suppression processing are performed on the HDR pack detection image to enhance the defect texture information in highly reflective and dark regions. The HDR pack detection image is used to identify bubble defects, wrinkle defects, scratch defects, foreign matter defects, and abnormal film adhesion defects on the pack surface.

[0022] Specifically, due to the strong reflective properties of the aluminum-cased battery coating surface, and the variations in brightness, texture, and local shadowing in different areas of the coating material, images acquired under traditional fixed exposure conditions are prone to local overexposure or loss of detail in dark areas, thus affecting the stability of minor defect identification. Therefore, this embodiment first performs single-frame high dynamic range fusion processing on the acquired image sequence to improve the image detail retention capability under complex lighting conditions. Specifically, this embodiment uses a CMOS image sensor with pixel-level exposure control capability to acquire images of the aluminum-cased battery coating surface, allowing different pixel regions in the same frame to be exposed with different integration times. Shorter integration times are used for some pixel regions to suppress overexposure in highly reflective areas, while longer integration times are used for others to enhance texture details in dark areas. Since different exposure information is acquired synchronously within the same frame, image misalignment and motion blur caused by transport motion during traditional multi-frame HDR synthesis can be avoided, making it suitable for online inspection requirements in high-speed continuous coating scenarios. The original images acquired by the industrial camera are preferably Bayer array format images. Subsequently, demosaicing is performed on the original Bayer array image to recover the complete color or grayscale image information corresponding to different exposure response areas, and image data with different exposure responses are obtained. Based on this, exposure fusion processing is performed on high-exposure and low-exposure areas according to the brightness distribution, grayscale saturation state, and local texture clarity of each exposure area, thereby generating a high dynamic range (HDR) cladding detection image. Further, to reduce the impact of specular reflection and local bright spots on the aluminum shell surface on the defect detection results, this embodiment performs brightness equalization and reflection suppression processing on the generated HDR cladding detection image. Brightness equalization processing reduces the brightness difference between different areas, making the film edge and defect texture features more uniform; reflection suppression processing weakens saturated bright spots in highly reflective areas to enhance the visibility of local textures of defects such as bubbles, wrinkles, and micro-scratches. The HDR cladding detection image obtained after the above processing can simultaneously retain detail information in both highlight and dark areas, thereby improving the detectability of cladding surface defects. Preferably, the high dynamic range (HDR) coating detection image can be used to identify bubble defects, wrinkle defects, scratch defects, foreign object defects, and abnormal film adhesion defects on the coating surface, providing a stable data foundation for subsequent defect feature extraction and dynamic anomaly analysis. After completing the single-frame HDR fusion processing, this embodiment further performs phase consistency enhancement processing based on the fused image. Since phase consistency features are mainly constructed based on frequency domain phase information, they have strong invariance to brightness changes and local illumination fluctuations, thus enabling stable extraction of film edge and texture structure features under complex reflective environments. This method further reduces the impact of film color changes, local brightness fluctuations, and highly reflective areas on defect detection results, thereby improving the stability and robustness of the coating detection image.

[0023] Furthermore, in step S2 of this application, phase consistency enhancement processing is performed based on the fused image, including:

[0024] Multi-scale Log-Gabor filtering is performed on the acquired membrane detection images to obtain filtering response results at different scales and directions. Local energy distribution is calculated based on the filtering response results at each scale, and a phase consistency map is generated based on the local energy distribution. Edge enhancement processing and texture feature extraction are performed on the phase consistency map to obtain membrane edge features, wrinkle texture features, and local energy anomaly features. Edge continuity and abrupt edge changes are analyzed based on the membrane edge features to identify membrane damage areas. Periodic ripple structures are analyzed based on the wrinkle texture features to identify membrane wrinkle areas. Local energy enhancement areas are analyzed based on the local energy anomaly features to identify bubble defects, membrane delamination defects, and foreign object defects. The phase consistency enhancement processing is used to reduce the impact of membrane surface reflection, membrane color changes, and local brightness fluctuations on defect detection results.

[0025] Specifically, after completing the single-frame high dynamic range fusion processing, this embodiment performs phase consistency enhancement processing on the fused cladding detection image to improve the stable extraction capability of film edge and defect texture structures under complex lighting conditions. Since phase consistency features are mainly constructed based on frequency domain phase information, they are highly invariant to image brightness changes and local illumination fluctuations, thus effectively reducing the impact of aluminum shell surface reflection, film color differences, and local brightness changes on defect detection results. First, multi-scale Log-Gabor filtering is performed on the acquired cladding detection image. Because Log-Gabor filters have good bandpass characteristics in the frequency domain, they can simultaneously preserve edge information and detailed textures, making them suitable for enhancing the extraction of minute structural features such as film wrinkles, scratches, and edge breaks. During processing, multiple scales and multiple directions of Log-Gabor filter banks are constructed, and convolution operations are performed on the cladding detection image to obtain filtering response results at different scales and directions. Subsequently, the local energy distribution is calculated based on the filtering response results at each scale, and a phase consistency map is generated based on the local energy distribution. The phase consistency map is used to characterize the degree of phase consistency between different frequency components in a local region of the image. When a region exhibits obvious edges, abrupt texture changes, or structural features, the phase consistency between its local frequency components is high, thus the corresponding region shows a strong response in the phase consistency map. Compared to traditional edge extraction methods based on gray-level gradients, this method has better robustness to illumination changes. Furthermore, this embodiment performs edge enhancement processing and texture feature extraction on the generated phase consistency map to obtain film edge features, wrinkle texture features, and local energy anomaly features. Among these, film edge features characterize the continuity and integrity of the film boundary; wrinkle texture features characterize the periodic ripple structure on the film surface; and local energy anomaly features characterize the energy abrupt change state in a local region. In this embodiment, after performing multi-scale Log-Gabor filtering on the envelope detection image, even-symmetric filtering responses at different scales and directions are obtained. With odd symmetric filter response .in, Indicates the filtering scale. Indicates the filtering direction. Represents the pixel coordinates of the image. This represents the even-symmetric response components at the corresponding scale and direction. This represents the odd-symmetric response components at the corresponding scale and orientation. Furthermore, the local energy is calculated based on the even-symmetric and odd-symmetric response components. Its expression is: ;in, For pixels The local energy value, The filtered responses across all scales and directions are accumulated. Then, the phase coherence coefficient is calculated based on the local energy and amplitude response, expressed as: ;in, For pixels Phase consistency coefficient, For the amplitude response at the corresponding scale and direction, This represents a stability constant to prevent the denominator from being zero. After generating the phase consistency map in the above manner, this embodiment further performs edge enhancement processing and texture feature extraction based on the phase consistency coefficient. When the phase consistency number of a certain region satisfies: When it is determined that a significant edge structure exists in the corresponding region, then, This represents the threshold for edge response determination. Furthermore, texture orientation consistency parameters are calculated based on the local directional gradient distribution. Its expression is: ,in, This indicates the number of directional samples within the local neighborhood. Indicates the first Local texture direction angle, This represents the average angle of the local texture direction. When... When the region exhibits periodic fluctuations within a continuous region, it is determined that a membrane fold structure exists in the corresponding region. Furthermore, when the local energy satisfies: At that time, it was determined that there was a localized abnormal increase in energy in the corresponding region; among them, This indicates the threshold for determining local energy anomalies. The corresponding area can be further identified as a bubble defect, film layer delamination defect, or foreign object defect area. During the specific detection process, edge continuity and abrupt edge changes are analyzed based on film edge characteristics. When the edge structure in the phase consistency map shows breakage, shift, or local abrupt changes, it can be determined that the corresponding area has film layer damage anomalies. Based on wrinkle texture characteristics, periodic wavy structures are analyzed. When a local area has a continuous directional wavy distribution, it can be identified that the corresponding area has film layer wrinkle anomalies. Furthermore, this embodiment further analyzes local energy enhancement areas based on local energy anomaly characteristics. When the local energy value in the local area meets the following criteria: At that time, it was determined that there was a localized abnormal increase in energy in the corresponding region, among which, This represents the local energy value of the current pixel. This represents the local energy average within the neighborhood. The local energy standard deviation within the neighborhood. This is the abnormal enhancement adjustment coefficient. Further, the abnormal enhancement adjustment coefficient... The enhancement is adaptively obtained based on the local energy distribution of the background region in the current capsule inspection image. Specifically, firstly, a defect-free background region is selected in the capsule inspection image, and the local energy distribution in the background region is statistically analyzed; then, the abnormal enhancement adjustment coefficient is dynamically calculated based on the average level and fluctuation degree of the local energy in the background region. Its expression is: ,in This is the anomaly enhancement adjustment coefficient, used to adjust the enhancement level of the local energy anomaly detection threshold, and is adaptively calculated based on the local energy fluctuations in the background region. The basic adjustment coefficient is used to represent the basic anomaly detection gain of the system under standard illumination conditions. Preferably, it is obtained statistically based on pre-acquired standard envelope sample images, or set empirically according to the local energy distribution of the background region under normal operating conditions. This is a fluctuation sensitivity adjustment parameter used to adjust the degree of influence of background energy fluctuations on the anomaly detection threshold. Preferably, it is set according to the reflectivity, texture complexity, or detection sensitivity requirements of different coating materials. When it is necessary to improve the system's ability to suppress background fluctuations, the sensitivity is increased. The value of ; when it is necessary to enhance the sensitivity of small defect detection, reduce The value of , This is the average local energy value of the background region, which is obtained by averaging the local energy values ​​of all pixels within the background region. The expression is: ;in, This represents the number of pixels included in the statistics within the background area. For the first Local energy value of each pixel Let be the standard deviation of the local energy in the background region, used to characterize the degree of local energy fluctuation in the background region. It is obtained by calculating the standard deviation of the local energy values ​​in the background region, and the expression is: ;in, For the first Local energy value of each pixel This represents the average local energy of the background region. This is a stability constant used to prevent the denominator from reaching zero or being too small, which could lead to calculation instability. Preferably, it is set to a preset small positive number. Through this method, the anomaly detection threshold can be dynamically adjusted based on background fluctuations in the current capsule detection image. When there is strong reflection or brightness fluctuation in the background area, the local energy standard deviation... Increase, corresponding to abnormal enhancement adjustment coefficient This increases the system's ability to suppress background interference; when the background region is relatively stable, the abnormal enhancement adjustment coefficient is increased. This reduces [the impact of defects], thereby improving the system's sensitivity to detecting minute defects. Since bubble defects, foreign matter defects, and film delamination defects typically cause abrupt changes in local surface structure, the corresponding regions will exhibit localized energy anomalies and enhanced responses in the phase consistency map. Through the above processing, this embodiment can stably extract structural and texture features of the coating surface under complex reflective environments and film color variations, thereby improving the detection stability and identification accuracy of defects such as bubbles, wrinkles, film breaks, and foreign matter, providing a stable image feature foundation for subsequent dynamic anomaly analysis and defect evolution trajectory construction.

[0026] S3: Extract membrane integrity features, bubble features, wrinkle features and surface texture continuity features based on the enhanced membrane detection image, and construct the corresponding defect feature parameter set.

[0027] Furthermore, step S3 of this application also includes:

[0028] The enhanced coating detection image is subjected to grayscale normalization and noise filtering to obtain a standardized coating image. The membrane edge contour is extracted based on an edge detection algorithm, and the membrane edge continuity, edge offset, and edge closure state are calculated to obtain membrane integrity features. Surface protrusions are extracted based on local grayscale distribution and regional morphological features, and the area, roundness, and grayscale gradient changes of the protrusions are calculated to obtain bubble features. Linear undulating regions are extracted based on directional gradient distribution and texture continuity analysis, and the length, width, orientation angle, and curvature changes of the linear regions are calculated to obtain wrinkle features. Edge bonding gap, edge coverage, and bonding uniformity are calculated based on the positional relationship between the membrane edge and the battery casing edge to obtain edge bonding features. Surface texture change states are analyzed based on grayscale continuity and texture consistency between adjacent regions to obtain surface texture continuity features. The membrane integrity features, bubble features, wrinkle features, edge bonding features, and surface texture continuity features are then constructed into a defect feature parameter set for subsequent defect identification and classification.

[0029] Specifically, in this embodiment, to achieve refined inspection of the aluminum-cased battery coating quality, the coating inspection image after phase consistency enhancement processing is first subjected to grayscale normalization and noise filtering to reduce brightness differences and random noise interference between different regions, thereby obtaining a standardized coating image. Grayscale normalization is used to unify the grayscale distribution range of the image and improve the consistency of image features between different time frames; noise filtering is used to suppress high-frequency noise components caused by sensor noise, local reflections, and texture disturbances. Further, the film edge contour is extracted based on an edge detection algorithm, and the continuity, offset state, and closure state of the film edge contour are analyzed to obtain film integrity features. The film edge continuity characterizes the degree of continuity and integrity of the film boundary; the edge offset characterizes the degree of deviation of the film edge from the preset coating trajectory; and the edge closure state characterizes whether there are local breaks, gaps, or unbonded areas in the film. Preferably, this embodiment calculates the film edge continuity parameter based on the continuous distribution of edge pixels. Its expression is: ;in, This is a parameter for the continuity of the film edge. The total length of the continuous edge segments. This represents the theoretical total edge length. When the film edge continuity parameter... When the continuity level falls below a preset threshold, the corresponding region is determined to have membrane layer damage, edge breakage, or local missing abnormalities. Further, surface protrusion regions are extracted based on local grayscale distribution and regional morphological features, and the area, roundness, and grayscale gradient changes of these protrusion regions are analyzed to obtain bubble characteristics. Since encapsulated bubble regions typically exhibit local protrusion structures, their corresponding regions will form local grayscale gradients and approximately circular contour features. Preferably, this embodiment calculates the roundness parameter of the bubble region. Its expression is: ;in, For the roundness parameter of the bubble region, The pixel area of ​​the bubble region. This represents the perimeter of the bubble region boundary. When the roundness parameter... When the value approaches a preset circular reference value, a bubble defect is determined to exist in the corresponding area. Further, this embodiment extracts linear undulating regions based on directional gradient distribution and texture continuity analysis, and calculates the length, width, orientation angle, and curvature changes of these linear regions to obtain wrinkle characteristics. Since film wrinkles typically exhibit a continuous strip-like texture structure, the corresponding areas will form obvious directional consistency characteristics in the directional gradient field. Preferably, this embodiment calculates the wrinkle curvature parameters based on the change in the orientation angle of the wrinkle trajectory. Its expression is: ;in, For the fold curvature parameter, This represents the change in direction angle between adjacent trajectory points. This corresponds to the length of the trajectory segment. When the fold curvature parameter... When the threshold is exceeded, the corresponding area is determined to have obvious wrinkling and deformation abnormalities. Preferably, in this embodiment, the edge coverage parameter is calculated based on the membrane edge length and the theoretical coverage length of the shell edge, and its expression is: ;in, For edge coverage parameters, The length of the membrane edge. This represents the theoretical coverage length of the shell edge. When the edge coverage parameter... When the coverage rate falls below a preset threshold, the corresponding area is determined to have exposed aluminum or insufficient coating. Furthermore, this embodiment analyzes surface texture changes based on the grayscale continuity and texture consistency between adjacent areas to obtain surface texture continuity features. Since normal areas on the film surface typically have a relatively stable texture distribution, abrupt texture changes, grayscale jumps, or discontinuous texture directions in a localized area indicate the presence of foreign objects, scratches, or film layer delamination anomalies. Finally, the film integrity features, bubble features, wrinkle features, edge adhesion features, and surface texture continuity features are uniformly organized to construct a defect feature parameter set for subsequent defect identification, defect classification, and defect evolution analysis. This enables continuous online detection of the aluminum-cased battery coating quality.

[0030] S4: Perform frame difference analysis and connected component analysis on the coating images between consecutive time frames to extract the dynamic continuity features of the coating layer, and identify coating material deviation, coating material breakage, surface foreign matter and coating stagnation anomalies based on the morphological distribution of the difference region.

[0031] Specifically, to achieve online detection of dynamic anomalies in the coating process, frame difference analysis and connected component analysis are performed on the coating images between consecutive time frames to extract the dynamic continuity features of the coating layer. Since the coating material has a stable and continuous trajectory under normal transport conditions, the image changes between adjacent time frames exhibit strong temporal continuity; however, when anomalies such as material deviation, material breakage, foreign object interference, or coating stagnation occur, the temporal change characteristics of the corresponding regions will undergo significant abrupt changes. Therefore, by analyzing the image differences between consecutive time frames, real-time identification of dynamic anomalies in the coating process can be achieved. Specifically, the embodiment first acquires the pixels in the current time frame image within the consecutive time frames. grayscale values ​​and corresponding pixels in the previous time frame image The grayscale value is used to calculate the pixel point based on the grayscale difference between corresponding pixels. The frame difference grayscale values ​​are used to construct a frame difference image, and its expression is: ;in, For time frames Next pixel The frame difference grayscale value, For the pixels in the current time frame image grayscale value, The corresponding pixel in the image of the previous time frame grayscale value, This represents absolute value operations. Frame difference operations allow for the acquisition of local variation regions between consecutive time frames. Further, to reduce the impact of random noise and local brightness fluctuations on the frame difference results, this embodiment performs threshold segmentation and morphological closing operations on the frame difference image to eliminate isolated noise points and fill in local discontinuous regions, thereby obtaining continuous difference regions. Subsequently, connected component analysis is performed on the difference regions to extract each independent difference target region, and the area, aspect ratio, orientation angle, and continuous distribution state of the corresponding connected components are calculated. The connected component area characterizes the variation range of the difference region; the aspect ratio characterizes the striping degree of the difference region; the orientation angle characterizes the motion direction characteristics of the difference region; and the continuous distribution state characterizes the continuity of the difference region in the transport direction. Preferably, this embodiment calculates the aspect ratio parameter of the connected component based on the area of ​​the connected component region and the geometric features of its circumscribed rectangle. Its expression is: ;in, Let be the length of the longer side of the circumscribed rectangle of the connected region, used to characterize the spatial scale of the connected region along the principal extension direction. The length (width) of the short side of the bounding rectangle of the connected region is used to characterize the spatial scale of the connected region in the vertical principal direction. When the aspect ratio parameter of the connected region exceeds a preset strip threshold, and the corresponding differential region is continuously distributed along the conveying direction, it is determined that there is a membrane material deviation anomaly in the corresponding region. Since membrane material deviation usually causes the membrane edge to shift continuously in consecutive time frames, the corresponding region will form a continuous strip-shaped bright structure in the frame difference image. Furthermore, when the differential region presents a discrete point-like or irregular block-like distribution, it can be determined that there is a surface foreign object anomaly or a local membrane damage anomaly in the corresponding region. Since foreign objects and local damage usually cause instantaneous changes in the local texture structure, the corresponding region will form a local discrete high-response region in the frame difference image. In addition, this embodiment further analyzes the continuity of membrane conveying based on the overall grayscale change degree of the frame difference image. Preferably, the global average differential energy is calculated based on the grayscale values ​​of all pixels in the frame difference image. Its expression is: ;in, For time frames Global average difference energy under the given conditions This represents the total number of pixels included in the statistics. For time frames Next pixel The frame difference grayscale value. When the global average difference energy When the energy level falls below a preset energy threshold, it is determined that the current coating area exhibits either coating stagnation or membrane material breakage. Since the image changes between adjacent time frames significantly decrease when the membrane material stops being transported or breaks, the overall grayscale change in the corresponding frame difference image will be significantly reduced. Through this method, this embodiment can utilize the dynamic relationship between consecutive time frames to achieve online identification of dynamic anomalies such as membrane material deviation, membrane material breakage, surface foreign matter, and coating stagnation, thereby improving the real-time performance and continuity of anomaly detection in the coating process.

[0032] S5: Perform polar coordinate transformation on the edge area of ​​the aluminum-cased battery to expand the circumferential edge area into a rectangular strip structure, and analyze the edge bonding gap, bonding uniformity and edge coverage continuity of the film layer based on the expanded edge trajectory.

[0033] Furthermore, step S5 of this application also includes:

[0034] Edge localization is performed on the image of the coated aluminum-cased battery to extract the outer contour of the battery casing and the edge contour of the film layer, and the edge detection area is determined. A polar coordinate system is established based on a preset center point, and polar coordinate transformation is performed on the edge detection area to expand the circumferential edge area into a rectangular strip image. The edge trajectory of the film layer is extracted from the expanded rectangular strip image, and the distance difference between the edge trajectory of the film layer and the edge trajectory of the casing is calculated to obtain the edge bonding gap parameter. The edge bonding uniformity and edge coverage continuity are calculated based on the edge bonding gap parameter at different angle positions. When the edge bonding gap parameter in a continuous angle interval is greater than a preset upper limit, it is determined that there is an abnormality of insufficient film coverage in the corresponding area. When the edge bonding gap parameter in a continuous angle interval is less than a preset lower limit, it is determined that there is an abnormality of excessive film coating in the corresponding area. When the standard deviation of the edge bonding gap parameter exceeds a preset threshold, it is determined that there is an abnormality of uneven edge bonding in the corresponding area, and the angle position information and edge bonding status evaluation results of the corresponding abnormal area are output.

[0035] Specifically, to improve the detection accuracy of the edge coating adhesion status of aluminum-cased batteries, polar coordinate transformation is performed on the edge region of the aluminum-cased battery, unfolding the circumferential edge region in the original image into a rectangular strip structure to achieve continuous quantitative analysis of the edge adhesion status. Since traditional edge detection methods typically employ independent analysis of four sides or local region detection, it is difficult to uniformly evaluate the adhesion consistency of the entire circumferential edge. Therefore, this embodiment uses polar coordinate unfolding to convert the annular edge region into a linear continuous structure, thereby improving the continuity and positioning accuracy of edge adhesion detection. Specifically, this embodiment first performs edge localization processing on the image of the coated aluminum-cased battery, extracting the outer contour of the battery casing and the edge contour of the film layer, and determining the edge detection area. The outer contour of the casing is used as a reference boundary for edge adhesion analysis; the edge contour of the film layer is used to characterize the actual coating coverage boundary. Subsequently, a polar coordinate system is established based on a preset center point, and polar coordinate transformation is performed on the edge detection area. Preferably, the original image coordinates... Convert to polar coordinates Its expression is: ; ;in, The radial distance from a pixel to a preset center point. The polar angle of the corresponding pixel. These are the pixel coordinates of the original image. The coordinates of the preset center point are used. Through polar coordinate transformation, the circumferential edge region in the original image can be unfolded into a rectangular strip image. The horizontal polar angle of the rectangular strip image is given by... Longitudinal distance corresponds to radial distance This achieves continuous unfolding of the edge trajectory. Further, in this embodiment, the edge trajectory of the membrane layer is extracted from the unfolded rectangular strip image, and the distance difference between the membrane layer edge trajectory and the shell edge trajectory is calculated to obtain the edge bonding gap parameter. Preferably, the edge bonding gap parameter is calculated as follows: ,in, Polar angle The edge fitting gap parameters below, This represents the radial distance corresponding to the edge trajectory of the membrane layer. This represents the radial distance corresponding to the edge trajectory of the casing. In the aluminum-cased battery coating process of this embodiment, the edge of the film layer is located inside the edge of the casing, and the edge bonding gap parameter is used to characterize the gap size between the edge of the film layer and the edge of the casing. By statistically analyzing the edge bonding gap parameters at different angular positions, the edge bonding uniformity and edge coverage continuity can be further calculated. The edge bonding uniformity characterizes the consistency of the distance distribution between the edge of the film layer and the edge of the casing; the edge coverage continuity characterizes the continuous coverage state of the film layer edge throughout the entire circumference. Preferably, this embodiment calculates the edge bonding standard deviation based on the edge bonding gap parameters at all angular positions. Its expression is: ;in, The number of sampling points for the angles used in the statistics. For the first Edge fitting gap parameters corresponding to each angular position This is the average value of the edge bonding gap parameter across all angular positions. The edge bonding gap parameter is calculated over a continuous angular range. When the value exceeds a preset upper limit, an anomaly of insufficient membrane coverage is determined in the corresponding area. Because the membrane edge fails to completely cover the shell edge, a large edge-fitting gap is formed between the membrane edge and the shell edge. Furthermore, when the edge-fitting gap parameter within a continuous angular range... When the value is below a preset lower limit, an abnormality of excessively tight membrane coating is determined in the corresponding area. This is because excessive shrinkage or over-compression of the membrane during coating causes the membrane edge to approach the shell edge excessively, resulting in an abnormally reduced edge bonding gap in the corresponding area. Furthermore, when the edge bonding standard deviation... When the threshold is exceeded, the corresponding area is determined to have an edge bonding unevenness anomaly. Because the bonding state of the film edge fluctuates significantly at different angles, the distribution of its edge bonding gap will exhibit obvious unevenness. The preset upper limit, preset lower limit, and preset threshold are predetermined based on the coating process requirements of the corresponding battery model or the statistical results of historical qualified samples. Finally, this embodiment further outputs the angular position information of the corresponding abnormal area and the edge bonding state evaluation result, thereby achieving continuous quantitative detection and accurate anomaly location of the coating edge bonding quality, improving the stability and engineering applicability of coating edge quality detection.

[0036] S6: Establish a synchronous mapping relationship between image acquisition time, transport displacement coordinates and coating process position, and map the identified defect area to the corresponding coating process position.

[0037] Specifically, to achieve precise correlation analysis between defect areas and the coating process, a synchronous mapping relationship is established between image acquisition time, conveying displacement coordinates, and coating process position, and the identified defect areas are mapped to the corresponding coating process positions. This method enables spatiotemporal correspondence between defect detection results and the coating execution process, providing fundamental support for subsequent anomaly localization, process tracing, and coating parameter adjustment. Specifically, in this embodiment, while continuously acquiring coating images with an industrial camera, the displacement encoding information corresponding to the conveying mechanism is simultaneously acquired, and the current coating process execution status is recorded. The industrial camera acquisition time is used to characterize the time position corresponding to the current image; the conveying displacement coordinates are used to characterize the real-time spatial position of the aluminum-cased battery in the conveying direction; and the coating process position is used to characterize the process execution stage corresponding to the current area, such as the unwinding area, pre-lamination area, pressing area, and edge wrapping area. Further, this embodiment synchronously aligns the image acquisition time and conveying displacement information based on a unified time reference and establishes a mapping relationship between image frames and conveying spatial positions. Preferably, the conveying displacement value under the corresponding time frame is calculated based on the conveying speed and time interval, and its expression is: ;in, This represents the transport displacement value corresponding to the current time frame. This is the transport displacement value corresponding to the previous time frame. The conveying speed within the current time period. The acquisition time interval between adjacent time frames is defined as follows. Through the above method, a dynamic correspondence between continuous image frames and transport spatial positions can be established. Further, this embodiment maps the current image frame to the corresponding coating process position based on the correspondence between transport displacement coordinates and preset process sections. Different coating process sections correspond to different process execution areas, such as the film material introduction area, film layer bonding area, pressing and forming area, and edge tightening area. Preferably, when the transport displacement coordinates meet the range conditions of the corresponding process section, it can be determined that the current image corresponds to the corresponding coating process position. During defect detection, after identifying the defect target area, this embodiment further obtains the timestamp information and transport displacement coordinates of the image frame containing the corresponding defect area, and maps the defect area to the corresponding coating process position. Preferably, defect spatial positioning information is constructed based on the coordinates of the center point of the defect area and the current transport displacement coordinates, thereby forming a correspondence between the defect area and the coating process position. Further, this embodiment can analyze the cause of the anomaly based on the coating process position corresponding to the defect area. For example, when defects are concentrated in the film bonding area, it can be determined that there is an abnormality in the corresponding bonding pressure or guiding state; when defects are concentrated in the edge covering area, it can be determined that there is an abnormality in the edge tightening or covering tension. Through the above methods, this embodiment can realize the spatiotemporal correlation analysis between the coating defect detection results and the coating process, thereby improving the accuracy of anomaly location and the ability to trace process problems, and providing data support for subsequent coating process optimization and online adjustment.

[0038] S7: Construct defect evolution trajectories based on defect detection results under continuous time series, analyze the area change rate, length change rate and expansion direction of defect regions, in order to identify persistent abnormal states during the encapsulation process.

[0039] Furthermore, step S7 of this application also includes:

[0040] S71. Based on the continuous acquisition time of the industrial camera during the coating conveying process, the defect detection results in the continuous time series are timestamped and aligned, and a spatial-temporal correspondence between defects is established by combining the conveying displacement coding information, wherein the defect detection results take the defect target region as the basic analysis unit; S72. Connected component extraction is performed on the defect target region in each time frame, and morphological thinning processing is performed based on the regional contour of the defect target region to generate a defect skeleton structure that corresponds one-to-one with the defect target region; S73. The defect principal direction vector is calculated based on the defect skeleton structure, and the consistency of the defect propagation direction is analyzed by combining the local gradient direction field to obtain the defect direction stability parameter, characterized in that: based on any adjacent skeleton points in the skeleton structure and Construct the main direction vector of the defect The expression is: ;in, The two-dimensional coordinates of the first sampling point on the skeleton structure. To and Two-dimensional coordinates of adjacent skeleton sampling points, To represent the main propagation direction vector of the defect in the current time frame; based on this, the first... Local orientation angle of the skeleton structure And calculate the defect direction consistency coefficient. The expression is: ;in, This represents the number of local directional sampling points in the skeleton structure that participate in the calculation. This is the average of all local direction angles. For the first S74. Perform spatial matching and relocation of the same defect target region in adjacent time frames, and calculate the defect area change rate and skeleton length change rate based on the skeleton structure corresponding to the defect target region to characterize the defect growth rate; S75. Calculate the defect expansion direction deflection angle based on the defect main direction vector change trend in multiple time frames, and determine whether the defect has undergone directional drift or bifurcation expansion; S76. Combine the defect area change rate, skeleton length change rate and directional stability parameters to construct a defect evolution stability judgment index to identify persistently expanding defects or transient interference pseudo-defects.

[0041] Furthermore, step S71 of this application also includes:

[0042] S71-1. Based on the continuous acquisition time of the industrial camera, the defect detection results under the continuous time series are timestamped to form a unified time reference sequence; S71-2. Combined with the transport displacement coding information, the time reference sequence is mapped to the corresponding transport space position to establish the defect space-time correspondence.

[0043] Furthermore, step S72 of this application also includes:

[0044] S72-1. Perform connected component analysis on the defect target region in each time frame, extract independent defect target regions with an area greater than a preset threshold based on pixel connectivity constraints, and remove isolated noise pixels and small-scale pseudo-defect regions; S72-2. Perform contour extraction on the defect target region, and combine Gaussian filtering and morphological opening and closing operations to smooth the defect boundary contour to suppress the boundary jaggedness and breakage caused by reflection and texture interference, and obtain a standardized defect contour; S72-3. Perform morphological thinning based on the standardized defect contour, and perform topological constraint correction on the thinning result to maintain the connectivity of the skeleton structure and the single pixel width characteristics, and obtain the defect skeleton structure.

[0045] Furthermore, step S74 of this application also includes:

[0046] For time frames With time frame Spatial matching and relocation of the same defect region are performed to determine the spatial correspondence of the same defect target in different time frames; time frames are extracted respectively. Area of ​​the defective region and the length of the skeleton structure and extract time frames Area of ​​the corresponding defect region and the length of the skeleton structure ; Calculate the rate of change of the defect area and the rate of change of skeleton length Its expression is as follows: ; ;in, Used to characterize the degree of area growth or shrinkage of defect regions between adjacent time frames. Used to characterize the extent to which a defect structure extends or contracts along the main extension direction.

[0047] Specifically, to achieve continuous analysis of coating defects from "instantaneous state" to "evolutionary process," a defect evolution trajectory is constructed based on defect detection results in a continuous time series. The area change rate, skeleton length change rate, and expansion direction of the defect region are comprehensively analyzed to identify persistent abnormal states or transient interference pseudo-defects during the coating process. Specifically, this embodiment uses the defect target region as the basic analysis unit, performing temporal tracking analysis on the same defect target in continuous time frames. Defect target regions in different time frames are uniformly numbered and associated to form an evolution sequence of the defect in the time dimension. In this step, based on the continuous acquisition times of the industrial camera during the coating transport process, the defect detection results in the continuous time series are timestamped, and a spatial-temporal correspondence between defects is established by combining transport displacement encoding information. Specifically, each time frame... The corresponding defect target area and its acquisition timestamp Binding is performed, and a ternary association relationship is constructed by combining the transmitted displacement encoding information: ;in, For time frames The defect space-time mapping unit below, For image acquisition timestamps, To transmit displacement values, This represents the set of defect target regions for a given time frame. The above method achieves a unified description of defect targets in both time and space. Connected component extraction is performed on the defect target regions in each time frame, and morphological thinning is applied based on the region contours to generate a defect skeleton structure corresponding to each defect target region. Specifically, firstly, connected component analysis is performed on the defect target regions based on pixel connectivity to extract independent defect targets; then, morphological thinning is applied to the boundary contours of the defect target regions, gradually shrinking the region contours to a single-pixel width structure, thereby obtaining the defect skeleton structure. This skeleton structure is used to characterize the main spatial propagation path of the defect, providing basic structural support for subsequent directional and length variation analysis. Based on the defect skeleton structure, the main direction vector of the defect is calculated, and the consistency of the defect propagation direction is analyzed in conjunction with the local gradient direction field to obtain the defect directional stability parameter. Its key feature is that it is based on any adjacent skeleton points within the skeleton structure. and Construct the main direction vector of the defect The expression is: ;in, The two-dimensional coordinates of the first sampling point on the skeleton structure. To and Two-dimensional coordinates of adjacent skeleton sampling points, To represent the main propagation direction vector of the defect in the current time frame; based on this, the first... Local orientation angle of the skeleton structure And calculate the defect direction consistency coefficient. The expression is: ;in, This represents the number of local directional sampling points in the skeleton structure that participate in the calculation. This is the average of all local direction angles. For the first Consistency weights are applied between local directions and the overall average direction. Spatial matching and relocation are performed on the same defect target region in adjacent time frames, and the defect area change rate and skeleton length change rate are calculated based on the corresponding skeleton structure to characterize the defect growth rate. Based on the change trend of the defect principal direction vector in multiple time frames, the defect expansion direction deflection angle is calculated, and it is determined whether the defect has undergone directional drift or bifurcation expansion. Specifically, the principal direction vectors in different time frames are... and Perform angle calculations to obtain the direction deflection angle. This is used to characterize the degree to which the defect propagation direction changes over time. When the defect exceeds a preset threshold, it is determined that the defect exhibits a tendency to drift or bifurcate. The defect area change rate, skeleton length change rate, and directional stability parameters are comprehensively integrated to form a defect evolution stability assessment index. Specifically, different features are assigned corresponding influence weights, and a comprehensive score is calculated based on the magnitude of change in the defect region across adjacent time frames. Specifically: when the defect area continuously increases and the increase is significant, the proportion of the area change rate in the comprehensive evaluation is increased; when the defect continuously extends along the main direction, the proportion of the skeleton length change rate in the comprehensive evaluation is increased; when the defect expansion direction maintains high consistency, the influence of directional instability factors is reduced. The defect evolution stability assessment results are obtained through the above method and classified based on a preset judgment threshold: when the comprehensive evaluation result exceeds the preset threshold, it is determined to be a continuously expanding defect; when the comprehensive evaluation result does not exceed the preset threshold, it is determined to be a transient, interfering pseudo-defect.

[0048] Furthermore, based on the continuous acquisition time of the industrial camera during the coating conveying process, the defect detection results corresponding to each time frame are timestamped and aligned to eliminate time deviations caused by acquisition delay, inter-frame jitter, and equipment synchronization errors. In this process, the acquisition time corresponding to each frame is uniformly marked using the industrial camera trigger signal or system clock as a reference, and all defect detection results are reordered according to chronological order to form a unified time reference sequence. Each time reference node corresponds to a set of defect detection results, used to characterize the defect distribution state on the coating surface at that moment, ensuring strict temporal consistency and comparability of detection results between different time frames. Further, after unifying the time reference, the time sequence is mapped to the corresponding spatial position by combining the displacement encoding information of the conveying mechanism, thereby establishing a spatial-temporal correspondence between defects. Specifically, by acquiring the real-time displacement signal output by the encoder in the conveying system, the current position of the aluminum-cased battery in the conveying direction is obtained and bound to the corresponding time reference sequence, so that the defect detection result of each time frame corresponds to a unique spatial position coordinate. Through this mapping relationship, the defect detection results that originally only existed at the image level are transformed into spatial discrete points or continuous trajectories distributed along the transport path, so that the defects have traceability and continuous expression capabilities in the spatial dimension.

[0049] Furthermore, to achieve a stable representation of the morphological structure of the capsule defect, connected component analysis, contour normalization, and skeleton refinement are sequentially performed on the defect target region in each time frame to obtain a defect skeleton structure corresponding one-to-one with the defect target region, which is used for subsequent defect direction analysis and evolution tracking. Connected component analysis is performed on the defect target region in each time frame. Based on pixel 8-neighborhood or 4-neighborhood connectivity constraints, candidate defect regions in the image are segmented and labeled to obtain several independent connected regions. The pixel area of ​​each connected region is calculated. And according to the preset area threshold Filter and retain only those that meet the following criteria: The independent defect target area. Wherein: It is obtained by counting the number of pixels in this area; The maximum area of ​​the noise region on the normal membrane surface is determined statistically, typically through statistical analysis of defect-free sample images. For example, the 95th percentile of the area of ​​the connected components in the background noise is used as a reference upper limit. Isolated noise pixels and small-scale pseudo-defect regions are eliminated using this method, thereby improving the reliability of the defect target region. After obtaining the defect target region, contour extraction is performed to obtain the original defect boundary contour. To eliminate jagged edges and breaks caused by reflections, texture interference, and imaging noise, Gaussian filtering and morphological opening / closing operations are performed on the contour for smoothing. Specifically, the contour boundary coordinate sequence... Gaussian smoothing: ;in, For the original outline Coordinates of a point, The coordinates of the smoothed contour points. These are the Gaussian weighting coefficients, calculated using the Gaussian function. The radius of the filtering window is determined by the contour sampling density. Subsequently, morphological opening operations are used to remove small protruding noise structures, and closing operations are used to fill local fracture areas, thereby obtaining a standardized defect contour. After obtaining the standardized defect contour, the defect region is iteratively shrunk using a morphological thinning algorithm, gradually shrinking the region boundary to a single-pixel width structure, thereby obtaining the initial skeleton structure. The skeleton extraction process can be represented as follows: ;in, To standardize defect profiles, This is the initial skeleton structure. This is a morphological thinning operator. To avoid breaks, pseudo-forks, or disconnected structures during the thinning process, the initial skeleton structure undergoes topological constraint correction. Specifically, this includes: if the skeleton has breakpoints, endpoints are connected based on the shortest Euclidean distance principle; if redundant short branches exist, they are connected based on a length threshold. Pruning is performed; if regions with widths other than a single pixel exist, iterative refinement continues until the constraints are met. Wherein: The branch length threshold is determined by the statistical distribution of normal defect skeleton lengths and is generally taken as less than the average length of the main skeleton. The empirical value. Through the above processing, a defect skeleton structure with consistent structure is finally obtained. It satisfies the following requirements: complete connectivity, single-pixel width, and preservation of the original defect's main extended geometry, providing a stable structural foundation for subsequent defect main direction calculation, length change analysis, and evolution trajectory construction.

[0050] Furthermore, to achieve quantitative analysis of the evolution of the capsule defect over time, spatial matching and relocation of the same defect target region in adjacent time frames are performed, and its rate of change is calculated based on the area information and skeleton structure information of the defect region, thereby characterizing the growth or contraction trend of the defect. Specifically, for time frames... With time frame Spatial matching is performed on the defect target region to determine the correspondence of the same defect target in different time frames. Preferably, matching is based on the geometric features of the defect target region (including centroid position, circumscribed rectangle, contour similarity, and spatial overlap) to achieve cross-frame association and relocation of defect targets, thereby ensuring the continuity of the same defect in the time series. After completing spatial matching, time frames are extracted respectively. With time frame The key descriptive parameters corresponding to the defect target. Among them, For time frames The area of ​​the defective region is obtained by counting the total number of pixels within the connected region of the defect. For time frames The area corresponding to the defect region. For time frames The length of the skeleton structure in the defect region is obtained by accumulating the segmented Euclidean distances of the skeleton pixels. For time frames The length of the skeleton structure corresponding to the defect region. Wherein, the skeleton length... The calculation method involves accumulating the distances between adjacent points in the skeleton point sequence: ;in, For the skeleton structure The coordinates of each pixel. Total number of skeleton points. Defect area change rate. and the rate of change of skeleton length Its expression is as follows: ; ;in, Used to characterize the degree of area growth or shrinkage of defect regions between adjacent time frames. This method is used to characterize the extent of extension or contraction of defect structures along the main expansion direction. By calculating the difference between adjacent time frames, a continuous quantitative description of the dynamic evolution process of defects is achieved. This embodiment can extend the defect from a static spatial distribution to a temporal evolution dimension, realizing a quantitative characterization of the defect expansion rate, and providing a stable data foundation for subsequent defect persistence identification, anomaly trend prediction, and process adjustment.

[0051] S8: When a suspected abnormal area is detected, perform local enhanced acquisition and online re-inspection on the corresponding area, and output the capsule quality judgment result and abnormal area location information based on the re-inspection result.

[0052] Specifically, suspected abnormal areas in the previous detection results are reconfirmed to improve the reliability and robustness of the detection results. When a suspected abnormal area is identified during continuous detection, the system adaptively adjusts the industrial camera acquisition parameters based on the spatial location information and transport displacement value of the area. This includes increasing local sampling resolution, increasing exposure control precision, or narrowing the imaging field of view, thereby performing local enhanced acquisition of the target area. During local enhanced acquisition, high-resolution image resampling is performed on the suspected abnormal area to enhance the expression of local texture, edge structure, and morphological change features. Subsequently, online re-inspection processing is performed on the enhanced local image. The re-inspection process is consistent with the previous detection process, including defect feature extraction and structural consistency analysis, to verify whether the suspected abnormal area is a real defect response or a false detection result caused by illumination changes, reflection interference, or transient noise. Furthermore, the re-inspection results are compared with the initial detection results. When the re-inspection results are consistent with the initial detection results, the area is confirmed as a valid defect area; when the re-inspection results are inconsistent with the initial detection results, it is judged as a transient interference anomaly and filtered. Finally, the coating quality judgment result is output based on the re-inspection confirmation result, and the precise positioning information of the abnormal area in the conveying direction and image coordinate system is output simultaneously to achieve accurate calibration of the defect location and quality traceability.

[0053] Example 2

[0054] Using an aluminum-cased battery with dimensions of 16mm thickness, 65mm width, and 125mm height as the inspection object, online inspection was performed on the coated battery. An industrial camera continuously acquired images of the coated battery surface, simultaneously acquiring transport displacement information and coating process position information. The acquired images first underwent high dynamic range fusion processing to reduce the impact of reflective areas on image quality, and then phase consistency enhancement processing was performed to enhance the texture features of the film edges and defect areas.

[0055] The edge contours, bubble features, wrinkle features, and surface texture continuity features of the membrane layer were extracted from the enhanced images, and a corresponding set of defect feature parameters was constructed. In the continuously acquired image sequence, a continuously changing anomalous region was found near the edge of the battery. Frame difference analysis and connected component analysis of adjacent time frames revealed that this anomalous region appeared continuously along the conveying direction and exhibited a banded distribution. Combined with the morphological changes of the difference region, it can be determined that this anomaly is related to the operating state of the membrane material.

[0056] Polar coordinate transformation was performed on the battery edge region to unfold it into a rectangular strip image, and the edge trajectory of the film and the edge trajectory of the casing were extracted. By calculating the edge bonding gap parameter, it was found that if the edge bonding gap parameter is continuously higher than the preset upper limit within a continuous angular range, it is determined that the corresponding area has insufficient film coverage; if the edge bonding gap parameter is continuously lower than the preset lower limit, it is determined that the corresponding area has excessive film coverage.

[0057] After identifying the abnormal area, its location was mapped based on the correspondence between image acquisition time, transport displacement information, and coating process location information. Subsequently, images acquired in subsequent time periods were continuously tracked and analyzed. The results showed that the same type of anomaly consistently appeared in similar locations, and the abnormal area gradually expanded. Combining the changes in defect area and expansion direction, it could be determined that this anomaly was a persistent process anomaly, rather than an occasional anomaly caused by momentary interference.

[0058] The system further performs local enhanced acquisition and online re-inspection on the abnormal area, and finally outputs the abnormality of insufficient film coverage and its corresponding location information, and feeds the detection results back to the coating process monitoring system.

[0059] The method described in this application was used to detect the coating images collected from the production line, and the results were compared with traditional detection methods that only use single images for edge detection. The detection results show that when reflective areas exist at the coating edge, traditional detection methods are prone to discontinuous edge recognition, while the method described in this application can maintain the continuity of the edge trajectory.

[0060] This application utilizes continuous time frame analysis and process location mapping to continuously track and locate abnormal regions, whereas traditional detection methods can only obtain detection results at a single moment, making it difficult to determine the specific process location where the anomaly occurred. This application demonstrates superior application performance in edge bonding anomaly identification, abnormal region localization, and continuous process anomaly analysis.

[0061] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0062] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application also intends to include such modifications and variations.

Claims

1. A machine vision-based online inspection method for the quality of aluminum-cased battery packs, characterized in that, The method includes: S1. The industrial camera set at the coating station continuously acquires image sequences of the aluminum-shell battery coating surface, and simultaneously obtains conveying displacement information and coating process position information. S2. Perform single-frame high dynamic range fusion processing on the image sequence, and perform phase consistency enhancement processing on the fused image to obtain a membrane detection image with illumination invariance; S3. Extract membrane integrity features, bubble features, wrinkle features and surface texture continuity features based on the enhanced membrane detection image, and construct the corresponding defect feature parameter set; S4. Perform frame difference analysis and connected component analysis on the envelope images between consecutive time frames to extract the dynamic continuity features of the membrane layer, and identify membrane material deviation, membrane material breakage, surface foreign matter and membrane stagnation anomalies based on the morphological distribution of the difference region. S5. Perform polar coordinate transformation on the edge area of ​​the aluminum-cased battery to expand the circumferential edge area into a rectangular strip structure, and analyze the edge bonding gap, bonding uniformity and edge coverage continuity of the film layer based on the expanded edge trajectory. S6. Establish a synchronous mapping relationship between image acquisition time, transmission displacement coordinates and coating process position, and map the identified defect area to the corresponding coating process position. S7. Based on the defect detection results under continuous time series, construct the defect evolution trajectory, analyze the area change rate, length change rate and expansion direction of the defect region, so as to identify the continuous abnormal state in the encapsulation process. S8. When a suspected abnormal area is detected, perform local enhanced acquisition and online re-inspection processing on the corresponding area, and output the capsule quality judgment result and abnormal area location information based on the re-inspection result. The single-frame high dynamic range fusion processing performed on the image sequence includes: The surface of the aluminum-cased battery pack is captured by a CMOS image sensor with pixel-level exposure control capabilities, so that different pixel areas in the same frame image are exposed with different integration times. Demosaicing was performed on the acquired raw Bayer array images to obtain image data with different exposure responses; Based on the brightness distribution and grayscale saturation state of different exposure response regions, exposure fusion processing is performed on high-exposure and low-exposure regions to generate high dynamic range envelope detection images. Brightness equalization and reflection suppression processing are performed on the high dynamic range coating inspection image to enhance the defect texture information in the high reflectivity area and the dark area. The high dynamic range coating inspection image is used to identify bubble defects, wrinkle defects, scratch defects, foreign matter defects and abnormal film adhesion defects on the coating surface.

2. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 1, characterized in that, Phase consistency enhancement processing is performed on the fused image, including: Multi-scale Log-Gabor filtering was performed on the acquired capsule detection images to obtain the filtering response results at different scales and directions. The local energy distribution is calculated based on the filtering response results at each scale, and a phase consistency map is generated based on the local energy distribution. Edge enhancement processing and texture feature extraction are performed on the phase consistency map to obtain film edge features, wrinkle texture features and local energy anomaly features; Based on the edge characteristics of the membrane layer, the continuity and abrupt changes of the edge are analyzed to identify the damaged areas of the membrane layer; Based on the wrinkle texture features, periodic ripple structures are analyzed to identify wrinkle regions in the film layer. Based on the analysis of the local energy anomaly characteristics, the local energy enhancement region is identified to identify bubble defects, film layer delamination defects, and foreign object defects. The phase consistency enhancement processing is used to reduce the impact of coating surface reflection, film color changes, and local brightness fluctuations on the defect detection results.

3. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 1, characterized in that, Based on the enhanced membrane detection image, features such as membrane integrity, bubble features, wrinkle features, and surface texture continuity features are extracted, including: The enhanced capsule detection image is subjected to grayscale normalization and noise filtering to obtain a standardized capsule image. The edge contour of the membrane layer is extracted based on the edge detection algorithm, and the edge continuity, edge offset and edge closure status of the membrane layer are calculated to obtain the integrity features of the membrane layer. Based on local grayscale distribution and regional morphological features, the surface protrusion regions are extracted, and the area, roundness, and grayscale gradient changes of the protrusion regions are calculated to obtain bubble features. Linear undulation regions are extracted based on directional gradient distribution and texture continuity analysis, and the length, width, orientation angle and curvature changes of the linear regions are calculated to obtain wrinkle features. The edge bonding gap, edge coverage, and bonding uniformity are calculated based on the positional relationship between the edge of the film layer and the edge of the battery casing to obtain the edge bonding characteristics; The surface texture change state is analyzed based on the gray-level continuity and texture consistency between adjacent regions to obtain surface texture continuity characteristics; The film integrity features, bubble features, wrinkle features, edge adhesion features, and surface texture continuity features are constructed into a defect feature parameter set for subsequent defect identification and classification.

4. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 1, characterized in that, Polar coordinate transformation is performed on the edge region of the aluminum-cased battery, unfolding the circumferential edge region into a rectangular strip structure. Based on the unfolded edge trajectory, the edge bonding gap, bonding uniformity, and edge coverage continuity of the film layer are analyzed, including: Edge localization is performed on the image of the coated aluminum-cased battery, the outer contour of the battery casing and the edge contour of the film are extracted, and the edge detection area is determined. A polar coordinate system is established based on a preset center point, and polar coordinate transformation is performed on the edge detection region to expand the circumferential edge region into a rectangular strip image. The edge trajectory of the membrane layer is extracted from the unfolded rectangular strip image, and the distance difference between the edge trajectory of the membrane layer and the edge trajectory of the shell is calculated to obtain the edge bonding gap parameter; Calculate edge bonding uniformity and edge coverage continuity based on edge bonding gap parameters at different angle positions; When the edge bonding gap parameter within a continuous angle range is greater than the preset upper limit, it is determined that there is an abnormality of insufficient film coverage in the corresponding area. When the edge bonding gap parameter within a continuous angle range is less than the preset lower limit, it is determined that there is an abnormality of excessively tight film coating in the corresponding area. When the standard deviation of the edge bonding gap parameter exceeds the preset threshold, it is determined that there is an abnormality in the edge bonding in the corresponding area, and the angle position information of the corresponding abnormal area and the edge bonding status evaluation result are output.

5. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 3, characterized in that, Based on defect detection results from continuous time series, a defect evolution trajectory is constructed, and the area change rate, length change rate, and expansion direction of the defect region are analyzed, including: S71. Based on the continuous acquisition time of the industrial camera during the film conveying process, the defect detection results under the continuous time series are timestamped and the spatial-temporal correspondence of defects is established by combining the conveying displacement coding information, wherein the defect detection results take the defect target area as the basic analysis unit. S72. For each time frame, the connected component of the defect target region is extracted, and morphological thinning is performed based on the region contour of the defect target region to generate a defect skeleton structure that corresponds one-to-one with the defect target region. S73. Calculate the principal direction vector of the defect based on the defect skeleton structure, and combine it with the local gradient direction field analysis to obtain the consistency of the defect propagation direction and obtain the defect direction stability parameter. The characteristic is that it is based on any adjacent skeleton points in the skeleton structure. and Construct the main direction vector of the defect The expression is: ; in, The coordinates of the first sampling point on the skeleton structure are two-dimensional. To and Two-dimensional coordinates of adjacent skeleton sampling points, This represents the main propagation direction vector of the defect in the current time frame; Based on this, extract the first element from the skeleton structure. Local orientation angle of the skeleton structure And calculate the defect direction consistency coefficient. The expression is: ; in, This represents the number of local directional sampling points in the skeleton structure that participate in the calculation. This is the average of all local direction angles. For the first Consistency weight between local directions and the overall average direction; S74. Perform spatial matching and relocation of the same defect target region in adjacent time frames, and calculate the defect region area change rate and skeleton length change rate based on the skeleton structure corresponding to the defect target region to characterize the defect growth rate. S75. Based on the change trend of the defect main direction vector in multiple time frames, calculate the defect propagation direction deflection angle and determine whether the defect has undergone directional drift or bifurcation propagation. S76. Combining the defect area change rate, skeleton length change rate, and directional stability parameters, a defect evolution stability judgment index is constructed to identify continuously expanding defects or transient interference pseudo-defects.

6. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 5, characterized in that, Based on the continuous acquisition time of industrial cameras during the coating conveying process, the defect detection results in the continuous time series are timestamped and aligned, and a spatial-temporal correspondence between defects is established by combining the conveying displacement coding information, including: S71-1. Based on the continuous acquisition time of industrial cameras, timestamps are aligned to the defect detection results in the continuous time series to form a unified time reference series. S71-2. Combine the conveying displacement coding information to map the time reference sequence to the corresponding conveying space position and establish the defect space-time correspondence.

7. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 5, characterized in that, Connected component extraction is performed on the defect target region in each time frame, and morphological thinning is performed based on the region contour of the defect target region to generate a defect skeleton structure corresponding one-to-one with the defect target region, including: S72-1. Perform connected component analysis on the defect target region in each time frame, extract independent defect target regions with an area greater than a preset threshold based on pixel connectivity constraints, and remove isolated noise pixels and small-scale pseudo-defect regions. S72-2. Perform contour extraction on the defect target area, and combine Gaussian filtering and morphological opening and closing operations to smooth the defect boundary contour in order to suppress the boundary jaggedness and breakage caused by reflection and texture interference, and obtain a standardized defect contour. S72-3. Perform morphological thinning based on the standardized defect contour, and perform topological constraint correction on the thinning result to maintain the connectivity of the skeleton structure and the single-pixel width characteristics, thereby obtaining the defect skeleton structure.

8. The online inspection method for aluminum-cased battery pack quality based on machine vision according to claim 5, characterized in that, Spatial matching and relocation are performed on the same defect target region in adjacent time frames. Based on the skeleton structure corresponding to the defect target region, the rate of change of defect region area and the rate of change of skeleton length are calculated to characterize the defect growth rate, including: Spatial matching and relocation of the same defect region in time frame t and time frame t-1 are performed to determine the spatial correspondence of the same defect target in different time frames. Extract time frames respectively Area of ​​the defective region and the length of the skeleton structure and extract time frames Area of ​​the corresponding defect region and the length of the skeleton structure ; Calculate the rate of change of the defect area and the rate of change of skeleton length Its expression is as follows: ; ; in, Used to characterize the degree of area growth or shrinkage of defect regions between adjacent time frames. Used to characterize the extent to which a defect structure extends or contracts along the main extension direction.

Citation Information

Patent Citations

  • Foam box forming quality online regulation and control method and system based on machine vision

    CN122200155A

  • Bridge defect automatic identification method based on deep learning

    CN122222897A