A method and system for detecting defects in a metallized film

By simultaneously acquiring edge images and correction displacement time sequences, a transformation matrix is ​​constructed to eliminate the influence of correction motion. Curvature analysis is then performed to accurately identify minute serrated tear defects in metallized thin films. This solves the problem of missed detection of minute edge tear defects under high-speed lateral correction motion of thin films and improves the reliability of detection.

CN122199538BActive Publication Date: 2026-07-21LUZHOU METALLIZED FILM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LUZHOU METALLIZED FILM TECH CO LTD
Filing Date
2026-05-14
Publication Date
2026-07-21

Smart Images

  • Figure CN122199538B_ABST
    Figure CN122199538B_ABST
Patent Text Reader

Abstract

The application provides a kind of metallized film defect detection method and system, belong to image processing and industrial detection technical field, the edge image of this application synchronous acquisition metallized film and the displacement time sequence of guiding shaft rectification in production line control bus, based on displacement time sequence construction transformation matrix, with displacement time sequence time alignment edge contour point set is converted into homogeneous coordinate matrix after with transformation matrix multiplication obtains target matrix, along target matrix arrangement sequence the local curvature of each position coordinate is calculated and carries out first order differentiation and obtains curvature variation vector, from curvature variation vector, the position coordinate corresponding to the component of positive and negative sign inversion is constructed target coordinate set, the coordinates in target coordinate set are connected to obtain topological graph, the geometric envelope parameter of topological graph is extracted and mapped to metallized film coordinate space, determine target defect position.The application realizes the accurate positioning of small sawtooth-shaped tear defect of metallized film.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing and industrial inspection technology, and in particular relates to a method and system for detecting defects in metallized thin films. Background Technology

[0002] Metallized thin films are widely used in capacitors, flexible circuits, photovoltaic modules, and other fields due to their excellent conductivity and barrier properties. Tiny tear defects at the film edges can directly affect the electrical performance and lifespan of the product; therefore, accurate detection of edge defects in metallized thin films is a crucial step in ensuring product quality. With the continuous increase in the speed of thin film production lines, manual visual inspection can no longer meet the needs of real-time detection, and automated defect detection based on image processing is gradually becoming the mainstream approach.

[0003] Existing methods for detecting defects in metallized thin films typically employ a linear scan camera to continuously scan and image the film surface, combining this with edge detection operators such as Sobel and Canny to extract the film's edge contours. Abnormal regions are then identified through shape analysis of the contour point set. Some methods further incorporate curvature calculations or template matching to describe local morphological changes in the edge contours, thereby locating edge-type defects such as tears and notches.

[0004] However, in actual production, the guide shaft continuously undergoes lateral correction motion during the film conveyor belt movement, resulting in continuous lateral displacement of the film. Existing detection methods do not compensate for the edge coordinate shift caused by this lateral displacement when analyzing the edge contour. This leads to continuous lateral drift of the film edge in the image coordinate system, obscuring the morphological characteristics of minute serrated tear defects. The detection method cannot effectively distinguish between contour anomalies caused by defects and positional changes caused by correction motion, resulting in a significantly increased false negative rate for minute edge defects. Therefore, existing technologies suffer from the technical problem of insufficient film defect detection due to the easy omission of minute edge tear defects in high-speed lateral correction motion scenarios. Summary of the Invention

[0005] The purpose of this application is to provide a method and system for detecting defects in metallized thin films, so as to solve the problem of insufficient thin film defect detection in the prior art.

[0006] To address the aforementioned technical problems, in a first aspect, this application provides a method for detecting defects in metallized thin films, comprising: Simultaneously acquire edge images of the metallized thin film captured by the line scan camera on the production line, as well as the displacement timing sequence used for guide shaft correction within the control bus of the production line; The lateral displacement deviation value is extracted from the displacement time series, and the displacement deviation value is used as a translation component in the reference transformation matrix to construct the transformation matrix; Extract the edge contour point set that is time-aligned with the displacement time series from the edge image, convert the two-dimensional coordinates in the edge contour point set into a homogeneous coordinate matrix, and perform matrix multiplication operation between the homogeneous coordinate matrix and the transformation matrix to obtain the target matrix; According to the arrangement sequence of elements in the target matrix, the local curvature of each element is obtained by calculating the first and second differences between each element and its neighboring elements in the preset neighborhood. The curvature change vector is obtained by performing the first derivative on each local curvature according to the arrangement sequence. Extract the target components whose positive and negative signs are reversed from the curvature change vector, and construct the target coordinate set by determining the position coordinates corresponding to each target component in the target matrix; Calculate the Euclidean distance between any two coordinates in the target coordinate set. Connect coordinates whose Euclidean distance is less than a preset distance threshold to obtain a topology map. Extract the geometric envelope parameters of the topology map and map them to the coordinate space of the metallized thin film to determine the location of the target defect.

[0007] Optionally, the displacement time sequence includes the displacement deviation value for guide shaft correction corresponding to each timestamp; The lateral displacement deviation value is extracted from the displacement time series, and the displacement deviation value is used as a translation component in the reference transformation matrix to construct the transformation matrix, including: The target deviation value is obtained by multiplying the displacement deviation value by the preset deviation conversion factor. Using a three-row, three-column matrix with all diagonal elements set to 1 and all off-diagonal elements set to 0 as the base transformation matrix, and writing the target deviation value as the translation component into the element located in the first row and third column of the base transformation matrix, we obtain the transformation matrix corresponding to each timestamp.

[0008] Optionally, an edge contour point set aligned with the displacement time series is extracted from the edge image. The two-dimensional coordinates in the edge contour point set are converted into a homogeneous coordinate matrix. Matrix multiplication is then performed between the aligned coordinate matrix and the transformation matrix to obtain the target matrix, including: The two-dimensional coordinates of edge points that meet the filtering criteria are extracted from the edge image and combined to obtain the edge contour point set. The filtering criteria are that the pixel value of the edge point is non-zero and the timestamp of the edge point is synchronized with the timestamp of the displacement time sequence. The two-dimensional coordinates of each edge point in the edge contour point set are expanded to obtain homogeneous coordinates including the horizontal coordinate, the vertical coordinate and the value 1. All homogeneous coordinates are arranged and combined in rows to obtain a homogeneous coordinate matrix with the same number of columns as the transformation matrix. Calculate the product of the homogeneous coordinates corresponding to each timestamp in the homogeneous coordinate matrix and the corresponding transformation matrix to obtain the target homogeneous coordinates. Extract the first two components of each target homogeneous coordinate as position coordinates, and construct the target matrix based on all position coordinates.

[0009] Optionally, according to the arrangement sequence of elements in the target matrix, the local curvature of each element is obtained by calculating the first and second differences between each element and its neighboring elements in a preset neighborhood. The curvature change vector is obtained by performing a first-order differential on each local curvature according to the arrangement sequence, including: Arrange all position coordinates in the target matrix according to the order from the starting position to the ending position to obtain the arrangement sequence. Extract the previous and next adjacent position coordinates of each position coordinate in the preset neighborhood from the arrangement sequence. The first-order difference is obtained by calculating the difference between the x-coordinate and y-coordinate of the position coordinate and the previous adjacent position coordinate. The second-order difference is obtained by calculating the difference between the x-coordinate and y-coordinate of the next adjacent position coordinate and the corresponding components of the first-order difference. The local curvature of each position coordinate is obtained by calculating the ratio of the numerator to the denominator of the cube root of the sum of squares of the components of the first-order difference and the numerator of the difference of the cross product of the components of the first-order difference and the second-order difference. The curvature difference between each local curvature and the local curvature corresponding to the coordinates of the adjacent position is calculated according to the permutation sequence and then arranged to obtain the curvature change vector.

[0010] Optionally, target components whose numerical signs are reversed are extracted from the curvature change vector. A target coordinate set is constructed by determining the position coordinates corresponding to each target component in the target matrix, including: According to the order of all curvature differences in the curvature change vector, extract the curvature difference values ​​with opposite signs to the next adjacent curvature difference values ​​as the target components. In the permutation sequence, the position coordinates corresponding to the target component are determined as the target position coordinates. All target position coordinates are combined to obtain the target coordinate set.

[0011] Optionally, the Euclidean distance between any two coordinates in the target coordinate set is calculated, and a topology map is obtained by connecting coordinates whose Euclidean distance is less than a preset distance threshold, including: The Euclidean distance between any two target coordinates is obtained by taking the square root of the sum of the squares of the differences in their x and y coordinates. Two target location coordinates whose Euclidean distance is less than a preset distance threshold are identified as connection relationships. A topology graph is constructed using the target location coordinates corresponding to the connection relationship as nodes and the connection relationship as edges.

[0012] Optionally, the geometric envelope parameters of the topology map are extracted and mapped to the coordinate space of the metallized thin film to determine the location of the target defect, including: Extract the minimum, maximum, minimum, and maximum x-coordinates, y-coordinates, and y-coordinates of all nodes from the topology graph as geometric envelope parameters; The first and second abscissas are obtained by multiplying the minimum and maximum abscissas in the geometric envelope parameters with the preset horizontal conversion coefficients, respectively. The first and second ordinates are obtained by multiplying the minimum and maximum ordinates in the geometric envelope parameters with the preset vertical conversion coefficients, respectively. Combine the first horizontal coordinate and the first vertical coordinate to form the first physical coordinate, and combine the second horizontal coordinate and the second vertical coordinate to form the second physical coordinate; Using the first physical coordinate and the second physical coordinate as physical boundary coordinates, the area enclosed by the physical boundary coordinates in the coordinate space of the metallized thin film is determined as the target defect location.

[0013] Secondly, this application provides a metallization thin film defect detection system, comprising: The acquisition module is used to synchronously acquire the edge image of the metallized film captured by the line scan camera on the production line, as well as the displacement timing sequence used for guide shaft correction in the control bus of the production line. The module is used to extract the lateral displacement deviation value from the displacement time series and configure the displacement deviation value as a translation component in the reference transformation matrix to construct the transformation matrix. The generation module is used to extract the edge contour point set that is time-aligned with the displacement time series from the edge image, convert the two-dimensional coordinates in the edge contour point set into a homogeneous coordinate matrix, and perform matrix multiplication operation between the homogeneous coordinate matrix and the transformation matrix to obtain the target matrix. The generation module is also used to obtain the local curvature of each element by calculating the first and second differences between each element and its neighboring elements in the preset neighborhood according to the arrangement sequence of elements in the target matrix, and to obtain the curvature change vector by performing the first derivative of each local curvature according to the arrangement sequence. The building module is also used to extract the target components whose positive and negative signs are reversed from the curvature change vector, and to construct the target coordinate set by determining the position coordinates corresponding to each target component in the target matrix; The determination module is used to calculate the Euclidean distance between any two coordinates in the target coordinate set. By connecting coordinates whose Euclidean distance is less than a preset distance threshold, a topology map is obtained. The geometric envelope parameters of the topology map are extracted and mapped to the coordinate space of the metallized thin film to determine the location of the target defect.

[0014] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the metallized thin film defect detection method as described in the first aspect above.

[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the metallization thin film defect detection method described in the first aspect above.

[0016] The metallized thin film defect detection method provided in this application firstly acquires the edge image and the timing sequence of the guide shaft correction displacement within the production line control bus simultaneously. The lateral displacement deviation value generated by the correction motion is directly extracted from the automated control bus, establishing a time alignment relationship between the image coordinates and the correction displacement from the data source. Subsequently, this application constructs a transformation matrix based on the displacement deviation value and multiplies it with the homogeneous coordinate matrix, eliminating the influence of the lateral correction displacement on the edge contour coordinates during dynamic conveyor belt movement point by point, ensuring that the compensated edge contour is uniformly projected onto the static coordinate system.

[0017] Finally, this application performs curvature calculation and curvature change vector analysis on the compensated contour coordinate sequence. By extracting the component with reversed positive and negative signs in the curvature change vector, local morphological abrupt change points on the contour are located. Then, through Euclidean distance connection and topological graph construction, spatially adjacent abrupt change points are aggregated into continuous defect regions and mapped to the thin film physical coordinate space. Therefore, this application can effectively detect tiny serrated tear defects masked by the correction motion trajectory in high-speed lateral correction motion scenarios of thin films, solving the technical problem of insufficient thin film defect detection caused by the easy omission of tiny edge tear defects due to high-speed lateral correction motion of thin films.

[0018] Furthermore, this application first constructs an arrangement sequence according to the position coordinates in the target matrix from the starting position to the ending position, ensuring that the subsequent curvature calculation unfolds sequentially along the spatial continuity of the edge contour, and avoiding curvature calculation errors caused by disordered coordinate arrangement.

[0019] Subsequently, by extracting the coordinates of the previous and next adjacent positions of each position in the permutation sequence, and calculating the local curvature based on the first-order and second-order differences, this application can accurately quantify the degree of local curvature of the edge contour at each discrete point. Even the slight protrusions or depressions of the contour caused by tiny jagged tears can be reflected by the change in curvature value.

[0020] Finally, this application performs a first-order differential on the local curvature along the permutation sequence to obtain a curvature change vector. This vector can capture the transient change trend of curvature, separating the curvature abrupt changes at micro-tear defects from the smooth curvature changes of the overall contour, thus amplifying the detection signal intensity of micro-morphological anomalies. Therefore, through dual analysis of curvature and its rate of change, this application can accurately identify micro-morphological changes in the edge contour in a static coordinate system after eliminating the interference of correction motion, solving the technical problem in the prior art where micro-edge tear defects are easily missed due to high-speed lateral correction motion of the thin film, resulting in insufficient detection of thin film defects. Attached Figure Description

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

[0022] Figure 1 A schematic flowchart of a method for detecting defects in metallized thin films provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for generating a target matrix provided in an embodiment of this application; Figure 3 A flowchart illustrating a method for generating curvature variation vectors provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a metallized thin film defect detection system provided in an embodiment of this application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0023] During the high-speed conveyor belt operation of a metallized thin film production line, the guide shaft continuously performs lateral correction movements to maintain film edge alignment, resulting in continuous lateral displacement of the film. Existing edge defect detection methods directly perform morphological analysis after extracting the edge contour without compensating for the edge coordinate offset caused by the correction movement. This leads to the true morphological characteristics of minute serrated tear defects being obscured by the superimposed lateral movement trajectory.

[0024] The detection algorithm cannot distinguish which coordinate changes on the edge contour originate from abrupt changes in the physical morphology of the defect and which originate from the position adjustment of the correction mechanism. This contradiction stems from the fact that existing methods treat the image coordinate system as a static reference, ignoring the dynamic lateral drift of the film in this coordinate system. Therefore, a defect identification strategy that can dynamically eliminate the influence of correction motion is urgently needed.

[0025] To address the aforementioned issues, this application proposes a defect detection method for metallized thin films based on displacement compensation and curvature change analysis. The core of this method lies in establishing a time alignment relationship between image coordinates and the correction motion by simultaneously acquiring edge images and the time sequence of guide shaft displacement within the production line control bus. Specifically, this application extracts lateral displacement deviation values ​​from the displacement time sequence and constructs a transformation matrix. Through homogeneous coordinate transformation, the edge contour point set is projected onto a stationary coordinate system that eliminates the influence of the correction motion, thereby effectively decoupling the defect morphology characteristics from the correction motion trajectory.

[0026] Based on this, this application calculates the local curvature along the contour sequence and performs first-order differentiation, extracts the component with reversed positive and negative signs in the curvature change vector to locate the small morphological mutation points, and then connects the mutation points adjacent to each other in the aggregation space with the topology graph through Euclidean distance to form continuous defect regions.

[0027] This method abandons the traditional static coordinate system analysis mode and eliminates the dynamic interference of the correction motion on the edge contour through multi-source data fusion and coordinate transformation. It ensures that even in the high-speed lateral correction scenario of thin film, it can still accurately capture tiny sawtooth tear defects. It solves the problem of missing detection of tiny edge defects caused by correction motion in the existing technology, and significantly improves the reliability of defect detection and product quality assurance capability of high-speed production lines.

[0028] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] To address the problems of the prior art, embodiments of this application provide a method, apparatus, device, computer storage medium, and computer program product for detecting defects in metallized thin films. The method for detecting defects in metallized thin films provided in this application embodiment will be described first below.

[0030] Figure 1 A schematic flowchart of a metallized thin film defect detection method according to an embodiment of this application is shown. Figure 1 As shown, the method includes: S101. Synchronously acquire the edge image of the metallized film captured by the line scan camera on the production line, as well as the displacement timing sequence used for guide shaft correction within the control bus of the production line.

[0031] An edge image refers to a two-dimensional grayscale or binary image obtained by continuously scanning the edge region of a metallized thin film using a line scan camera on the production line. This image mainly includes the edge contour of the thin film and the pixel information of its adjacent areas. A displacement time sequence refers to an ordered sequence composed of lateral position feedback data of the guide shaft correction mechanism recorded in the automated control bus of the production line at different time stamps, with each time stamp corresponding to the lateral position value of a guide shaft.

[0032] Specifically, firstly, during the operation of the metallization thin film production line, a line scan camera is fixedly installed above or to the side of the film edge. The line scan camera scans the film edge area line by line at a preset scanning frequency. Each scan generates a line of pixel data and adds a timestamp. Multiple lines of pixel data are stitched together in chronological order to form an edge image. For example, if the line scan camera scans at a frequency of 1000 lines per second, with each line containing 2048 pixels, an image with a resolution of [resolution missing] can be obtained after 100 milliseconds of scanning. Edge image The grayscale value of each pixel in the image ranges from 0 to 255, and the timestamp of the image acquisition completion time is recorded as follows: .

[0033] Simultaneously, position feedback data of the guide shaft correction mechanism is read from the production line's control bus. The control bus records the lateral position of the guide shaft at a fixed sampling period, for example, recording the position value once every 10 milliseconds, forming a displacement timing sequence. The value of each position Corresponding to a timestamp Next, the timestamps of the edge images are... Compare with each timestamp in the displacement time series to filter out timestamps that match... By matching the positional values ​​or time differences within the allowable error range, a time alignment relationship is established between the edge image and the displacement time sequence.

[0034] S102. Extract the lateral displacement deviation value from the displacement time sequence, and use the displacement deviation value as a translation component in the reference transformation matrix to construct the transformation matrix.

[0035] Optionally, the displacement time sequence in step S102 includes the displacement deviation value for guide shaft correction corresponding to each timestamp.

[0036] Step S102, which involves extracting the lateral displacement deviation value from the displacement time series and configuring the displacement deviation value as a translation component in the reference transformation matrix to construct the transformation matrix, can specifically include: S1021. The target deviation value is obtained by multiplying the displacement deviation value by the preset deviation conversion coefficient.

[0037] The displacement deviation value refers to the difference between the lateral position value of the guide shaft at the current timestamp and the reference lateral position value at the starting timestamp, and is used to represent the offset of the guide shaft relative to the initial position.

[0038] The deviation conversion factor is a scaling factor used to convert the physical displacement units of the guide axis to image pixel coordinate units, and it is used to establish the quantization relationship between the physical spatial scale and the image spatial scale. The target deviation value is the lateral offset in pixel coordinate units obtained after the displacement deviation value has been converted by the deviation conversion factor, and it is used for translation transformation operations in the image coordinate system. The preset deviation conversion factors are shown in Table 1 below: Table 1: Preset Deviation Conversion Factor Comparison Table

[0039] As shown in Table 1, Table 1 displays typical values ​​of the preset deviation conversion factor under different production line configurations. The internal data processing logic of this factor is the ratio of pixel resolution to physical field of view size, and the specific calculation formula is as follows: in, This is the deviation conversion factor. This refers to the horizontal pixel resolution of a line scan camera. This represents the horizontal physical field of view of the camera. In practical applications, the displacement transformation reference corresponding to each timestamp is calculated based on the actual deployment parameters of the camera and the formula described above.

[0040] For example, for a camera with a resolution of 2048 pixels and a field of view of 100 mm, the deviation conversion factor is approximately 20.48 pixels per millimeter; while for a camera with a resolution of 4096 pixels and a field of view of 200 mm, the deviation conversion factor is approximately 20.48 pixels per millimeter.

[0041] Specifically, firstly, the displacement time series obtained from step S101... Extract the horizontal position value corresponding to each timestamp, and set the start timestamp. Corresponding position value As a reference horizontal position, calculate the position values ​​corresponding to other timestamps and... The difference is used to obtain the displacement deviation value sequence. ,in .

[0042] Subsequently, based on the actual configuration of the production line, the corresponding deviation conversion factor is selected from Table 1. For example, for a configuration with a camera resolution of 2048 pixels and a field of view of 100 mm, the deviation conversion factor is selected. Pixels per millimeter. Next, timestamps will be added to the edge image. Alignment displacement deviation value Conversion factor with deviation Multiply to obtain the target deviation value. .

[0043] S1022. Using a three-row, three-column matrix with all diagonal elements set to 1 and all off-diagonal elements set to 0 as the reference transformation matrix, and writing the target deviation value as the translation component into the element position located in the first row and third column of the reference transformation matrix, the transformation matrix corresponding to each timestamp is obtained.

[0044] The baseline transformation matrix is ​​a 3x3 identity matrix where all diagonal elements are 1 and all off-diagonal elements are 0. In two-dimensional homogeneous coordinate transformations, this matrix represents an identity transformation without any scaling, rotation, or translation. The transformation matrix is ​​obtained by adding the target deviation value to the first row and third column of the baseline transformation matrix and is used to perform a lateral translation operation on two-dimensional homogeneous coordinates.

[0045] Specifically, first, construct the reference transformation matrix. The matrix is ​​in the form of a 3x3 identity matrix: Next, the target deviation value calculated in step S1021 is... Write the reference transformation matrix The position of the element in the first row and third column, that is, let The transformation matrix is ​​obtained. : Finally, since each time stamp in the displacement time series corresponds to a different displacement deviation value, it is necessary to calculate the corresponding target deviation value for each time stamp and construct the corresponding transformation matrix to form a transformation matrix sequence. ,in Corresponding timestamp The transformation matrix.

[0046] This embodiment achieves accurate mapping from physical spatial scale to image spatial scale. By constructing the transformation matrix by writing the target deviation value into the translation component position of the reference transformation matrix, a data foundation is laid for eliminating the dynamic interference of correction motion on edge contour coordinates.

[0047] S103. Extract the edge contour point set that is time-aligned with the displacement time series from the edge image, convert the two-dimensional coordinates in the edge contour point set into a homogeneous coordinate matrix, and perform matrix multiplication operation between the homogeneous coordinate matrix and the transformation matrix to obtain the target matrix.

[0048] Optionally, step S103, which involves extracting a set of edge contour points aligned with the displacement time series from the edge image, converting the two-dimensional coordinates in the edge contour point set into a homogeneous coordinate matrix, and performing matrix multiplication between the aligned coordinate matrix and the transformation matrix to obtain the target matrix, may specifically include: Figure 2 A flowchart illustrating a method for generating a target matrix according to an embodiment of this application is shown. Figure 2 As shown, the method includes: S1031. Extract the two-dimensional coordinates of the edge points that meet the filtering conditions from the edge image and combine them to obtain the edge contour point set. The filtering conditions are that the pixel value of the edge point is non-zero and the timestamp of the edge point is synchronized with the timestamp of the displacement time sequence.

[0049] The edge contour point set refers to the set of two-dimensional coordinates of all edge points extracted from the edge image according to the filtering criteria. And among them and The first The x and y coordinates of each edge point in the image coordinate system The total number of edge points to satisfy the filtering criteria.

[0050] Specifically, firstly, the Canny edge detection operator is used to perform gradient calculation and binarization on the original grayscale image acquired by the linear scan camera, setting the pixel values ​​of edge regions to 255 and the pixel values ​​of background regions to 0. Next, the entire edge image is read. Data collection completion timestamp Because the scanning time of a line-scan camera is extremely short, the timestamp of each pixel in this frame is uniformly labeled as... Then, the binarized edge image is traversed. The two-dimensional coordinates of edge pixels with non-zero pixel values ​​and whose calibrated timestamps are synchronously matched with the timestamps recorded in the displacement time sequence are combined to obtain the edge contour point set. .

[0051] S1032. Expand the two-dimensional coordinates of each edge point in the edge contour point set to obtain homogeneous coordinates including the horizontal coordinate, the vertical coordinate and the value 1. Arrange all homogeneous coordinates in rows to obtain a homogeneous coordinate matrix with the same number of columns as the transformation matrix.

[0052] Homogeneous coordinates refer to the three-dimensional vector representation obtained by extending two-dimensional coordinates with a third component whose value is always 1, i.e., the two-dimensional coordinates of edge points. Expanded to three-dimensional form A homogeneous coordinate matrix is ​​a multi-row, three-column matrix formed by arranging the homogeneous coordinates of all edge points in a row-major order, and the number of columns in this matrix is ​​the same as the transformation matrix obtained in step S1022. They all have the same number of columns, that is, three columns.

[0053] Specifically, firstly, the edge contour point set obtained in step S1031 is... Each edge point in The value 1 is added sequentially to the third component position, expanding the two-dimensional coordinates of each edge point to include the horizontal coordinate. y-axis Homogeneous coordinates of the sum of the three components of the value 1 Next, all of them The homogeneous coordinates of the edge points are based on the edge contour point set. The points in the matrix are arranged sequentially into a multi-row, three-column matrix, resulting in a homogeneous coordinate matrix. : in , , ,matrix common Rows and columns.

[0054] S1033. Calculate the product of the homogeneous coordinates corresponding to each timestamp in the homogeneous coordinate matrix and the corresponding transformation matrix to obtain the target homogeneous coordinates. Extract the first two components of each target homogeneous coordinate as position coordinates and construct the target matrix based on all position coordinates.

[0055] The target homogeneous coordinates refer to the homogeneous coordinate matrix. The transformation matrix between the homogeneous coordinates of each row and the corresponding timestamp The resulting three-component vector after multiplication represents the position coordinates of the edge points in the stationary coordinate system after lateral displacement compensation. The target matrix is ​​a multi-row, two-column matrix composed of the position coordinates of all edge points arranged in original order.

[0056] Specifically, firstly, the transformation matrix sequence obtained in step S1022... In the process, the acquisition timestamp corresponding to each edge point in the edge image is used as the basis. The matching relationship with the timestamps of the displacement time series was selected. The corresponding transformation matrix .

[0057] Next, align the secondary coordinate matrix. Each row of homogeneous coordinates By transforming the matrix Transpose to obtain the transpose matrix Then, perform matrix multiplication between the homogeneous coordinate row vector and the transpose matrix to obtain the target homogeneous coordinates: in , , This refers to the target deviation value calculated in step S1021. Then, the first two components of each target homogeneous coordinate are extracted. As position coordinates, all The position coordinates of the edge points are arranged in original point order into a multi-row, two-column matrix to obtain the target matrix. : This embodiment ensures strict alignment of the edge contour point set with the displacement time sequence in the time dimension, eliminating the interference of lateral correction displacement on the edge coordinates during dynamic tape movement point by point.

[0058] S104. According to the arrangement sequence of elements in the target matrix, the local curvature of each element is obtained by calculating the first and second differences between each element and its neighboring elements in the preset neighborhood. The curvature change vector is obtained by performing the first derivative of each local curvature according to the arrangement sequence.

[0059] Optionally, step S104, according to the arrangement sequence of elements in the target matrix, calculates the first and second differences between each element and its neighboring elements in a preset neighborhood to obtain the local curvature of each element, and performs the first derivative of each local curvature according to the arrangement sequence to obtain the curvature change vector, may specifically include: Figure 3 A flowchart illustrating a method for generating curvature variation vectors according to an embodiment of this application is shown. Figure 3 As shown, the method includes: S1041. Arrange all position coordinates in the target matrix according to the order from the starting position to the ending position to obtain the arrangement sequence. Extract the previous and next adjacent position coordinates of each position coordinate in the preset neighborhood from the arrangement sequence.

[0060] The permutation sequence refers to the permutation of the target matrix obtained in step S1033. An ordered sequence formed by arranging all position coordinates in a spatially continuous order according to the edge contour from the start position to the end position can be represented as follows: And among them For the permutation sequence, the first... Location coordinates, This represents the total number of position coordinates. The previous adjacent position coordinate and the next adjacent position coordinate refer to the adjacent position coordinates within the preset neighborhood range before and after the current position coordinate in the permutation sequence, respectively.

[0061] Specifically, first, according to the target matrix in step S1033... The unordered set of position coordinates in the image is processed using the Moore neighborhood contour tracking algorithm. Starting from any edge endpoint, the algorithm continuously searches for the next adjacent non-zero pixel along the 8-connected neighborhood. All position coordinates are then rearranged sequentially from the starting position to the ending position according to the continuous direction in the real physical space, resulting in the permutation sequence. .

[0062] Next, permutation sequence Each position coordinate in Extract the coordinates of its previous neighbor within a preset neighborhood. Coordinates of the next adjacent position For the first and last coordinates in the sequence, edge value copying is used to fill in the missing coordinates as the preceding or following adjacent coordinates.

[0063] S1042. Calculate the difference between the x-coordinate and y-coordinate of the position coordinate and the previous adjacent position coordinate to obtain the first-order difference. Calculate the difference between the difference between the x-coordinate and y-coordinate of the next adjacent position coordinate and the corresponding component of the first-order difference to obtain the second-order difference.

[0064] The first-order difference refers to the two-dimensional vector formed by the difference in the x-coordinate and the difference in the y-coordinate between the current position coordinate and its previous adjacent position coordinate, which can be represented as: And among them , The second-order difference refers to the two-dimensional vector obtained by subtracting the corresponding components of the first-order difference from the differences in the x-coordinate and y-coordinate of the next adjacent position coordinates and the current position coordinates. It can be represented as... And among them , .

[0065] Specifically, firstly, the permutation sequence in step S1041 is... Each position coordinate in Calculate its x-coordinate and the coordinates of its previous adjacent position. The difference of the x-coordinates and the difference in the vertical coordinates ,Will and Combined into a first-order difference vector .

[0066] Next, calculate the coordinates of the next adjacent position. With current position coordinates The difference of the x-coordinates Subtract the horizontal component of the first difference from it. The transverse component of the second-order difference is obtained. Similarly, calculate the difference in the ordinates. Subtract it The longitudinal component of the second-order difference is obtained. ,Will and Combined into a second-order difference vector .

[0067] S1043. Using the cube of the sum of square roots of the components of the first-order difference as the denominator and the difference of the cross product of the components in the first-order difference and the second-order difference as the numerator, calculate the ratio of the numerator to the denominator to obtain the local curvature of each position coordinate.

[0068] Local curvature Local curvature is a quantified value representing the degree of curvature of the edge contour at the current coordinates, used to describe the morphological changes of the contour near that point. Local curvature is calculated through the cross-product relationship between the components of the first-order and second-order difference vectors. A larger absolute value indicates a higher degree of curvature at that location, and when a small serrated tear defect appears on the edge contour, the local curvature at the corresponding location in the defect area will exhibit a significant numerical abrupt change.

[0069] Specifically, firstly, for each position coordinate obtained in step S1042... The corresponding first-order difference vector With second-order difference vector Calculate the local curvature using the following formula. : Then the permutation sequence All The above calculations are performed sequentially on each location coordinate to form a local curvature sequence. ,in For the first The local curvature value of each position coordinate.

[0070] S1044. Calculate the curvature difference between each local curvature and the local curvature corresponding to the coordinates of the adjacent position according to the arrangement sequence, and arrange them to obtain the curvature change vector.

[0071] The curvature difference refers to the numerical difference between the local curvatures corresponding to two adjacent coordinates in a permutation sequence, and is used to describe the transient change in the curvature of the edge contour along the direction of the permutation sequence. The curvature change vector is an ordered vector composed of all curvature differences corresponding to adjacent coordinates arranged sequentially according to the permutation sequence, denoted as... Furthermore, each element in the vector corresponds to the curvature change between two adjacent coordinates in the permutation sequence.

[0072] Specifically, firstly, the local curvature sequence obtained in step S1043 is... According to the permutation sequence Following the order of the position coordinates, the difference in local curvature corresponding to two adjacent position coordinates is calculated sequentially, that is, for the first position coordinate... The coordinates of the position and the first Calculate the curvature difference at each position coordinate. Next, all the calculated curvature differences are arranged sequentially according to the arrangement sequence to form a curvature change vector. This includes Each curvature difference element.

[0073] This embodiment ensures that subsequent curvature calculations are carried out sequentially along the edge contour path. It not only accurately quantifies the degree of curvature of the edge contour at each discrete point, but also transforms the transient curvature change characteristics at the locations of minute morphological changes in the edge contour into directly detectable numerical signals.

[0074] S105. Extract the target components whose positive and negative signs are reversed from the curvature change vector, and construct the target coordinate set by determining the position coordinates corresponding to each target component in the target matrix.

[0075] Optionally, step S105, which extracts the target components whose numerical signs have been reversed from the curvature change vector and constructs the target coordinate set by determining the position coordinates corresponding to each target component in the target matrix, may specifically include: S1051. According to the order of all curvature differences in the curvature change vector, extract the curvature difference values ​​with opposite signs to the next adjacent curvature difference values ​​as the target components.

[0076] The target component refers to the curvature change vector. The curvature difference between the elements and their subsequent neighbors with opposite signs satisfies the current curvature difference. Difference in curvature with the next adjacent value The curvature difference element is defined under the condition that the product of the two elements is less than zero.

[0077] Specifically, firstly, according to the total number of steps obtained in step S1044, including Curvature change vector of each element The order of all curvature differences in the array is determined by iterating from the first element to the last element. Curvature difference And simultaneously obtain the curvature difference of its adjacent neighbors. .

[0078] Next, make a judgment and Whether the signs of the values ​​are reversed, i.e., to determine Does this condition hold true? What is the curvature difference that satisfies this condition? This refers to the target components. Finally, all target components and their coordinates in the curvature change vector are considered. The corresponding sequence position number is recorded as the starting mapping feature of the curvature change interval, forming the target component set.

[0079] S1052. Determine the position coordinates corresponding to the target components in the permutation sequence as the target position coordinates, and combine all the target position coordinates to obtain the target coordinate set.

[0080] The target position coordinates refer to the permutation sequence obtained in step S1041. The position coordinates are the position coordinates corresponding to the sequence position numbers of the target components and are used to calibrate the spatial positions where the curvature change direction on the edge contour reverses. The target coordinate set is the set of coordinates obtained by combining all target position coordinates, denoted as . And among them The total number of target components. For the first The target position coordinates corresponding to each target component.

[0081] Specifically, firstly, based on the target component sequence position number set recorded in step S1051... The permutation sequence obtained in step S1041 In the middle, the extracted sequence position number is The corresponding position coordinates Used as the target location coordinates. Next, all... The target location coordinates are combined sequentially to obtain the target coordinate set. .

[0082] This embodiment accurately extracts the target component whose positive and negative signs are reversed and its sequence position number, transforming the numerical features in the curvature change vector into spatial coordinate information on the edge contour. This achieves a precise mapping from curvature change signals to spatial position coordinates.

[0083] S106. Calculate the Euclidean distance between any two coordinates in the target coordinate set. Connect the coordinates whose Euclidean distance is less than a preset distance threshold to obtain a topology map. Extract the geometric envelope parameters of the topology map and map them to the coordinate space of the metallized thin film to determine the location of the target defect.

[0084] Optionally, the process of calculating the Euclidean distance between any two coordinates in the target coordinate set in step S106, and obtaining the topology map by connecting coordinates whose Euclidean distance is less than a preset distance threshold, may specifically include: S1061. Calculate the square root of the sum of the squares of the differences in the x-coordinates and the squares of the differences in the y-coordinates of any two target positions in the target coordinate set, and obtain the Euclidean distance between any two target positions.

[0085] Euclidean distance refers to the target coordinate set The straight-line distance between any two target coordinates, used to quantify the spatial proximity of the two target coordinates in the image coordinate system, is denoted as . And among them and These are the indexes of any two target position coordinates in the target coordinate set.

[0086] Specifically, first, the target coordinate set obtained in step S1052 is traversed. All target position coordinate pairs, for any two target position coordinates and Calculate the square root of the sum of the squares of the differences in the x-coordinates and the squares of the differences in the y-coordinates to obtain the Euclidean distance between them: in This represents the difference in the x-coordinates of the two target locations. This represents the difference in the ordinate. Next, for the target coordinate set... Perform the above calculations sequentially on all possible target position coordinate pairs to obtain the Euclidean distances between all pairwise target position coordinates within the target coordinate set, forming a set of Euclidean distances. .

[0087] S1062. Determine the corresponding coordinates of two target positions that have an Euclidean distance less than a preset distance threshold as a connection relationship, and construct a topology graph with the target position coordinates corresponding to the connection relationship as nodes and the connection relationship as edges.

[0088] Preset distance threshold This refers to the upper limit of distance used to determine whether the coordinates of two target locations are connected. A connection is defined as an Euclidean distance less than a preset distance threshold. The relationship between the coordinates of two target locations is used to describe the topological connectivity between spatially adjacent candidate defect locations.

[0089] A topology graph is a graph structure constructed using the coordinates of target locations that satisfy connectivity relationships as nodes and the connectivity relationships as edges. It is used to aggregate spatially adjacent target location coordinates into continuous defect regions. Preset distance thresholds are shown in Table 2 below. Table 2: Preset Distance Threshold Reference Table

[0090] Table 2 shows typical reference values ​​for preset distance thresholds under different production line configurations and defect size requirements. Specifically, when the camera resolution is 4096 and the minimum detectable defect size is 0.5, the corresponding preset distance threshold is corrected to 10 pixels. The internal data calculation logic is the pixel distance spanned by the smallest detectable defect size in the image coordinate system. The specific calculation formula is as follows: in, The minimum detectable physical size length of the target defect. The lateral conversion factor is determined based on the camera configuration. To compensate for the dynamic tensile deformation caused by the film conveyor belt speed, the preset coefficient is calculated by the normalized ratio of the product of the camera's single exposure time and the film's linear velocity. In practical applications, it is obtained by measuring the stretching ratio of a standard circular calibration point under dynamic conveyor belt conditions.

[0091] Specifically, firstly, select the corresponding preset distance threshold based on the actual configuration of the production line. Next, traverse the set of Euclidean distances obtained in step S1061. For each of them, Euclidean distance ,judge Whether the condition is met will be determined by the coordinates of the two corresponding target positions. and The connection has been confirmed.

[0092] Finally, by using the coordinates of all target locations that satisfy the connection relationships as nodes and each pair of connection relationships as edges, a topology graph is constructed. Specifically, for isolated target location coordinates that do not satisfy connectivity relationships, they are directly included in the topology graph as independent nodes without connected edges. middle.

[0093] Optionally, the process of extracting the geometric envelope parameters of the topology map and mapping them to the coordinate space of the metallized thin film in step S106 to determine the location of the target defect may specifically include: S1063. Extract the minimum, maximum, minimum, and maximum values ​​of the x-coordinates of all nodes from the topology graph as geometric envelope parameters.

[0094] Geometric envelope parameters refer to parameters derived from the topological graph. The quadruple array formed by extracting the minimum and maximum x-coordinates, minimum and maximum y-coordinates from all node coordinates is denoted as . It is also used to describe the spatial coverage of the topology map in the image coordinate system.

[0095] Specifically, first, the topology graph constructed in step S1062 is traversed. For each node, extract the minimum x-coordinate of all nodes. With the maximum value and the minimum value of the y-coordinates of all nodes. With the maximum value Next, , , and Combined into geometric envelope parameters .

[0096] S1064. Calculate the product of the minimum and maximum values ​​of the abscissa in the geometric envelope parameters with the preset horizontal conversion coefficients to obtain the first abscissa and the second abscissa. Calculate the product of the minimum and maximum values ​​of the ordinate in the geometric envelope parameters with the preset vertical conversion coefficients to obtain the first ordinate and the second ordinate.

[0097] Horizontal conversion factor This refers to the scaling factor that converts the horizontal coordinate of a pixel in the image coordinate system to its physical horizontal position in the physical coordinate space of the metallized thin film. Vertical conversion factor. It refers to the scaling factor that converts the pixel ordinate in the image coordinate system into the physical vertical position in the physical coordinate space of the metallized film.

[0098] The first and second horizontal coordinates refer to... and The physical lateral boundary value obtained after lateral conversion factor transformation is denoted as . and The first and second ordinates refer to... and The physical longitudinal boundary value obtained after conversion by longitudinal conversion factors is denoted as follows. and The preset horizontal and vertical conversion factors are shown in Table 3 below: Table 3: Comparison Table of Horizontal and Vertical Conversion Factors

[0099] As shown in Table 3, Table 3 presents typical reference values ​​for the preset horizontal and vertical conversion factors under different production line configurations. The determination logic for these factors is based on the ratio mapping between the physical field of view size and pixel resolution, and the specific calculation formula is as follows: in, This is the horizontal conversion factor. and These are the camera's horizontal physical field of view and horizontal pixel resolution, respectively. This is the vertical conversion factor. and These represent the camera's vertical physical field of view height and vertical pixel resolution, respectively. In practical applications, the corresponding conversion factor for each dimension can be accurately calculated based on the aforementioned internal data processing logic, according to the specific configuration of the production line.

[0100] Specifically, firstly, select the corresponding horizontal conversion factor from Table 3 based on the actual configuration of the production line. Vertical conversion factor For example, for a camera configuration with a resolution of 2048 pixels and a field of view of 100 mm, select... millimeters per pixel Millimeters per pixel.

[0101] Next, the geometric envelope parameters obtained in step S1063 are... and Respectively with horizontal conversion factors Multiply by the product and add the pre-calibrated lateral mounting offset reference amount of the upper left corner origin of the camera field of view in the absolute physical coordinate system of the thin film. , obtain the first x-coordinate With the second x-axis Then, and Conversion factors with vertical conversion respectively Multiply by the product and add the corresponding longitudinal installation offset reference amount. , obtain the first ordinate and the second ordinate .

[0102] S1065. Combine the first horizontal coordinate and the first vertical coordinate to form the first physical coordinate, and combine the second horizontal coordinate and the second vertical coordinate to form the second physical coordinate.

[0103] The first physical coordinate refers to the first horizontal coordinate obtained in step S1064. and the first ordinate The resulting two-dimensional physical coordinates are denoted as It is also used to pinpoint the location of a boundary corner point of the target defect region in the physical coordinate space of the metallized thin film. The second physical coordinate refers to the second horizontal coordinate. and the second ordinate The resulting two-dimensional physical coordinates are denoted as It is also used to mark the location of another diagonal boundary corner of the target defect area.

[0104] Specifically, firstly, the first horizontal coordinate obtained in step S1064 is... and the first ordinate By combining the results, the first physical coordinates are obtained. Next, the second x-coordinate and the second ordinate By combining the results, we obtain the second physical coordinates. .

[0105] S1066. Using the first physical coordinate and the second physical coordinate as physical boundary coordinates, determine the area enclosed by the physical boundary coordinates in the coordinate space of the metallized thin film as the target defect location.

[0106] The physical boundary coordinates refer to the first physical coordinates obtained in step S1065. With the second physical coordinates The coordinate pair formed by these coordinates defines the rectangular region where the target defect is located in the physical coordinate space of the metallized thin film. The target defect location refers to the rectangular region enclosed by the physical boundary coordinates in the coordinate space of the metallized thin film, and this region corresponds to the physical distribution range of the micro-serrated tear defects on the film.

[0107] Specifically, firstly, using the first physical coordinates obtained in step S1065... With the second physical coordinates As physical boundary coordinates, the two correspond to the lower left and upper right corners of the target defect region in the physical coordinate space of the metallized thin film, respectively.

[0108] Next, with and As the lateral boundary of the target defect area, with and The rectangular region enclosed by the physical boundary coordinates in the metallized thin film coordinate space, serving as the longitudinal boundary of the target defect area, is defined as the location of the target defect. Ultimately, the target defect location is output in the form of physical coordinates, directly corresponding to the actual physical distribution area of ​​the micro-serrated tear defects on the metallized thin film.

[0109] This embodiment realizes a complete mapping from the image pixel coordinate space to the physical coordinate space of the metallized thin film, completing the entire process of metallized thin film defect detection.

[0110] Figure 4 This is a schematic diagram of a specific embodiment of a metallized thin film defect detection system provided in this application, with reference to... Figure 4 The system may include: The acquisition module 410 is used to synchronously acquire the edge image of the metallized film captured by the line scan camera on the production line, as well as the displacement timing sequence in the control bus of the production line used for guide shaft correction. Module 420 is used to extract the lateral displacement deviation value from the displacement time series and configure the displacement deviation value as a translation component in the reference transformation matrix to construct the transformation matrix. The generation module 430 is used to extract the edge contour point set that is time-aligned with the displacement time sequence from the edge image, convert the two-dimensional coordinates in the edge contour point set into a homogeneous coordinate matrix, and perform matrix multiplication operation between the homogeneous coordinate matrix and the transformation matrix to obtain the target matrix. The generation module 430 is also used to obtain the local curvature of each element by calculating the first and second differences between each element and its neighboring elements in the preset neighborhood according to the arrangement sequence of elements in the target matrix, and to obtain the curvature change vector by performing the first derivative on each local curvature according to the arrangement sequence. Module 420 is also used to extract target components whose positive and negative signs are reversed from the curvature change vector, and to construct a target coordinate set by determining the position coordinates corresponding to each target component in the target matrix; The determination module 440 is used to calculate the Euclidean distance between any two coordinates in the target coordinate set. By connecting coordinates whose Euclidean distance is less than a preset distance threshold, a topology map is obtained. The geometric envelope parameters of the topology map are extracted and mapped to the coordinate space of the metallized thin film to determine the location of the target defect.

[0111] The metallized thin film defect detection system of this application is used to implement the aforementioned metallized thin film defect detection method. Therefore, the specific implementation of the metallized thin film defect detection system can be found in the embodiment section of the metallized thin film defect detection method above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.

[0112] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application is shown.

[0113] The electronic device may include a processor 510 and a memory 520 storing computer program instructions.

[0114] Specifically, the processor 510 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0115] Memory 520 may include mass storage for data or instructions. For example, and not limitingly, memory 520 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 520 may include removable or non-removable (or fixed) media. Where appropriate, memory 520 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 520 is non-volatile solid-state memory.

[0116] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this disclosure.

[0117] The processor 510 reads and executes computer program instructions stored in the memory 520 to implement any of the metallization thin film defect detection methods in the above embodiments.

[0118] In one example, the electronic device may also include a communication interface 530 and a bus 540. Wherein, such as Figure 5 As shown, the processor 510, memory 520, and communication interface 530 are connected through bus 540 and complete communication with each other.

[0119] The communication interface 530 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0120] Bus 540 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 540 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0121] The electronic device can execute the metallized thin film defect detection method in the embodiments of this application, thereby realizing the metallized thin film defect detection method described in conjunction with the accompanying drawings.

[0122] Furthermore, in conjunction with the metallized thin film defect detection method in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the metallized thin film defect detection methods in the above embodiments.

[0123] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0124] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0125] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0126] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0127] The above provides a detailed description of a method and system for detecting defects in metallized thin films. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A method for detecting defects in metallized thin films, characterized in that, include: Simultaneously acquire edge images of the metallized thin film captured by the line scan camera on the production line, as well as the displacement timing sequence used for guide shaft correction within the control bus of the production line; The lateral displacement deviation value is extracted from the displacement time sequence, and the displacement deviation value is used as a translation component in the reference transformation matrix to construct the transformation matrix; Extract the edge contour point set that is time-aligned with the displacement time sequence from the edge image, convert the two-dimensional coordinates in the edge contour point set into a homogeneous coordinate matrix, and perform matrix multiplication on the homogeneous coordinate matrix and the transformation matrix to obtain the target matrix; According to the arrangement sequence of elements in the target matrix, the local curvature of each element is obtained by calculating the first and second differences between each element and its neighboring elements in the preset neighborhood. The curvature change vector is obtained by performing the first derivative on each local curvature according to the arrangement sequence. Extract the target components whose positive and negative signs are reversed from the curvature change vector, and construct a target coordinate set by determining the position coordinates corresponding to each target component in the target matrix; Calculate the Euclidean distance between any two coordinates in the target coordinate set, and obtain a topology map by connecting coordinates whose Euclidean distance is less than a preset distance threshold. Extract the geometric envelope parameters of the topology map and map them to the coordinate space of the metallized thin film to determine the location of the target defect. Extracting the set of edge contour points from the edge image that is time-aligned with the displacement time series includes: The edge image is extracted and the two-dimensional coordinates corresponding to the edge points that meet the filtering conditions are combined to obtain the edge contour point set. The filtering conditions are that the pixel value of the edge point is non-zero and the timestamp of the edge point is synchronized with the timestamp of the displacement time sequence. The step of extracting the geometric envelope parameters of the topology map and mapping them to the coordinate space of the metallized thin film to determine the location of the target defect includes: Extract the minimum, maximum, minimum, and maximum x-coordinates, and the maximum y-coordinates of all nodes from the topology graph as the geometric envelope parameters; Calculate the product of the minimum and maximum values ​​of the horizontal coordinates in the geometric envelope parameters with a preset horizontal conversion coefficient to obtain the first horizontal coordinate and the second horizontal coordinate. Calculate the product of the minimum and maximum values ​​of the vertical coordinates in the geometric envelope parameters with a preset vertical conversion coefficient to obtain the first vertical coordinate and the second vertical coordinate. Combine the first horizontal coordinate with the first vertical coordinate to form the first physical coordinate, and combine the second horizontal coordinate with the second vertical coordinate to form the second physical coordinate; Using the first physical coordinates and the second physical coordinates as physical boundary coordinates, the area enclosed by the physical boundary coordinates in the coordinate space of the metallized thin film is determined as the target defect location.

2. The method according to claim 1, characterized in that, The displacement time sequence includes the displacement deviation value for guide shaft correction corresponding to each timestamp; The step of extracting the lateral displacement deviation value from the displacement time series and configuring the displacement deviation value as a translation component in the reference transformation matrix to construct the transformation matrix includes: The target deviation value is obtained by multiplying the displacement deviation value by a preset deviation conversion factor. Using a three-row, three-column matrix with all diagonal elements set to 1 and all off-diagonal elements set to 0 as the base transformation matrix, and writing the target deviation value as the translation component into the element located in the first row and third column of the base transformation matrix, the transformation matrix corresponding to each timestamp is obtained.

3. The method according to claim 2, characterized in that, The step of converting the two-dimensional coordinates of the edge contour point set into a homogeneous coordinate matrix, and performing matrix multiplication between the homogeneous coordinate matrix and the transformation matrix to obtain the target matrix includes: The two-dimensional coordinates of each edge point in the edge contour point set are expanded to obtain homogeneous coordinates including the horizontal coordinate, the vertical coordinate and the value 1. All the homogeneous coordinates are arranged and combined in rows to obtain a homogeneous coordinate matrix with the same number of columns as the transformation matrix. Calculate the product of the homogeneous coordinates corresponding to each timestamp in the homogeneous coordinate matrix and the corresponding transformation matrix to obtain the target homogeneous coordinates, and extract the first two components of each target homogeneous coordinate as position coordinates, and construct a target matrix based on all the position coordinates.

4. The method according to claim 3, characterized in that, The step of obtaining the local curvature of each element by calculating the first and second differences between each element and its neighboring elements in a preset neighborhood according to the arrangement sequence of elements in the target matrix, and then performing a first-order differential on each local curvature according to the arrangement sequence to obtain a curvature change vector includes: Arrange all the position coordinates in the target matrix in the order from the starting position to the ending position to obtain an arrangement sequence. Extract the previous and next adjacent position coordinates of each position coordinate in the preset neighborhood from the arrangement sequence. The first-order difference is obtained by calculating the difference between the x-coordinate and y-coordinate of the position coordinate and the previous adjacent position coordinate. The second-order difference is obtained by calculating the difference between the difference between the x-coordinate and y-coordinate of the next adjacent position coordinate and the position coordinate and the corresponding component of the first-order difference. The local curvature of each position coordinate is obtained by calculating the ratio of the numerator to the denominator by using the cube of the sum of squares of the components of the first-order difference as the denominator and the difference of the cross product of the components of the first-order difference and the second-order difference as the numerator. The curvature difference between each local curvature and the local curvature corresponding to the adjacent position coordinates is calculated according to the arrangement sequence and arranged to obtain the curvature change vector.

5. The method according to claim 4, characterized in that, The step of extracting the target component whose numerical sign has been reversed from the curvature change vector, and constructing a target coordinate set by determining the position coordinates corresponding to each target component in the target matrix, includes: According to the arrangement order of all curvature differences in the curvature change vector, the curvature difference values ​​with opposite signs to the next adjacent curvature difference values ​​are extracted as target components. In the permutation sequence, the position coordinates corresponding to the target component are determined as the target position coordinates, and all the target position coordinates are combined to obtain the target coordinate set.

6. The method according to claim 5, characterized in that, The calculation of the Euclidean distance between any two coordinates in the target coordinate set, and the connection of coordinates whose Euclidean distance is less than a preset distance threshold to obtain a topological map, includes: The Euclidean distance between any two target position coordinates is obtained by calculating the square root of the sum of the squares of the differences in the x-coordinates and the squares of the differences in the y-coordinates of any two target position coordinates in the target coordinate set. Two target location coordinates whose Euclidean distance is less than a preset distance threshold are identified as a connection relationship. The topology graph is constructed using the target location coordinates corresponding to the connection relationship as nodes and the connection relationship as edges.

7. A defect detection system for metallized thin films, characterized in that, include: The acquisition module is used to synchronously acquire the edge image of the metallized film captured by the line scan camera on the production line, as well as the displacement timing sequence used for guide shaft correction in the control bus of the production line. A construction module is used to extract the lateral displacement deviation value from the displacement time sequence and configure the displacement deviation value as a translation component in the reference transformation matrix to construct the transformation matrix; The generation module is used to extract an edge contour point set that is time-aligned with the displacement time series from the edge image, convert the two-dimensional coordinates of the edge contour point set into a homogeneous coordinate matrix, and perform matrix multiplication on the homogeneous coordinate matrix and the transformation matrix to obtain a target matrix. Specifically, the generation module is used to extract the two-dimensional coordinates corresponding to edge points that meet the filtering conditions from the edge image and combine them to obtain the edge contour point set. The filtering conditions are that the pixel value of the edge point is non-zero and the timestamp of the edge point is synchronized with the timestamp of the displacement time series. The generation module is also used to obtain the local curvature of each element by calculating the first and second differences between each element and its neighboring elements in a preset neighborhood according to the arrangement sequence of elements in the target matrix, and to obtain the curvature change vector by performing the first derivative on each local curvature according to the arrangement sequence. The construction module is also used to extract target components whose positive and negative signs are reversed from the curvature change vector, and to construct a target coordinate set by determining the position coordinates corresponding to each target component in the target matrix; The determination module is used to calculate the Euclidean distance between any two coordinates in the target coordinate set, obtain a topology map by connecting coordinates whose Euclidean distance is less than a preset distance threshold, extract the geometric envelope parameters of the topology map and map them to the coordinate space of the metallized thin film to determine the location of the target defect. The determination module is specifically used to extract the minimum, maximum, minimum, and maximum values ​​of the horizontal and vertical coordinates of all nodes from the topology graph as the geometric envelope parameters; Calculate the product of the minimum and maximum values ​​of the horizontal coordinates in the geometric envelope parameters with a preset horizontal conversion coefficient to obtain the first horizontal coordinate and the second horizontal coordinate. Calculate the product of the minimum and maximum values ​​of the vertical coordinates in the geometric envelope parameters with a preset vertical conversion coefficient to obtain the first vertical coordinate and the second vertical coordinate. The first horizontal coordinate and the first vertical coordinate are combined to form the first physical coordinate, and the second horizontal coordinate and the second vertical coordinate are combined to form the second physical coordinate. The first physical coordinate and the second physical coordinate are used as physical boundary coordinates to determine the area enclosed by the physical boundary coordinates in the coordinate space of the metallized thin film as the target defect location.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the metallized thin film defect detection method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the metallization thin film defect detection method as described in any one of claims 1 to 6.