A screen protection film visual defect detection apparatus and method
Patent Information
- Application Number
- CN202611275225.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-16
AI Technical Summary
然而,此类单光源检测体系存在显著局限性:透明或半透明高分子材料的屏幕保护膜,其缺陷光学表现同时受表面形貌变化与内部应力双折射效应影响,单一反射光强度维度无法有效区分表面划痕与内部应力斑的本质差异,导致光学伪影被误判为真实缺陷,过检率持续偏高
[0033] This invention employs a dual-path independent imaging architecture consisting of a coaxial reflection optical path, a backlight transmission polarization optical path, and a three-dimensional contour scanning module. This architecture simultaneously acquires three complementary features: reflected light intensity, polarization phase delay, and surface deformation height. Based on this, a coupling suppression term is constructed using polarization stress fluctuation rate and surface deformation rate to nonlinearly and dynamically decouple the reflected light intensity fluctuation rate. This effectively eliminates optical artifact interference caused by transmission internal stress and surface micro-deformation, allowing for the separation of true defect signals. This significantly reduces the over-detection rate in traditional single-source inspection, which is hampered by the inability to distinguish between surface scratches and internal stress spots.
Smart Images

Figure CN122922076A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical inspection technology, and in particular relates to a method for detecting visual defects in screen protectors. Background Technology
[0002] Screen protectors play a crucial role in the surface protection of consumer electronics products, and their optical performance and appearance quality directly determine the user experience of the end product. Microscopic defects generated during the manufacturing process, such as bubbles, scratches, embossing, crystal points, and foreign matter inclusions, typically range in size from micrometers to millimeters and are difficult to see clearly under normal lighting conditions, thus placing high sensitivity requirements on automated optical inspection systems.
[0003] Current industrial inspection solutions generally employ high-resolution cameras combined with coaxial illumination to acquire reflected images, and then use traditional image processing or deep learning algorithms to identify abnormal areas. However, such single-light-source inspection systems have significant limitations: the optical performance of defects in transparent or semi-transparent polymer screen protectors is affected by both surface morphology changes and internal stress birefringence effects. A single dimension of reflected light intensity cannot effectively distinguish the essential differences between surface scratches and internal stress spots, leading to optical artifacts being misjudged as real defects, resulting in a persistently high over-detection rate.
[0004] A deeper problem lies in the fact that the light intensity fluctuations in the defect region actually stem from the superposition of multiple physical mechanisms, including local surface deformation, uneven film thickness, refractive index changes, and polarization phase delay. Existing algorithms simply categorize these interfering factors as noise and lack a mechanism to construct coupling suppression terms based on polarization and deformation information. This prevents the dynamic decoupling of optical artifacts, causing weak defect signals to be masked by interference sources. In the signal enhancement stage, weak defect extraction relies excessively on a fixed threshold segmentation strategy, failing to incorporate the bias term of the imaging system's intrinsic noise into the gradient feature normalization process, and neglecting to establish a multiplicative modulation fusion mechanism between the decoupling coefficients and the spatial geometric gradient. Consequently, it is difficult to effectively improve the saliency of defects.
[0005] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention
[0006] The purpose of this invention is to provide a method for detecting visual defects in screen protectors, thereby addressing the aforementioned problems.
[0007] This invention is implemented as follows: a method for detecting visual defects in screen protectors, comprising the following steps:
[0008] S1 employs a dual-optical-path independent imaging architecture. It obtains the local reflected light intensity of the screen protector through a coaxial reflection optical path, obtains the local polarization phase delay through a backlight transmission polarization optical path, and obtains the local surface deformation height by combining three-dimensional contour scanning. Local low-pass filtering is applied to the above three types of features to generate a dynamic background reference, and then the dimensionless and non-negative reflected light intensity fluctuation rate, polarization stress fluctuation rate, and surface deformation rate are calculated.
[0009] S2, using the polarization stress fluctuation rate and surface deformation rate to construct a coupling suppression term, nonlinearly and dynamically decouple the reflected light intensity fluctuation rate, and obtain the dynamic decoupling coefficient of the local region;
[0010] S3, extract the gray-level gradient of the local area of the screen protector in the spatial direction, perform dimensionless processing based on the global average gradient of the image, introduce a bias term representing the intrinsic noise of the imaging system into the normalization factor, and then use the processed gradient as a geometric amplification multiplier to perform multiplication modulation fusion with the dynamic decoupling coefficient to calculate the defect significance index of each pixel.
[0011] S4. Morphological connected component extraction is performed on the distribution map of the defect significance index to lock the candidate defect region. The topological area and chain code perimeter of the region are accurately calculated to obtain the shape compactness. A cross-evaluation model is constructed by combining the average defect significance index and area ratio within the candidate defect region to calculate the final defect severity evaluation index. When the defect severity evaluation index is greater than the preset product grade judgment threshold, the system outputs a defect alarm.
[0012] A further technical solution, in step S1, is as follows: The specific method for calculating the dimensionless and non-negative fluctuation rate of reflected light intensity is:
[0013] First, calculate the difference between the actual reflected light intensity and the local background reflected light intensity. Then, take the absolute value of this difference and divide it by the local background reflected light intensity. The resulting quotient is used as the reflected light intensity fluctuation rate at that pixel.
[0014] The specific method for calculating the dimensionless and non-negative polarization stress fluctuation rate is as follows: first, calculate the difference between the actual polarization phase delay and the local background phase delay, then take the absolute value of the difference, and finally divide it by the local background phase delay. The resulting quotient is used as the polarization stress fluctuation rate at that pixel.
[0015] A further technical solution is that, in step S1, the specific method for calculating the dimensionless and non-negative surface deformation rate is as follows: first, calculate the difference between the actual surface deformation height and the local nominal reference height; then, take the absolute value of the difference; finally, divide it by the local nominal reference height, and use the resulting quotient as the surface deformation rate at that pixel.
[0016] A further technical solution is that, in step S2, the specific method for calculating the dynamic decoupling coefficient is as follows:
[0017] First, calculate the polarization stress fluctuation rate multiplied by the surface deformation rate, and add the minimum system constant to prevent the denominator from being zero to obtain the denominator term; then divide the reflected light intensity fluctuation rate by the denominator term to obtain the intermediate ratio; finally, take the logarithm of the intermediate ratio with the natural constant e as the base, and add the natural constant to it. The result is used as the dynamic decoupling coefficient at the pixel point.
[0018] A further technical solution involves, in step S3, using the spatial geometric gradient as a feature amplification multiplier and the dynamic decoupling coefficients for multiplicative modulation fusion. The specific method for calculating the defect significance index is as follows:
[0019] First, calculate the square of the spatial grayscale gradient of the pixel in the X direction plus the square of the spatial grayscale gradient in the Y direction, and then take the square root of the sum to obtain the spatial comprehensive gradient value.
[0020] The global average spatial gradient of the current detected image is added to the root mean square gradient of the dark noise of the coaxial reflection optical path imaging system under no-light conditions to obtain a sum; then the spatial comprehensive gradient value is divided by the above sum to obtain the dimensionless spatial comprehensive gradient.
[0021] Finally, add 1 to the dimensionless spatial synthesis gradient, multiply the result by the dynamic decoupling coefficient at that pixel, and use the product as the defect significance index at that pixel.
[0022] A further technical solution, in step S4, after performing connected component labeling and boundary chain code extraction on the candidate defect region, is as follows:
[0023] The shape compactness is calculated as follows: first, calculate the total area of pixels contained in the connected region, multiply it by four times pi, and then divide it by the square of the precise perimeter of the connected region. The quotient is used as the shape compactness of the candidate defect region.
[0024] The area percentage is calculated by dividing the total area of pixels contained in the connected region by the total area of pixels in the current camera field of view, and the resulting quotient is used as the area percentage of the candidate defect region.
[0025] A further technical solution, in step S4, is as follows: The specific method for constructing the cross-evaluation model to calculate the defect severity evaluation index is as follows:
[0026] First, calculate the average significance index of the defect significance index of all pixels in the candidate defect area, multiply it by the area ratio to obtain the product term; then divide the product term by the sum of the shape compactness and the product term, and use the quotient as the defect severity evaluation index of the candidate defect area.
[0027] A screen protector visual defect detection device, applied to the method described in any one of the above, comprising:
[0028] The coaxial reflection optical path module, the backlight transmission polarization optical path module, and the three-dimensional contour scanning module are used to collect the reflected light intensity, polarization phase delay, and surface deformation height, respectively.
[0029] A data processor, electrically connected to the above modules, is used to perform the steps of the method as described in any one of claims 1 to 7, and to calculate the defect severity evaluation index;
[0030] The controller, electrically connected to the data processor, is used to issue an alarm command when the defect severity evaluation index is greater than a preset threshold.
[0031] An alarm module, electrically connected to the controller, is used to receive alarm commands and output defect alarms.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] This invention employs a dual-path independent imaging architecture consisting of a coaxial reflection optical path, a backlight transmission polarization optical path, and a three-dimensional contour scanning module. This architecture simultaneously acquires three complementary features: reflected light intensity, polarization phase delay, and surface deformation height. Based on this, a coupling suppression term is constructed using polarization stress fluctuation rate and surface deformation rate to nonlinearly and dynamically decouple the reflected light intensity fluctuation rate. This effectively eliminates optical artifact interference caused by transmission internal stress and surface micro-deformation, allowing for the separation of true defect signals. This significantly reduces the over-detection rate in traditional single-source inspection, which is hampered by the inability to distinguish between surface scratches and internal stress spots.
[0034] This invention innovatively introduces the root mean square gradient of dark noise, which characterizes the intrinsic noise of the imaging system, as a bias term during the spatial gradient normalization process, thus avoiding numerical instability and misjudgment caused by noise in low-gradient regions. Simultaneously, the dimensionless spatial composite gradient is used as a geometric amplification multiplier and multiplied and modulated with the dynamic decoupling coefficients. This enhances the saliency index of defect regions with clear edges and distinct geometric features, while effectively suppressing background noise, thereby significantly improving the detection sensitivity of weak defects.
[0035] This invention extracts connected components from the defect saliency index distribution map, accurately calculates the topological area and chain code perimeter of candidate defect regions, obtains shape compactness, and constructs a cross-evaluation model by combining the region's average saliency index and area proportion, outputting a unified defect severity evaluation index. This model comprehensively considers the intensity, spatial range, and morphological characteristics of defects, avoiding the one-sidedness of single thresholds or grayscale statistics, making defect level determination more objective and repeatable, and effectively supporting product grading decisions.
[0036] This invention generates a dynamic background benchmark through local low-pass filtering. All volatility is calculated using dimensionless and non-negative relative deviations, unaffected by absolute influences such as light intensity, camera gain, or product batch differences. Simultaneously, the dynamic decoupling coefficient, defect significance index, and severity evaluation index are all processed using nonlinear transformation and normalization, enabling the algorithm to maintain stable performance under different imaging conditions and screen protector materials without frequent parameter adjustments. It possesses excellent adaptability to industrial environments and cross-model scalability. Attached Figure Description
[0037] Figure 1 A schematic diagram illustrating the steps of a method for detecting visual defects in screen protectors;
[0038] Figure 2 The logic block diagram for dynamic decoupling and significance index calculation;
[0039] Figure 3 This is a logical block diagram of the hardware architecture for a visual defect detection device. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0041] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0042] like Figures 1-3 As shown, an embodiment of the present invention provides a method for detecting visual defects in screen protectors, comprising the following steps:
[0043] S1 employs a dual-optical-path independent imaging architecture. It obtains the local reflected light intensity of the screen protector through a coaxial reflection optical path, obtains the local polarization phase delay through a backlight transmission polarization optical path, and obtains the local surface deformation height by combining three-dimensional contour scanning. Local low-pass filtering is applied to the above three types of features to generate a dynamic background reference, and then the dimensionless and non-negative reflected light intensity fluctuation rate, polarization stress fluctuation rate, and surface deformation rate are calculated.
[0044] A dual-path independent imaging architecture is employed. The local reflected light intensity of the screen protector is acquired via a coaxial reflective optical path, while the local polarization phase delay is obtained via a backlight transmission polarization optical path. This is combined with 3D contour scanning to obtain the local surface deformation height. To achieve multimodal data acquisition, a system containing multiple independent imaging units can be configured. For example, the coaxial reflective optical path can consist of a ring light source and an industrial camera. The light emitted by the light source illuminates the screen protector surface perpendicularly, and the camera receives the reflected light. The backlight transmission polarization optical path can consist of a polarization light source, the screen protector, and a polarization camera. The polarization light source illuminates the screen protector from below, and the polarization camera receives the transmitted light from above and analyzes its polarization state. 3D contour scanning can utilize a laser triangulation sensor or a structured light projector to obtain the height information of the screen protector surface by scanning it. After acquiring the above three types of raw feature data, to eliminate the influence of background inhomogeneity and slowly changing substrates, these features need to undergo local low-pass filtering to generate a dynamic background reference. For example, sliding window averaging or Gaussian smoothing can be used to process the reflected light intensity, polarization phase delay, and surface deformation height in a local area to obtain their respective local background values. Subsequently, based on these dynamic background benchmarks, dimensionless and non-negative reflected light intensity fluctuations, polarization stress fluctuations, and surface deformation rates are calculated. For instance, this can be achieved by dividing the difference between the original eigenvalues and the local background benchmark by the local background benchmark, ensuring the dimensionlessness and non-negativity of the fluctuations.
[0045] S2, using the polarization stress fluctuation rate and surface deformation rate to construct a coupling suppression term, nonlinear dynamic decoupling is performed on the reflected light intensity fluctuation rate to eliminate optical artifact interference caused by transmission internal stress and surface micro-deformation, obtaining the dynamic decoupling coefficient of the local area. The defect signal of the screen protector is often affected by the coupling of multiple factors, especially internal stress and surface micro-deformation, which can lead to optical artifacts. To effectively distinguish between real defects and artifacts, this embodiment uses the polarization stress fluctuation rate and surface deformation rate calculated in step S1 to construct a coupling suppression term. For example, the polarization stress fluctuation rate and surface deformation rate can be multiplied, or other nonlinear combinations can be used to form a comprehensive suppression factor characterizing the artifact intensity. Subsequently, this coupling suppression term is used to perform nonlinear dynamic decoupling on the reflected light intensity fluctuation rate. For example, a nonlinear function can be used to calculate the reflected light intensity fluctuation rate and the coupling suppression term, thereby eliminating optical artifact interference caused by transmission internal stress and surface micro-deformation in the local area. Through this decoupling process, the dynamic decoupling coefficient characterizing the local area of the real defect can be obtained more accurately, and this coefficient can reflect the defect signal intensity after artifact suppression.
[0046] S3. Extract the gray-level gradient of a local area of the screen protector in the spatial direction. Perform dimensionless processing based on the global average gradient of the image, and introduce a bias term representing the intrinsic noise of the imaging system into the normalization factor. Then, use the processed gradient as a geometric amplification multiplier and perform multiplicative modulation fusion with the dynamic decoupling coefficient to calculate the defect saliency index of each pixel. To further enhance the defect signal and improve detection sensitivity, this embodiment extracts the gray-level gradient of a local area of the screen protector in the spatial direction. For example, edge detection algorithms such as the Sobel operator, Prewitt operator, or Roberts operator can be used to calculate the gray-level gradient of the image in the X and Y directions and synthesize it into a comprehensive gradient.
[0047] Subsequently, to standardize the gradient information, dimensionless processing is performed based on the global average gradient of the image. For example, the local gradient value can be divided by the global average gradient of the image. Furthermore, to avoid misjudgments due to noise in low-gradient regions, a bias term representing the intrinsic noise of the imaging system is introduced into the normalization factor. For example, this bias term could be a pre-determined root mean square gradient value of the system's dark noise. Then, the processed gradient is used as a geometric amplification multiplier and multiplied and modulated with the dynamic decoupling coefficients obtained in step S2. For example, the dynamic decoupling coefficients can be multiplied by a function related to the processed gradient (such as 1 plus the processed gradient) to calculate the defect saliency index for each pixel. This multiplied modulation fusion enhances the defect saliency in regions with high gradients (i.e., sharp edges) while effectively suppressing the noise influence in low-gradient regions.
[0048] S4. Morphological connected component extraction is performed on the distribution map of the defect saliency index to identify candidate defect regions. The topological area and chain code perimeter of the region are accurately calculated to obtain the shape compactness. A cross-evaluation model is constructed by combining the average defect saliency index and area ratio within the candidate defect region to calculate the final defect severity evaluation index. When the defect severity evaluation index exceeds the preset product grade judgment threshold, the system outputs a defect alarm. After obtaining the defect saliency index distribution map, morphological connected component extraction is required to identify specific defect entities and identify candidate defect regions.
[0049] For example, a threshold can be set to binarize the saliency index map, and then a connected component labeling algorithm (such as 8-connected or 4-connected) can be used to identify independent connected regions, which are then considered candidate defect regions. For each identified candidate defect region, its topological area and chain code perimeter are precisely calculated to obtain its shape compactness. For example, the topological area can be obtained by counting the number of pixels within the connected region, and the chain code perimeter can be calculated by chain-coding the region boundaries. Based on the area and perimeter, the shape compactness can be calculated, which reflects the geometric characteristics of the defect.
[0050] Furthermore, a cross-evaluation model is constructed by combining the average defect significance index and area proportion within the candidate defect region. For example, the average defect significance index, area proportion, and shape compactness can be combined using a preset mathematical model. This cross-evaluation model is then used to calculate the final defect severity evaluation index. When this defect severity evaluation index exceeds a preset product grade judgment threshold, the system will output a defect alarm, indicating the presence of a defect requiring attention.
[0051] In this embodiment,
[0052] In a preferred embodiment of the present invention, in step S1, the specific formulas for calculating the dimensionless and non-negative fluctuation rate of reflected light intensity and the fluctuation rate of polarization stress are as follows:
[0053]
[0054] in, Represents pixel coordinates The dimensionless reflected light intensity fluctuation rate at a pixel measures the degree of deviation of the actual reflected light intensity at that pixel relative to the reflected light intensity of its local background. Represents pixel coordinates The actual reflected light intensity at that location, i.e., the raw data directly collected by the coaxial reflection optical path module; Represents the pixel coordinates generated by low-pass filtering. The local background reflected light intensity at a given location represents the baseline value of reflected light intensity in the normal area surrounding that pixel. ;
[0055]
[0056] in Represents pixel coordinates The dimensionless polarization stress fluctuation rate at a pixel measures the degree of deviation of the actual polarization phase delay at that pixel relative to its local background polarization phase delay. Represents the pixel coordinates under the transmitted light path The actual polarization phase delay at that point, i.e., the raw data collected by the backlight transmission polarization optical path module; Represents the pixel coordinates generated by low-pass filtering. The local background phase delay at a given location represents the baseline value of the polarization phase delay in the normal region surrounding that pixel.
[0057] The aforementioned dimensionless reflected light intensity fluctuation rate This is an indicator that measures the deviation of the actual reflected light intensity at a pixel from the reflected light intensity of its local background. Its dimensionless nature makes it unaffected by specific units of illumination, facilitating comparisons across different scenarios and devices; its non-negativity ensures the physical meaning of volatility, focusing only on the magnitude of the deviation. This volatility is used to quantify local anomalies in the reflective properties of screen protectors and is an important basis for identifying surface defects. It can be calculated by subtracting the actual reflected light intensity value collected by the image sensor from the local background reflected light intensity value obtained after low-pass filtering such as Gaussian filtering or mean filtering, and then normalizing by dividing by the background value. Alternatively, median filtering or morphological opening and closing operations can be used to obtain a background reference, followed by calculation according to the formula.
[0058] The aforementioned dimensionless polarization stress fluctuation rate This is an indicator that measures the deviation of the actual polarization phase delay at a pixel relative to its local background polarization phase delay. It reflects the local anomalies in the stress distribution within the screen protector. This volatility is used to quantify the local non-uniformity of the stress distribution within the screen protector and is an important basis for identifying internal defects or stress artifacts. It can be calculated by subtracting the actual polarization phase delay obtained by a polarization camera or polarization measurement system from the local background phase delay obtained after low-pass filtering (such as Fourier transform domain filtering or wavelet transform filtering), and then normalizing by dividing by the background value. Alternatively, the background phase delay can be modeled using methods such as polynomial fitting or spline interpolation, and then calculated according to the formula.
[0059] This application achieves precise quantification of reflected light intensity fluctuation rate and polarization stress fluctuation rate by providing an explicit mathematical calculation model. The core of this method lies in calculating the relative deviation between the actual measured value and the local background reference value, and then normalizing it using the background value. This processing method makes the obtained fluctuation rate dimensionless and non-negative, thereby effectively isolating and quantifying local anomalies in the surface reflectivity and internal stress distribution of the screen protector, without considering the absolute intensity of the background signal.
[0060] In a preferred embodiment of the present invention, the specific formula for calculating the dimensionless and non-negative surface deformation rate in step S1 is as follows:
[0061]
[0062] in, Represents pixel coordinates Dimensionless surface deformation rate at the location; Represents pixel coordinates The actual surface deformation height at that location; Represents the pixel coordinates generated by fitting. The local nominal reference height at that location .
[0063] In this embodiment, the dimensionless and non-negative surface deformation rate Indicates the pixel coordinates of the screen protector surface. The relative deviation of the actual deformation height from the local nominal reference height. By making it dimensionless and ensuring it is non-negative, the influence of the absolute height value can be eliminated, making the degree of surface deformation between different regions or different batches of products comparable and facilitating subsequent quantitative analysis.
[0064] Actual surface deformation height This refers to the screen protector's pixel coordinates. The actual physical surface height. Obtaining the actual surface deformation height can be achieved through various 3D contour scanning techniques. For example, laser triangulation can be used, where a laser beam is irradiated onto the screen protector surface and a camera captures the position of the reflected light spot to calculate the height; alternatively, structured light projection technology can be used to project a known pattern onto the screen protector surface and reconstruct the surface's 3D topography by analyzing the pattern's deformation. Local nominal reference height. This refers to the actual surface deformation height. The smoothed background height is obtained through local fitting. The generation of the local nominal reference height aims to filter out the overall macroscopic curvature or slowly changing shape of the screen protector, thereby highlighting the local microscopic deformation characteristics. The local nominal reference height can be generated by performing polynomial fitting, spline interpolation, or smoothing using low-pass filters (such as Gaussian filters or moving average filters) on the actual surface deformation height data of the local area.
[0065] This application, based on obtaining the local reflected light intensity and local polarization phase delay of the screen protector, further acquires the local surface deformation height through three-dimensional contour scanning. To effectively integrate this physical deformation information into the defect detection process and make it comparable to the reflected light intensity fluctuation rate and polarization stress fluctuation rate, this application introduces a dimensionless and non-negative surface deformation rate. This surface deformation rate is calculated by measuring the actual surface deformation height. relative to local nominal reference height It is obtained by the relative deviation between them. Among them, the local nominal reference height The generation of surface deformation rate aims to abstract the overall macroscopic morphology of the screen protector, thereby focusing on microscopic local deformations. In this way, surface deformation rate can accurately quantify the degree of microscopic unevenness on the screen protector surface, such as scratches, dents, or bumps; these deformations are often important defect types. Combining surface deformation rate with two other fluctuation rates allows for a comprehensive evaluation of defect detection from both optical response and physical morphology dimensions. This avoids missed detections or misjudgments that may occur when relying solely on optical signals, providing direct and quantitative detection evidence, especially for defects that primarily manifest as physical deformation.
[0066] In a preferred embodiment of the present invention, the specific mathematical calculation model for calculating the dynamic decoupling coefficient in step S2 is as follows:
[0067]
[0068] in, Represents pixel coordinates The dynamic decoupling coefficient at the location; Represents the natural constant; Represents pixel coordinates The dimensionless reflected light intensity fluctuation rate at the location; Represents pixel coordinates The dimensionless polarization stress fluctuation rate at the location; Represents pixel coordinates Dimensionless surface deformation rate at the location; This represents the dimensionless minimum system constant to prevent the denominator from being zero.
[0069] In this embodiment, the dynamic decoupling coefficient It is a mathematically processed quantitative indicator that characterizes the actual fluctuation in reflected light intensity in a local area of the screen protector after eliminating optical artifacts caused by transmission stress and surface micro-deformation. This coefficient forms the basis for subsequent defect significance index calculations, and its accuracy directly affects the final defect detection results. This coefficient can be calculated by a dedicated image processing unit or a general-purpose processor by executing a preset algorithm.
[0070] The natural constant e is an important mathematical constant. In this scheme, it serves as the base of the natural logarithm function and is used to perform a nonlinear transformation on the decoupled ratio. This transformation helps compress the dynamic range of the data while maintaining sensitivity to small changes, making defect features easier to identify and quantify in subsequent processing.
[0071] Surface deformation rate This is the relative change in surface deformation height of a local area of the screen protector relative to its local nominal reference height. It characterizes the microscopic undulations on the screen protector surface, which can also cause optical artifacts. This deformation rate can be obtained by fitting and normalizing reference surfaces to surface topography data acquired by equipment such as 3D contour scanners, laser confocal microscopes, or white light interferometers, or calculated using structured light projection technology.
[0072] dimensionless minimum system constant This is a preset, very small positive value, primarily used to prevent the denominator from being zero in mathematical calculation models, thus avoiding calculation errors or numerical instability. This constant can be set according to the actual system noise level and numerical accuracy requirements; for example, it can be set to 10. -6 Or 10 -9 This is to ensure the robustness of the computation.
[0073] The solution proposed in this application calculates the dynamic decoupling coefficient by constructing a specific mathematical calculation model, which aims to effectively eliminate optical artifact interference caused by transmission internal stress and surface micro-deformation.
[0074] Specifically, this model treats the dimensionless reflected light intensity fluctuation rate as the subject of decoupling, and the product of the dimensionless polarization stress fluctuation rate and the dimensionless surface deformation rate as the coupling suppression term. When the screen protector has internal stress or surface deformation, the corresponding polarization stress fluctuation rate and surface deformation rate will increase, causing the value of the coupling suppression term to increase accordingly. This coupling suppression term is located in the denominator; its increase leads to a decrease in the overall fractional term, thereby reducing the value of the dynamic decoupling coefficient under the influence of the natural logarithm function.
[0075] Conversely, when the fluctuations in reflected light intensity are not caused by internal stress or surface deformation, the value of the coupling suppression term is relatively small, allowing the dynamic decoupling coefficient to more accurately reflect the inherent fluctuations in reflected light intensity. Through this nonlinear mathematical relationship, the model can intelligently suppress reflected light intensity fluctuations related to internal stress or surface deformation, thereby separating optical artifacts from the true defect signal. The use of the natural logarithm function further enhances the model's sensitivity to the decoupled signal, especially at low signal strengths, better highlighting defect characteristics. This approach enables subsequent defect saliency index calculations to be based on purer, more realistic reflected light intensity fluctuation information, significantly improving the accuracy and reliability of defect detection.
[0076] In a preferred embodiment of the present invention, in step S3, the spatial geometric gradient is used as a feature amplification multiplier and the dynamic decoupling coefficients for multiplicative modulation fusion. The specific mathematical calculation model for calculating the defect significance index is as follows:
[0077]
[0078] in, Represents pixel coordinates The dimensionless spatial synthesis gradient at the location; Represents pixel coordinates Spatial gray-level gradient in the X direction; Represents pixel coordinates Place Spatial gray-level gradient in direction; This represents the global average spatial gradient of the currently detected image; Let be the root mean square gradient value of the dark noise of the coaxial reflection optical path imaging system under no-light conditions, i.e., the root mean square value of the spatial gradient of the measured background image of the imaging system under no-light conditions, used as a bias term characterizing the intrinsic noise of the system, and satisfying the following: ;
[0079]
[0080] in, Represents pixel coordinates The significance index of defects at the location; Represents pixel coordinates The dynamic decoupling coefficient at the location; Represents pixel coordinates The dimensionless spatial synthesis gradient at the location.
[0081] In this embodiment, the spatial geometric gradient refers to the rate of change of pixel grayscale values in space within an image. It reflects the geometric features of the image, such as edges and textures. This gradient can be calculated using various operators. For example, the Sobel operator, Prewitt operator, or Roberts operator can be used to perform convolution operations on the image to obtain the grayscale gradients in the X and Y directions. and .
[0082] The global average gradient of the image The average gradient is obtained by averaging the gradient magnitudes of all pixels in the entire detected image, and it characterizes the overall texture richness or contrast level of the image. This average gradient can be obtained simply by summing the gradient magnitudes of all pixels and then dividing by the total number of pixels, or it can be represented by a more robust statistic such as the median gradient.
[0083] The bias term of the intrinsic noise of the imaging system This is used to quantify the noise level of the imaging system itself under no-light conditions. It can be obtained in advance by acquiring multiple images in a completely dark environment and calculating the root mean square value of the spatial gradient of these dark images. The introduction of this bias term aims to prevent the denominator from being zero and to provide a stable benchmark for gradient calculation, ensuring computational stability in low-gradient regions. The multiplicative modulation fusion is a method of combining two different feature information. By multiplying the dimensionless spatial synthesis gradient as an amplifying multiplier with the dynamic decoupling coefficient, the saliency of defects that simultaneously possess material anomalies and geometric features can be effectively enhanced. The defect saliency index... It is the final quantification of the visual prominence of defects. It integrates material properties and geometric features, making defects more prominent in the detection results.
[0084] This application's scheme introduces spatial geometric gradient as a feature amplification multiplier and fuses it with dynamic decoupling coefficients through multiplicative modulation, thereby calculating a more comprehensive defect saliency index. Specifically, firstly, by calculating pixel coordinates... Spatial gray-level gradient in the X direction Spatial gray-level gradient in the Y direction This allows us to obtain the gradient magnitude at that pixel. Subsequently, this gradient magnitude is compared with the global average spatial gradient of the current detection image. and the bias term characterizing the intrinsic noise of the imaging system Normalization is performed to obtain the dimensionless spatial synthesis gradient. This normalization process ensures that the gradient values are unaffected by overall brightness variations and inherent system noise, guaranteeing the validity and stability of the gradient information. Next, the dimensionless spatial gradient is synthesized. As an amplifying multiplier, it is used in conjunction with the dynamic decoupling coefficients obtained in the previous steps. Multiplication modulation fusion is performed to finally calculate the pixel coordinates. Defect significance index at the location This process enables those materials that possess anomalies (due to...) (Reflection) and also has obvious geometric features (from) The defect significance index of the affected area is significantly improved, making it more prominent in the defect map.
[0085] In a preferred embodiment of the present invention, in step S4, after performing connected component labeling and boundary chain code extraction on the candidate defect region, the specific mathematical formulas for calculating the shape compactness and area ratio are as follows:
[0086]
[0087] in, The dimensionless shape compactness of the candidate defect region is represented by π; π represents pi. This represents the total area of pixels contained in the connected region after the morphological closing operation; This represents the precise perimeter of the connected region obtained through boundary chain code calculation;
[0088]
[0089] in, This represents the dimensionless area percentage; This represents the total area of pixels contained in the candidate defect region; This represents the total pixel area of the current camera's field of view.
[0090] In this embodiment, connected component labeling is an image processing technique used to identify interconnected regions in an image with the same or similar pixel values. Its function is to organize discrete pixels in an image into meaningful regions, forming the basis for subsequent shape analysis. This technique can be implemented using a scan-line algorithm, which involves scanning the image line by line and using an equivalence table to merge adjacent connected regions; or using a seed-fill algorithm, which starts from a pixel and recursively or iteratively checks its neighboring pixels, adding all matching neighboring pixels to the connected region. Boundary chain code extraction is a compact encoding method for representing image region boundaries, describing the boundary shape by recording the relative directions of boundary pixels. Its function is to accurately describe the boundary contours of connected regions, facilitating the calculation of geometric features such as perimeter. This technique can be implemented using Freeman chain code, using 8 direction codes (0-7) to represent the relative position from the current pixel to the next boundary pixel; or using a contour tracking algorithm, starting from a starting point on the boundary and tracking and recording boundary pixels one by one according to a preset neighborhood search rule.
[0091] Dimensionless shape compactness It is a dimensionless geometric feature used to measure the "roundness" or "compactness" of a region's shape, and is usually defined as follows: This metric is calculated by measuring the total pixel area of connected regions. and the precise perimeter obtained through boundary chain codes Substitute into the formula Perform calculations. Dimensionless area percentage. It is a dimensionless feature representing the proportion of the candidate defect region to the total area of the entire detection field of view. Its function is to quantify the relative size of the defect, reflecting the extent of its influence across the entire product surface. This metric is calculated by measuring the total pixel area of the connected regions. Total pixel area of the camera's field of view Substitute into the formula Perform the calculation.
[0092] The dimensionless shape compactness Theoretically, the numerical range of is (0,1], where This corresponds to an ideally circular defect. In practical inspection applications, The value range of has a clear correspondence with the engineering classification of defect morphology, and the specific quantification rules are as follows:
[0093] (1) When When the defect morphology is determined to be roughly circular (such as bubbles, crystal points, foreign matter inclusions), the stress concentration effect of such defects is significant and has a great impact on the integrity of the protective film structure. Therefore, they should be evaluated as high severity.
[0094] (2) When When the defect morphology is determined to be a transitional morphology between regular and irregular (such as irregular embossing, edge burrs), the severity evaluation is calculated normally according to the formula.
[0095] (3) When When the defect is identified as a fine, elongated scratch, although this type of defect typically occupies a small area, it has a significant impact on the appearance quality of the screen protector and is a key type of defect to be controlled in appearance inspection. In this case, the system automatically raises the defect severity evaluation index by one level (for example, using the min(calculated value × 1.5, 1) of the calculated value as the final evaluation index) to ensure that the scratch-type defect obtains a grade that matches its actual appearance impact in the grading determination.
[0096] The above thresholds can be adjusted according to different product grade requirements through preset configuration parameters.
[0097] This application's solution first identifies candidate defect regions on the screen protector by performing morphological connected component extraction on the distribution map of the defect saliency index. To conduct a more in-depth quantitative analysis of these regions, this solution further extracts the boundary chain code for each marked connected region, thereby accurately outlining the defect's contour and precisely calculating its perimeter. Subsequently, the total pixel area obtained after morphological closing operations is used... and the precise perimeter obtained through boundary chain codes Calculate the dimensionless shape compactness This metric quantifies the geometric features of defects; for example, a nearly circular defect will have a higher compactness value, while a thin, elongated scratch will have a lower compactness value. It also calculates the total pixel area of candidate defect regions. Total pixel area of the current camera field of view The ratio yields the dimensionless area percentage. This metric reflects the relative size of the defect throughout the entire detection area.
[0098] By introducing dimensionless shape compactness and dimensionless area ratio This solution, based on the identification of candidate defect regions, further provides a quantitative description of the geometric features of the defects. This allows subsequent defect severity assessment to no longer rely solely on the defect saliency index, but to comprehensively consider the shape and relative size of the defects, thus enabling a more comprehensive and accurate classification and evaluation of visual defects in screen protectors. This quantitative analysis combining geometric features compensates for the shortcomings of defect identification based solely on grayscale or intensity fluctuations, avoiding the misjudgment of atypical defects with irregular shapes or excessively small areas as severe defects, or the misjudgment of benign features with large areas but regular shapes as defects, thereby improving the robustness and accuracy of detection.
[0099] In a preferred embodiment of the present invention, the specific mathematical formula for calculating the defect severity evaluation index by constructing the cross-evaluation model in step S4 is as follows:
[0100]
[0101] In the formula, Indicators representing the severity of defects; The region average significance index represents the significance index of all pixels within the candidate defect region. This represents the dimensionless area percentage; This represents the dimensionless shape compactness of the candidate defect region.
[0102] In this embodiment, the cross-evaluation model is a mathematical framework or algorithm for comprehensively assessing the severity of defects. Its core lies in weighting, combining, or nonlinearly mapping multiple interrelated but independent defect features (such as defect intensity, size, and shape) to generate a unified quantitative index. Besides the specific mathematical formula proposed in this application, this model can also be implemented in other ways, such as through machine learning algorithms like fuzzy logic-based expert systems, support vector machines, or neural networks, learning the complex relationship between different feature combinations and defect severity through training.
[0103] Defect severity evaluation index This is a numerical value used for the final quantitative assessment of defects detected on the screen protector. This indicator aims to provide an objective, comparable value reflecting the degree to which defects affect product quality and functionality. Its value range is typically designed to be between 0 and 1, with higher values indicating more severe defects. In addition to being calculated using the specific formula described in this application, this indicator can also be a graded score set according to industry standards or expert experience, or a normalized composite score.
[0104] Regional average significance index This refers to the average defect saliency index of all pixels within an identified candidate defect region. It quantifies the overall "defect intensity" or "abnormality" of the defect region. The calculation method is usually an arithmetic mean of the defect saliency index of all pixels within the region, but a weighted average can also be used, for example, weighted according to the distance of each pixel from the center of the region, or weighted according to the local gradient changes of each pixel within the defect region.
[0105] Dimensionless area ratio It refers to the ratio of the total pixel area of the candidate defect region to the total pixel area of the entire camera field of view.
[0106] Dimensionless shape compactness It is a geometric index that measures how close the shape of a candidate defect region is to a circle. Its value is usually between 0 and 1, where 1 represents a perfect circle, and the smaller the value, the more irregular or elongated the shape.
[0107] This application's solution constructs a cross-evaluation model that organically integrates defect features obtained from different dimensions, thereby achieving a comprehensive quantitative assessment of defect severity. Specifically, the model multiplies the average defect significance index (representing the intrinsic strength of the defect) within the candidate defect region with the dimensionless area proportion (representing the spatial extent of the defect), forming a factor reflecting the overall impact of the defect. Simultaneously, the model incorporates dimensionless shape compactness (representing the morphological characteristics of the defect) into the denominator along with the aforementioned impact factor for weighting, and calculates the final defect severity evaluation index through overall mathematical operations. This fusion approach ensures that the defect severity evaluation index considers not only the "intensity" and "size" of the defect itself, but also its "shape" characteristics. For example, for defects with the same average significance index and area proportion, the less compact the shape (e.g., a thin, elongated scratch), the smaller its shape compactness value, and the relatively lower its weight in the denominator, potentially leading to a higher defect severity evaluation index. This aligns with the actual production need to pay more attention to certain specific morphological defects (such as scratches). Conversely, the more compact the defect's shape, the higher its compactness value, which increases its weight in the denominator and may result in a relatively lower defect severity evaluation index. This cross-evaluation using multi-dimensional characteristics allows for a more comprehensive and accurate reflection of the true severity of the defect, avoiding the biases that can arise from a single indicator assessment.
[0108] A screen protector visual defect detection device, applied to the method described in any one of the above, comprising:
[0109] The coaxial reflection optical path module, the backlight transmission polarization optical path module, and the three-dimensional contour scanning module are used to collect the reflected light intensity, polarization phase delay, and surface deformation height, respectively.
[0110] A data processor, electrically connected to the above modules, is used to perform the steps of the method as described in any one of claims 1 to 7, and to calculate the defect severity evaluation index;
[0111] The controller, electrically connected to the data processor, is used to issue an alarm command when the defect severity evaluation index is greater than a preset threshold.
[0112] An alarm module, electrically connected to the controller, is used to receive alarm commands and output defect alarms.
[0113] In this embodiment, the coaxial reflection optical path module can be configured as a combination of a ring-shaped illumination source and an industrial camera. The light emitted by the light source illuminates the surface of the screen protector perpendicularly, and the industrial camera receives the reflected light to obtain the local reflected light intensity. The backlight transmission polarization optical path module can be configured as a combination of a polarization backlight source and a polarization camera. The polarization backlight source is located below the screen protector to provide transmission illumination, and the polarization camera receives the transmitted light and obtains the local polarization phase delay through a polarization analyzer. The three-dimensional contour scanning module uses a laser triangulation sensor to obtain the local surface deformation height by scanning the surface of the screen protector. The data processor receives the three types of raw data in real time. First, it performs local low-pass filtering on the reflected light intensity, polarization phase delay, and surface deformation height to generate a dynamic background reference. Then, it calculates the dimensionless and non-negative reflected light intensity fluctuation rate, polarization stress fluctuation rate, and surface deformation rate. Next, it constructs a coupling suppression term using the polarization stress fluctuation rate and surface deformation rate to perform nonlinear dynamic decoupling on the reflected light intensity fluctuation rate to eliminate optical artifact interference and obtain the dynamic decoupling coefficient. Subsequently, it extracts the spatial gray-level gradient, performs dimensionless processing based on the global average gradient of the image, and introduces a bias term of the intrinsic noise of the imaging system into the normalization factor. The processed gradient is used as a geometric amplification multiplier and multiplied and modulated with the dynamic decoupling coefficient to calculate the defect saliency index of each pixel. Finally, it extracts the morphological connected components from the defect saliency index distribution map, accurately calculates the topological area and chain code perimeter of the candidate defect region to obtain the shape compactness, and constructs a cross-evaluation model by combining the average defect saliency index and area ratio to output the defect severity evaluation index.
[0114] The core innovation of this embodiment lies in combining the coaxial reflection optical path module, the backlight transmission polarization optical path module, and the three-dimensional contour scanning module into a dual-optical-path independent imaging architecture. Simultaneously, a data processor is introduced to perform nonlinear dynamic decoupling, gradient modulation fusion, and structured cross-evaluation, thereby effectively distinguishing surface defects from internal stress artifacts and enhancing weak defect signals. Specifically, the dual-optical-path independent imaging architecture simultaneously acquires reflection, polarization, and deformation three-mode information, overcoming the inability of traditional single-source detection to distinguish the essential differences between surface scratches and internal stress spots. The data processor utilizes polarization stress fluctuation rate and surface deformation rate to construct a coupling suppression term for nonlinear dynamic decoupling, eliminating optical artifact interference caused by transmission internal stress and surface micro-deformation. A bias term for the intrinsic noise of the imaging system is introduced into the gradient modulation fusion, avoiding misjudgment in low-gradient regions, and the significance of weak defects is enhanced through geometric amplification multipliers. The cross-evaluation model comprehensively considers shape compactness, area ratio, and average significance index to achieve a quantitative assessment of defect severity. The above technical solutions significantly reduce the over-detection rate, improve the accuracy and reliability of screen protector defect detection, and solve the technical bottlenecks of existing technologies such as optical artifact misjudgment, insufficient weak signal extraction, and lack of structured evaluation mechanism.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting visual defects in screen protectors, characterized in that, Includes the following steps: S1 employs a dual-optical-path independent imaging architecture. It obtains the local reflected light intensity of the screen protector through a coaxial reflection optical path, obtains the local polarization phase delay through a backlight transmission polarization optical path, and obtains the local surface deformation height by combining three-dimensional contour scanning. Local low-pass filtering is applied to the above three types of features to generate a dynamic background reference, and then the dimensionless and non-negative reflected light intensity fluctuation rate, polarization stress fluctuation rate, and surface deformation rate are calculated. S2, using the polarization stress fluctuation rate and surface deformation rate to construct a coupling suppression term, nonlinearly and dynamically decouple the reflected light intensity fluctuation rate, and obtain the dynamic decoupling coefficient of the local region; S3, extract the gray-level gradient of the local area of the screen protector in the spatial direction, perform dimensionless processing based on the global average gradient of the image, introduce a bias term representing the intrinsic noise of the imaging system into the normalization factor, and then use the processed gradient as a geometric amplification multiplier to perform multiplication modulation fusion with the dynamic decoupling coefficient to calculate the defect significance index of each pixel. S4. Morphological connected component extraction is performed on the distribution map of the defect significance index to lock the candidate defect region. The topological area and chain code perimeter of the region are accurately calculated to obtain the shape compactness. A cross-evaluation model is constructed by combining the average defect significance index and area ratio within the candidate defect region to calculate the final defect severity evaluation index. When the defect severity evaluation index is greater than the preset product grade judgment threshold, the system outputs a defect alarm.
2. The method for detecting visual defects in screen protectors according to claim 1, characterized in that, In step S1, the specific method for calculating the dimensionless and non-negative fluctuation rate of reflected light intensity is as follows: First, calculate the difference between the actual reflected light intensity and the local background reflected light intensity. Then, take the absolute value of this difference and divide it by the local background reflected light intensity. The resulting quotient is used as the reflected light intensity fluctuation rate at that pixel. The specific method for calculating the dimensionless and non-negative polarization stress fluctuation rate is as follows: first, calculate the difference between the actual polarization phase delay and the local background phase delay, then take the absolute value of the difference, and finally divide it by the local background phase delay. The resulting quotient is used as the polarization stress fluctuation rate at that pixel.
3. The method for detecting visual defects in screen protectors according to claim 2, characterized in that, In step S1, the specific method for calculating the dimensionless and non-negative surface deformation rate is as follows: first, calculate the difference between the actual surface deformation height and the local nominal reference height; then, take the absolute value of the difference; finally, divide it by the local nominal reference height, and use the resulting quotient as the surface deformation rate at that pixel.
4. The method for detecting visual defects in screen protectors according to claim 3, characterized in that, In step S2, the specific method for calculating the dynamic decoupling coefficients is as follows: First, calculate the polarization stress fluctuation rate multiplied by the surface deformation rate, and add the minimum system constant to prevent the denominator from being zero to obtain the denominator term; then divide the reflected light intensity fluctuation rate by the denominator term to obtain the intermediate ratio; finally, take the logarithm of the intermediate ratio with the natural constant e as the base, and add the natural constant to it. The result is used as the dynamic decoupling coefficient at the pixel point.
5. The method for detecting visual defects in screen protectors according to claim 3, characterized in that, In step S3, the spatial geometric gradient is used as a feature amplification multiplier and multiplied and modulated with the dynamic decoupling coefficients to calculate the defect significance index. The specific method for this calculation is as follows: First, calculate the square of the spatial grayscale gradient of the pixel in the X direction plus the square of the spatial grayscale gradient in the Y direction, and then take the square root of the sum to obtain the spatial comprehensive gradient value. The sum of the global average spatial gradient of the current detected image and the root mean square gradient of the dark noise of the coaxial reflection optical path imaging system under no-light conditions is obtained. Then divide the spatial composite gradient value by the sum of the above values to obtain the dimensionless spatial composite gradient; Finally, add 1 to the dimensionless spatial synthesis gradient, multiply the result by the dynamic decoupling coefficient at that pixel, and use the product as the defect significance index at that pixel.
6. The method for detecting visual defects in screen protectors according to claim 5, characterized in that, In step S4, after performing connected component labeling and boundary chain code extraction on the candidate defect regions, the specific method for calculating the shape compactness and area ratio is as follows: The shape compactness is calculated as follows: first, calculate the total area of pixels contained in the connected region, multiply it by four times pi, and then divide it by the square of the precise perimeter of the connected region. The quotient is used as the shape compactness of the candidate defect region. The area percentage is calculated by dividing the total area of pixels contained in the connected region by the total area of pixels in the current camera field of view, and the resulting quotient is used as the area percentage of the candidate defect region.
7. The method for detecting visual defects in screen protectors according to claim 6, characterized in that, In step S4, the specific method for constructing the cross-evaluation model to calculate the defect severity evaluation index is as follows: First, calculate the average significance index of the defect significance index of all pixels in the candidate defect area, multiply it by the area ratio to obtain the product term; then divide the product term by the sum of the shape compactness and the product term, and use the quotient as the defect severity evaluation index of the candidate defect area.
8. A screen protector visual defect detection device, applied to the method described in any one of claims 1-7, characterized in that, include: The coaxial reflection optical path module, the backlight transmission polarization optical path module, and the three-dimensional contour scanning module are used to collect the reflected light intensity, polarization phase delay, and surface deformation height, respectively. A data processor, electrically connected to the above modules, is used to perform the steps of the method as described in any one of claims 1 to 7, and to calculate the defect severity evaluation index; The controller, electrically connected to the data processor, is used to issue an alarm command when the defect severity evaluation index is greater than a preset threshold. An alarm module, electrically connected to the controller, is used to receive alarm commands and output defect alarms.