Automatic control method and system for battery film production based on visual inspection
Through visual detection technology and image processing algorithms, defects of battery films are automatically identified and process parameters are optimized, which solves the problems of low defect detection efficiency and unsatisfactory process optimization effects in battery film production, and realizes high-precision film quality control and production line automation .
Patent Information
- Application Number
- CN202411303247.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the production process of battery film, due to the complex process and changing environment, defects are prone to occur on the surface of the film, such as scratches, pinholes, and unevenness, resulting in battery quality and safety hazards. The existing detection efficiency is low and the accuracy is not high, and the defect cause analysis depends on Experience lacks theoretical guidance.
Using an automated control method based on vision detection, the industrial vision camera combines multi-view stereo imaging technology, uses wavelet transform, Fourier Merlin transform and Francisco filtering algorithm for image processing, extracts the geometric features and defect characteristics of the film, and constructs defects. The detection model combines process parameters and defect type distribution rules to generate defect distribution maps and confidence, and optimizes process parameters through the knowledge base inference engine to achieve real-time closed-loop control.
It improves the battery film detection accuracy and the automation level of the production line, reduces defect occurrence, optimizes process parameters, improves the quality and stability of film products, and achieves a seamless connection from defect perception to production control.
Smart Images

Figure CN119229372A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of production control, and in particular to a battery thin film production automation control method and system based on visual detection. Background Art
[0002] Battery film is one of the key materials for new chemical power sources such as lithium-ion batteries. The performance of battery film directly affects the comprehensive performance indicators of the battery, such as capacity, rate, and cycle life. In the production process of battery film, due to the influence of factors such as complex process and changing environment, scratches, pinholes, unevenness and unevenness are easy to appear on the surface of the film, which seriously affects the quality of the film and even causes safety hazards such as battery short circuit.
[0003] At present, battery thin film defect detection mainly adopts manual visual inspection and offline sampling, which has problems such as low detection efficiency, low accuracy and poor consistency. At the same time, the cause analysis of defects and adjustment of process parameters mainly rely on the experience of on-site engineers, which often lack theoretical guidance and data support, and the optimization effect is not ideal.
[0004] Therefore, a solution is urgently needed to solve the problems existing in the prior art. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for automated control of battery thin film production based on visual inspection, which can at least solve some of the problems existing in the prior art.
[0006] A first aspect of an embodiment of the present invention provides a battery thin film production automation control method based on visual inspection, comprising:
[0007] The thin film images in the production process of the battery thin film are collected by using a pre-set industrial visual camera in combination with multi-view stereo imaging technology, the features of the thin film images at different scales are extracted by a multi-resolution decomposition algorithm based on wavelet transform, and the images are fused in combination with an average weighted strategy to generate a fused thin film image, and denoised by using an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, the homography matrix of the denoised multi-view thin film image is estimated, feature points are extracted and a feature point matching relationship is constructed, and the erroneous point pairs are removed by combining a random sampling consistency algorithm, the homography transformation matrix between images of different view angles is estimated, geometric correction is performed based on the homography transformation matrix, and the corrected image is sub-pixel aligned by an image registration method based on Fourier Mellin transform to obtain a registered image;
[0008] For the registered image, based on the improved Franchi filter algorithm, edge enhancement is performed by calculating the eigenvalues of the Hessian matrix at multiple scales, the edge area is repaired in combination with morphological operations and the edge contour of the film is obtained by segmentation through an adaptive threshold segmentation algorithm, three-dimensional reconstruction of the multi-view film edge is performed based on the triangulation principle, the three-dimensional point cloud coordinates are solved by the bundle adjustment optimization method and the three-dimensional contour model of the film is reconstructed, the geometric features are extracted and the geometric feature subsets are obtained by screening through the feature selection algorithm, a film defect detection model is constructed by a transfer learning algorithm, and a film defect distribution map and defect confidence are obtained by forward propagation in combination with the film production process parameters and the defect type distribution law;
[0009] The film defect distribution map and defect confidence are correlated with the current production process, a feature mapping model is constructed and the causes and influencing factors of different types of defects are determined, a defect knowledge base is generated and the corresponding process parameter optimization strategies are matched to different types of defects through the knowledge base reasoning engine, dynamic instructions are generated and sent to the workstation control unit, the workstation control unit operates according to the dynamic instructions, and the operating data of different workstation control units are monitored in real time. With process quality and equipment health level as constraints, closed-loop feedback control is performed through an adaptive intelligent control algorithm to obtain the current optimal control solution.
[0010] In an optional embodiment,
[0011] The thin film images in the production process of battery thin films are collected by pre-set industrial visual cameras combined with multi-view stereo imaging technology. The features of the thin film images at different scales are extracted by a multi-resolution decomposition algorithm based on wavelet transform. The fusion is combined with an average weighted strategy to generate a fused thin film image and denoise it by an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, including:
[0012] Install multiple industrial vision cameras at the workstations of the battery thin film production line, perform multi-view imaging based on multi-view stereo imaging technology and external synchronous trigger signals, obtain thin film images during the battery thin film production process, and combine the thin film images according to the time series to obtain the original thin film image sequence;
[0013] For each film image in the original film image sequence, a wavelet basis function is selected, and a two-dimensional discrete wavelet transform is performed according to the selected wavelet basis function. The film image is recursively low-pass filtered and high-pass filtered to obtain approximate coefficients and detail coefficients. The number of decomposition layers is modified and controlled in combination with the multi-scale characteristics of the wavelet transform to obtain wavelet coefficients at different frequency bands and spatial scales. At each scale, the wavelet coefficients are threshold processed to obtain structural features at the current scale. Sub-band images at different scales are reconstructed by inverse wavelet transform. For sub-band images at different scales at each viewing angle, a clarity mapping matrix is obtained by calculating a clarity index, and a viewing angle difference mapping matrix is obtained by calculating a viewing angle difference index. A weight mapping matrix is constructed based on the clarity mapping matrix and the viewing angle difference mapping matrix, and a fusion weight is assigned to the sub-band image at each viewing angle. Sub-band images at different viewing angles at the same scale are weighted averaged pixel by pixel based on the fusion weight. The sub-band images after weighted average are inverse wavelet transformed to reconstruct the fused film image after fusion.
[0014] The fused film image is represented as a discrete function, and a total variation regularization model is obtained by constructing a total variation regularization energy functional. A bilateral filtering term is added to the total variation regularization model, and the spatial kernel and gray value kernel of the bilateral filter are adaptively adjusted. The total variation regularization model is iteratively solved in combination with a gradient descent algorithm. In each iteration, the gradients of the data fidelity term and the smoothing regularization term in the total variation regularization energy functional are calculated, and the gradients are smoothed in combination with bilateral filtering. The current solution is updated according to the direction of the smoothed gradient, and the update is repeated until a preset maximum number of iterations is reached to obtain a denoised multi-view film image.
[0015] In an optional embodiment,
[0016] The homography matrix of the denoised multi-view film image is estimated, feature points are extracted and matching relationships of feature points are constructed, and the erroneous point pairs are removed by combining the random sampling consistency algorithm, and the homography transformation matrix between images of different view angles is estimated. Geometric correction is performed based on the homography transformation matrix, and the corrected image is aligned at the sub-pixel level by the image registration method based on Fourier-Mellin transform to obtain the registered image including:
[0017] Performing scale-invariant feature transformation feature extraction on the denoised multi-view film image, detecting the first key point that is invariant to the view angle, constructing a scale space through a Gaussian difference pyramid and obtaining position information and direction information by detecting extreme points at different scales, accurately locating and assigning directions to the first key point based on the position information and the direction information, extracting the local image block corresponding to the first key point, and calculating the scale-invariant feature transformation descriptor;
[0018] Based on the scale-invariant feature transform descriptor, feature point matching is performed on sub-band images of different viewing angles through a nearest neighbor ratio test. For each first key point, the Euclidean distance with all first key points in the sub-band images of different viewing angles is calculated, the nearest neighbor and the second nearest neighbor are selected and the ratio is calculated, matching point pairs are screened according to a preset ratio threshold, and the external points are removed in combination with a random sampling consistency algorithm to obtain high-quality point pairs. Based on the high-quality point pairs, the homography matrix between multi-view sub-band images is estimated and the homography matrix is optimized by minimizing the reprojection error to obtain a homography transformation matrix. Based on the homography transformation matrix, the multi-view film image is projected and transformed, the transformed image is resampled, and a corrected image is obtained in combination with a bicubic interpolation algorithm.
[0019] For the corrected multi-view film image, a reference view image is selected, and the multi-view film images except the reference view image are converted from spatial domain images to frequency domain representations through Fourier transform, a Fourier spectrum is generated, and the translation amount between the current multi-view film image and the reference view image is estimated through frequency domain phase correlation technology, and the translation amount of the current multi-view film image in the horizontal and vertical directions is calculated by combining the translation invariance of Fourier transform and the phase information of the Fourier spectrum, and translation registration is performed according to the translation amount;
[0020] A Mellin transform is performed on the multi-view film image after translational registration, and the image is mapped from a Cartesian coordinate system to a logarithmic polar coordinate system to generate a Mellin spectrum. The rotation angle and scale factor are determined based on the scale invariance of the Mellin transform by analyzing the phase correlation of the Mellin spectrum. Based on the rotation angle, scale factor and translation amount, the multi-view film image is transformed and resampled, and the registered image is obtained by sub-pixel alignment.
[0021] In an optional embodiment,
[0022] The rotation angle and scale factor are determined based on the scale invariance of the Mellin transform as shown in the following formula:
[0023]
[0024] Among them, △θ represents the rotation angle change of the image to be registered relative to the reference image, △logs represents the logarithm of the scale change of the image to be registered relative to the reference image, It means to find the best combination of rotation angle and logarithmic scale, where the best combination means that the expression reaches the maximum value under the given rotation angle and scale. represents the inverse Mellin transform, represents the Mellin transformation, M f (θ, logρ) represents the Mellin transform of the reference image f(x, y), M g(θ, logρ) represents the Mellin transform of the image to be registered g(x, y), represents the complex conjugate part of the Mellin transform of the image to be registered, represents the weighting function in the Mellin transform domain, and ρ represents the radial distance of the image in the polar coordinate system.
[0025] In an optional embodiment,
[0026] For the registered image, based on the improved Franchi filter algorithm, edge enhancement is performed by calculating the eigenvalues of the Hessian matrix at multiple scales, the edge area is repaired in combination with morphological operations and the edge contour of the film is obtained by segmentation through an adaptive threshold segmentation algorithm, three-dimensional reconstruction of the multi-view film edge is performed based on the triangulation principle, the three-dimensional point cloud coordinates are solved by the bundle adjustment optimization method and the three-dimensional contour model of the film is reconstructed, the geometric features are extracted and the geometric feature subsets are obtained by screening through the feature selection algorithm, the film defect detection model is constructed by the transfer learning algorithm, and the film production process parameters and the defect type distribution law are combined, and the film defect distribution map and defect confidence are obtained by forward propagation, including:
[0027] For the registered image, hierarchical decomposition is performed through a guided filtering algorithm to generate a preprocessed image and the Hessian matrix of the preprocessed image at multiple scales is calculated through an improved Franchi filtering algorithm, for each pixel point, the second-order partial derivatives at different scales are calculated and a first filter matrix is generated, the first filter eigenvalue and the second filter eigenvalue corresponding to the first filter matrix are calculated, a structural characteristic measure and a structural significance measure are constructed, a filter enhancement function is constructed based on the first filter eigenvalue and the second filter eigenvalue, a parameter value in the filter enhancement function is adaptively adjusted based on local contrast, and the edge enhancement of the registered image is performed through the adaptively adjusted filter enhancement function;
[0028] For the registered image after edge enhancement, the broken edges are filled by morphological closing operation, and the isolated noise points and pseudo responses are removed by morphological opening operation of the filled image, a rough edge contour is generated, and the rough edge contour is refined by a skeletonization algorithm to obtain an initial edge contour. For the initial edge contour, the inter-class variance is calculated based on the global grayscale histogram corresponding to the registered image after edge enhancement by an improved adaptive threshold segmentation algorithm, and the pre-set threshold area is dynamically adjusted based on the local contrast information to maximize the inter-class variance, and the film edge contour is extracted by combining the gradient-based contour detection method;
[0029] Based on the edge contour of the film under different viewing angles, edge feature points in the edge contour of the film are identified and matched through edge detection. Based on the principle of triangulation, the three-dimensional coordinates of the edge feature points are calculated in combination with camera parameters to generate three-dimensional points. In combination with the bundle adjustment optimization method, the coordinates of the three-dimensional points are optimized by minimizing the projection error between the three-dimensional points and the actual observation points. At the same time, the camera position and internal and external parameters are correspondingly optimized to obtain the optimized three-dimensional point coordinates. The three-dimensional points are repeatedly generated and optimized to obtain a three-dimensional point cloud. A three-dimensional contour model corresponding to the film is generated through a surface reconstruction algorithm. Geometric features are extracted from the three-dimensional contour model, wherein the geometric features include the curvature, length and thickness of the edge of the film. The geometric features are selected according to a pre-set selection criterion through a feature selection algorithm to obtain a subset of the geometric features.
[0030] According to a pre-selected defect detection data set, pre-training is performed through a transfer learning algorithm to generate an initial defect detection model and the geometric feature subset is added to the initial defect detection model. Parameters are optimized in combination with real data collected from the film production line to obtain a film defect detection model. Based on the temperature, tension and thickness in the film production process and in combination with known defect type distribution laws, a film defect distribution map is obtained through forward propagation. For each defect in the film defect distribution map, the corresponding confidence is calculated and output as a defect confidence, wherein the known defect type distribution laws include scratch distribution laws, bubble distribution laws and crack distribution laws.
[0031] In an optional embodiment,
[0032] Based on the first filtering eigenvalue and the second filtering eigenvalue, a filtering enhancement function is constructed as shown in the following formula:
[0033]
[0034] Among them, E(x, y) represents the filter enhancement function value, α represents the weight coefficient, σ represents the standard deviation of the Gaussian kernel, I(x, y) represents the pixel value of the original image at the coordinate (x, y), γ represents the sensitivity control parameter, and β represents the offset control parameter.
[0035] In an optional embodiment,
[0036] The film defect distribution map and defect confidence are correlated with the current production process, a feature mapping model is constructed and the causes and influencing factors of different types of defects are determined, a defect knowledge base is generated, and the corresponding process parameter optimization strategies are matched to different types of defects through the knowledge base reasoning engine, and dynamic instructions are generated and sent to the station control unit. The station control unit operates according to the dynamic instructions, monitors the operating data of different station control units in real time, and performs closed-loop feedback control through an adaptive intelligent control algorithm with process quality and equipment health level as constraints. The current optimal control solution includes:
[0037] Performing a connected domain analysis on the film defect distribution map, extracting the morphological features corresponding to each defect area and calculating the geometric center coordinates of each defect area, mapping the defect area to the actual physical size, performing a statistical analysis on the defect features in each defect area, clustering the samples to be classified in combination with a density-based spatial clustering algorithm, dividing the defect types, and for each defect type, statistically analyzing the defect indicators per unit time through a sliding time window to generate a defect time series, determining the correlation between the defect time series and the process parameters based on the Pearson correlation coefficient, and identifying the key process parameters corresponding to the current defect;
[0038] A multivariate feature space is constructed based on the key process parameters, wherein each point in the multivariate feature space contains defect features and process parameters, a feature mapping model is constructed based on the multivariate feature space, for the feature mapping model, a training set is generated according to historical defect cases, the training set is used as input for training, hyperparameters in the feature mapping model are adjusted, defect occurrence is used as a dependent variable, process parameters are used as independent variables, whether the process parameters are Granger causes of defects are determined by a Granger causality test algorithm, the defect type and process parameters are used as network nodes, a directed acyclic graph is generated, and conditional probability distribution is determined for each network node based on expert knowledge, the network structure and parameters are learned by a maximum likelihood estimation algorithm, a network causal model is obtained, defect occurrence is used as a latent variable, the process parameters are used as observed variables, a measurement model is constructed and a causal relationship between variables is assumed, the latent variable score is calculated by partial least squares method and the hyperparameters of the measurement model are determined, based on the measurement model and the network causal model, in combination with physical and chemical principles, the intrinsic reasons why the process parameters affect defect formation are analyzed, the intrinsic reasons are sorted out, and a causal relationship map is generated;
[0039] Based on the causal relationship graph, core concepts, hierarchical relationships, attributes corresponding to the core concepts, and semantic relationships between the core concepts are defined, and defect generation rules and defect influencing factors are constructed through ontology language and rule language to obtain the defect knowledge base;
[0040] Based on the defect knowledge base, the corresponding defect type is derived according to the defect feature through the knowledge base reasoning engine, the similarity between the current defect feature and the defect feature in the defect knowledge base is calculated, and it is determined whether the similarity is greater than a preset similarity threshold. If it is greater, the defect features in the defect knowledge base are sorted in descending order according to the similarity, the first three defect features are selected and the corresponding process parameter optimization strategies are obtained. If it is not greater than the preset similarity threshold, the current defect feature is taken as a new type, and reasoning is performed through the inductive logic programming algorithm to generate inductive rules and perform coverage detection to obtain the most likely cause corresponding to the current defect feature, and the process parameter optimization strategy is configured according to the most likely cause;
[0041] Based on the process parameter optimization strategy, dynamic instructions are generated and sent to the workstation control unit. The workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
[0042] A second aspect of an embodiment of the present invention provides a battery thin film production automation control system based on visual inspection, comprising:
[0043] The first unit is used to collect thin film images in the production process of battery thin films by using a pre-set industrial visual camera in combination with multi-view stereo imaging technology, extract the features of the thin film images at different scales by using a multi-resolution decomposition algorithm based on wavelet transform, fuse them in combination with an average weighted strategy, generate a fused thin film image, and perform denoising by using an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, perform homography matrix estimation on the denoised multi-view thin film image, extract feature points and construct feature point matching relationships, remove erroneous point pairs in combination with a random sampling consistency algorithm, estimate the homography transformation matrix between images of different viewpoints, perform geometric correction based on the homography transformation matrix, perform sub-pixel alignment on the corrected image by using an image registration method based on Fourier Mellin transform, and obtain a registered image;
[0044] The second unit is used for performing edge enhancement on the registered image based on an improved Franchi filter algorithm by calculating the eigenvalues of the Hessian matrix at multiple scales, repairing the edge area in combination with morphological operations and segmenting the film edge contour through an adaptive threshold segmentation algorithm, reconstructing the multi-view film edge in three dimensions based on the triangulation principle, solving the three-dimensional point cloud coordinates and reconstructing the three-dimensional contour model of the film through a bundle adjustment optimization method, extracting geometric features and obtaining a geometric feature subset through a feature selection algorithm, constructing a film defect detection model through a transfer learning algorithm, and obtaining a film defect distribution map and defect confidence through forward propagation in combination with film production process parameters and defect type distribution laws;
[0045] The third unit is used to correlate and analyze the film defect distribution map and defect confidence with the current production process, build a feature mapping model and determine the causes and influencing factors of different types of defects, generate a defect knowledge base and match different types of defects with corresponding process parameter optimization strategies through the knowledge base reasoning engine, generate dynamic instructions and send them to the workstation control unit, the workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
[0046] According to a third aspect of the embodiments of the present invention,
[0047] An electronic device is provided, comprising:
[0048] processor;
[0049] a memory for storing processor-executable instructions;
[0050] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0051] According to a fourth aspect of the embodiments of the present invention,
[0052] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0053] In the present invention, edge detection and morphological processing are used to extract the contour of the film, and the three-dimensional morphological features of the film surface are obtained through three-dimensional reconstruction, so that the common defect types can be accurately identified and located. Based on statistical laws and expert experience, a defect knowledge base is generated, and structured defect knowledge and unstructured descriptive knowledge are fused and stored, which is convenient for knowledge management, retrieval and reuse. Adaptive control algorithm is used to realize closed-loop feedback. Under the premise of meeting quality constraints and equipment health level requirements, the optimal parameter combination is searched in real time to guide the dynamic optimization of the production process and reduce the occurrence of defects. The defect detection rate is improved by intelligent means, and missed detection and misjudgment are reduced. At the same time, the production process is optimized and the generation of defects is suppressed, which can effectively improve the quality level and stability of thin film products. In summary, the present invention provides an intelligent solution for online defect detection and process optimization in battery thin film production, makes full use of multi-source heterogeneous data, combines data-driven with knowledge-driven, breaks through the limitations of traditional methods, and realizes seamless connection from defect perception, diagnosis to production control. It has significant effects in improving detection accuracy, optimizing process quality, reducing costs and increasing efficiency, and is of great value in promoting intelligent manufacturing of thin films. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flow chart of a battery thin film production automation control method based on visual inspection according to an embodiment of the present invention;
[0055] Figure 2 It is a schematic diagram of the structure of a battery thin film production automation control system based on visual inspection according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0058] Figure 1 FIG. 1 is a flow chart of an automated control method for producing a battery thin film based on visual inspection according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0059] S1. Use a pre-set industrial visual camera and multi-view stereo imaging technology to collect thin film images in the production process of battery thin films, extract the features of the thin film images at different scales through a multi-resolution decomposition algorithm based on wavelet transform, fuse them in combination with an average weighted strategy, generate a fused thin film image, and perform denoising through an iterative optimization denoising algorithm that combines total variation regularization and bilateral filtering, estimate the homography matrix of the denoised multi-view thin film image, extract feature points and construct a feature point matching relationship, remove erroneous point pairs in combination with a random sampling consistency algorithm, estimate the homography transformation matrix between images of different viewpoints, perform geometric correction based on the homography transformation matrix, perform sub-pixel alignment on the corrected image through an image registration method based on Fourier Mellin transform, and obtain a registered image;
[0060] The industrial vision camera is an image acquisition device specially used in industrial environments, and has the characteristics of high speed, high precision, and strong stability. The multi-view stereo imaging technology uses the principle of stereo vision to perform three-dimensional reconstruction and depth estimation by taking multiple images from different angles. The wavelet transform is a multi-resolution analysis tool that can decompose an image into low-frequency and high-frequency components of different scales, and extract the global information and detail information of the image respectively. The average weighted strategy performs weighted averaging on pixel values with different weights, and is often used in image fusion and denoising to ensure that the influence of noise is reduced while retaining details. The total variation regularization is a denoising method that aims to reduce noise in an image while maintaining edge details. The bilateral filtering is a filtering method that simultaneously considers the difference in pixel spatial position and grayscale value. The method can retain the edge information of the image while removing noise. The iterative optimization denoising algorithm is a denoising method that gradually optimizes the image through an iterative process, and is often combined with a variety of regularization techniques. The homography matrix describes the transformation relationship from one plane to another, and is usually used for image registration and plane transformation in stereo vision. The homography transformation matrix is used to project an image into the plane of another image for image registration and image stitching. The Fourier-Mellin transform is an image registration method that converts the image to the frequency domain and performs scale, rotation and translation invariance analysis to achieve precise alignment of the image. The sub-pixel alignment is an advanced technology for image registration. Through a sophisticated interpolation algorithm, the alignment accuracy between images can reach a fractional level of pixels, thereby improving the alignment effect.
[0061] In an optional embodiment,
[0062] The thin film images in the production process of battery thin films are collected by pre-set industrial visual cameras combined with multi-view stereo imaging technology. The features of the thin film images at different scales are extracted by a multi-resolution decomposition algorithm based on wavelet transform. The fusion is combined with an average weighted strategy to generate a fused thin film image and denoise it by an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, including:
[0063] Install multiple industrial vision cameras at the workstations of the battery thin film production line, perform multi-view imaging based on multi-view stereo imaging technology and external synchronous trigger signals, obtain thin film images during the battery thin film production process, and combine the thin film images according to the time series to obtain the original thin film image sequence;
[0064] For each film image in the original film image sequence, a wavelet basis function is selected, and a two-dimensional discrete wavelet transform is performed according to the selected wavelet basis function. The film image is recursively low-pass filtered and high-pass filtered to obtain approximate coefficients and detail coefficients. The number of decomposition layers is modified and controlled in combination with the multi-scale characteristics of the wavelet transform to obtain wavelet coefficients at different frequency bands and spatial scales. At each scale, the wavelet coefficients are threshold processed to obtain structural features at the current scale. Sub-band images at different scales are reconstructed by inverse wavelet transform. For sub-band images at different scales at each viewing angle, a clarity mapping matrix is obtained by calculating a clarity index, and a viewing angle difference mapping matrix is obtained by calculating a viewing angle difference index. A weight mapping matrix is constructed based on the clarity mapping matrix and the viewing angle difference mapping matrix, and a fusion weight is assigned to the sub-band image at each viewing angle. Sub-band images at different viewing angles at the same scale are weighted averaged pixel by pixel based on the fusion weight. The sub-band images after weighted average are inverse wavelet transformed to reconstruct the fused film image after fusion.
[0065] The fused film image is represented as a discrete function, and a total variation regularization model is obtained by constructing a total variation regularization energy functional. A bilateral filtering term is added to the total variation regularization model, and the spatial kernel and gray value kernel of the bilateral filter are adaptively adjusted. The total variation regularization model is iteratively solved in combination with a gradient descent algorithm. In each iteration, the gradients of the data fidelity term and the smoothing regularization term in the total variation regularization energy functional are calculated, and the gradients are smoothed in combination with bilateral filtering. The current solution is updated according to the direction of the smoothed gradient, and the update is repeated until a preset maximum number of iterations is reached to obtain a denoised multi-view film image.
[0066] The two-dimensional discrete wavelet transform is a method for decomposing an image into low-frequency and high-frequency components. The approximate coefficient and detail coefficient of the image are obtained by low-pass filtering and high-pass filtering respectively. The low-pass filtering retains the overall characteristics and large structure of the image, while the high-pass filtering extracts the edges and details in the image. The approximate coefficient represents the low-frequency component of the image and reflects the large-scale structure of the image. The detail coefficient represents the high-frequency component and reflects the details and edges of the image. The scale characteristic means that the wavelet transform can analyze the characteristics of the image at different scales. The control of the number of decomposition layers refers to the number of decompositions performed in the wavelet transform. The more layers, the higher the resolution. The threshold processing is a denoising method. By setting a threshold, the detail coefficients smaller than the threshold are set to zero, thereby reducing noise. The sub-band image means that the image after wavelet decomposition is divided into multiple frequency sub-bands, which respectively represent different frequency components of the image, such as low-frequency approximate image and high-frequency detail image. The clarity mapping matrix is used to describe the clarity information of the image, usually in image enhancement. The perspective difference mapping matrix is used in the process of strengthening and deblurring. The perspective difference mapping matrix is used to describe the difference between different perspectives in multi-perspective imaging, and helps correct the geometric deformation between images. The weight mapping matrix refers to the weight value of each pixel of different images in the image fusion process, which is usually weighted averaged according to the importance of the pixel. The pixel-by-pixel weighted average refers to assigning different weights to each pixel in the image, and then averaging them to obtain a smooth result. The total variation regularization energy functional is the objective function in the total variation regularization. By optimizing this functional, the edge structure of the image can be retained while eliminating noise. The bilateral filtering term is used in image processing to smooth the image while retaining the edge, and is often used as a sub-item of denoising and enhancement. The spatial kernel is a measure of similarity used to describe the spatial distribution of image pixels. The gray value kernel is used to measure the similarity of pixel gray values in the image. The data fidelity term is used to ensure that the processed image remains as similar to the original image as possible to avoid excessive smoothing or distortion.
[0067] Install multiple industrial vision cameras at the workstations of the battery thin film production line, use an external synchronous trigger signal to trigger all cameras for image acquisition at the same time, obtain multi-perspective thin film images in the battery thin film production process based on multi-perspective stereo imaging technology, combine multi-perspective thin film images according to the time series, and obtain the original thin film image sequence. For each image in the original thin film image sequence, select a suitable wavelet basis function, such as the db4 wavelet basis, and use the selected wavelet basis function to perform a two-dimensional discrete wavelet transform on each thin film image. Recursively perform low-pass filtering and high-pass filtering on the thin film image to obtain the approximate coefficient and detail coefficient. According to the multi-scale characteristics of the wavelet transform, control the number of decomposition layers, such as 3 or 4 layers, to obtain different frequency bands and wavelet coefficients at spatial scales, at each scale, threshold processing is performed on the wavelet coefficients to obtain the structural features at the current scale, and sub-band images at different scales are reconstructed by inverse wavelet transform, and clarity index is calculated for sub-band images of different scales at each viewing angle to obtain a clarity mapping matrix, and the viewing angle difference index between sub-band images of different viewing angles is calculated to obtain a viewing angle difference mapping matrix, and a weight mapping matrix is constructed based on the clarity mapping matrix and the viewing angle difference mapping matrix to assign fusion weights to sub-band images of each viewing angle, and at the same scale, pixel-by-pixel weighted averaging is performed on sub-band images of different viewing angles, and inverse wavelet transform is performed on the sub-band images after weighted averaging to reconstruct a fused film image;
[0068] The fused film image is represented as a discrete function, a total variation regularization energy functional is constructed, and a total variation regularization model is obtained. A bilateral filtering term is added to the total variation regularization model, and the spatial kernel and gray value kernel of the bilateral filter are adaptively adjusted. The total variation regularization model is iteratively solved using a gradient descent algorithm. In each iteration, the gradients of the data fidelity term and the smoothing regularization term in the total variation regularization energy functional are calculated, and the gradients are smoothed in combination with bilateral filtering. The current solution is updated according to the direction of the smoothed gradient, and the update is repeated until the preset maximum number of iterations is reached to obtain a denoised multi-view film image.
[0069] For example, it is assumed that three industrial cameras are installed on a lithium battery diaphragm production line, which are located above, on the left and on the right of the production line respectively. The three cameras are synchronously triggered by an external trigger signal to obtain multi-view images of the diaphragm production process. The acquired images are combined in time series to obtain a set of original diaphragm image sequences. For each original diaphragm image, the db4 wavelet basis function is selected to perform a three-layer two-dimensional discrete wavelet transform. At each scale, the wavelet coefficients are thresholded to extract structural features, and the sub-band images at three scales are reconstructed by inverse wavelet transform. For each viewing angle, Sub-band images, calculate clarity index and perspective difference index, build a weight mapping matrix, at the same scale, perform weighted averaging on the sub-band images of three perspectives, and then perform inverse wavelet transform to obtain the fused diaphragm image, represent the fused diaphragm image as a discrete function, build a total variation regularization model, add bilateral filtering terms, use the gradient descent algorithm to iterate the model 100 times, in each iteration, calculate the gradient and smooth it with bilateral filtering, update the current solution according to the smoothed gradient, and finally obtain the denoised multi-perspective diaphragm image for subsequent defect detection and quality analysis.
[0070] In this embodiment, by installing multiple industrial vision cameras on the production line and using external synchronous triggering, multi-view images in the production process of the battery thin film can be obtained, providing more comprehensive thin film surface information, which is helpful for subsequent defect detection and quality analysis. The thin film image is decomposed at multiple scales using wavelet transform, and the structural features of the image can be extracted at different frequency bands and spatial scales, effectively representing the local and global information of the image. The sub-band images of different perspectives are weighted averaged to obtain a fused high-quality thin film image, which contains comprehensive information from multiple perspectives and improves the clarity and information richness of the image. The total variation regularization model can remove image noise while retaining important structure and edge information of the image by balancing the data fidelity term and the smoothing regularization term, thereby achieving high-quality image denoising. The model is iteratively solved using the gradient descent algorithm, and the gradient is smoothed in combination with bilateral filtering, which can effectively suppress noise while maintaining the details and clarity of the image. In summary, this embodiment can obtain high-quality multi-view battery thin film images, the noise in the image is effectively suppressed, and important structure and detail information is retained, providing a reliable image basis for subsequent defect detection, quality analysis and control, and helping to improve the quality management level and production efficiency of the battery thin film production line.
[0071] In an optional embodiment,
[0072] The homography matrix of the denoised multi-view film image is estimated, feature points are extracted and matching relationships of feature points are constructed, and the erroneous point pairs are removed by combining the random sampling consistency algorithm, and the homography transformation matrix between images of different view angles is estimated. Geometric correction is performed based on the homography transformation matrix, and the corrected image is aligned at the sub-pixel level by the image registration method based on Fourier-Mellin transform to obtain the registered image including:
[0073] Performing scale-invariant feature transformation feature extraction on the denoised multi-view film image, detecting the first key point that is invariant to the view angle, constructing a scale space through a Gaussian difference pyramid and obtaining position information and direction information by detecting extreme points at different scales, accurately locating and assigning directions to the first key point based on the position information and the direction information, extracting the local image block corresponding to the first key point, and calculating the scale-invariant feature transformation descriptor;
[0074] Based on the scale-invariant feature transform descriptor, feature point matching is performed on sub-band images of different viewing angles through a nearest neighbor ratio test. For each first key point, the Euclidean distance with all first key points in the sub-band images of different viewing angles is calculated, the nearest neighbor and the second nearest neighbor are selected and the ratio is calculated, matching point pairs are screened according to a preset ratio threshold, and the external points are removed in combination with a random sampling consistency algorithm to obtain high-quality point pairs. Based on the high-quality point pairs, the homography matrix between multi-view sub-band images is estimated and the homography matrix is optimized by minimizing the reprojection error to obtain a homography transformation matrix. Based on the homography transformation matrix, the multi-view film image is projected and transformed, the transformed image is resampled, and a corrected image is obtained in combination with a bicubic interpolation algorithm.
[0075] For the corrected multi-view film image, a reference view image is selected, and the multi-view film images except the reference view image are converted from spatial domain images to frequency domain representations through Fourier transform, a Fourier spectrum is generated, and the translation amount between the current multi-view film image and the reference view image is estimated through frequency domain phase correlation technology, and the translation amount of the current multi-view film image in the horizontal and vertical directions is calculated by combining the translation invariance of Fourier transform and the phase information of the Fourier spectrum, and translation registration is performed according to the translation amount;
[0076] A Mellin transform is performed on the multi-view film image after translational registration, and the image is mapped from a Cartesian coordinate system to a logarithmic polar coordinate system to generate a Mellin spectrum. The rotation angle and scale factor are determined based on the scale invariance of the Mellin transform by analyzing the phase correlation of the Mellin spectrum. Based on the rotation angle, scale factor and translation amount, the multi-view film image is transformed and resampled, and the registered image is obtained by sub-pixel alignment.
[0077] The Gaussian difference pyramid is a method in multi-scale analysis. By performing Gaussian filtering on the image at different scales and then calculating the difference between adjacent scales, the edges and features of the image are extracted. The scale-invariant feature transform descriptor is an algorithm for image feature extraction, which has scale and rotation invariance and can be used for tasks such as image registration and target recognition. The nearest neighbor ratio test is a screening method for feature matching. By comparing the nearest neighbor distance and the next nearest neighbor distance of the matching point, a reliable matching pair is selected. The random sampling consistency algorithm is an algorithm for estimating model parameters. When the data set contains external points, the algorithm can effectively find internal points and perform parameter estimation. It is often used for homography matrix estimation in image registration. The external points refer to data points that do not meet the model assumptions. In image matching, external points are usually wrong matching points. The bicubic interpolation is an image interpolation method. By performing cubic function interpolation on image pixels, it is used for resampling pixel values in the process of image enlargement, reduction and registration. The translation invariance means that some image processing algorithms are not affected by image translation, that is, even if the image is displaced, the algorithm can still correctly identify and match the features in the image.
[0078] The scale-invariant feature transformation feature extraction is performed on the denoised multi-view film image, the scale space is constructed through the Gaussian difference pyramid, the extreme points are detected at different scales, the position information and direction information of the key points are obtained, and the key points are accurately located and the direction is assigned based on the position information and direction information, and the local image blocks corresponding to the key points are extracted, and the scale-invariant feature transformation feature descriptor is calculated. Based on the scale-invariant feature transformation feature descriptor, the feature points of the sub-band images of different viewpoints are matched through the nearest neighbor ratio test. For each key point, the Euclidean distance with all key points in the sub-band images of different viewpoints is calculated, the nearest neighbor and the next nearest neighbor are selected, and the ratio is calculated. The matching point pairs are screened according to the preset ratio threshold, and the random sampling consistency algorithm is used to remove the external points to obtain the high-quality point pairs. Based on the high-quality point pairs, the homography matrix between the multi-view sub-band images is estimated, and the homography matrix is optimized by minimizing the reprojection error to obtain the homography transformation matrix.
[0079] Based on the homography transformation matrix, the multi-view film image is projected and transformed, the transformed image is resampled, and the corrected image is obtained by combining the bicubic interpolation algorithm. An image of one view is selected as the reference view image. For the multi-view film images except the reference view image, the spatial domain is converted into the frequency domain through Fourier transformation to generate the Fourier spectrum. The translation between the current multi-view image and the reference view image is estimated by the frequency domain phase correlation technology. The translation invariance of Fourier transform and the phase information of the spectrum are used to calculate the translation of the current multi-view image in the horizontal and vertical directions. The multi-view images are translationally registered according to the calculated translation. The multi-view film images after translation registration are subjected to the Mellin transformation to map the images from the Cartesian coordinate system to the logarithmic polar coordinate system to generate the Mellin spectrum. By analyzing the phase correlation of the Mellin spectrum, the rotation angle and scale factor are determined based on the scale invariance of the Mellin transform. Based on the rotation angle, scale factor and translation, the multi-view film image is transformed and resampled, and the final registered image is obtained by sub-pixel alignment.
[0080] For example, it is assumed that a group of multi-view images of lithium battery diaphragms after noise reduction are registered, and the scale-invariant feature transformation feature extraction is performed on the image of each view to obtain the position, direction and descriptor of the key point. The key points of the images of different view angles are matched through the nearest neighbor ratio test and the random sampling consistency algorithm to obtain high-quality matching point pairs. Based on the high-quality matching point pairs, the homography matrix between the multi-view images is estimated, and the matrix is optimized by minimizing the reprojection error to obtain the homography transformation matrix. The multi-view images are projected and resampled using the matrix to obtain the corrected image, an image of one view angle is selected as the reference image, and the images of other view angles are Fourier transformed to generate the Fourier spectrum. The translation amount between each view angle image and the reference image is estimated by the frequency domain phase correlation technology, and the translation registration is performed. The image after the translation registration is subjected to the Mellin transformation to generate the Mellin spectrum. The rotation angle and scale factor are determined by analyzing the phase correlation of the spectrum. Based on the rotation angle, scale factor and translation amount, the multi-view images are transformed and resampled, and the final registered image is obtained by sub-pixel alignment.
[0081] In this embodiment, by constructing a scale space through a Gaussian difference pyramid, key points can be detected at different scales, the robustness of feature extraction is improved, and the key points are accurately located and assigned directions, which can accurately describe the position and direction information of the key points and enhance the accuracy of matching. By matching the feature points of images of different viewpoints through the nearest neighbor ratio test, corresponding feature point pairs can be found, and the correspondence between images of different viewpoints can be established to improve the accuracy and robustness of matching. By converting the image from the spatial domain to the frequency domain representation through Fourier transform, the frequency domain phase correlation technology is used to estimate the translation amount between multi-view images, and efficient and accurate translation registration can be achieved. By mapping the image from the Cartesian coordinate system to the logarithmic polar coordinate system through the Mellin transform, the rotation and scale transformation can be converted into translation in the frequency domain, simplifying the registration process. In summary, this embodiment can achieve accurate registration of multi-view battery thin film images, eliminate the influence of viewpoint difference, translation, rotation and scale change on image analysis, and provide a reliable image basis for subsequent defect detection, quality analysis and control, which helps to improve the accuracy of detection and analysis, reduce errors and missed detections, and thus improve the quality management level of battery thin film production lines.
[0082] In an optional embodiment,
[0083] The rotation angle and scale factor are determined based on the scale invariance of the Mellin transform as shown in the following formula:
[0084]
[0085] Among them, △θ represents the rotation angle change of the image to be registered relative to the reference image, △logs represents the logarithm of the scale change of the image to be registered relative to the reference image, It means to find the best combination of rotation angle and logarithmic scale, where the best combination means that the expression reaches the maximum value under the given rotation angle and scale. represents the inverse Mellin transform, represents the Mellin transformation, M f (θ, logρ) represents the Mellin transform of the reference image f(x, y), M g (θ, logρ) represents the Mellin transform of the image to be registered g(x, y), represents the complex conjugate part of the Mellin transform of the image to be registered, represents the weighting function in the Mellin transform domain, and ρ represents the radial distance of the image in the polar coordinate system.
[0086] In this embodiment, by mapping the image from a Cartesian coordinate system to a logarithmic polar coordinate system, the Mellin transform converts the rotation and scale transformation of the image into a translation in the frequency domain, thereby simplifying the registration process. In the Mellin transform domain, the rotation and scale transformation can be represented by a simple translation operation, thereby reducing the computational complexity. By finding the maximum value in the Mellin transform domain, the rotation angle and scale factor can be accurately estimated to achieve high-precision registration. The weighting function can be designed according to the characteristics of the image and application requirements, such as giving higher weights to important areas in the image to reduce the impact of noise and interference. In summary, this embodiment simplifies the registration process, improves the registration accuracy, and has good robustness and applicability. Accurate rotation angle and scale factor estimation ensures the accuracy of the registration results, provides a reliable image basis for subsequent defect detection and quality analysis, and improves the quality management level of the battery thin film production line.
[0087] S2. For the registered image, based on the improved Franchi filtering algorithm, edge enhancement is performed by calculating the eigenvalues of the Hessian matrix at multiple scales, the edge area is repaired in combination with morphological operations, and the edge contour of the film is obtained by segmentation through an adaptive threshold segmentation algorithm, three-dimensional reconstruction of the multi-view film edge is performed based on the triangulation principle, the three-dimensional point cloud coordinates are solved by the bundle adjustment optimization method and the three-dimensional contour model of the film is reconstructed, geometric features are extracted and a geometric feature subset is obtained by screening through a feature selection algorithm, a film defect detection model is constructed by a transfer learning algorithm, and a film defect distribution map and defect confidence are obtained by forward propagation in combination with film production process parameters and defect type distribution law;
[0088] The Franchi filter algorithm is an image processing technology for enhancing linear or tubular structures, and is commonly used for blood vessel detection in medical image analysis. The Hessian matrix is a matrix of second-order partial derivatives, and is commonly used to describe the local curvature of a function. The morphological operation is a type of processing method based on image shape, and is commonly used for edge detection, noise elimination, and morphological feature extraction of binary images and grayscale images. The adaptive threshold segmentation algorithm is an image segmentation technology that dynamically adjusts the threshold. The triangulation principle is a geometric measurement method that calculates the relative position of a third point through two known points and corresponding angles. The bundle adjustment is a nonlinear optimization technology that is commonly used for three-dimensional reconstruction in computer vision. By minimizing the error between the observation point and the projection point, the camera parameters and the position of the 3D point are optimized to improve the reconstruction accuracy.
[0089] In an optional embodiment,
[0090] For the registered image, based on the improved Franchi filter algorithm, edge enhancement is performed by calculating the eigenvalues of the Hessian matrix at multiple scales, the edge area is repaired in combination with morphological operations and the edge contour of the film is obtained by segmentation through an adaptive threshold segmentation algorithm, three-dimensional reconstruction of the multi-view film edge is performed based on the triangulation principle, the three-dimensional point cloud coordinates are solved by the bundle adjustment optimization method and the three-dimensional contour model of the film is reconstructed, the geometric features are extracted and the geometric feature subsets are obtained by screening through the feature selection algorithm, the film defect detection model is constructed by the transfer learning algorithm, and the film production process parameters and the defect type distribution law are combined, and the film defect distribution map and defect confidence are obtained by forward propagation, including:
[0091] For the registered image, hierarchical decomposition is performed through a guided filtering algorithm to generate a preprocessed image and the Hessian matrix of the preprocessed image at multiple scales is calculated through an improved Franchi filtering algorithm, for each pixel point, the second-order partial derivatives at different scales are calculated and a first filter matrix is generated, the first filter eigenvalue and the second filter eigenvalue corresponding to the first filter matrix are calculated, a structural characteristic measure and a structural significance measure are constructed, a filter enhancement function is constructed based on the first filter eigenvalue and the second filter eigenvalue, a parameter value in the filter enhancement function is adaptively adjusted based on local contrast, and the edge enhancement of the registered image is performed through the adaptively adjusted filter enhancement function;
[0092] For the registered image after edge enhancement, the broken edges are filled by morphological closing operation, and the isolated noise points and pseudo responses are removed by morphological opening operation of the filled image, a rough edge contour is generated, and the rough edge contour is refined by a skeletonization algorithm to obtain an initial edge contour. For the initial edge contour, the inter-class variance is calculated based on the global grayscale histogram corresponding to the registered image after edge enhancement by an improved adaptive threshold segmentation algorithm, and the pre-set threshold area is dynamically adjusted based on the local contrast information to maximize the inter-class variance, and the film edge contour is extracted by combining the gradient-based contour detection method;
[0093] Based on the edge contour of the film under different viewing angles, edge feature points in the edge contour of the film are identified and matched through edge detection. Based on the principle of triangulation, the three-dimensional coordinates of the edge feature points are calculated in combination with camera parameters to generate three-dimensional points. In combination with the bundle adjustment optimization method, the coordinates of the three-dimensional points are optimized by minimizing the projection error between the three-dimensional points and the actual observation points. At the same time, the camera position and internal and external parameters are correspondingly optimized to obtain the optimized three-dimensional point coordinates. The three-dimensional points are repeatedly generated and optimized to obtain a three-dimensional point cloud. A three-dimensional contour model corresponding to the film is generated through a surface reconstruction algorithm. Geometric features are extracted from the three-dimensional contour model, wherein the geometric features include the curvature, length and thickness of the edge of the film. The geometric features are selected according to a pre-set selection criterion through a feature selection algorithm to obtain a subset of the geometric features.
[0094] According to a pre-selected defect detection data set, pre-training is performed through a transfer learning algorithm to generate an initial defect detection model and the geometric feature subset is added to the initial defect detection model. Parameters are optimized in combination with real data collected from the film production line to obtain a film defect detection model. Based on the temperature, tension and thickness in the film production process and in combination with known defect type distribution laws, a film defect distribution map is obtained through forward propagation. For each defect in the film defect distribution map, the corresponding confidence is calculated and output as a defect confidence, wherein the known defect type distribution laws include scratch distribution laws, bubble distribution laws and crack distribution laws.
[0095] The structural characteristic measure is used to quantify the degree of structural information in an image, and is usually used in fields such as image enhancement and feature extraction to identify and enhance significant structural features in an image. The structural saliency measure is used to measure whether certain areas in an image are visually significant, and is often used in target detection and image segmentation. The morphological closing operation is an operation of first dilation and then erosion, and is usually used to fill small holes in an image, connect disconnected edges, or eliminate small noise in an image. The morphological opening operation is an operation of first erosion and then dilation, and is mainly used to remove small noise points in an image while retaining the main shape structure. The skeletonization algorithm is used to extract the "skeleton" or center line of an image, and is a technique for simplifying objects in an image into one-dimensional lines. The global grayscale histogram is a distribution map of the grayscale values of all pixels in an image, and is used to analyze the overall contrast and brightness characteristics of an image. The inter-class variance is used to measure the distinction between different categories, and in image segmentation, it is often used as a criterion for determining the optimal segmentation threshold. The local contrast information is used to measure the brightness changes within a small range in an image.
[0096] The registered thin film image is hierarchically decomposed by a guided filtering algorithm to generate a preprocessed image, the Hessian matrix of the preprocessed image is calculated at multiple scales by an improved Franchi filtering algorithm, the second-order partial derivatives at different scales are calculated for each pixel point, a first filter matrix is generated, the first filter eigenvalue and the second filter eigenvalue corresponding to the first filter matrix are calculated, a structural characteristic measure and a structural significance measure are constructed, a filter enhancement function is constructed based on the first filter eigenvalue and the second filter eigenvalue, the parameter value in the filter enhancement function is adaptively adjusted based on the local contrast, and the edge of the registered image is enhanced by the adaptively adjusted filter enhancement function;
[0097] The broken edges of the registered image after edge enhancement are filled by morphological closing operation. The isolated noise points and pseudo responses are removed from the filled image by morphological opening operation to generate a rough edge contour. The rough edge contour is refined by the skeletonization algorithm to obtain the initial edge contour. For the initial edge contour, the inter-class variance is calculated based on the global grayscale histogram corresponding to the registered image after edge enhancement by an improved adaptive threshold segmentation algorithm. The preset threshold area is dynamically adjusted based on the local contrast information to maximize the inter-class variance. The edge contour of the film is extracted by combining the gradient-based contour detection method. Based on the edge contour of the film at different viewing angles, the edge contour of the film is extracted by the edge detection method. Edge detection identifies and matches edge feature points. Based on the principle of triangulation, the three-dimensional coordinates of edge feature points are calculated in combination with camera parameters to generate three-dimensional points. The three-dimensional point coordinates are optimized by minimizing the projection error between the three-dimensional points and the actual observation points in combination with the bundle adjustment optimization method. At the same time, the camera position and internal and external parameters are optimized accordingly. The three-dimensional points are repeatedly generated and optimized to obtain a three-dimensional point cloud. The three-dimensional contour model corresponding to the film is generated through the surface reconstruction algorithm. The geometric features are extracted from the three-dimensional contour model, including the curvature, length and thickness of the film edge. The geometric features are selected according to the preset selection criteria through the feature selection algorithm to obtain a geometric feature subset.
[0098] Based on the pre-selected defect detection data set, pre-training is performed through the transfer learning algorithm to generate an initial defect detection model. The geometric feature subset is added to the initial defect detection model. The parameters are optimized in combination with the real data collected from the film production line to obtain a film defect detection model. Based on the temperature, tension and thickness in the film production process and the known defect type distribution law, a film defect distribution map is obtained through forward propagation. For each defect in the film defect distribution map, the corresponding confidence is calculated and output as the defect confidence.
[0099] Exemplarily, assuming that there is a grayscale image of a battery film with a size of 1024×1024, which contains some defects such as scratches, bubbles and cracks, the guided filtering algorithm is used to decompose the image into 5 layers to obtain pre-processed images with sizes of 512×512, 256×256, 128×128, 64×64 and 32×32, respectively. For each pre-processed image, the improved Franchi filtering algorithm is used to calculate the Hessian matrix at three scales, and for each pixel, the second-order partial derivatives at three scales are calculated to generate a first filter matrix with a size of 3×3, calculate two eigenvalues of the first filter matrix, construct a structural characteristic measure and a structural significance measure, construct a filter enhancement function, adaptively adjust the parameters according to the local contrast C, and use the adaptively adjusted filter enhancement function to perform edge enhancement on the original image to obtain an enhanced image;
[0100] Perform morphological closing operation on the enhanced image, use 3×3 square structure element, iterate 3 times, fill the broken edges, perform morphological opening operation on the filled image, use 5×5 circular structure element, iterate 2 times, remove isolated noise and pseudo response, obtain rough edge contour, use skeletonization algorithm to refine the rough edge contour, obtain the initial edge contour, calculate the global grayscale histogram of the enhanced image, use the improved adaptive threshold segmentation algorithm, the initial threshold is set to the average grayscale value, the threshold adjustment step is 8, according to the local contrast information, limit the threshold adjustment range to [average grayscale value -24, average grayscale value +24], determine the optimal threshold by maximizing the inter-class variance, perform gradient calculation on the enhanced image, and perform edge detection in combination with the optimal threshold to extract the final film edge contour;
[0101] The film images are acquired from three different viewing angles (front, 45° left, and 45° right), and their respective edge contours are extracted. The feature points on the edge contours are detected and matched to obtain about 200 pairs of matching points. The 3D coordinates of the matching points are calculated using the triangulation principle according to the camera calibration parameters to generate 3D points. The bundle adjustment optimization method is used with 0.1 pixels as the error threshold. The 3D point coordinates and camera pose parameters are optimized 10 times after iteration. The matching and optimization are repeated to accumulate about 5,000 3D points to form a sparse point cloud. The point cloud is meshed using the Poisson surface reconstruction algorithm to obtain a 3D contour model containing about 10,000 triangular facets. Geometric features are extracted from the 3D contour model: the average curvature is 0.15, the perimeter is 1,200 pixels, and the average thickness is 20 pixels. The recursive feature elimination algorithm is used with the average curvature and perimeter as the selected features to obtain a geometric feature subset. The algorithm contains 1 The algorithm is pre-trained on a dataset of 3000 defect images (300 each of scratches, bubbles and cracks, and 100 normal images). The initial defect detection model is obtained through transfer learning, and the geometric feature subset is added to the initial model. 500 images are collected on the production line for parameter fine-tuning. The batch size is 16, the learning rate is 0.001, and 50 samples are trained to obtain the final defect detection model. In actual production, according to the current process parameters (temperature 350℃, tension 20N, thickness 10μm) and defect distribution law (scratches: 40%, bubbles: 30%, cracks: 30%), the trained model is used to perform forward reasoning on the film image to obtain the defect distribution map. The detected defective areas are screened according to the confidence threshold of 0.8 to obtain the final defect detection result. A total of 12 defects are detected, including 5 scratches, 4 bubbles and 3 cracks, with an average confidence of 0.92.
[0102] In this embodiment, the guided filtering algorithm performs hierarchical decomposition on the image and extracts structural information at different scales, which is helpful for subsequent multi-scale edge extraction, constructs a filtering enhancement function, and adaptively adjusts parameters according to local contrast. It can enhance edges while retaining details, thereby improving the detectability of edges. The feature extraction capability of the pre-trained model is utilized through transfer learning to accelerate the convergence of the model, improve detection accuracy, and extract geometric features such as curvature, length, thickness, etc. from the three-dimensional model, providing important criteria for subsequent defect detection. In summary, this embodiment realizes the complete process from the original thin film image to the accurate defect detection result, which greatly improves the automation level and detection performance of battery thin film defect detection, and provides a strong guarantee for the quality control of battery production.
[0103] In an optional embodiment,
[0104] Based on the first filtering eigenvalue and the second filtering eigenvalue, a filtering enhancement function is constructed as shown in the following formula:
[0105]
[0106] Among them, E(x, y) represents the filter enhancement function value, α represents the weight coefficient, σ represents the standard deviation of the Gaussian kernel, I(x, y) represents the pixel value of the original image at the coordinate (x, y), γ represents the sensitivity control parameter, and β represents the offset control parameter.
[0107] In this embodiment, the adaptive mechanism can effectively enhance local edge features while retaining the overall structure of the image. The gradient reflects the rate of change of image pixels in each direction. The larger the gradient value, the higher the edge strength. By introducing the gradient term, the filtering enhancement function can directionally enhance the edge of the image and highlight the edge contour. The nonlinear mapping can enhance the contrast of the edge while suppressing the response of the non-edge area and improving the edge distinction. In summary, this embodiment can effectively enhance the edge of the image, highlight the edge contour, and improve the contrast and distinction of the edge. The function parameters can be adjusted according to the specific image characteristics and application requirements to obtain the best edge enhancement effect, laying the foundation for subsequent edge extraction and defect detection.
[0108] S3. Correlate and analyze the film defect distribution map and defect confidence with the current production process, build a feature mapping model and determine the causes and influencing factors of different types of defects, generate a defect knowledge base and match the corresponding process parameter optimization strategies for different types of defects through the knowledge base reasoning engine, generate dynamic instructions and send them to the workstation control unit, the workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
[0109] The association analysis is a technology used to discover the relationship between item sets in a data set, and is often used in fields such as market basket analysis. The defect knowledge base is a database used to store defect information related to products, production processes or systems, including descriptions, causes, repair methods and related process parameters of known defects. The knowledge base reasoning engine is a system that uses pre-stored rules and knowledge for logical reasoning. The process parameter optimization strategy refers to a technical method to improve production efficiency, quality or reduce costs by analyzing and adjusting key process parameters in the production process. The workstation control unit refers to a hardware or software system used to control the operation of the equipment at a specific workstation in a production line.
[0110] In an optional embodiment,
[0111] The film defect distribution map and defect confidence are correlated with the current production process, a feature mapping model is constructed and the causes and influencing factors of different types of defects are determined, a defect knowledge base is generated, and the corresponding process parameter optimization strategies are matched to different types of defects through the knowledge base reasoning engine, and dynamic instructions are generated and sent to the station control unit. The station control unit operates according to the dynamic instructions, monitors the operating data of different station control units in real time, and performs closed-loop feedback control through an adaptive intelligent control algorithm with process quality and equipment health level as constraints. The current optimal control solution includes:
[0112] Performing a connected domain analysis on the film defect distribution map, extracting the morphological features corresponding to each defect area and calculating the geometric center coordinates of each defect area, mapping the defect area to the actual physical size, performing a statistical analysis on the defect features in each defect area, clustering the samples to be classified in combination with a density-based spatial clustering algorithm, dividing the defect types, and for each defect type, statistically analyzing the defect indicators per unit time through a sliding time window to generate a defect time series, determining the correlation between the defect time series and the process parameters based on the Pearson correlation coefficient, and identifying the key process parameters corresponding to the current defect;
[0113] A multivariate feature space is constructed based on the key process parameters, wherein each point in the multivariate feature space contains defect features and process parameters, a feature mapping model is constructed based on the multivariate feature space, for the feature mapping model, a training set is generated according to historical defect cases, the training set is used as input for training, hyperparameters in the feature mapping model are adjusted, defect occurrence is used as a dependent variable, process parameters are used as independent variables, whether the process parameters are Granger causes of defects are determined by a Granger causality test algorithm, the defect type and process parameters are used as network nodes, a directed acyclic graph is generated, and conditional probability distribution is determined for each network node based on expert knowledge, the network structure and parameters are learned by a maximum likelihood estimation algorithm, a network causal model is obtained, defect occurrence is used as a latent variable, the process parameters are used as observed variables, a measurement model is constructed and a causal relationship between variables is assumed, the latent variable score is calculated by partial least squares method and the hyperparameters of the measurement model are determined, based on the measurement model and the network causal model, in combination with physical and chemical principles, the intrinsic reasons why the process parameters affect defect formation are analyzed, the intrinsic reasons are sorted out, and a causal relationship map is generated;
[0114] Based on the causal relationship graph, core concepts, hierarchical relationships, attributes corresponding to the core concepts, and semantic relationships between the core concepts are defined, and defect generation rules and defect influencing factors are constructed through ontology language and rule language to obtain the defect knowledge base;
[0115] Based on the defect knowledge base, the corresponding defect type is derived according to the defect feature through the knowledge base reasoning engine, the similarity between the current defect feature and the defect feature in the defect knowledge base is calculated, and it is determined whether the similarity is greater than a preset similarity threshold. If it is greater, the defect features in the defect knowledge base are sorted in descending order according to the similarity, the first three defect features are selected and the corresponding process parameter optimization strategies are obtained. If it is not greater than the preset similarity threshold, the current defect feature is taken as a new type, and reasoning is performed through the inductive logic programming algorithm to generate inductive rules and perform coverage detection to obtain the most likely cause corresponding to the current defect feature, and the process parameter optimization strategy is configured according to the most likely cause;
[0116] Based on the process parameter optimization strategy, dynamic instructions are generated and sent to the workstation control unit. The workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
[0117] The connected domain analysis is a technology in image processing, which is mainly used to identify interconnected pixel areas in an image. The morphological features are features used in image analysis to describe geometric properties such as object shape, edge, size, etc. The density-based spatial clustering algorithm forms clusters by finding high-density areas of data points, and regards data points in low-density areas as noise. The Pearson correlation coefficient is a statistical indicator for measuring the linear correlation between two variables. The multivariate feature space refers to a space containing multiple feature dimensions, each dimension representing a feature. The feature mapping model converts raw data into a representation in the feature space, with the aim of making different categories of data easier to separate or classify in the feature space. The Granger causality test algorithm is used to determine whether a variable in a time series can be used to predict another variable, and provides a statistical explanation for causal relationships. The Granger causality refers to a statistical causal relationship based on a time series. The directed acyclic graph is composed of directed edges. The graph structure is composed of a set of variables, but there are no loops in it. The maximum likelihood estimation algorithm is a parameter estimation method that estimates model parameters by maximizing the likelihood function of the observed data. The network causal model is a graphical model used to represent the causal relationship between variables. The latent variables refer to variables that are not directly observed in the statistical model, but they have an impact on the observed data. The partial least squares method is a regression analysis method that is suitable for situations where both the independent variable and the dependent variable contain multiple variables. The ontology language is a descriptive language used to represent concepts and their relationships, and is often used to build knowledge graphs or domain knowledge bases. The rule language is used to define rules in the reasoning or decision-making process of the knowledge base. The inductive logic programming algorithm is a machine learning method based on logical reasoning, which can summarize general logical rules from known facts and background knowledge. The inductive rules are rules automatically generated by inductive logic programming or other machine learning algorithms, and are used to describe patterns or relationships in data.
[0118] Perform 8-neighborhood connected domain analysis on the binary defect distribution map to mark each independent defect area. For each defect area, extract morphological features such as area, perimeter, major axis length, minor axis length, and circularity, calculate the geometric center coordinates of each defect area, map the pixel coordinates to the actual physical size according to the scale of the imaging system, perform statistics on the morphological features of each defect area, calculate the maximum value, minimum value, mean value, and standard deviation, etc., take the morphological features of each defect area as sample points, use Euclidean distance as the distance metric, set the neighborhood radius and the minimum number of included points, and perform clustering. According to the clustering results, divide the defect area into different defect types (such as scratches, bubbles, cracks, etc.). For each defect type, count the number of defects per unit time (such as per minute), the proportion of defect area, and other indicators to generate a defect time series. Use the Pearson correlation coefficient to calculate the correlation between the defect time series and various process parameters (such as temperature, pressure, speed, etc.), and identify the key process parameters most relevant to the current defect type.
[0119] Select defect features (such as defect area, defect density, etc.) and key process parameters as feature dimensions, and construct a multivariate feature space. In the multivariate feature space, each sample point represents a defect case, which contains defect features and process parameter information. Use machine learning models such as neural networks and support vector machines to build a feature mapping model, map sample points in the multivariate feature space to defect type labels, collect historical defect cases, build a training set, input the feature mapping model for training, and optimize the model hyperparameters through methods such as cross-validation. Take defect occurrence as the dependent variable and process parameters as the independent variable, and use the Granger causality test algorithm to determine whether the process parameters are the Granger cause of the defect occurrence.
[0120] Defect types and process parameters are used as nodes of the Bayesian network. According to expert knowledge and data analysis results, directed edges between nodes are determined, and a directed acyclic graph is constructed. Conditional probability distributions, such as Gaussian distribution and Bernoulli distribution, are assigned to each node. The maximum likelihood estimation algorithm is used to learn the network structure and parameters based on the observed data. The latent variable of defect occurrence is introduced to construct a measurement model. It is assumed that there is a linear relationship between the latent variable and the observed variable (process parameter). The latent variable score is calculated using the partial least squares method. The hyperparameters of the measurement model (such as the number of latent variables) are optimized by cross-validation and other methods. Based on the conditional probability distribution in the Bayesian network, the degree and direction of the influence of each process parameter on the occurrence of defects are analyzed. Combined with the relationship between the latent variable and the observed variable in the measurement model, the potential connection between the process parameter and the defect type is inferred. The physical and chemical principles, such as material properties, thermodynamics and kinetic laws, are used to explain the intrinsic mechanism of the process parameters affecting the formation of defects. Based on the above analysis results, the causal relationship between the process parameters and the defect type is sorted out, and a causal relationship map is drawn to intuitively represent the influence path and action intensity between the various factors.
[0121] Extract core concepts from the causal relationship map, such as defect type, process parameters, material properties, etc., and define the hierarchical relationship between concepts (such as scratches are a type of defect), define attributes for each core concept, such as the attributes of defect type include morphological characteristics, size range, etc., the attributes of process parameters include numerical range, unit, etc., characterize the semantic relationship between core concepts, such as "process parameters affect defect formation", "material properties determine defect sensitivity", etc., select appropriate ontology language (such as OWL) and rule language (such as SWRL), formalize the concepts, hierarchies, attributes and relationships defined above, and build a defect knowledge base. In the defect knowledge base, use ontology language and rule language to write defect generation rules (such as high temperature and high pressure cause material softening, thereby causing deformation defects) and defect influencing factors (such as too fast cooling speed). Cause crack defects), according to the defect features detected online, use the knowledge base reasoning engine (such as Jena, Drools, etc.), identify the defect type through ontology reasoning and rule reasoning, calculate the similarity between the current defect features and the existing defect features in the knowledge base, if the similarity is greater than the preset threshold, sort the defect cases in the knowledge base according to the similarity, select the three most similar cases, extract the corresponding process parameter optimization strategy, if the current defect feature is a new type (that is, the similarity with the existing features is less than the threshold), take it as a new case, use inductive logic programming (ILP) for reasoning, generate inductive rules through coverage detection, and infer the possible causes of defects based on this, according to the inferred defect causes, combined with physical and chemical principles and expert experience, configure the optimization strategy of process parameters, and generate dynamic control instructions;
[0122] Convert the process parameter optimization strategy into dynamic control instructions for setting temperature, pressure, speed, etc., and send the dynamic control instructions to each workstation control unit (such as PLC, CNC system, etc.) through communication protocols such as industrial Ethernet to guide them to adjust process parameters, collect the operation data of each workstation control unit in real time, monitor process quality and equipment health status, build a closed-loop feedback control system, use adaptive intelligent control algorithms (such as fuzzy control, predictive control, reinforcement learning, etc.), use process quality and equipment health level as constraints, dynamically adjust process parameters, achieve online prevention of defects and closed-loop optimization, and ensure product quality and production efficiency;
[0123] In this embodiment, through machine vision and image processing technology, tiny defects on the surface of the film can be detected quickly and accurately, and the characteristic parameters such as the size and shape of the defects can be quantified to provide reliable data support for subsequent defect analysis. By constructing a Bayesian network model and a causal relationship map, the influence of various factors such as process parameters and material properties on defect formation is comprehensively analyzed, and the inherent mechanism of defect generation is explored to provide theoretical guidance for defect prevention. A defect knowledge base is constructed based on ontology language and rule language, and explicit knowledge and implicit knowledge such as defect cases and process experience are refined, abstracted and standardized to achieve systematic management and reuse of knowledge. Through knowledge reasoning and machine learning algorithms, defect process parameter optimization strategies are automatically generated and converted into executable dynamic control instructions to guide the real-time adjustment of process parameters, reduce trial and error costs, and improve optimization efficiency and accuracy. In summary, this embodiment realizes the full-process intelligent control of film defects and provides a high-precision, high-efficiency, and high-adaptability solution, which has important practical significance and promotion value for improving the quality of film products and reducing production costs.
[0124] Figure 2 FIG. 1 is a schematic diagram of a battery thin film production automation control system based on visual inspection according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0125] The first unit is used to collect thin film images in the production process of battery thin films by using a pre-set industrial visual camera in combination with multi-view stereo imaging technology, extract the features of the thin film images at different scales by using a multi-resolution decomposition algorithm based on wavelet transform, fuse them in combination with an average weighted strategy, generate a fused thin film image, and perform denoising by using an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, perform homography matrix estimation on the denoised multi-view thin film image, extract feature points and construct feature point matching relationships, remove erroneous point pairs in combination with a random sampling consistency algorithm, estimate the homography transformation matrix between images of different viewpoints, perform geometric correction based on the homography transformation matrix, perform sub-pixel alignment on the corrected image by using an image registration method based on Fourier Mellin transform, and obtain a registered image;
[0126] The second unit is used for performing edge enhancement on the registered image based on an improved Franchi filter algorithm by calculating the eigenvalues of the Hessian matrix at multiple scales, repairing the edge area in combination with morphological operations and segmenting the film edge contour through an adaptive threshold segmentation algorithm, reconstructing the multi-view film edge in three dimensions based on the triangulation principle, solving the three-dimensional point cloud coordinates and reconstructing the three-dimensional contour model of the film through a bundle adjustment optimization method, extracting geometric features and obtaining a geometric feature subset through a feature selection algorithm, constructing a film defect detection model through a transfer learning algorithm, and obtaining a film defect distribution map and defect confidence through forward propagation in combination with film production process parameters and defect type distribution laws;
[0127] The third unit is used to correlate and analyze the film defect distribution map and defect confidence with the current production process, build a feature mapping model and determine the causes and influencing factors of different types of defects, generate a defect knowledge base and match different types of defects with corresponding process parameter optimization strategies through the knowledge base reasoning engine, generate dynamic instructions and send them to the workstation control unit, the workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
[0128] According to a third aspect of the embodiments of the present invention,
[0129] An electronic device is provided, comprising:
[0130] processor;
[0131] a memory for storing processor-executable instructions;
[0132] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0133] According to a fourth aspect of the embodiments of the present invention,
[0134] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0135] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A battery thin film production automation control method based on visual inspection, characterized in that: include: The thin film images in the production process of the battery thin film are collected by using a pre-set industrial visual camera in combination with multi-view stereo imaging technology, the features of the thin film images at different scales are extracted by a multi-resolution decomposition algorithm based on wavelet transform, and the images are fused in combination with an average weighted strategy to generate a fused thin film image, and denoised by using an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, the homography matrix of the denoised multi-view thin film image is estimated, feature points are extracted and a feature point matching relationship is constructed, and the erroneous point pairs are removed by combining a random sampling consistency algorithm, the homography transformation matrix between images of different view angles is estimated, geometric correction is performed based on the homography transformation matrix, and the corrected image is sub-pixel aligned by an image registration method based on Fourier Mellin transform to obtain a registered image; For the registered image, based on the improved Franchi filter algorithm, edge enhancement is performed by calculating the eigenvalues of the Hessian matrix at multiple scales, the edge area is repaired in combination with morphological operations and the edge contour of the film is obtained by segmentation through an adaptive threshold segmentation algorithm, three-dimensional reconstruction of the multi-view film edge is performed based on the triangulation principle, the three-dimensional point cloud coordinates are solved by the bundle adjustment optimization method and the three-dimensional contour model of the film is reconstructed, the geometric features are extracted and the geometric feature subsets are obtained by screening through the feature selection algorithm, a film defect detection model is constructed by a transfer learning algorithm, and a film defect distribution map and defect confidence are obtained by forward propagation in combination with the film production process parameters and the defect type distribution law; The film defect distribution map and defect confidence are correlated with the current production process, a feature mapping model is constructed and the causes and influencing factors of different types of defects are determined, a defect knowledge base is generated and the corresponding process parameter optimization strategies are matched to different types of defects through the knowledge base reasoning engine, dynamic instructions are generated and sent to the workstation control unit, the workstation control unit operates according to the dynamic instructions, and the operating data of different workstation control units are monitored in real time. With process quality and equipment health level as constraints, closed-loop feedback control is performed through an adaptive intelligent control algorithm to obtain the current optimal control solution.
2. The method according to claim 1, characterized in that The thin film images in the production process of battery thin films are collected by pre-set industrial visual cameras combined with multi-view stereo imaging technology. The features of the thin film images at different scales are extracted by a multi-resolution decomposition algorithm based on wavelet transform. The fusion is combined with an average weighted strategy to generate a fused thin film image and denoise it by an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, including: Install multiple industrial vision cameras at the workstations of the battery thin film production line, perform multi-view imaging based on multi-view stereo imaging technology and external synchronous trigger signals, obtain thin film images during the battery thin film production process, and combine the thin film images according to the time series to obtain the original thin film image sequence; For each film image in the original film image sequence, a wavelet basis function is selected, and a two-dimensional discrete wavelet transform is performed according to the selected wavelet basis function. The film image is recursively low-pass filtered and high-pass filtered to obtain approximate coefficients and detail coefficients. The number of decomposition layers is modified and controlled in combination with the multi-scale characteristics of the wavelet transform to obtain wavelet coefficients at different frequency bands and spatial scales. At each scale, the wavelet coefficients are threshold processed to obtain structural features at the current scale. Sub-band images at different scales are reconstructed by inverse wavelet transform. For sub-band images at different scales at each viewing angle, a clarity mapping matrix is obtained by calculating a clarity index, and a viewing angle difference mapping matrix is obtained by calculating a viewing angle difference index. A weight mapping matrix is constructed based on the clarity mapping matrix and the viewing angle difference mapping matrix, and a fusion weight is assigned to the sub-band image at each viewing angle. Sub-band images at different viewing angles at the same scale are weighted averaged pixel by pixel based on the fusion weight. The sub-band images after weighted average are inverse wavelet transformed to reconstruct the fused film image after fusion. The fused film image is represented as a discrete function, and a total variation regularization model is obtained by constructing a total variation regularization energy functional. A bilateral filtering term is added to the total variation regularization model, and the spatial kernel and gray value kernel of the bilateral filter are adaptively adjusted. The total variation regularization model is iteratively solved in combination with a gradient descent algorithm. In each iteration, the gradients of the data fidelity term and the smoothing regularization term in the total variation regularization energy functional are calculated, and the gradients are smoothed in combination with bilateral filtering. The current solution is updated according to the direction of the smoothed gradient, and the update is repeated until a preset maximum number of iterations is reached to obtain a denoised multi-view film image.
3. The method according to claim 1, characterized in that The homography matrix of the denoised multi-view film image is estimated, feature points are extracted and matching relationships of feature points are constructed, and the erroneous point pairs are removed by combining the random sampling consistency algorithm, and the homography transformation matrix between images of different view angles is estimated. Geometric correction is performed based on the homography transformation matrix, and the corrected image is aligned at the sub-pixel level by the image registration method based on Fourier-Mellin transform to obtain the registered image including: Performing scale-invariant feature transformation feature extraction on the denoised multi-view film image, detecting the first key point that is invariant to the view angle, constructing a scale space through a Gaussian difference pyramid and obtaining position information and direction information by detecting extreme points at different scales, accurately locating and assigning directions to the first key point based on the position information and the direction information, extracting the local image block corresponding to the first key point, and calculating the scale-invariant feature transformation descriptor; Based on the scale-invariant feature transform descriptor, feature point matching is performed on sub-band images of different viewing angles through a nearest neighbor ratio test. For each first key point, the Euclidean distance with all first key points in the sub-band images of different viewing angles is calculated, the nearest neighbor and the second nearest neighbor are selected and the ratio is calculated, matching point pairs are screened according to a preset ratio threshold, and the external points are removed in combination with a random sampling consistency algorithm to obtain high-quality point pairs. Based on the high-quality point pairs, the homography matrix between multi-view sub-band images is estimated and the homography matrix is optimized by minimizing the reprojection error to obtain a homography transformation matrix. Based on the homography transformation matrix, the multi-view film image is projected and transformed, the transformed image is resampled, and a corrected image is obtained in combination with a bicubic interpolation algorithm. For the corrected multi-view film image, a reference view image is selected, and the multi-view film images except the reference view image are converted from spatial domain images to frequency domain representations through Fourier transform, a Fourier spectrum is generated, and the translation amount between the current multi-view film image and the reference view image is estimated through frequency domain phase correlation technology, and the translation amount of the current multi-view film image in the horizontal and vertical directions is calculated by combining the translation invariance of Fourier transform and the phase information of the Fourier spectrum, and translation registration is performed according to the translation amount; A Mellin transform is performed on the multi-view film image after translational registration, and the image is mapped from a Cartesian coordinate system to a logarithmic polar coordinate system to generate a Mellin spectrum. The rotation angle and scale factor are determined based on the scale invariance of the Mellin transform by analyzing the phase correlation of the Mellin spectrum. Based on the rotation angle, scale factor and translation amount, the multi-view film image is transformed and resampled, and the registered image is obtained by sub-pixel alignment.
4. The method according to claim 3, characterized in that The rotation angle and scale factor are determined based on the scale invariance of the Mellin transform as shown in the following formula: Among them, △θ represents the rotation angle change of the image to be registered relative to the reference image, △logs represents the logarithm of the scale change of the image to be registered relative to the reference image, It means to find the best combination of rotation angle and logarithmic scale, where the best combination means that the expression reaches the maximum value under the given rotation angle and scale. represents the inverse Mellin transform, represents the Mellin transformation, M f (θ, logρ) represents the Mellin transform of the reference image f(x, y), M g (θ, logρ) represents the Mellin transform of the image to be registered g(x, y), represents the complex conjugate part of the Mellin transform of the image to be registered, represents the weighting function in the Mellin transform domain, and ρ represents the radial distance of the image in the polar coordinate system.
5. The method according to claim 1, characterized in that For the registered image, based on the improved Franchi filter algorithm, edge enhancement is performed by calculating the eigenvalues of the Hessian matrix at multiple scales, the edge area is repaired in combination with morphological operations and the edge contour of the film is obtained by segmentation through an adaptive threshold segmentation algorithm, three-dimensional reconstruction of the multi-view film edge is performed based on the triangulation principle, the three-dimensional point cloud coordinates are solved by the bundle adjustment optimization method and the three-dimensional contour model of the film is reconstructed, the geometric features are extracted and the geometric feature subsets are obtained by screening through the feature selection algorithm, the film defect detection model is constructed by the transfer learning algorithm, and the film production process parameters and the defect type distribution law are combined, and the film defect distribution map and defect confidence are obtained by forward propagation, including: For the registered image, hierarchical decomposition is performed through a guided filtering algorithm to generate a preprocessed image and the Hessian matrix of the preprocessed image at multiple scales is calculated through an improved Franchi filtering algorithm, for each pixel point, the second-order partial derivatives at different scales are calculated and a first filter matrix is generated, the first filter eigenvalue and the second filter eigenvalue corresponding to the first filter matrix are calculated, a structural characteristic measure and a structural significance measure are constructed, a filter enhancement function is constructed based on the first filter eigenvalue and the second filter eigenvalue, a parameter value in the filter enhancement function is adaptively adjusted based on local contrast, and the edge enhancement of the registered image is performed through the adaptively adjusted filter enhancement function; For the registered image after edge enhancement, the broken edges are filled by morphological closing operation, and the isolated noise points and pseudo responses are removed by morphological opening operation of the filled image, a rough edge contour is generated, and the rough edge contour is refined by a skeletonization algorithm to obtain an initial edge contour. For the initial edge contour, the inter-class variance is calculated based on the global grayscale histogram corresponding to the registered image after edge enhancement by an improved adaptive threshold segmentation algorithm, and the pre-set threshold area is dynamically adjusted based on the local contrast information to maximize the inter-class variance, and the film edge contour is extracted by combining the gradient-based contour detection method; Based on the edge contour of the film under different viewing angles, edge feature points in the edge contour of the film are identified and matched through edge detection. Based on the principle of triangulation, the three-dimensional coordinates of the edge feature points are calculated in combination with camera parameters to generate three-dimensional points. In combination with the bundle adjustment optimization method, the coordinates of the three-dimensional points are optimized by minimizing the projection error between the three-dimensional points and the actual observation points. At the same time, the camera position and internal and external parameters are correspondingly optimized to obtain the optimized three-dimensional point coordinates. The three-dimensional points are repeatedly generated and optimized to obtain a three-dimensional point cloud. A three-dimensional contour model corresponding to the film is generated through a surface reconstruction algorithm. Geometric features are extracted from the three-dimensional contour model, wherein the geometric features include the curvature, length and thickness of the edge of the film. The geometric features are selected according to a pre-set selection criterion through a feature selection algorithm to obtain a subset of the geometric features. According to a pre-selected defect detection data set, pre-training is performed through a transfer learning algorithm to generate an initial defect detection model and the geometric feature subset is added to the initial defect detection model. Parameters are optimized in combination with real data collected from the film production line to obtain a film defect detection model. Based on the temperature, tension and thickness in the film production process and in combination with known defect type distribution laws, a film defect distribution map is obtained through forward propagation. For each defect in the film defect distribution map, the corresponding confidence is calculated and output as a defect confidence, wherein the known defect type distribution laws include scratch distribution laws, bubble distribution laws and crack distribution laws.
6. The method according to claim 5, characterized in that Based on the first filtering eigenvalue and the second filtering eigenvalue, a filtering enhancement function is constructed as shown in the following formula: Among them, E(x, y) represents the filter enhancement function value, α represents the weight coefficient, σ represents the standard deviation of the Gaussian kernel, I(x, y) represents the pixel value of the original image at the coordinate (x, y), γ represents the sensitivity control parameter, and β represents the offset control parameter.
7. The method according to claim 1, characterized in that The film defect distribution map and defect confidence are correlated with the current production process, a feature mapping model is constructed and the causes and influencing factors of different types of defects are determined, a defect knowledge base is generated, and the corresponding process parameter optimization strategies are matched to different types of defects through the knowledge base reasoning engine, and dynamic instructions are generated and sent to the station control unit. The station control unit operates according to the dynamic instructions, monitors the operating data of different station control units in real time, and performs closed-loop feedback control through an adaptive intelligent control algorithm with process quality and equipment health level as constraints. The current optimal control solution includes: Performing a connected domain analysis on the film defect distribution map, extracting the morphological features corresponding to each defect area and calculating the geometric center coordinates of each defect area, mapping the defect area to the actual physical size, performing a statistical analysis on the defect features in each defect area, clustering the samples to be classified in combination with a density-based spatial clustering algorithm, dividing the defect types, and for each defect type, statistically analyzing the defect indicators per unit time through a sliding time window to generate a defect time series, determining the correlation between the defect time series and the process parameters based on the Pearson correlation coefficient, and identifying the key process parameters corresponding to the current defect; A multivariate feature space is constructed based on the key process parameters, wherein each point in the multivariate feature space contains defect features and process parameters, a feature mapping model is constructed based on the multivariate feature space, for the feature mapping model, a training set is generated according to historical defect cases, the training set is used as input for training, hyperparameters in the feature mapping model are adjusted, defect occurrence is used as a dependent variable, process parameters are used as independent variables, whether the process parameters are Granger causes of defects are determined by a Granger causality test algorithm, the defect type and process parameters are used as network nodes, a directed acyclic graph is generated, and conditional probability distribution is determined for each network node based on expert knowledge, the network structure and parameters are learned by a maximum likelihood estimation algorithm, a network causal model is obtained, defect occurrence is used as a latent variable, the process parameters are used as observed variables, a measurement model is constructed and a causal relationship between variables is assumed, the latent variable score is calculated by partial least squares method and the hyperparameters of the measurement model are determined, based on the measurement model and the network causal model, in combination with physical and chemical principles, the intrinsic reasons why the process parameters affect defect formation are analyzed, the intrinsic reasons are sorted out, and a causal relationship map is generated; Based on the causal relationship graph, core concepts, hierarchical relationships, attributes corresponding to the core concepts, and semantic relationships between the core concepts are defined, and defect generation rules and defect influencing factors are constructed through ontology language and rule language to obtain the defect knowledge base; Based on the defect knowledge base, the corresponding defect type is derived according to the defect feature through the knowledge base reasoning engine, the similarity between the current defect feature and the defect feature in the defect knowledge base is calculated, and it is determined whether the similarity is greater than a preset similarity threshold. If it is greater, the defect features in the defect knowledge base are sorted in descending order according to the similarity, the first three defect features are selected and the corresponding process parameter optimization strategies are obtained. If it is not greater than the preset similarity threshold, the current defect feature is taken as a new type, and reasoning is performed through the inductive logic programming algorithm to generate inductive rules and perform coverage detection to obtain the most likely cause corresponding to the current defect feature, and the process parameter optimization strategy is configured according to the most likely cause; Based on the process parameter optimization strategy, dynamic instructions are generated and sent to the workstation control unit. The workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
8. A battery thin film production automation control system based on visual inspection, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to collect thin film images in the production process of battery thin films by using a pre-set industrial visual camera in combination with multi-view stereo imaging technology, extract the features of the thin film images at different scales by using a multi-resolution decomposition algorithm based on wavelet transform, fuse them in combination with an average weighted strategy, generate a fused thin film image, and perform denoising by using an iterative optimization denoising algorithm combining total variation regularization and bilateral filtering, perform homography matrix estimation on the denoised multi-view thin film image, extract feature points and construct feature point matching relationships, remove erroneous point pairs in combination with a random sampling consistency algorithm, estimate the homography transformation matrix between images of different viewpoints, perform geometric correction based on the homography transformation matrix, perform sub-pixel alignment on the corrected image by using an image registration method based on Fourier Mellin transform, and obtain a registered image; The second unit is used for performing edge enhancement on the registered image based on an improved Franchi filter algorithm by calculating the eigenvalues of the Hessian matrix at multiple scales, repairing the edge area in combination with morphological operations and segmenting the film edge contour through an adaptive threshold segmentation algorithm, reconstructing the multi-view film edge in three dimensions based on the triangulation principle, solving the three-dimensional point cloud coordinates and reconstructing the three-dimensional contour model of the film through a bundle adjustment optimization method, extracting geometric features and obtaining a geometric feature subset through a feature selection algorithm, constructing a film defect detection model through a transfer learning algorithm, and obtaining a film defect distribution map and defect confidence through forward propagation in combination with film production process parameters and defect type distribution laws; The third unit is used to correlate and analyze the film defect distribution map and defect confidence with the current production process, build a feature mapping model and determine the causes and influencing factors of different types of defects, generate a defect knowledge base and match different types of defects with corresponding process parameter optimization strategies through the knowledge base reasoning engine, generate dynamic instructions and send them to the workstation control unit, the workstation control unit operates according to the dynamic instructions, monitors the operating data of different workstation control units in real time, and uses process quality and equipment health level as constraints to perform closed-loop feedback control through an adaptive intelligent control algorithm to obtain the current optimal control solution.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Ampoule bottle information identification method and system based on machine vision
CN119723548A
A method and device for preparing multi-layer composite thin film material with multi-node coordination
CN119734469A
Intelligent acquisition, analysis and processing method for transformer cross-cut sheet stock detection data
CN119848028A
Battery assembly process defect real-time detection and classification method and system
CN119904704A
Intelligent control method and system for stamping robot
CN119916695A
