Image recognition-based aluminum plating film quality detection method and system

By calculating blur intensity and sensitivity in blocks during aluminum film detection, spatially variable guided weights are generated, and the blind deconvolution algorithm is optimized. This solves the problem of low image restoration quality in aluminum film detection and achieves more efficient defect detection.

CN121459359BActive Publication Date: 2026-05-29GUANGDONG MEIKE NEW MATERIALS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG MEIKE NEW MATERIALS CO LTD
Filing Date
2025-11-13
Publication Date
2026-05-29

Smart Images

  • Figure CN121459359B_ABST
    Figure CN121459359B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and more particularly, to a kind of aluminized film quality detection method and system based on image recognition, comprising: obtaining the fuzzy image of aluminized film, and the aluminized film is printed with Chinese and English characters;The fuzzy image is divided into multiple image blocks, and for each image block, based on the gradient feature of the image block, its fuzzy intensity index is calculated.The present application divides the image into blocks, and calculates the fuzzy intensity index and the fuzzy sensitivity degree for each image block respectively, and then generates a spatial variability guide weight by combining the two.The weight can intelligently identify the key areas in the image that are both severely blurred and contain complex characters, and guide the blind deconvolution algorithm to focus on accurately restoring these areas, effectively solving the defect that traditional methods are difficult to handle spatially varying blur, and significantly improving the restoration quality of the blurred image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method and system for detecting the quality of aluminum-coated films based on image recognition. Background Technology

[0002] Metallized film is widely used due to its excellent barrier properties and metallic luster. Its surface is typically printed with critical information such as production dates and batch numbers. To ensure product quality and traceability, online, real-time automated inspection of the printing quality of these characters is necessary. Image recognition is the core technology for achieving this inspection. On high-speed production lines, image acquisition systems inevitably introduce motion blur to capture the rapidly moving metallized film. This blur severely reduces the sharpness of character edges, greatly interfering with the determination of whether defects such as broken lines, burrs, or stains exist.

[0003] To address motion blur, blind deconvolution is a commonly used technique. This algorithm can simultaneously estimate the sharp original image and the blur kernel from a single blurred image, even when the point spread function (PSF, i.e., the blur kernel) is unknown. However, existing blind deconvolution algorithms have a core limitation when applied to the detection of flexible aluminized films in high-speed motion scenarios: their algorithm model is based on a crucial spatial invariance assumption, which assumes that the degree and direction of blur across the entire image are completely consistent, thus attempting to find a globally unique blur kernel.

[0004] However, in physical reality, as a flexible material, aluminized film can exhibit minute but significant differences in instantaneous speed and vibration patterns across different regions during high-speed transport due to factors such as uneven conveyor belt tension, airflow disturbances, or mechanical vibrations. This physical non-uniform motion results in spatially variable image blurring, meaning the blur kernel differs across image locations. Forcing a spatially invariant blur model onto the spatially variable blurring reality leads to poor image quality: some areas may be under-restored and remain blurry due to model mismatch, while other areas may suffer from severe artifacts such as ringing and distortion due to over-correction. These restoration defects directly interfere with the subsequent accurate assessment of character edge integrity, leading to missed defects and false alarms, failing to meet the demands of high-quality industrial inspection. Summary of the Invention

[0005] This invention provides a method and system for detecting the quality of aluminum-coated films based on image recognition, aiming to solve the problem in related technologies where forcibly applying a spatially invariant fuzzy model to a spatially variable fuzzy reality leads to low quality of the restored image.

[0006] In a first aspect, the present invention provides a method for quality inspection of aluminized film based on image recognition, comprising: acquiring a blurred image of an aluminized film, wherein the aluminized film is printed with Chinese and English characters; dividing the blurred image into multiple image blocks, and for each image block, calculating its blur intensity index based on the gradient features of the image block; calculating the sensitivity of each image block to blur, wherein the calculation of the sensitivity includes: determining its information richness based on the sum of the corner response values ​​and the topological complexity of the image block, wherein the topological complexity is obtained based on the number of connected components and the Euler number within the image block, and the sensitivity of the image block to blur is positively correlated with the information richness and is also related to the foreground pixel density of the image block; calculating a spatial variability guiding weight for each image block based on the product of the blur intensity index and the sensitivity; performing blind deconvolution restoration on the blurred image using the spatial variability guiding weight to obtain a restored image, and performing defect detection on the restored image to complete the quality inspection of the aluminized film. To address the non-uniform blurring caused by high-speed movement of aluminized film printed with Chinese and English characters, a novel spatial variability-guided weighting calculation strategy is proposed. This strategy comprehensively evaluates the blur intensity and content sensitivity of each image region, combining corner points, topology, and character type to guide the blind deconvolution algorithm to prioritize the restoration of key regions with high information content and severe blurring. This significantly improves the restoration accuracy of non-uniformly blurred images and enables more accurate automated quality detection.

[0007] Furthermore, the method for calculating the topological complexity is as follows: =|max(1, ) |; where, It is the topological complexity of image patch k. It is the number of connected components in image patch k. It is the Euler number of image patch k. By explicitly using the number of connected components and the Euler number to quantify the topological structure of image patches, a concrete, quantifiable, and robust approach to noise such as printing adhesion is provided for the evaluation of information richness, ensuring the stability and accuracy of fuzziness sensitivity calculation.

[0008] Furthermore, determining its information richness includes normalizing the product of the sum of all corner response values ​​of the image patch and the topological complexity to obtain the information richness of the image patch. Compared to using only single features such as corners or edges, this combined approach can more comprehensively evaluate the complexity of the image patch content, avoid the problem of single feature failure due to printing defects, and thus more accurately measure the importance of the image patch in the restoration process.

[0009] Furthermore, blind deconvolution restoration is performed on the blurred image, including: optimizing the objective function of the blind deconvolution algorithm, wherein the optimization formula is: In the formula, To estimate the optimal sharp image and estimate the first The optimal local blur kernel for each image patch For the clear image to be solved in the first... The part corresponding to each image patch For the first The original blurred image patch of the image patch, The first one to be solved Local blur kernel for each image patch, For the first Information richness of each image patch For convolution operations, Let L2 norm represent the reconstruction error. These are regularization terms for the sharp image and the blur kernel, respectively, used to impose prior constraints. All are regularization coefficients. The calculated spatial variability guiding weights are used as weighting coefficients for the data fidelity term. This causes the optimization algorithm to prioritize fitting regions with high weights during iterative solving, ensuring accurate restoration of key information. Compared to traditional blind deconvolution algorithms that treat all pixels equally, this method achieves differentiated and focused restoration, improving both efficiency and effectiveness.

[0010] Furthermore, the sensitivity of each image patch to blur is calculated using the following formula: In the formula, Indicates the first The sensitivity of each image patch to blur. For the first Foreground pixel density of each image block The average pixel density of the pure English character area. The average pixel density of a pure Chinese character region. For the information richness of image patch k, It is a very small positive number. By calculating the relative position of the foreground pixel density of the current image patch between the two, the content type and complexity are determined. This makes the sensitivity assessment more in line with real-world scenarios, automatically assigning higher sensitivity to Chinese regions with more complex content, thus providing more accurate guidance for image restoration.

[0011] Furthermore, defect detection is performed on the restored image, including: thresholding the restored image to obtain defect regions, calculating the proportion of the area of ​​the defect regions to the total area of ​​the clear image, and determining that the aluminum-coated film has quality defects when the proportion is greater than a preset threshold, wherein the preset threshold is 3%. By thresholding the restored clear image and calculating the proportion of defect areas, an automated and standardized quality assessment standard is provided, replacing the subjectivity and inefficiency of traditional manual visual inspection, enabling the entire inspection process to be closed-loop and quantified.

[0012] Furthermore, obtaining the foreground pixel density includes: performing adaptive binarization processing on the image block to obtain foreground pixels and background pixels; dividing the number of foreground pixels in the image block by the total number of pixels in the image block to obtain the foreground pixel density.

[0013] Furthermore, the method for obtaining the sum of corner response values ​​of the image block includes: using Harris corner detection to detect corners within the image block and calculating their response values ​​to obtain the sum of corner response values ​​of the image block.

[0014] In a second aspect, the present invention also provides an image recognition-based aluminum coating quality inspection system, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the image recognition-based aluminum coating quality inspection method described above.

[0015] Beneficial Effects: By dividing the image into blocks and calculating the blur intensity index and blur sensitivity for each block, a spatially variable guiding weight is generated by combining the two. This weight can intelligently identify key regions in the image that are both severely blurred and contain complex characters, and guide the blind deconvolution algorithm to focus on accurately restoring these regions. This effectively solves the problem that traditional methods have difficulty handling spatially variable blur, significantly improving the restoration quality of blurred images. This provides a clearer and more reliable image foundation for subsequent defect detection, ultimately improving the accuracy and automation level of aluminum-coated film quality inspection. Attached Figure Description

[0016] Figure 1 This is a schematic flowchart illustrating the quality inspection process of aluminum-coated film according to an embodiment of the present invention. Detailed Implementation

[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] like Figure 1 As shown, S101: Image acquisition and block processing.

[0019] The process involves acquiring blurred digital images of aluminum-coated films bearing Chinese and English characters moving on a high-speed production line, and preprocessing these images, such as converting them to grayscale. To quantify the differences in blurriness caused by non-uniform motion in different regions of the image, it is necessary to segment the image into blocks. This involves dividing the image into multiple non-overlapping or slightly overlapping image blocks. ,in This is the index of the image patch.

[0020] S102: Calculate the blur intensity index for any image patch.

[0021] For each image patch Calculate its internal fuzzy intensity index This metric characterizes the degree of loss of high-frequency information within an image patch. The more severe the loss of high-frequency information, the higher the blurriness of the local area. The reason for constructing the blur intensity metric is that motion blur is essentially a low-pass filtering process, which significantly weakens high-frequency components in the image, especially edge and texture details. Therefore, by measuring the attenuation of gradient energy in a local area, the blur intensity suffered by that area can be effectively deduced. Its calculation formula is as follows: In the formula, For the first Blur intensity index of an image patch For the image in coordinates The pixel grayscale value at that location, and These are the first-order gradients of the image in the horizontal and vertical directions, respectively, which can be calculated using gradient operators such as Sobel. For image blocks The total number of pixels within, The reference gradient magnitude represents the average gradient magnitude that a character region of this type should have under ideal clarity conditions. This value can be obtained in advance through statistical analysis of clear character samples collected offline.

[0022] The core of this formula is to calculate the average gradient magnitude within an image patch and compare it with an ideal reference gradient magnitude. A comparison is made. When local motion blur intensifies, character edges become smoother, resulting in changes in gradient magnitude. The overall decrease leads to a smaller numerator after summation, resulting in a reduction in the overall score and ultimately causing a decrease in the fuzziness intensity index. The value of increases. Therefore, the fuzzy intensity index The higher the value, the better the number of... The more severe the blurring of an image patch, the more significant the gradient decay.

[0023] S103: Calculate the sensitivity of each image patch to blur.

[0024] First, for each image patch, a local adaptive binarization process is performed, for example using Otsu's method, to separate character pixels from the aluminum-coated background. Then, the foreground pixel density within the patch is calculated; the foreground pixel density is the ratio of the number of foreground pixels in the patch to the total number of pixels in the patch. Furthermore, for each image patch, functions from standard image processing libraries can be directly called to calculate the Euler number of the patch and obtain the topological complexity of image patch k. Topological complexity =|max(1, ) |; It is the number of connected components in image patch k. It is the Euler number of image patch k.

[0025] Then, the Harris or Shi-Tomasi corner detection algorithm is used to calculate the sum of the response values ​​of all corner points within the block. Corners are markers of stroke intersections and transitions, and their number and intensity directly reflect the complexity of the structure. However, due to the manufacturing process of the aluminum-coated film, common printing defects occur in image processing, such as connected printed fonts, which systematically destroy gradient-based geometric features, such as corners and edges, leading to inaccurate calculation results. Therefore, the topological complexity of image block k is required. Correction, resulting in image patches Information richness : In the formula, For image blocks Information richness For the first The sum of the response values ​​of all corner points of an image patch. The maximum sum of the response values ​​of all corner points across all image patches. For image blocks The topological complexity.

[0026] Next, obtain image patches. Fuzzy intensity index and image blocks Information richness Then, combining prior knowledge of the character arrangement on the aluminum-coated film, namely the scene feature of Chinese and English lines being interspersed, each image block... The sensitivity of constructing this image patch to blur. .

[0027] Specifically, a baseline range is pre-determined by statistically analyzing samples from pure Chinese and pure English character regions. This baseline range represents the average pixel density of the pure Chinese character region. Due to the numerous strokes in Chinese characters, the average pixel density is relatively high. Conversely, the average pixel density of the pure English character region is relatively low due to the simpler structure of the letters. The reason for constructing the sensitivity of image patches to blur is that different types of characters have different sensitivities to blur. Chinese characters have complex structures and contain abundant high-frequency information, making their gradient fields more sensitive to blur. English letters, on the other hand, have simpler structures and relatively less high-frequency information. Therefore, under the same blurring effect, the gradient attenuation of the Chinese character region is more representative, and the blur information it contains is more reliable. In other words, due to its inherent high information density, complex spatial structure, and abundant high-frequency components, the Chinese character region exhibits more significant and reliable image feature attenuation than the English character region when subjected to motion blur. Therefore, assigning higher sensitivity weights to Chinese character regions by means of foreground pixel density and information richness when constructing the blur sensitivity factor is an optimization strategy based on data characteristics. Its purpose is to more accurately estimate the non-uniform motion blur field, thereby ultimately achieving higher quality image restoration. Using this feature, the sensitivity of each image patch to blur can be calculated. The calculation formula is as follows: In the formula, Indicates the first The sensitivity of each image patch to blur. For the first Foreground pixel density of each image block The average pixel density of the pure English character area. The average pixel density of a pure Chinese character region. For the information richness of image patch k, For example, a very small positive number To avoid the denominator being 0.

[0028] The above formula mainly calculates the foreground pixel density of the current image block. Its position between pure English density and pure Chinese density. The function is used to restrict the result of the fractional term to the interval [0,1], increasing the robustness of the algorithm and preventing abnormal density values ​​caused by noise. A value greater than 0 indicates that the foreground pixel density of the k-th image patch is higher than the average pixel density of the pure English character region. The k-th image patch begins to exhibit more complex features than simple English characters. Each image patch should be more sensitive to blur.

[0029] Based on the blur intensity index and the sensitivity of each image patch to blur obtained in the first two steps, for each image patch... Calculate a spatially variable guiding weight The reason for constructing this weight is to guide subsequent blind deconvolution algorithms in estimating the blur kernel by focusing on information-rich and reliable regions, while performing smooth interpolation on regions with insufficient information. An ideal reference region should simultaneously satisfy the conditions of significant blur and complex content. The formula for calculating this weight is as follows: In the formula, For the first Spatial variability of image patches guides weights. For the first Blur intensity index of an image patch For all in the entire image The maximum value is used for normalization. The average sensitivity of all image patches to blur is used for centering. For the first The sensitivity of an image patch to blur.

[0030] This formula combines information from two dimensions through multiplication. The first term This indicates that the higher the relative ambiguity of a region, the higher its weight. (Second item) This means that when the character structure complexity of a region is higher than average, i.e., higher than that of Chinese character regions, the exponent term is positive, and the weight is amplified; conversely, the exponent term is negative, and the weight is reduced. In summary, when an image patch is both severely blurred and contains complex Chinese characters, its... The maximum value will be obtained, indicating that the region is the most reliable anchor point for estimating the local fuzzy kernel.

[0031] S105: Restore the image and perform quality inspection.

[0032] Guiding weights with spatial variability Image restoration is performed by integrating this into the optimization objective function of the blind deconvolution algorithm. Traditional blind deconvolution aims to minimize a global energy function that includes data fidelity and regularization terms. This invention improves upon this by modifying the data fidelity term into a weighted form: In the formula, To estimate the optimal sharp image and estimate the first The optimal local blur kernel for each image patch For the clear image to be solved in the first... The part corresponding to each image patch For the first The original blurred image patch of the image patch, The first one to be solved Local blur kernel for each image patch, For convolution operations, Let L2 be the norm, representing the reconstruction error. These are regularization terms for the sharp image and the blur kernel, respectively, used to impose prior constraints (such as gradient sparsity). All are regularization coefficients. The value range is [0.1, 10]. In this embodiment, The preferred value is 1; The value range is [0.001, 0.05]. In this embodiment, The preferred value is 0.01. For example, a very small positive number To avoid the denominator being 0.

[0033] The logical relationship of the formula: The core of this optimization objective function lies in the weights before the data fidelity term. During the iterative solution process, for Regions with high values ​​(such as blurry Chinese characters) have higher reconstruction errors. This results in a greater penalty, forcing the optimization algorithm to prioritize accurately fitting the blurring of these anchor point regions, thereby obtaining an accurate local blur kernel. .for In regions with low values ​​(such as clearly defined English text), the error term has a smaller weight, allowing for some model bias in these areas. Ultimately, by applying all local blur kernels... By performing smooth interpolation, a continuously varying spatially variable blur field can be constructed, which can then be used to reconstruct the entire image, resulting in the final sharp image. .

[0034] Based on the restored clear image The Otsu threshold segmentation algorithm is used to process the defect area, and the proportion of the defect area is used as the quality inspection result of the aluminum-coated film. For example, when the proportion of the defect area is greater than 3%, the aluminum-coated film is judged to be unqualified, and the quality inspection of the aluminum-coated film is completed.

[0035] The present invention also provides an image recognition-based aluminum-coated film quality inspection system. The system includes a processor and a memory, the memory storing computer program instructions. When the processor executes the computer program instructions, it implements the image recognition-based aluminum-coated film quality inspection method according to the first aspect of the present invention.

[0036] 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 therefore will not be described in detail here.

[0037] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions stored or otherwise maintained on such a computer-readable medium.

[0038] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. A method for quality inspection of aluminum-coated films based on image recognition, characterized in that, include: Obtain a blurred image of an aluminized film, which is printed with Chinese and English characters; The blurred image is divided into multiple image blocks. For each image block, its blur intensity index is calculated based on the gradient features of the image block. For each image patch, the sensitivity of each image patch to blur is calculated. The calculation of sensitivity includes: determining the information richness of the image patch based on the sum of its corner response values ​​and its topological complexity, where the topological complexity is based on the number of connected components and the Euler number within the image patch; and calculating the sensitivity of each image patch to blur using the following formula: ; In the formula, Indicates the first The sensitivity of each image patch to blur. For the first Foreground pixel density of each image block The average pixel density of the pure English character area. The average pixel density of a pure Chinese character region. For the information richness of image patch k, It is a very small positive number; Based on the product of the blur intensity index and the sensitivity, a spatial variability guiding weight is calculated for each image block; Blind deconvolution restoration is performed on the blurred image using the spatially variable guided weights to obtain the restored image, including: The objective function of the blind deconvolution algorithm is optimized, and the optimization formula is as follows: ; In the formula, To estimate the optimal sharp image and estimate the first The optimal local blur kernel for each image patch For the clear image to be solved in the first... The part corresponding to each image patch For the first The original blurred image patch of the image patch, The first one to be solved Local blur kernel for each image patch, For the first Spatial variability of image patches guides weights. For convolution operations, Let L2 norm represent the reconstruction error. These are regularization terms for the sharp image and the blur kernel, respectively, used to impose prior constraints. All are regularization coefficients; Defect detection is performed on the restored image to complete the quality inspection of the aluminum-coated film.

2. The method for quality inspection of aluminum-coated film based on image recognition according to claim 1, characterized in that, The method for calculating the topological complexity is as follows: =∣max(1, ) ∣; In the formula, It is the topological complexity of image patch k. It is the number of connected components in image patch k. It is the Euler number of image patch k.

3. The method for quality inspection of aluminum-coated film based on image recognition according to claim 1, characterized in that, Determining its information richness includes: The information richness of the image patch is obtained by normalizing the product of the sum of the response values ​​of all corner points of the image patch and the topological complexity.

4. The method for quality inspection of aluminum-coated film based on image recognition according to claim 1, characterized in that, Defect detection is performed on the restored image, including: The restored image is segmented by thresholding to obtain the defect region. The area of ​​the defect region is calculated as a proportion of the total area of ​​the clear image. When the proportion is greater than a preset threshold, it is determined that the aluminum-coated film has a quality defect.

5. The method for quality inspection of aluminum-coated film based on image recognition according to claim 1, characterized in that, Obtaining the foreground pixel density includes: The image block is subjected to adaptive binarization to obtain foreground pixels and background pixels; the number of foreground pixels in the image block is divided by the total number of pixels in the image block to obtain the foreground pixel density.

6. The method for quality inspection of aluminum-coated film based on image recognition according to claim 1, characterized in that, The method for obtaining the sum of corner response values ​​of the image patch includes: The corner points within the image patch are detected using Harris corner detection, and their response values ​​are calculated to obtain the sum of the corner response values ​​of the image patch.

7. The method for quality inspection of aluminum-coated film based on image recognition according to claim 1, characterized in that, The preset threshold is 3%.

8. A quality inspection system for aluminum-coated films based on image recognition, comprising a processor and a memory, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement the image recognition-based aluminum coating quality inspection method as described in any one of claims 1-7.