A method and system for detecting defects in the PWO layer of foldable screen production
By employing image decomposition and optimization methods, and utilizing structured distance metrics and the ADMM algorithm, the problem of texture interference in PWO layer detection was solved, achieving high-precision defect detection with a low false alarm rate, thus improving the accuracy and robustness of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-03-10
AI Technical Summary
Existing PWO layer defect detection methods cannot effectively suppress non-stationary quasi-periodic texture interference caused by coating and stretching processes, resulting in high false alarm rates and poor robustness.
By employing image decomposition and optimization, a background regularization term is constructed by defining a structured distance metric between pixel grayscale and gradient direction. The Alternating Direction Multiplier Method (ADMM) is used to solve the optimization objective function, separating the image into a background layer and a defect layer. Textures with local self-similarity are accurately identified and reconstructed as the background, effectively separating real defects.
It achieves high-precision, low-false-report detection of defects in the PWO layer, effectively suppresses interference from complex textured backgrounds, and improves the accuracy and robustness of detection.
Smart Images

Figure CN121120620B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection, and more particularly to a method and system for detecting defects in the PWO layer of foldable screen production. Background Technology
[0002] In the field of foldable screen manufacturing, the PWO (Polymer Window Overlay) layer, as a key protective film covering flexible display panels, directly affects the product's optical uniformity, mechanical folding resistance, and end-user experience. Currently, mainstream production lines commonly employ high-resolution industrial cameras combined with machine vision algorithms to perform online surface defect detection on PWO films during high-speed operation, replacing traditional manual visual inspection and achieving automated identification and location of microscopic defects such as bubbles, dents, foreign objects, and oil stains. This detection method has become a core link in ensuring yield, improving production efficiency, and building a closed loop for intelligent manufacturing, and is applied in fields such as high-end consumer electronics and automotive displays.
[0003] Chinese patent application CN119599996A discloses a machine vision-based method for detecting defects in thermal insulation layers, relating to the field of defect detection technology. By employing a method that determines the comparison threshold based on the mean of gray-level features, the method can automatically adjust the threshold according to the distribution of gray-level features in different segmented regions of the entire image, making it more adaptable to local differences and overall changes in thermal insulation layer images. For target areas where gray-level feature matching yields no results, a detailed analysis of edge features is performed by establishing a Cartesian coordinate system, enabling the extraction of more clues about defects from edge information. Furthermore, by judging the integrity of abnormal shapes and analyzing the combination of related regions of incomplete shapes, a more comprehensive understanding of the distribution and formation mechanism of defects in the thermal insulation layer can be achieved.
[0004] However, existing detection methods cannot effectively suppress the inherent non-stationary quasi-periodic texture interference of PWO materials. This texture is naturally formed by the coating and stretching process, and locally resembles water ripples, but it has no strict repeating pattern and changes dynamically with position. This makes it easy for traditional frequency domain filtering, spatial background subtraction, or deep learning models to misjudge normal texture fluctuations as defects, resulting in high false alarm rates and poor robustness. Summary of the Invention
[0005] To address the issues of high false alarm rates and poor robustness in existing technologies for PWO layer defect detection, this invention provides a PWO layer defect detection method and system for foldable screen production.
[0006] In a first aspect, the present invention provides a method for detecting defects in the PWO layer of foldable screen production, employing the following technical solution:
[0007] A method for detecting defects in the PWO layer during foldable screen production includes the following steps: acquiring a grayscale image of the PWO layer; decomposing the grayscale image into a background layer image and a defect layer image; the decomposition process is based on an optimization objective function to find the optimal background layer image and the optimal defect layer image that satisfy the following conditions:
[0008] The difference between the sum of the optimal background layer image and the optimal defect layer image and the grayscale image is minimized; the sum of the absolute values of the grayscale values of all pixels in the optimal defect layer image is minimized; a background regularization term is included to evaluate the texture regularity of the background layer image, and the background regularization term is minimized; the background regularization term is positively correlated with the grayscale difference between each central image patch and its predicted image patch in the background layer image; the predicted image patch is a weighted average of all neighboring image patches in the neighborhood of the same central image patch; the weight of each neighboring image patch is positively correlated with the structured distance between the corresponding central image patch and the neighboring image patches, and the structured distance is calculated based on the original grayscale image; the structured distance is positively correlated with the square of the grayscale difference of pixels at the same position in the corresponding image patch, and negatively correlated with the cosine of the gradient direction angle difference; the defect is identified based on the optimal defect layer image.
[0009] By decomposing an image into a background layer and a defect layer, and solving for the objective function based on an optimization term that includes a data fidelity term, a defect sparsity term, and a background regularization term, the background regularization term evaluates the regularity of the background texture through a structured distance that considers both pixel grayscale differences and gradient direction angle differences among image patches. This approach can more accurately identify and reconstruct textures with local self-similarity but not strict repetition as the background, effectively separating real defects with abrupt structural features into the defect layer. This significantly suppresses interference from complex textured backgrounds, improving the accuracy and robustness of defect detection.
[0010] Preferably, the background regularization term is calculated as follows:
[0011]
[0012] in, Indicates background regularization terms; Indicates the background layer image Extracted as pixels The central image block; Indicates the background layer image Extracted as pixels The center is the neighboring image block; Represents the central image block Image blocks with neighbors Weights between them; Represents the central image block ; This represents the square of the Frobenius norm.
[0013] By using a computable and optimizable formula, the physical prior that the ideal background texture should be predicted by weighted neighboring image patches is transformed into a clear mathematical constraint, making the entire optimization process more accurate and controllable, and providing a foundation for achieving efficient background and defect separation.
[0014] Preferably, the weight is calculated as follows:
[0015]
[0016] in, Indicates weight; Represents the central image block The sum of the weights of all neighboring image patches is a normalization factor that is positively correlated with the sum of the weights of all neighboring image patches; Indicates An exponential function with base 0; Represents the central image block Image blocks with neighbors The square of the structured distance between Indicates the scale parameter.
[0017] By introducing an exponential function based on structured distance to calculate weights, image patches that are structurally similar in terms of grayscale and gradient direction receive higher weights, while image patches with large structural differences (such as defective patches) have rapidly decaying weights. This ensures that the most relevant texture information can be preferentially utilized when reconstructing the background, further enhancing the ability to identify and reject defects.
[0018] Preferably, the method for calculating the structured distance is as follows:
[0019]
[0020] in, Represents the central image block Image blocks with neighbors The square of the structured distance between them; and Representing the central image blocks respectively and neighboring image blocks The Middle The grayscale value of each pixel; Represents the cosine function; Represents the central image block and neighboring image blocks In the The difference in gradient direction angles at each pixel.
[0021] By combining the cosine values of pixel grayscale difference and gradient direction angle difference, a metric that can simultaneously measure photometric similarity and structural orientation consistency is creatively constructed. This enables the method to have a strong ability to identify the unique, highly directional water ripple-like texture of PWO films, accurately distinguishing between normal texture undulations and structural damage caused by defects, fundamentally solving the texture interference problem.
[0022] Preferably, the scale parameter The value range is 10 to 20.
[0023] Preferably, the size of the central image block is The size of the neighborhood is ,in .
[0024] Preferably, the objective function is solved iteratively using the alternating direction multiplier method to obtain the optimal background layer image and the optimal defect layer image.
[0025] The objective function is solved using the Alternating Direction Multiplier Method (ADMM). Compared to traditional optimization algorithms such as gradient descent, the ADMM algorithm has the advantages of fast convergence speed and high computational efficiency when dealing with complex optimization problems with multiple constraints, as proposed in this invention. It can also achieve fast and stable solutions in practical applications, meeting the real-time requirements of industrial online inspection.
[0026] Preferably, all identified defects are marked on the grayscale image and output to generate a marked defect image.
[0027] Preferably, acquiring the grayscale image includes:
[0028] Line scan industrial cameras deployed on the PWO production line are used to continuously acquire images of the PWO film surface, and the acquired images are converted into grayscale images.
[0029] Secondly, this invention provides a PWO layer defect detection system for foldable screen production, employing the following technical solution:
[0030] A PWO layer defect detection system for foldable screen production includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a PWO layer defect detection method for foldable screen production as described above is implemented.
[0031] The aforementioned PWO layer defect detection method for foldable screen production is generated into a computer program and stored in a memory for loading and execution by a processor. Thus, a system is created based on the memory and processor for convenient use.
[0032] The present invention has the following technical effects:
[0033] The core innovation of this invention lies in proposing a novel detection framework based on image decomposition and optimization to address the challenge of detecting inherent, irregular, quasi-periodic texture interference defects on the surface of the PWO layer in foldable screens. The key lies in defining a structured distance metric that combines pixel grayscale and gradient direction, integrating it into the background regularization term. This accurately separates the image into a background layer representing normal texture and a defect layer representing abnormalities, effectively suppressing misjudgments of complex textures and achieving high-precision, low-false-alarm-rate detection of minute defects. Attached Figure Description
[0034] Figure 1 This is a flowchart of a PWO layer defect detection method for foldable screen production according to the present invention. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] This invention discloses a method for detecting defects in the PWO layer used in foldable screen production, referring to... Figure 1 The process includes the following steps, as detailed below:
[0037] S1: Obtain the grayscale image of the PWO film.
[0038] High-resolution line-scan industrial cameras deployed on the PWO film production line continuously acquire grayscale images of the PWO film surface.
[0039] S2: Decompose the image.
[0040] The difficulty in detecting PWO layers lies in the fact that normal wavy textures and abnormal defects are mixed together and difficult to distinguish. Therefore, this step distinguishes between normal textures and abnormal defects in grayscale images.
[0041] A grayscale image consists of a background layer image and a defect layer image. This step involves finding the background layer image and the defect layer image such that their sum is as close as possible to the original grayscale image. Meanwhile, the background layer image and the defect layer image each satisfy their respective structural constraints. Specifically, the structural constraint of the background layer image is that it conforms to quasi-periodic texture, meaning that an ideal background layer image has local self-similarity and strong directional consistency; any small image patch should be able to be well reconstructed by its surrounding structurally similar neighboring image patches. The structural constraint of the defect layer is that defects are isolated and sparse in physical space. Based on these two structural constraints, the background layer image and the defect layer image are separated from the original image. The separated background layer image is taken as the optimal background layer image, and the separated defect layer image is taken as the optimal defect layer image. The optimal background layer image and the optimal defect image constitute the target image pair. The separation method is as follows: First, construct the objective function, expressed as:
[0042]
[0043] in, This represents the target image pair, i.e., the optimal background layer image. and the optimal defect layer image ; Indicates when Background layer image B and defect layer image D when the value is at its minimum; These represent the grayscale image, the background layer image to be solved, and the defect layer image, respectively. This indicates the data fidelity item, specifically: calculation. With grayscale images The sum of squares of the differences between all pixels; The background regularization term is used to evaluate the background layer image. Is it an ideal function? An ideal background layer image. ,That The value is smaller; conversely, the value is larger. The value is relatively large; This represents the sparse constraint term for defects, specifically the defect image. The sum of the absolute values of the grayscale values of all pixels in the image. During optimization, minimize... Will drive defective images Most pixel values in the data become zero, which is consistent with the prior knowledge that defects are sparse and isolated in space; and These are two regularization parameters used to balance the importance of the three constraint terms mentioned above. For example, increasing... This will result in the final defect image. More sparse. These two parameters can be set empirically, for example, , ; The square of the Frobenius Norm, when applied to an image patch (i.e., a matrix), is calculated by summing the squares of the gray values of all pixels within that patch. Let L1 norm be denoted as , and let L1 norm be denoted as , which represents the sum of the absolute values of all elements of the matrix.
[0044] This formula constructs an objective function with three goals. The optimization algorithm needs to find an optimal balance among reconstructing the grayscale image, making the defect image as sparse as possible, and making the texture of the background image as regular as possible. A real defect, due to its abrupt shape, cannot be forcibly classified into the background image. This will severely disrupt the regularity of the background image, leading to... This generates a huge penalty value. Therefore, to minimize the total energy, this abrupt structure needs to be extracted from the background layer image B and placed into the defect layer image. Medium. Although it will slightly increase The value of the term is decreasing, but the total energy is decreasing. Through this mechanism, the precise separation of background and defects is achieved.
[0045] S3: Construct a background regularization term that conforms to the quasi-periodic texture.
[0046] Background Regularization The corresponding physical prior is the local self-similarity of the PWO film surface texture. Physically, this refers to the quasi-periodic water ripples formed by the coating and stretching process. Although there is no strict repeating pattern on a macroscopic scale, in any tiny local area, the texture pattern is highly similar to its immediate surrounding areas. In other words, on a perfect, defect-free PWO film surface, any small patch can find multiple similar neighboring image patches. Based on this physical prior, a background regularization term is defined. :
[0047]
[0048] in, This represents the background regularization term, used to evaluate the background layer image to be solved. Is the texture ideal? An ideal background texture will make... The value is very small.
[0049] This represents the coordinates of any center pixel in a grayscale image. It exists in both the original image and the background layer image.
[0050] This represents the background layer image to be solved.
[0051] Indicates the background layer image Center pixel Extract a size of centered The central image block.
[0052] Indicates the background layer image Neighborhood pixels The size extracted from the center is The neighboring image blocks.
[0053] The similarity weight, with values between 0 and 1, is used to measure the similarity of the central image patch. and neighboring image blocks The degree of similarity between the two blocks is such that the closer the value is to 1, the more similar the two blocks are.
[0054] Represents the search window The coordinates of any neighboring pixel within the range.
[0055] Represented by the center pixel A size defined at the center is Large image patches (e.g.) (where m is greater than n).
[0056] This represents the square of the Frobenius norm.
[0057] Equivalent to neighboring image blocks Perform a weighted average to predict the center image patch. And with the actual center image patch The difference is calculated to obtain the error between the predicted center image patch and the actual center image patch. The larger the error, the more the center image patch deviates from the ideal background layer image. For any tiny local area, its texture pattern is highly similar to its immediate surrounding area.
[0058]
[0059] This represents the similarity weight.
[0060] Indicates any one of The size of the center is The normalization factor of an image patch is the sum of the weights of all its neighbors. It equals 1.
[0061] This represents the square of the structured distance between two image patches.
[0062] This represents a normal number, called the scaling parameter, which controls the rate at which the weight value decays with increasing distance; the empirical value is 15.
[0063] , These represent the grayscale images respectively. China-Israel point and The size extracted from the center is Image blocks.
[0064] This represents a grayscale image.
[0065] This represents an exponential function with base e.
[0066]
[0067] This represents the square of the structured distance between two image patches.
[0068] Represents image blocks and The position index of any pixel at the same location within the internal space.
[0069] , Representing image blocks and At the same location inside The pixel grayscale value at that location.
[0070] This represents the cosine function.
[0071] Represents two image blocks and In the corresponding internal position The difference in gradient direction angle at that point, i.e. The gradient direction angle is... It can be obtained through image gradient calculation.
[0072] The physical prior corresponding to d is the strong directional consistency of the PWO film texture, which means that the ideal background's water-ripple-like micro-texture not only exists but also has a clear and continuous direction. Therefore, the structured distance measures this directional consistency by introducing the difference in gradient direction angles. A real defect (such as a bubble) has a divergent gradient direction in its physical structure, completely different from the linear direction of the surrounding background; therefore, the difference calculated by the structured distance is usually large.
[0073] When the structure of the central pixel block is exactly the same as that of its neighboring pixel blocks, the gradient direction of each pixel in the two pixel blocks is the same. ,therefore The distance contribution of each pixel in the two pixel blocks is:
[0074] This indicates that, given that two pixel blocks have the same structure, the similarity between the two pixel blocks degenerates into a measure of the difference in gray levels between them; the smaller the difference in gray levels, the more similar the two pixel blocks are.
[0075] When the structure of the central pixel block is inconsistent with that of its neighboring pixel blocks, the gradient directions of some pixels in the two blocks are different. For pixels with different gradient directions... , The greater the difference in direction, The smaller the value (even if it's negative), the more it amplifies the distance between the local structures of two pixels, even their grayscale values. and Even if they are very close, they will still be judged to have a large difference if their gradient directions do not match.
[0076] The weight term measures the central image patch. and neighboring image blocks The similarity between the blocks is such that the closer the value is to 1, the more similar the two blocks are. In this way, when predicting the center block, only similar blocks will be selected for prediction.
[0077] When calculating the background regularization term, the background layer image to be optimized is used. Image patches in and Because the regularization term penalizes the background image. Its own structure; and in calculating similarity weights At that time, the original grayscale image was used without any changes. Image blocks and The reason is that whether the textures at any two locations are similar is an objective attribute determined by the content of the grayscale image. Using this fixed objective attribute to guide the reconstruction of the background is problematic if the weights also change... Using this method for calculation can lead to an unstable optimization objective, making convergence difficult.
[0078] For a normal background texture point: its surrounding similar background blocks not only have similar gray levels, but more importantly, their texture directions are highly consistent. Generally close to 1. Therefore, the total distance... Very small, weight It is large, and satisfies the physical prior that the texture pattern of any tiny local region is highly similar to that of its immediate surrounding regions, and can be effectively represented by background blocks. Therefore, the calculated background regularization term... It is very small. It should be noted that even if there are defects in the background blocks surrounding normal background texture points, the weight of the defects in the calculation is extremely small because the normal background texture and the defective background texture are inconsistent. Therefore, the defects do not participate in the prediction of the center block.
[0079] For a real defect (such as a bubble or foreign object): its gradient direction is divergent or random, unlike the linear direction of the surrounding background. When the defect is compared with any background patch, the calculated structured distance is structurally amplified, and the weights... Extremely small. This makes it impossible for defective blocks to be effectively represented by background blocks under any circumstances, resulting in the calculated background regularization term. The size is large, thus the defect points are forced to be separated into the defect layer image. middle.
[0080] S4: Obtain the optimal defect layer image to achieve defect detection of the PWO layer.
[0081] The objective function is solved iteratively using the alternating direction multiplier method (ADMM) to obtain the optimal defect layer image. It possesses highly desirable characteristics: in all defect-free areas, its pixel values are precisely zero; only in areas containing actual defects does it retain its original shape and grayscale information. At this point, the defect layer image... By applying a fixed threshold (e.g., a threshold of 1), all non-zero pixels can be identified, generating a binary defect mask image. The defect mask image accurately marks the position, size, and shape of each defect in the grayscale image, thus completing the defect detection of the PWO film.
[0082] This invention also discloses a PWO layer defect detection system for foldable screen production, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a PWO layer defect detection method for foldable screen production according to the present invention.
[0083] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0084] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A PWO layer defect detection method for foldable screen production, characterized by, The method comprises the following steps: obtaining a gray image of the PWO layer; and decomposing the gray image into a background layer image and a defect layer image; The decomposition process is based on an optimization objective function to find an optimal background layer image and an optimal defect layer image that satisfy the following conditions: The difference between the sum of the optimal background layer image and the optimal defect layer image and the gray image is minimized to construct the objective function: wherein, denotes the target image pair, i.e. the optimal background layer image and the optimal defect layer image ; and are two regularization parameters for balancing the importance of the three constraint terms above; denotes the background layer image B and the defect layer image D when is the minimum value; respectively denote the grayscale image, the background layer image and the defect layer image to be solved; denotes the data fidelity term, which is specifically calculated as: the sum of squares of all pixel point differences between and the grayscale image ; denotes the background regularization term, which is a function for evaluating whether the background layer image is ideal. The sum of the absolute values of all pixel gray values in the optimal defect layer image is minimized; a background regularization term for evaluating the regularity of the texture of the background layer image is included and minimized; the background regularization term is positively correlated with the gray difference between each center image block in the background layer image and its predicted image block, and the calculation method is: wherein, denotes a background regularizer term; denotes a center image patch centered at pixel point extracted from the background layer image ; denotes a neighbor image patch centered at pixel point extracted from the background layer image ; denotes a weight between the center image patch and the neighbor image patch ; denotes a neighborhood of the center image patch ; denotes a square of the Frobenius norm; The predicted image block is a weighted average of all neighbor image blocks in the neighborhood of the same center image block, and the calculation method of the weight is: wherein, denotes a weight; denotes a sum of weights of all neighbor image blocks of the center image block a normalized factor positively related to the sum of weights of all neighbor image blocks of the center image block denotes an exponential function with base denotes a structured distance between the center image block and the neighbor image block denotes a scale parameter; The structured distance is calculated based on the original gray image, and the calculation method is: in, Represents the central image block Image blocks with neighbors The square of the structured distance between them; and Representing the central image blocks respectively and neighboring image blocks The Middle The grayscale value of each pixel; Represents the cosine function; Represents the central image block and neighboring image blocks In the The difference in gradient direction angles at each pixel; The identification of defects is realized based on the optimal defect layer image.
2. The PWO layer defect detection method for foldable screen production according to claim 1, characterized in that, The scale parameter is in the range 10-20.
3. The PWO layer defect detection method for foldable screen production according to claim 1, characterized in that, The size of the center image block is , the size of the neighborhood is where .
4. The PWO layer defect detection method for foldable screen production according to claim 1, wherein, The objective function is iteratively solved by using the alternating direction multiplier method to obtain the optimal background layer image and the optimal defect layer image.
5. The PWO layer defect detection method for foldable screen production according to claim 1, characterized in that, All identified defects are marked on the gray image and output to generate a marked defect image.
6. The PWO layer defect detection method for foldable screen production according to claim 1, wherein, Obtaining the gray image comprises: continuously collecting images of the surface of the PWO film using a line scan industrial camera deployed on the PWO production line, and converting the collected images into a gray image.
7. A PWO layer defect detection system for foldable screen production, characterized by, The method comprises a processor and a memory, and the memory stores computer program instructions which, when executed by the processor, implement the PWO defect detection method for foldable screen production according to any one of claims 1-6.
Citation Information
Patent Citations
Thermal insulation layer defect detection method based on machine vision
CN119599996A
PMOLED screen dark and bright scratch defect detection method and system based on graphic processing algorithm
CN117058995A
MURA defect detection method based on background reconstruction and related equipment
CN119850636A