A surface film detection system for an IML display device
By combining image binarization, region selection, centroid locking, and area analysis modules, the problem of misjudgment in the detection of tiny breakpoint defects in the surface film of IML display devices is solved, achieving high-precision, low-latency defect identification and judgment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MIANYANG HONGYONGSHENG MOULD&PLASTIC CO LTD
- Filing Date
- 2026-06-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to accurately extract the true topological equivalent area and anisotropic effective pixel density and distribution eccentricity of fragmented defect clusters composed of tiny breakpoints in the surface film of an IML display device, leading to misjudgments and missed detections.
The system employs an image binarization module to acquire gradient images and compare them with edge gradient thresholds, a region selection module to obtain connected components through an image pyramid, a centroid locking module to calculate the spatial moments of defect pixel clusters, an area analysis module to construct the topological inertia tensor covariance matrix, and a verification decision module to compare density and eccentricity, thereby achieving high-precision defect detection.
It achieves high detection rate and low false alarm rate detection of the surface film of IML display devices, can adaptively identify fracture defects with specific distribution tendencies, eliminate false defects, and match the high online cycle time requirements of industrial production lines.
Smart Images

Figure CN122312639B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of detection system technology, and in particular to a surface thin film detection system for IML display devices. Background Technology
[0002] With the widespread application of in-mold inlay (IML) technology in various display devices, the appearance quality of its surface film directly determines the final yield of the product.
[0003] Currently, machine vision inspection systems are widely used on production lines for automated quality inspection of thin film surfaces. Conventional inspection methods typically involve using industrial cameras to acquire high-resolution images of the product surface, then using basic grayscale threshold comparison algorithms to identify abnormal continuous pixel regions in the image, and directly calculating the physical size or conventional envelope area of these independent connected regions. These results are then compared with the factory's preset defect inspection standards to output the inspection results.
[0004] However, in actual production and processing, IML films often exhibit complex defects such as cold glue marks, stress whitening, or fine fuzz. Under high-resolution microscopic images, these defects often do not appear as continuous and complete color blocks, but rather as fragmented discrete communities composed of a large number of adjacent but unconnected tiny spots. At the same time, these discrete defect spots are not scattered randomly, but usually have a specific physical distribution tendency, such as being distributed in inclined bands or lines along a specific force direction or injection flow direction.
[0005] Existing technologies struggle to accurately extract the true topological equivalent area of such fragmented defect clusters, and also cannot precisely obtain their anisotropic effective pixel density and distribution eccentricity features. When faced with macroscopic defects composed of tiny breakpoints, the overall morphological parameters and density data output by existing systems are often severely distorted, causing the system to be unable to effectively distinguish between fracture defects with specific distribution tendencies and isolated dust noise that happens to be close by. This makes it very easy for the system to misjudge real strip-shaped or linear non-conforming defects as compliant background noise and filter them out directly, resulting in non-conforming products being incorrectly released into the next process. Summary of the Invention
[0006] The main objective of this invention is to provide a surface thin film inspection system for IML display devices, which aims to solve the problem that the overall morphological parameters and density data are easily distorted when the prior art is faced with macroscopic defects composed of tiny breakpoints.
[0007] To achieve the above objectives, the present invention provides a surface thin film inspection system for an IML display device, the system comprising: An image binarization module is used to acquire a gradient image of the surface film of the IML display device under test, and compare the gradient image with a preset edge gradient threshold to obtain a binarized image. The region selection module is used to construct an image pyramid based on the binarized image, obtain the connected components that have physically merged in the preset target level, and reverse map the boundaries of the connected components back to the binarized image to obtain the region of interest. The centroid locking module is used to traverse all binarized pixels in the region of interest, obtain the zero-order spatial moment and the first-order spatial moment of the defective pixel cluster in the region of interest, and obtain the physical centroid of the defective pixel cluster according to the ratio of the first-order spatial moment to the zero-order spatial moment. The area analysis module is used to obtain the second-order central moment of the defective pixel cluster with the physical centroid as the origin, construct the topological inertia tensor covariance matrix based on the second-order central moment and extract the principal eigenvalues and secondary eigenvalues to obtain the area of the equivalent inertial ellipse that encloses the defective pixel cluster. The verification decision module is used to obtain the anisotropic topological density based on the zero-order spatial moment and the area of the equivalent inertial ellipse, and to obtain the distribution eccentricity based on the principal eigenvalue and the secondary eigenvalue; compare the anisotropic topological density with a preset density threshold, and compare the distribution eccentricity with a preset eccentricity threshold; and confirm the merging state of the connected components based on the comparison results and output the detection results.
[0008] Optionally, when the region selection module obtains the preset target level, it is specifically used for: To obtain the maximum physical fracture distance within a single defect that is permissible by the process, and the optical resolution of the inspection camera; The maximum physical fracture distance is converted into the optical resolution to obtain the maximum pixel spacing that defects are allowed to merge. The target level for performing connected component extraction is determined based on the maximum pixel spacing.
[0009] Optionally, when acquiring the region of interest, the region selection module is specifically used for: Obtain the outer envelope boundary of the connected component at the target level; The area magnification factor is obtained based on the difference between the target level and the initial construction level. The coordinate dimensions of the outer envelope boundary are mapped and calculated based on the area magnification factor, and the region of interest containing only the defective pixel cluster is located and cropped in the binarized image.
[0010] Optionally, in the centroid locking module, the zeroth-order spatial moment is obtained by summing the total number of all binarized pixels representing defect states within the region of interest; The first-order spatial moment is obtained by globally accumulating the position coordinates of each binarized pixel representing a defect state in the region of interest along the coordinate axis and its corresponding pixel value.
[0011] Optionally, when obtaining the second-order central moment, the area analysis module is specifically used for: Traverse all binarized pixels within the region of interest and obtain the distance difference between the position coordinates of each pixel representing a defect state and the physical centroid. The square of the distance difference and the product of the distance differences in different coordinate axis directions are multiplied by the corresponding binarized pixel values and then accumulated to obtain the variance and covariance of the defect distribution in each direction, which are used as the second-order central moments.
[0012] Optionally, when the area analysis module obtains the area of the equivalent inertial ellipse that encloses the defective pixel cluster, it is specifically used to: construct a second-order characteristic equation using the variance and covariance contained in the second-order central moment. According to the second-order characteristic equation, the variance distributed along the major axis is taken as the principal characteristic value, and the variance distributed along the minor axis is taken as the secondary characteristic value. Multiply the square root of the principal eigenvalue by the square root of the secondary eigenvalue, and then multiply by the pi parameter to obtain the area of the equivalent inertial ellipse.
[0013] Optionally, in the verification decision module, the anisotropic topological density is obtained by dividing the zero-order spatial moment representing the total number of defective pixels by the area of the equivalent inertial ellipse. The distribution eccentricity is obtained by taking the square root of the ratio of the secondary eigenvalue to the primary eigenvalue, and is used to characterize the distribution tendency of the defective pixel cluster.
[0014] Optionally, when outputting the detection result, the verification decision module is specifically used for: When the anisotropic topological density is greater than or equal to the preset density threshold, and the distribution eccentricity is greater than or equal to the preset eccentricity threshold, the defective pixel cluster in the current region of interest is determined to be a fracture defect, the merging state of the connected domain is confirmed to be valid, and the detection result of product non-compliance is output.
[0015] Optionally, the verification decision module is further configured to: When the anisotropic topological density is less than the preset density threshold, and / or the distribution eccentricity approaches zero, the connected component is determined to be a pseudo-connected structure, a break mechanism is initiated to separate the connected component, and it is determined to be background noise.
[0016] Optionally, before acquiring the binarized image, the image binarization module is further configured to perform dynamic occlusion processing: Extract the outer contour of the IML display device under test to construct a background-free product image; Using the backgroundless product image as a base, the physical boundary contours of the transparent display window area and the non-transparent border area are identified to construct a nested mask; After masking the abrupt edges generated by the physical boundary contour according to the nested mask, the operation of converting to the binarized image is then performed.
[0017] The beneficial effects that this invention can achieve are as follows: This invention uses an image binarization module to perform gradient threshold comparison, a region selection module to obtain the region of interest by inverse mapping of the connected components of the target level in the image pyramid, a centroid locking module to lock the physical centroid based on the ratio of the first-order and zero-order spatial moments, an area analysis module to extract the second-order central moment with the centroid as the origin and construct the topological inertia tensor covariance matrix to extract the principal and secondary eigenvalues to obtain the area of the equivalent inertial ellipse, and a verification decision module to calculate the anisotropic topological density and distribution eccentricity based on the zero-order spatial moment, the area of the equivalent inertial ellipse, and the principal and secondary eigenvalues and perform threshold comparison. This invention solves the problems of fragmentation and missed detection caused by discrete defect fragmentation in IML thin film detection, as well as false detection caused by false area expansion due to defect tilting or adjacent dust particles. It achieves an adaptive dual verification decision with high detection, low false alarm and ultra-low computing power. This invention also utilizes characteristic moment tensor analysis to enable the equivalent inertial ellipse area to adaptively follow the arbitrary tilting posture of defects such as cold glue marks and fuzz, rotating and tightly wrapping them. This eliminates a large amount of harmless background contained in the traditional horizontal envelope rectangle, fundamentally preventing area distortion. At the same time, the dual-dimensional verification of density and eccentricity can accurately identify and logically break isotropic random dust at the feature level, preventing the false positive of good products. Moreover, the entire process calculation is controlled at the microsecond level, matching the high online cycle time requirements of industrial production lines. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0019] Figure 1 This is a structural block diagram of the detection system in Embodiment 1 of the present invention.
[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0022] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a specific posture. If the specific posture changes, the directional indication will also change accordingly.
[0023] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral part; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0024] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0025] Example 1: Reference Figure 1This embodiment provides a surface thin film detection system for an IML display device, the system comprising:
[0026] An image binarization module is used to acquire a gradient image of the surface film of the IML display device under test, and compare the gradient image with a preset edge gradient threshold to obtain a binarized image. The region selection module is used to construct an image pyramid based on the binarized image, obtain the connected components that have physically merged in the preset target level, and reverse map the boundaries of the connected components back to the binarized image to obtain the region of interest. The centroid locking module is used to traverse all binarized pixels in the region of interest, obtain the zero-order spatial moment and the first-order spatial moment of the defective pixel cluster in the region of interest, and obtain the physical centroid of the defective pixel cluster according to the ratio of the first-order spatial moment to the zero-order spatial moment. The area analysis module is used to obtain the second-order central moment of the defective pixel cluster with the physical centroid as the origin, construct the topological inertia tensor covariance matrix based on the second-order central moment and extract the principal eigenvalues and secondary eigenvalues to obtain the area of the equivalent inertial ellipse that encloses the defective pixel cluster. The verification decision module is used to obtain the anisotropic topological density based on the zero-order spatial moment and the area of the equivalent inertial ellipse, and to obtain the distribution eccentricity based on the principal eigenvalue and the secondary eigenvalue; compare the anisotropic topological density with a preset density threshold, and compare the distribution eccentricity with a preset eccentricity threshold; and confirm the merging state of the connected components based on the comparison results and output the detection results.
[0027] In this embodiment, due to the high gloss and strong reflective properties of the surface film of the IML display device, it is prone to generating uneven light spot backgrounds during optical inspection, causing subsequent algorithms to misjudge optical noise as defects. To cut off this optical heterogeneity interference, after the image binarization module acquires the gradient image of the surface film of the IML display device under test, it compares the gradient value at each coordinate position in the gradient image with a preset edge gradient threshold. When the gradient value is greater than the threshold, it is forcibly assigned a high-level Boolean value representing the defect state; otherwise, it is assigned a low-level Boolean value representing the background state, thereby obtaining a binarized image. In this feature stripping process, the image binarization module follows the following logical expression: ; In the formula, This represents the Boolean pixel value at the spatial coordinate point (x,y) of the binarized image obtained after calculation. This data serves as the basic input source for subsequent region selection and matrix analysis. This represents the grayscale gradient value of the gradient image of the thin film on the tested surface at the spatial coordinate point (x,y). This data comes from the digital matrix output after the front-end detection camera scans the image and filters it through the edge operator. This represents the preset edge gradient threshold, which is derived from the global critical constant determined by sampling the environmental background noise of known defect-free standard parts during the system's debugging phase.
[0028] The above formula, through discretization threshold truncation, forces the complex gray-level floating-point matrix to be reduced to a Boolean matrix that is either 0 or 1. This logical processing not only eliminates the macroscopic brightness drift caused by surface undulations, but also provides a binary basis with minimal computational cost for subsequent spatial moment integration operations of massive pixels, greatly improving the real-time response time of the system on the pipeline.
[0029] After obtaining the underlying feature base, the data stream enters the region selection module. This module constructs an image pyramid based on the acquired binarized image. Specifically, the module uses maximum downsampling logic to force topological closure of originally adjacent discrete defect breakpoints within a preset target level, obtaining physically merged connected components. Subsequently, the module extracts the outer boundary of this connected component and uses a level magnification factor to inversely map it back to the highest resolution binarized image, thereby accurately cropping out the high-resolution region of interest containing only the defect cluster. In this region selection and localization process, the formula used by the region selection module to determine the downsampling depth is as follows: ; In the formula, This represents the preset target level, and its data is represented as positive integers, derived from the result of rounding up, and is used to control the stopping boundary of the iterative calculation of the image pyramid. This represents the maximum physical fracture distance within a single defect that is permissible under the process. The data for this measurement comes from the physical tolerance threshold entered by the field engineer according to the inspection specifications. It indicates the optical resolution capability of the camera, and its data comes from the physical size of a single pixel, which is determined by dividing the actual field of view of the camera lens by the number of pixels on the sensor target surface.
[0030] Since different IML injection molding production lines have different inspection standards for the allowable physical breakage distance of defects such as cold glue marks and fuzz, the above formula divides and binds the abstract image pixel scaling logarithm with the actual physical geometric tolerance in the workshop. This allows the detection system to adaptively lock the optimal processing level by simply modifying the physical tolerance parameters when changing different models of the tested products, thus possessing strong engineering adaptability.
[0031] After completing the macroscopic boundary selection, due to the highly irregular morphology of the discrete defect cluster at the microscopic level, directly using the geometric center of the rectangle would result in severe offset. Therefore, the centroid locking module directly traverses all binarized pixels within the region of interest. By introducing the concept of spatial moments from rigid body mechanics, it obtains the zeroth-order and first-order spatial moments of the defect pixel cluster. Finally, it performs normalization based on the ratio of the first-order to the zeroth-order spatial moment to obtain the true physical centroid of the defect pixel cluster. In this process, the core mathematical logic formulas used by the centroid locking module to calculate various basic spatial moments and centroid coordinates are as follows: ; ; ; ; Understandably, the physical essence of the zeroth-order spatial moment is the absolute summation of all high-level defect pixels within the region, representing the true quality of the defect; while the first-order spatial moment is a weighted summation of the positional weights of the defect pixels in their spatial distribution. By dividing the summation of positional weights by the total absolute quality, the physical centroid found by the system is entirely determined by the density and distribution of the defect pixels themselves. This avoids center point drift caused by an overly large or small envelope, providing a unique and stable reference origin for the subsequent calculation of the second-order central variance.
[0032] In the formula, This represents the zeroth-order spatial moment, whose data comes from the absolute summation of the total number of all binarized pixels with a value of 1 within the region of interest.
[0033] It represents the first-order spatial moment in the direction of the vertical axis, and its data comes from the global accumulation after multiplying the vertical coordinate of each defective pixel with the corresponding pixel value; This represents the calculated x-coordinate of the physical centroid, whose data comes from the quotient of the first-order spatial moment and the zeroth-order spatial moment of the x-coordinate. This represents the calculated ordinate of the physical centroid, whose data comes from the quotient of the first-order spatial moment and the zeroth-order spatial moment of the ordinate. x and y represent the horizontal and vertical coordinates of the currently traversed binary pixel within the region of interest, respectively, with the data sourced from the underlying image matrix index.
[0034] After locking the physical centroid, the area analysis module uses the physical centroid as the origin to perform in-depth topological feature analysis. Since IML surface defects often exhibit an inclined and stretched shape along the injection flow field, in order to eliminate the ineffective background area expansion caused by the conventional circumscribed rectangle, the area analysis module first obtains the three second-order central moments of the defect pixel community to characterize the spatial dispersion of defects in various directions.
[0035] Next, based on the obtained second-order central moments, the system constructs the topological inertia tensor covariance matrix in memory and establishes a second-order characteristic equation to extract the principal and secondary eigenvalues of the tensor matrix. Finally, based on the extracted principal and secondary eigenvalues, the system calculates the area of the equivalent inertial ellipse enclosing the defective pixel cluster. The core mathematical logic formulas for this series of high-order topological transformations executed by the area analysis module are as follows: ; ; ; ; ; In the formula, This represents the second-order central moment obtained in the horizontal direction. The data comes from the weighted sum of the squared distances from the horizontal coordinate of each point to the centroid. This represents the second-order central moment obtained in the ordinate direction. The data is derived from the weighted sum of the squared distances from the ordinate of each point to the centroid. This represents the second-order central moments, or covariance, along the intersection of the horizontal and vertical coordinates. The data is derived from the weighted summation of the products of the horizontal and vertical distance differences between each point. The principal eigenvalues extracted from the topological inertia tensor covariance matrix represent the physical variance of the discrete lattice along the longest distribution axis. The secondary eigenvalues extracted from the topological inertia tensor covariance matrix represent the physical variance of the discrete lattice along the shortest distribution axis. This represents the area of the equivalent inertial ellipse obtained after the solution. This parameter will be output as a direct measurement basis for defect morphology determination.
[0036] It should be noted that the variance of the clustering pattern of discrete defects is different on different axes. The second-order central moment accurately records the sum of the squares of the distances of all defect pixels from the centroid and the cross product. By constructing the second-order characteristic equation and solving the principal and secondary eigenvalues, the system essentially finds the longest principal axis and the shortest secondary axis of this cluster of discrete points. The equivalent inertial ellipse area constructed based on the square root of the variance of these two principal axes can adaptively rotate and fit along the actual tilt angle of the cold glue mark. This dynamic fitting mechanism not only eliminates a large amount of harmless background area generated inside the traditional envelope, but also makes the final output area parameter truly reflect the macroscopic severity of the defect cluster, preventing secondary misjudgments caused by area distortion.
[0037] Finally, the verification decision module divides the zero-order spatial moment, representing the total number of real pixels, by the area of the best-fitting equivalent inertial ellipse to obtain the anisotropic topological density; simultaneously, it performs a square root operation using the ratio of secondary eigenvalues to principal eigenvalues to obtain the distribution eccentricity. The module compares the anisotropic topological density with a preset density threshold and the distribution eccentricity with a preset eccentricity threshold. When both density and eccentricity are greater than or equal to the preset thresholds, it indicates that the discrete community not only has a compact pixel distribution but also exhibits a significant tendency for banded stretching along a fixed axis. Based on this, the system determines it to be a genuine fracture defect, confirms the effective merging of connected components, and outputs a product failure result. Conversely, if the density is less than the threshold or the eccentricity approaches zero, it indicates that this is merely an isolated background dust mass without directionality, falsely connected due to accidental proximity. The system then forcibly breaks the connected component to prevent good products from being falsely detected. During this process, the core mathematical logic upon which the verification decision module relies for the anti-false positive judgment is as follows: ; ; In the formula, This represents the obtained anisotropic topological density, whose data comes from the quotient of the zeroth-order spatial moment and the area of the equivalent inertial ellipse; e represents the obtained distribution eccentricity, which is a dimensionless value constructed based on the ratio of primary and secondary eigenvalues, used to characterize the distribution tendency of the defect community.
[0038] Understandably, genuine IML process defects (such as fuzz generated by injection molding) exhibit spatial tensile anisotropy under the influence of fluid dynamics, resulting in significant differences in primary and secondary eigenvalues and thus extremely high eccentricity. Simultaneously, the distribution of internal breakpoints remains within a reasonable density range. In contrast, environmental dust noise often exhibits isotropic circular scattering, with its primary and secondary eigenvalues tending to be consistent, leading to extremely low eccentricity and extremely low density due to its large equivalent area. By establishing a multiplicative constraint on density and eccentricity, the system eliminates the loopholes in conventional algorithms that blindly classify defects based solely on proximity, ensuring the rigor of IML surface film quality assessment.
[0039] Finally, when the anisotropic topological density is greater than or equal to the preset density threshold, and the distribution eccentricity is greater than or equal to the preset eccentricity threshold, the system confirms at the physical morphology level that the defective pixel clusters in the current region of interest have a high degree of aggregation and compactness as well as strong anisotropic axial extension characteristics. This corresponds to the fracture defect topological morphology of IML display devices during injection molding due to cold glue marks or fine scratches in the industrial field.
[0040] At this point, the verification decision module confirms that the merging state of the connected regions obtained by the region selection module in the target level of the image pyramid is completely valid. This proves that these microscopic fragmented breakpoints do indeed constitute a unified defective entity in the macroscopic physical space, rather than random isolated noise. Based on this confirmation of the valid merging state, the verification decision module immediately activates the defective product judgment control logic, latches the zero-order spatial moment and physical centroid coordinates of the defective pixel cluster as a feature file, and outputs the product non-conforming detection result to the external actuator to drive the pneumatic diversion valve or robot arm on the automated production line to perform the sorting and rejection action of non-conforming products.
[0041] Conversely, if the anisotropic topological density is less than the preset density threshold, and / or the distribution eccentricity approaches zero, the system identifies a distinctly different spatial distribution topology in the feature matrix. Low density means that the pixels truly belonging to the defective state within the region of interest are extremely sparse, while the near-zero eccentricity proves that the overall divergence pattern of these pixels exhibits an isotropic, nearly circular dispersion tendency, lacking a fixed stretching principal axis.
[0042] This characteristic does not conform to the hydrodynamic anisotropy of injection molding process defects, but precisely corresponds to discrete dust that accidentally falls on the surface of multilayer composite films at relatively close physical distances, or pseudo optical noise caused by highly reflective areas.
[0043] At this point, the verification decision module determines that the macroscopic physical merging previously performed by the region selection module was a false over-merging, and the connected region logically belongs to a pseudo-connected structure. Based on this determination, the verification decision module immediately activates the rupture mechanism, logically forcibly breaking the false links of the connected region, re-splitting the macroscopic region into independent pixels at the bottom layer, and directly classifying them as background noise harmless to the product appearance. The system then directly outputs a qualified product inspection result to the main production line, allowing the tested part to enter the next process. Through this decision-making output process of first coarsely merging and then accurately verifying based on anisotropic feature moments, the potential for false negatives caused by accidental proximity of dust and foreign objects is eliminated, ensuring the accuracy and rigor of the entire inspection result output.
[0044] In this embodiment, when the region selection module obtains the preset target level, it is specifically used for: To obtain the maximum physical fracture distance within a single defect that is permissible by the process, and the optical resolution of the inspection camera; The maximum physical fracture distance is converted into the optical resolution to obtain the maximum pixel spacing that defects are allowed to merge. The target level for performing connected component extraction is determined based on the maximum pixel spacing.
[0045] The region selection module first obtains the maximum physical break distance within a single defect, allowed by the process, and the optical resolution of the detection camera. Then, it proportionally converts the maximum physical break distance to the optical resolution to obtain the maximum pixel spacing that defects can be merged. The mathematical formula used to convert physical dimensions to pixel span in this process is as follows: ; in, This represents the maximum pixel spacing that defects are allowed to merge, and its calculation result serves as a key intermediate control variable for determining the final stopping level of the pyramid.
[0046] After obtaining the maximum pixel spacing that the defects are allowed to merge, the region selection module determines the target level for performing connected component extraction based on the maximum pixel spacing. Since the resolution of the rows and columns of the maximum value image pyramid is reduced to half of the previous level as it is built from the bottom up, the defect feature points that were originally in a disconnected state will move closer together geometrically as they advance to higher levels. In order to accurately capture the minimum critical level that allows the broken points to be physically fused together.
[0047] Furthermore, when the production line changes to different models of display device films, the downsampling depth of the pyramid is automatically adjusted according to the input physical tolerance and hardware resolution. This enables macroscopic closure of large-span defects at high levels, while also preserving high-precision morphological features at low levels.
[0048] Furthermore, traditional dilation operations, in order to span long fracture gaps, must employ massive structuring elements for global sliding convolution across the entire high-resolution image, resulting in extremely high hardware computational costs. This embodiment, however, operates directly at the target level of the pyramid using this conversion formula. After downsampling, the image matrix data volume at the target level is significantly reduced. At this point, connected component labeling is performed, enabling physical fusion of long-span fracture defects within microseconds while completely protecting the system's main computing power from loss. This aligns perfectly with the high-speed, low-latency online inspection applications required in industrial production lines.
[0049] In this embodiment, when the region selection module acquires the region of interest, it is specifically used for: Obtain the outer envelope boundary of the connected component at the target level; The area magnification factor is obtained based on the difference between the target level and the initial construction level. The coordinate dimensions of the outer envelope boundary are mapped and calculated based on the area magnification factor, and the region of interest containing only the defective pixel cluster is located and cropped in the binarized image.
[0050] Because downsampling processes merge previously fragmented defect points into connected entities within the low-resolution target layer, the region selection module first needs to determine the absolute geometric boundary of this connected region at the current spatial level, i.e., obtain the circumscribed envelope boundary of the connected region at the target level. This circumscribed envelope boundary is represented as a two-dimensional orthogonal feature boundary that tightly encloses the connected region, defined by the horizontal maxima, horizontal minima, vertical maxima, and vertical minima of all pixels within the connected region in the current level coordinate system. The purpose of obtaining this circumscribed envelope boundary is to coarsely separate the connected region from the overall background of the target level without sacrificing its morphological integrity, using it as the base coordinate reference for subsequent inverse high-precision backtracking mapping.
[0051] After locking the outer envelope boundary, in order to accurately restore the low-resolution boundary range to the original high-resolution binarized image, the region selection module needs to obtain the area magnification factor based on the layer difference between the target layer and the initial construction layer. Since the image pyramid is built from the bottom up, with each layer increase, its horizontal and vertical resolution is proportionally reduced to half its original size, the physical area represented by a single pixel magnifies in a power-of-four manner during layer progression. This requires quantifying the region scaling ratio caused by spatial resolution sampling variations.
[0052] After obtaining the area magnification factor, the region selection module needs to perform mapping calculations on the coordinate dimensions of the outer envelope boundary based on the area magnification factor, and then locate and crop the region of interest containing only the defect pixel cluster in the binarized image. Since the outer envelope boundary is represented by one-dimensional coordinate dimensions, while the area magnification factor represents the area scaling factor in two-dimensional space, when performing inverse scaling mapping on the one-dimensional horizontal and vertical coordinate boundaries, it is necessary to perform square root processing on the area magnification factor to reduce its dimension back to a one-dimensional linear size magnification factor.
[0053] By performing the inverse square root operation on the area magnification factor, the linear scaling step size of the image pyramid in the row and column directions can be matched. By directly multiplying the boundary coordinates at low resolution by this linear magnification factor, the algorithm can map the coordinates of the four extreme points of the outer envelope boundary back to the original pixel coordinate system at the bottom layer with extremely high logical determinism, thereby directly locking a high-resolution cropping box. The region selection module then performs a local image patch cropping operation directly in the binarized image based on the bottom boundary coordinate size obtained by mapping, thereby obtaining the region of interest containing only the defective pixel cluster.
[0054] In this embodiment, in the centroid locking module, the zeroth-order spatial moment is obtained by summing the total number of all binarized pixels representing defect states within the region of interest. The first-order spatial moment is obtained by globally accumulating the position coordinates of each binarized pixel representing a defect state in the region of interest along the coordinate axis and its corresponding pixel value.
[0055] Because the complex defects on the surface of IML display devices (such as cracked cold glue marks or stress whitening) often present an extremely irregular and discontinuous distribution, traditional machine vision algorithms usually directly extract the intersection of the geometric diagonals of the circumscribed rectangle as the center. This will cause serious coordinate drift when dealing with discrete point arrays that are tilted or diagonally distributed.
[0056] In the centroid locking module, the zero-order spatial moment is obtained by summing the total number of all binarized pixels representing defective states within the region of interest. Since the normal background area without defects has been assigned a value of zero in the previous binarization process, while pixels representing defective states have been assigned a value of one, traversing the region of interest and performing the summation operation accurately and uniquely reflects the total number of underlying defective pixels actually existing within the current region of interest, unaffected by the area of harmless blank background within the region.
[0057] The first-order spatial moment is obtained by globally accumulating the position coordinates of each binary pixel representing a defect state in the region of interest along the coordinate axis and its corresponding pixel value. In the specific calculation process, since the normal background pixel value is zero, any position coordinate multiplied with it is directly eliminated and returned to zero. Only those position coordinates belonging to defect features (pixel value of one) are retained and added to the global accumulation pool. Through this multiplication and addition operation of coordinate values and pixel values, the first-order spatial moment accurately captures the sum of the spatial position offsets of all real defect pixels in the X and Y axis directions. Essentially, it quantifies the distribution tilt weight of this batch of discrete defect points in macroscopic physical space.
[0058] In this embodiment, the area analysis module, when obtaining the second-order central moment, is specifically used for: Traverse all binarized pixels within the region of interest and obtain the distance difference between the position coordinates of each pixel representing a defect state and the physical centroid. The square of the distance difference and the product of the distance differences in different coordinate axis directions are multiplied by the corresponding binarized pixel values and then accumulated to obtain the variance and covariance of the defect distribution in each direction, which are used as the second-order central moments.
[0059] In this embodiment, when the area analysis module obtains the area of the equivalent inertial ellipse that encloses the defective pixel cluster, it is specifically used to: construct a second-order characteristic equation using the variance and covariance contained in the second-order central moment. According to the second-order characteristic equation, the variance distributed along the major axis is taken as the principal characteristic value, and the variance distributed along the minor axis is taken as the secondary characteristic value. Multiply the square root of the principal eigenvalue by the square root of the secondary eigenvalue, and then multiply by the pi parameter to obtain the area of the equivalent inertial ellipse.
[0060] Understandably, the system calculates the differences between the x-coordinate of the currently traversed point and the x-coordinate of the physical centroid within the region of interest, and the differences between the y-coordinate of the currently traversed point and the y-coordinate of the physical centroid. These two distance differences represent, at the spatial geometric level, the relative displacement of discrete defect pixels from the overall distribution core. Next, the area analysis module multiplies the square of these distance differences and the product of the distance differences along different coordinate axes with the corresponding binarized pixel values, and then globally accumulates these values across the region of interest to obtain the variance and covariance of the defect distribution in each direction, which serve as the second-order central moments. Furthermore, through this spatial second-order difference multiplication and addition operation, the spatial distribution coordinates of each discrete pixel are transformed into statistical features sensitive to variance.
[0061] It is also understandable that the area analysis module first constructs a second-order characteristic equation using the variance and covariance contained in the second-order central moment. This second-order characteristic equation characterizes the distribution of eigenvalues of the covariance matrix of the defect lattice topology at the algebraic level. Then, based on the second-order characteristic equation, the system calculates the eigenvalues by analytical solution, taking the variance distributed along the major axis as the principal eigenvalue and the variance distributed along the minor axis as the secondary eigenvalue. Finally, the area analysis module multiplies the square root of the principal eigenvalue and the square root of the secondary eigenvalue, and then multiplies it by the pi parameter to obtain the area of the equivalent inertial ellipse.
[0062] The equivalent inertial ellipse area exhibits perfect anisotropic adaptive characteristics. Regardless of the diagonal slope or irregular extension shape of defects such as cold glue marks on the IML panel surface, the ellipse boundary can achieve a tight, seamless rotational enclosure, eliminating a large amount of normal display background enclosed in the traditional bounding rectangle and preventing secondary misjudgments caused by area distortion. Furthermore, since the entire calculation process is entirely based on the pre-cut region of interest, and the entire process only involves solving basic quadratic equations and simple arithmetic multiplication and addition, its computation time is firmly locked at the microsecond level. This fundamentally solves the long-standing engineering challenge between high-precision measurement of complex morphological defects and high-speed online quality inspection in industrial production lines.
[0063] In this embodiment, in the verification decision module, the anisotropic topological density is obtained by dividing the zero-order spatial moment representing the total number of defective pixels by the area of the equivalent inertial ellipse. The distribution eccentricity is obtained by taking the square root of the ratio of the secondary eigenvalue to the primary eigenvalue, and is used to characterize the distribution tendency of the defective pixel cluster.
[0064] In this embodiment, the verification decision module, when outputting the detection result, is specifically used for: When the anisotropic topological density is greater than or equal to the preset density threshold, and the distribution eccentricity is greater than or equal to the preset eccentricity threshold, the defective pixel cluster in the current region of interest is determined to be a fracture defect, the merging state of the connected domain is confirmed to be valid, and the detection result of product non-compliance is output.
[0065] In this embodiment, the verification decision module is further configured to: When the anisotropic topological density is less than the preset density threshold, and / or the distribution eccentricity approaches zero, the connected component is determined to be a pseudo-connected structure, a break mechanism is initiated to separate the connected component, and it is determined to be background noise.
[0066] Since the zeroth-order spatial moment represents the absolute total number of real defective pixels in the region of interest, while the area of the equivalent inertial ellipse represents the compact topological boundary that can perfectly rotate and fit the distribution trend of the lattice cluster, the anisotropic topological density obtained by dividing the two quantifies, in physical terms, the microscopic aggregation concentration and spatial compactness of this cluster of fragmented lattices within the macroscopic elliptical envelope.
[0067] Meanwhile, the distribution eccentricity is obtained by taking the square root of the ratio of the secondary eigenvalue to the primary eigenvalue, and is used to characterize the distribution tendency of the defective pixel cluster. Since the primary and secondary eigenvalues represent the geometric variance of the discrete lattice along the primary and secondary axes of the distribution, respectively, the ratio of the two, combined with the square root logic, can output a dimensionless morphological index. This allows for a mathematically sensitive perception of whether the defect cluster exhibits a long, narrow, strongly directional distribution or a near-circular, non-directional scattering.
[0068] High topological density demonstrates that the distribution of tiny discontinuities within the region is relatively dense and continuous, while high eccentricity proves that these pixels exhibit extremely significant unidirectional tensile characteristics under the influence of injection molding flow or external mechanical stress. The superposition of these two spatial topological characteristics precisely corresponds to typical strip-shaped or linear structural appearance defects unique to IML display devices during processing, such as cold glue marks, scratches, or localized severe whitening.
[0069] At this point, the verification decision module confirms that the macroscopic physical merging performed by the aforementioned region selection module in the image pyramid is completely valid, indicating that these scattered tiny breakpoints physically belong to a complete defective entity. The system then immediately locks the centroid coordinates and morphological parameters of the current defect as a quality file and outputs a defect judgment instruction to the subsequent automated production line to drive the pneumatic sorting mechanism or industrial robot to accurately intercept and remove the non-conforming product.
[0070] In practical workshop applications, if the anisotropic topological density is extremely low, it indicates that the defective pixels within the envelope region are actually scattered and few in number. Conversely, if the distribution eccentricity approaches zero, it proves that these independent pixels exhibit an isotropic circular disordered scattering state in space, completely losing the tendency to stretch along a fixed axis. This microscopic morphological manifestation is completely detached from the physical formation mechanism of IML injection molding defects, and instead precisely corresponds to independent dust impurities that accidentally fall onto the surface of the composite film and are relatively close to each other, or to pseudo-image noise caused by localized strong reflections.
[0071] At this point, the verification decision module determines that the previous macroscopic merging was a false over-merging. The connected component is logically defined as a pseudo-connected structure. By activating the rupture mechanism, the system forcibly severs the virtual link of the connected component in the electrical processing logic, reclassifies it as an isolated and harmless background pixel, and directly performs blanking filtering. Subsequently, the module outputs the product qualification test result to the main control system, allowing the IML display panel to enter the next assembly process.
[0072] In this embodiment, before acquiring the binarized image, the image binarization module is further configured to perform dynamic occlusion processing: Extract the outer contour of the IML display device under test to construct a background-free product image; Using the backgroundless product image as a base, the physical boundary contours of the transparent display window area and the non-transparent border area are identified to construct a nested mask; After masking the abrupt edges generated by the physical boundary contour according to the nested mask, the operation of converting to the binarized image is then performed.
[0073] In actual online acquisition processes on production lines, the original images captured by the camera usually include external non-inspection backgrounds such as transmission tracks, worktables, or vacuum suction cups. Through global grayscale segmentation or connected region large contour extraction technology, the system can accurately identify the overall external edge of the current thin film workpiece, and then assign all irrelevant background pixels outside the outer contour to zero, thereby obtaining a completely independent product image without background interference that excludes external mechanical environment interference.
[0074] Subsequently, the image binarization module uses the background-free product image as a base to identify the physical boundary contours of the transparent display window area and the non-transparent border area to construct a nested mask. Because modern IML display devices, in order to balance screen display and aesthetics, typically integrate a central transparent display window area and a surrounding non-transparent border area coated with opaque black ink on the same panel.
[0075] When the camera scans the heterogeneous interface, the drastic change in transmittance and back reflectance of the different materials naturally creates a large-span, high-contrast abrupt change edge in the image. Its grayscale gradient response is often stronger than that of a genuine scratch or glue residue defect. To remove this inherent physical structure line from the inspected features, the algorithm performs a secondary contour search in the internal region of the backgroundless product image, adaptively identifying the physical boundary contour at the transparent-opaque junction. After locking the precise pixel coordinates of this boundary contour, the module constructs a nested mask that completely covers the abrupt change response range by performing a pre-defined outward and inward equidistant topological expansion of the contour line.
[0076] Finally, the image binarization module masks the abrupt edges generated by the physical boundary contour using the nested mask before converting it into a binarized image. Specifically, in the electrical processing logic, the system performs feature-level masking operations on the nested mask and the input original gradient image, forcibly clearing the high gradient pixel values caused by the physical boundary within the area covered by the nested mask to zero, thereby eliminating this strong physical boundary edge at its source. After this dynamic masking is completed, the purified gradient image is sent to the aforementioned threshold comparison logic, compared with a preset edge gradient threshold, and finally converted into the binary image, which is either zero or one.
[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0078] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A surface film detection system for an IML display device, characterized by, The system includes: An image binarization module is used to acquire a gradient image of the surface film of the IML display device under test, and compare the gradient image with a preset edge gradient threshold to obtain a binarized image. The region selection module is used to construct an image pyramid based on the binarized image, obtain the connected components that have physically merged in the preset target level, and reverse map the boundaries of the connected components back to the binarized image to obtain the region of interest. The centroid locking module is used to traverse all binarized pixels in the region of interest, obtain the zero-order spatial moment and the first-order spatial moment of the defective pixel cluster in the region of interest, and obtain the physical centroid of the defective pixel cluster according to the ratio of the first-order spatial moment to the zero-order spatial moment. The area analysis module is used to obtain the second-order central moment of the defective pixel cluster with the physical centroid as the origin, construct the topological inertia tensor covariance matrix based on the second-order central moment and extract the principal eigenvalues and secondary eigenvalues to obtain the area of the equivalent inertial ellipse that encloses the defective pixel cluster. The verification decision module is used to obtain the anisotropic topological density based on the zero-order spatial moment and the area of the equivalent inertial ellipse, and to obtain the distribution eccentricity based on the principal eigenvalue and the secondary eigenvalue; compare the anisotropic topological density with a preset density threshold, and compare the distribution eccentricity with a preset eccentricity threshold; and confirm the merging state of the connected components based on the comparison results and output the detection results.
2. A surface film detection system for an IML display device as claimed in claim 1, characterized in that When the region selection module obtains the preset target level, it is specifically used for: To obtain the maximum physical fracture distance within a single defect that is permissible by the process, and the optical resolution of the inspection camera; The maximum physical fracture distance is converted into the optical resolution to obtain the maximum pixel spacing that defects are allowed to merge. The target level for performing connected component extraction is determined based on the maximum pixel spacing.
3. A surface film detection system for an IML display device as recited in claim 1, wherein, When acquiring the region of interest, the region selection module is specifically used for: Obtain the outer envelope boundary of the connected component at the target level; The area magnification factor is obtained based on the difference between the target level and the initial construction level. The coordinate dimensions of the outer envelope boundary are mapped and calculated based on the area magnification factor, and the region of interest containing only the defective pixel cluster is located and cropped in the binarized image.
4. A surface film inspection system for an IML display device as recited in claim 1, wherein, In the centroid locking module, the zero-order spatial moment is obtained by summing the total number of all binarized pixels representing defect states within the region of interest. The first-order spatial moment is obtained by globally accumulating the position coordinates of each binarized pixel representing a defect state in the region of interest along the coordinate axis and its corresponding pixel value.
5. The surface thin film detection system for an IML display device as described in claim 1, characterized in that, When obtaining the second-order central moment, the area analysis module is specifically used for: Traverse all binarized pixels within the region of interest and obtain the distance difference between the position coordinates of each pixel representing a defect state and the physical centroid. The square of the distance difference and the product of the distance differences in different coordinate axis directions are multiplied by the corresponding binarized pixel values and then accumulated to obtain the variance and covariance of the defect distribution in each direction, which are used as the second-order central moments.
6. A surface film inspection system for an IML display device as claimed in claim 5, characterized in that When the area analysis module obtains the area of the equivalent inertial ellipse that encloses the defective pixel cluster, it is specifically used to: construct a second-order feature equation using the variance and covariance contained in the second-order central moment. According to the second-order characteristic equation, the variance distributed along the major axis is taken as the principal characteristic value, and the variance distributed along the minor axis is taken as the secondary characteristic value. Multiply the square root of the principal eigenvalue by the square root of the secondary eigenvalue, and then multiply by the pi parameter to obtain the area of the equivalent inertial ellipse.
7. A surface film inspection system for an IML display device as defined in claim 1, wherein, In the verification decision module, the anisotropic topological density is obtained by dividing the zero-order spatial moment characterizing the total number of defective pixels by the area of the equivalent inertial ellipse. The distribution eccentricity is obtained by taking the square root of the ratio of the secondary eigenvalue to the primary eigenvalue, and is used to characterize the distribution tendency of the defective pixel cluster.
8. A surface film inspection system for an IML display device as defined in claim 1, wherein, The verification decision module, when outputting the detection results, is specifically used for: When the anisotropic topological density is greater than or equal to the preset density threshold, and the distribution eccentricity is greater than or equal to the preset eccentricity threshold, the defective pixel cluster in the current region of interest is determined to be a fracture defect, the merging state of the connected domain is confirmed to be valid, and the detection result of product non-compliance is output.
9. A surface film detection system for an IML display device as claimed in claim 8, wherein, The verification decision module is also used for: When the anisotropic topological density is less than the preset density threshold, and / or the distribution eccentricity approaches zero, the connected component is determined to be a pseudo-connected structure, a break mechanism is initiated to separate the connected component, and it is determined to be background noise.
10. A surface film inspection system for an IML display device as defined in claim 1, wherein, Before acquiring the binarized image, the image binarization module is also used to perform dynamic occlusion processing: Extract the outer contour of the IML display device under test to construct a background-free product image; Using the backgroundless product image as a base, the physical boundary contours of the transparent display window area and the non-transparent border area are identified to construct a nested mask; After masking the abrupt edges generated by the physical boundary contour according to the nested mask, the operation of converting to the binarized image is then performed.