Liquid crystal screen defect determination method and system based on visual defect feature coding

By generating the main anchor point and anchor point tolerance set of defects in the brightness residual map, and establishing the ring structure to extract defect feature codes, the problem of non-reproducible coding of uneven brightness defects in LCD screens during re-inspection is solved, thus improving the consistency and reliability of judgment.

CN122289231APending Publication Date: 2026-06-26ZHONGSHAN JINRUN ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGSHAN JINRUN ELECTRONICS CO LTD
Filing Date
2026-04-03
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for detecting uneven brightness defects in LCD screens are susceptible to imaging noise and micro-disturbances in illumination during re-inspection, leading to fluctuations in the position and range of candidate boxes, resulting in the inability to reproduce feature codes and affecting the consistency and reliability of judgments.

Method used

By generating a brightness residual map, the target connected component is determined, and the main anchor point and anchor point tolerance set of the defect are generated in it. The ring structure is established to extract the defect feature code, and the code of each anchor point is compared to determine whether the code can be reproduced, and the stable degree of defect is output.

Benefits of technology

It improves the consistency and reliability of judging uneven brightness defects, reduces the impact of noise and lighting disturbances on detection, and ensures the stability and consistency of coding in re-inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289231A_ABST
    Figure CN122289231A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for determining defects in liquid crystal displays (LCDs) based on visual defect feature encoding, belonging to the field of machine vision inspection and image data processing technology. The method includes the following steps: acquiring a brightness image of the LCD under a lit detection screen and generating a brightness residual map; determining a target connected component based on the brightness residual map, and generating a defect master anchor point and an anchor point tolerance set within the target connected component; establishing a ring structure on the brightness residual map centered on the defect master anchor point and each anchor point in the anchor point tolerance set; extracting defect feature encoding based on the ring structure; using the defect feature encoding corresponding to the defect master anchor point as a reference encoding; and comparing the difference between the defect feature encoding corresponding to each anchor point in the anchor point tolerance set and the reference encoding. This invention solves the problem in existing technologies where uneven brightness and weak, gradually changing defect boundaries cause fluctuations in the candidate boxes output by target detection during re-inspection, leading to encoding non-reproducibility and resulting in judgment jitter and inconsistency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision inspection and image data processing technology, and in particular to a method and system for determining defects in liquid crystal displays based on visual defect feature encoding. Background Technology

[0002] With the widespread application of LCD panels in mobile phones, tablets, automotive displays, and industrial displays, production lines are increasingly demanding higher standards for the appearance quality of LCD screens. On one hand, screen resolution and pixel density are continuously improving, resulting in more subtle defects; on the other hand, production cycle time and consistency requirements are becoming more stringent, making it difficult for traditional manual visual inspection methods to meet production line needs in terms of efficiency, stability, and traceability. Therefore, the method of using industrial cameras to capture LCD screen images and combining them with algorithms for automatic judgment is gradually becoming the mainstream approach.

[0003] Existing LCD screen appearance inspection systems typically follow a process of image acquisition, preprocessing, candidate localization, feature extraction and encoding, judgment, and report output: images are acquired under standard illuminated screen conditions, and preprocessing techniques such as grayscale conversion, filtering, background correction, and reflection suppression are used to improve defect visibility; then, suspected defect areas are located or divided; based on the localization results, brightness statistics, texture features, morphological features, etc., are calculated to form feature vectors or feature codes; finally, based on threshold rules or evaluation models, the defect category, severity level, and inspection report are output.

[0004] For example, Chinese invention patent CN104978748 discloses a method for detecting defects in liquid crystal displays (LCDs) based on local pixel values. This method relates to an automatic detection method for pixel defects in LCDs, particularly for mobile phone and tablet screens. The method acquires a clear image of the LCD screen, processes the image for grayscale values, and then performs column and row projections on the grayscale image. Based on the minimum values ​​of the projections, the initially acquired image is divided into a mesh of pixel blocks. The entire image is then divided into multiple regions, each containing multiple pixel blocks. Defective pixel blocks are detected in each region based on the difference between the grayscale value of each pixel block and the average grayscale value of that region.

[0005] For example, Chinese invention patent CN120747060B discloses a machine vision-based method and system for quantitative evaluation of Mura defects in LCD screens. The method includes: acquiring LCD screen images through an industrial camera and performing reflected light separation processing on the LCD screen images; extracting texture and morphological features of the LCD screen images after preprocessing; forming a feature vector from the extracted texture and morphological features; determining whether the LCD screen images have Mura defects and their morphological characteristics through a Mura defect evaluation model; and generating a defect detection report.

[0006] However, in the process of implementing the technical solution of the invention in the embodiments of this application, it was found that the above-mentioned technology has at least the following technical problems: For weak boundary display defects such as uneven brightness with low contrast and slow transition, the existing production line inspection process generally adopts the processing method of "first obtaining the defect candidate range, then cropping within the candidate range and calculating feature codes to complete the judgment". The defect candidate range can be determined by the candidate region boundary obtained by traditional image segmentation or by the defect candidate box output by the target detection model. Because weak boundary defects typically have a wide transition band, the defect candidate range is highly sensitive to minute disturbances such as imaging noise, micro-drift in illumination, and fine-tuning of exposure gain. During re-inspection or repeated acquisition, pixel-level to small-range fluctuations in the position and scale of the candidate box are prone to occur. Existing methods directly use the candidate range as the hard clipping caliber for brightness statistics and texture feature calculation, which amplifies the above fluctuations. This causes the background blending ratio and the truncation position of the transition band within the clipping area to change with re-inspection, making it difficult to maintain consistency in feature statistics. This leads to non-reproducible defect feature encoding, further causing jitter and inconsistency in defect level and pass / fail judgment results during re-inspection, affecting the consistency, reliability, and traceability of production line judgments.

[0007] In existing technologies, due to the weak boundary gradual change of uneven brightness defects, the defect candidate boxes output by the target detection model are prone to position and range fluctuations during re-inspection. Existing methods directly perform hard clipping on the candidate boxes and calculate statistical and texture features accordingly, which amplifies the fluctuation of the candidate boxes and changes the feature statistical caliber, resulting in feature encoding not being reproduced, thus causing jitter and inconsistency in defect judgment. Summary of the Invention

[0008] To address the technical problem in existing technologies where uneven brightness defects cause weak and gradual boundary variations, leading to fluctuations in candidate boxes during target detection and subsequent encoding discrepancies during re-inspection, resulting in inconsistent and inconsistent judgments, this invention provides a method and system for determining LCD screen defects based on visual defect feature encoding. The technical solution is as follows: On the one hand, a method for determining defects in liquid crystal displays based on visual defect feature encoding is provided, the method comprising: Step 1: Acquire the brightness image of the LCD screen under the illumination detection screen and generate a brightness residual map. Based on the brightness residual map, determine the target connected component and generate the defect master anchor point and anchor point tolerance set within the target connected component. Step 2: Using the defect master anchor point and each anchor point in the anchor point tolerance set as the center, establish a ring structure on the brightness residual map. Extract defect feature codes based on the ring structure. Use the defect feature code corresponding to the defect master anchor point as the benchmark code. Compare the defect feature codes corresponding to each anchor point in the anchor point tolerance set with the benchmark code to determine whether the defect feature code is reproducible. Step 3: When it is determined that the defect feature code is reproducible, output the LCD screen defect degree based on the defect feature code of the defect master anchor point. When it is determined that the defect feature code is not reproducible, output the conservative defect degree or output a re-inspection mark based on the defect feature code of the defect master anchor point.

[0009] On the other hand, a defect determination system for LCD screens based on visual defect feature encoding is provided, the system comprising: The anchor point generation module acquires the brightness image of the LCD screen under the illumination detection screen and generates a brightness residual map. Based on the brightness residual map, it determines the target connected component and generates the main defect anchor point and the anchor point tolerance set within the target connected component. The encoding evaluation module establishes a ring structure on the brightness residual map with the main defect anchor point and each anchor point in the anchor point tolerance set as the center. Based on the ring structure, it extracts the defect feature code. Using the defect feature code corresponding to the main defect anchor point as the benchmark code, it compares the defect feature codes corresponding to each anchor point in the anchor point tolerance set with the benchmark code to determine whether the defect feature code is reproducible. The result output module outputs the LCD screen defect degree based on the defect feature code of the main defect anchor point when the defect feature code is determined to be reproducible. When the defect feature code is determined to be unreproducible, it outputs the conservative defect degree or outputs a re-inspection mark based on the defect feature code of the main defect anchor point.

[0010] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: 1. The LCD screen defect determination method based on visual defect feature coding provided by this invention first determines the target connected component in the brightness residual map and generates the defect main anchor point and anchor point tolerance set within the target connected component. Then, a ring structure is established with each anchor point in the defect main anchor point and anchor point tolerance set as the center and defect feature coding is extracted. The difference between the defect feature coding of each anchor point and the benchmark coding is compared to obtain a reproducible evaluation result. Thus, the gating determination of coding stability is completed before the defect level is output, thereby improving the consistency of the determination of weak boundary brightness unevenness defects in the re-inspection scenario. It effectively solves the problems in the prior art that directly calculate features by hard clipping candidate regions or candidate boxes, resulting in the statistical caliber fluctuating with the candidate range, the defect feature coding not being reproducible, and the jitter and inconsistency between defect level and pass / fail determination in the re-inspection.

[0011] 2. This invention establishes the main anchor point of the defect at the center of the deviation intensity distribution of the target connected component, and uses an anchor point tolerance set composed of high deviation representative points and geometric center representative points. This transforms defect localization from hard boundary clipping that relies on weak boundaries to anchor point localization that relies on the deviation distribution of the defect body. The consistency of the encoding is verified within a reasonable deviation range of the anchor points, thereby suppressing noise spikes and local artifacts and tolerating slight anchor point shifts. This makes the defect feature encoding more stable to minor imaging disturbances during re-inspection. Compared with the existing technology that relies on a single candidate boundary or single position sampling method, it can significantly reduce feature jumps caused by anchor point drift and improve encoding reproducibility and output reliability.

[0012] 3. By constructing a fixed-caliber ring structure with a core ring, a transition ring, and a background ring, and jointly extracting core deviation intensity coding, transition morphology consistency coding, and spatial coherence coding from the ring structure, this invention simultaneously characterizes the deviation intensity of the defect subject relative to the background, the slope morphology of the slow transition of weak boundaries, and the continuous spatial structure. The synergistic consistency of the three types of coding participates in reproducible evaluation and output strategy selection, thereby distinguishing between true brightness unevenness defects and interferences such as noise fluctuations, reflection artifacts, and local jumps. Compared with the existing technology that relies solely on brightness statistics or single-dimensional judgment based on texture features, this invention can obtain a more stable defect level output under the mutual constraints of intensity evidence, morphological evidence, and structural evidence. When the coding is unstable, it outputs a conservative defect degree or a re-inspection mark, reducing the impact of misjudgment and re-inspection jitter on production line decisions. Attached Figure Description

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

[0014] Figure 1 Flowchart of a liquid crystal screen defect determination method based on visual defect feature encoding provided in this application embodiment; Figure 2 A schematic diagram of the structure of a liquid crystal screen defect determination system based on visual defect feature encoding provided in an embodiment of this application; Figure 3 A flowchart for filtering target connected components provided in an embodiment of this application; Figure 4 This is a flowchart illustrating the construction and reproducibility determination of annular structure feature encoding in an embodiment of this application. Figure 5This is a schematic diagram of the brightness unevenness candidate region localization result based on the target detection model provided in the embodiments of this application. Detailed Implementation

[0015] Embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present disclosure are shown in the drawings, it should be understood that embodiments of the present disclosure may be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure.

[0016] It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure. In the description of the embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "this embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects.

[0017] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0018] Specific Implementation Example 1, such as Figure 1 The diagram shown is a flowchart of a liquid crystal display (LCD) defect determination method based on visual defect feature encoding provided in this application embodiment. The method includes the following steps: In this embodiment, a candidate defect localization step is set up before step one: the detection station controls the LCD screen to display a preset illuminated detection screen and acquire brightness images. The brightness images are accessed by the vision processor and the unified caching and scheduling of image data are completed. The vision processor is used to carry out the calculation process of target detection inference and subsequent defect feature encoding, thereby achieving stable real-time processing under the production line cycle.

[0019] The vision processor inputs the brightness image into the target detection model to output defect candidate region boxes, defect categories, and confidence scores. When the defect category output by the target detection model is uneven brightness defect, the vision processor uses the corresponding candidate region box as a spatial prior for subsequent processing to limit or guide the search range of target connected components in the brightness residual map. This reduces the probability of false detections caused by blind searching across the entire screen and lowers computational overhead. It should be noted that this invention does not directly use the boundaries of the candidate region boxes as the statistical caliber of defect features. Instead, the vision processor generates a brightness residual map and determines the target connected components within the coverage area of ​​the candidate region boxes or their extended range. Within the target connected components, it generates defect master anchor points and anchor point tolerance sets. By establishing a ring structure centered on the anchor points, defect feature encoding is extracted. Based on the anchor point tolerance set, a reproducibility evaluation is performed on the defect feature encoding. Therefore, even when the candidate region boxes exhibit pixel-level boundary oscillations or slight positional shifts during re-inspection, the stability and consistency of the defect feature encoding and defect severity output can still be maintained.

[0020] like Figure 5 As shown, the target detection model outputs the candidate region localization results for uneven brightness defects on the LCD screen brightness image. In the figure, candidate defect regions are marked with rectangular boxes, and the defect category and confidence level are indicated near the rectangular boxes. Two candidate regions are labeled region_Mura 0.87 and region_Mura 0.84, respectively, to characterize the confidence level at which the candidate region is determined to be an uneven brightness defect. Based on the candidate region localization results, this invention uses the candidate region box as a spatial prior input for subsequent steps. A brightness residual map is generated within the coverage area of ​​the candidate region box or its extended range, and target connected components are determined. From the target connected components, a defect master anchor point and an anchor point tolerance set are generated. Then, a ring structure of core ring, transition ring, and background ring is established with each anchor point as the center to extract defect feature codes. Subsequently, the defect feature codes of each anchor point in the anchor point tolerance set are compared with the baseline defect feature codes of the defect master anchor point to evaluate whether the defect feature codes are reproducible. Through the above processing, the present invention avoids directly using the rectangular box boundary output by the target detection model as the hard clipping caliber, thereby suppressing the amplification effect of the candidate box boundary swing on the caliber of brightness statistics and texture feature calculation during re-inspection, and improving the coding stability, re-inspection consistency and judgment traceability of brightness unevenness defects.

[0021] Step 1: Obtain the brightness image of the LCD screen under the illumination detection screen and generate a brightness residual map. Based on the brightness residual map, determine the target connected component and generate the defect main anchor point and anchor point tolerance set within the target connected component.

[0022] In this embodiment, the deviation intensity threshold, minimum area threshold, consistency threshold, high deviation threshold, first ring boundary distance, second ring boundary distance, third ring boundary distance, monotonic violation percentage threshold, core deviation tolerance threshold, and pass percentage threshold are all derived from offline calibration and fixed in the configuration table. The configuration table is a parameter file or parameter data record stored in the system, used to provide a unified judgment standard during online detection. The configuration table is generated by the offline calibration process. The offline calibration process collects data based on qualified and defective samples of the same model of LCD screen, verifies the effect of different threshold candidate values, and selects parameter values ​​that meet the objectives of false alarm control and missed alarm control. After calibration, the parameters are written into the configuration table and version managed. During online testing, the system reads the corresponding configuration table when starting up or switching product models, and loads parameters such as deviation intensity threshold, minimum area threshold, consistency threshold, high deviation threshold, ring boundary distance, monotonic violation proportion threshold, core deviation tolerance threshold, and pass proportion threshold as running parameters. These parameters are then directly called during the screening, elimination, encoding extraction, and reproducibility determination processes in each step, ensuring that the calculation caliber is consistent and traceable under the same model and the same screen conditions.

[0023] The control LCD screen at the inspection station displays a preset illumination inspection screen, while an industrial camera captures the original brightness image. Low-frequency background estimation is performed on the original brightness image to obtain a background reference surface. This low-frequency background estimation can be achieved using large-scale smoothing and robust correction: first, the original brightness image is smoothed on a large scale to obtain an initial background; then, areas with significant differences between the original brightness image and the initial background are marked as anomaly suppression regions. During the second background estimation, the influence of these anomaly suppression regions on background fitting is reduced, resulting in the background reference surface. A difference calculation is performed between the original brightness image and the background reference surface to obtain a brightness residual map. This brightness residual map characterizes the brightness deviation of the original brightness image relative to the background reference surface.

[0024] In this embodiment, the difference operation refers to calculating the pixel-by-pixel difference between the brightness values ​​at the same pixel position in the original brightness image and the background reference plane. Specifically, the brightness value of the pixel in the original brightness image is subtracted from the background brightness value at the corresponding pixel position in the background reference plane, and the resulting difference is used as the residual value of that pixel in the brightness residual map. A positive difference indicates that the pixel is brighter than the background reference plane, and a negative difference indicates that the pixel is darker than the background reference plane. The absolute magnitude of the difference is used to characterize the degree of deviation. This difference operation can remove low-frequency background brightness trends while retaining local relative deviation information, making the brightness residual map more prominent in reflecting the deviation distribution of brightness non-uniformity defects relative to the background. This provides a unified deviation measurement caliber for subsequent candidate deviation point screening, connected component construction, and defect feature encoding extraction.

[0025] The system calculates the deviation intensity of each pixel in the brightness residual map, where the deviation intensity is defined as the absolute value of the pixel's residual. Pixels with a deviation intensity not lower than a deviation intensity threshold are marked as candidate deviation points. The system performs spatial connectivity aggregation on the candidate deviation points to obtain candidate deviation connected components. The connectivity aggregation is performed using configured connectivity rules.

[0026] In the brightness residual map, pixels with deviation intensities not lower than the deviation intensity threshold are marked as candidate deviation points, and spatial connectivity aggregation is performed on these candidate deviation points to obtain candidate deviation connected components. The system first performs noise removal on the candidate deviation connected components: the area of ​​the connected component is obtained by counting the number of pixels it contains; when the area is lower than the minimum area threshold, the connected component is removed to avoid introducing unstable subjects by isolated noise points or small noise clusters. Then, for the unremoved connected components, the connectivity consistency value is calculated. The consistency value is the percentage of pixels whose residual sign is consistent with the dominant sign of the connected component; when the consistency value is lower than the consistency threshold, the connected component is removed to avoid stray structures with mixed positive and negative signs interfering with the localization of weak boundary defects. The system identifies unremoved connected components as valid candidate connected components. When there is only one valid candidate connected component, it is directly identified as the target connected component. When there is more than one valid candidate connected component, the cumulative deviation is obtained by accumulating the pixel deviation intensity within the valid candidate connected components. The valid candidate connected component with the largest cumulative deviation is identified as the target connected component. This is to select the defect subject with the largest overall deviation evidence, providing a stable basis for the subsequent generation of the defect main anchor point and anchor point tolerance set, thereby improving the consistency of feature coding re-inspection.

[0027] After determining the target connected component, the system generates a primary defect anchor point and an anchor point tolerance set within the target connected component. Specifically, the system first calculates the primary defect anchor point within the target connected component by establishing a weighted relationship between the coordinate position of each pixel within the target connected component and its corresponding deviation intensity. When calculating the primary defect anchor point, the system does not change the residual value of the brightness residual map, nor does it amplify the deviation intensity. Instead, it uses the deviation intensity as a weight when summarizing the positions to determine where the anchor point is closer to the region with more concentrated deviations. The system reads the pixel coordinates of each pixel within the target connected component and the corresponding deviation intensity. The deviation intensity is used as the weight in calculating the center position of the pixel coordinates. First, the pixel coordinates of each pixel within the target connected component are weighted and summed with their corresponding deviation intensities. Then, the accumulated value of the deviation intensities of all pixels within the target connected component is used to scale the weighted summation result to ensure that the obtained center position remains a reasonable pixel coordinate position. The meaning of proportionalization is: to determine the contribution of each pixel to the center position according to the proportion of its deviation intensity to the total deviation intensity, thus obtaining the center position after allocating the contribution proportion according to the deviation intensity. The center position can be understood as the average position of the pixel coordinates within the target connected component under the deviation intensity proportional weight, used to reflect the center of the deviation distribution of the defect body. Since the x and y coordinates of the center position may be non-integer values, the system maps the center position to integer pixel coordinates to obtain the defect master anchor point. The mapping method is: to process the x and y coordinates of the center position to the nearest integer. When the decimal part is less than 0.5, the smaller integer is taken; when the decimal part is not less than 0.5, the larger integer is taken. This yields the integer pixel coordinate with the smallest Euclidean distance from the center position, and this integer pixel coordinate is determined as the defect master anchor point. The defect master anchor point obtained by using the deviation intensity weighted center reflects the deviation distribution center of the target connected component, without relying on single-point extrema, thereby reducing the influence of noise spikes or local anomalies on anchor point positioning and improving the stability of the anchor point in re-inspection.

[0028] High-deviation representative points are selected within the target connected component. The selection method involves filtering pixels within the target connected component whose deviation intensity is not lower than the high-deviation threshold as high-deviation candidate points. Spatial dispersion selection is then performed on these high-deviation candidate points to avoid multiple representative points concentrating in the same local area. This is achieved by dividing the bounding rectangle of the target connected component into multiple regions and selecting the high-deviation candidate point with the largest deviation intensity within each region, resulting in multiple sets of high-deviation representative points. The high-deviation representative points obtained through spatial dispersion selection can cover multiple locations with high deviation intensity within the target connected component. This allows subsequent encoding and reproducibility evaluation to cover a reasonable deviation range where anchor points may fall in different locations within the defective structure, thereby improving tolerance to uncertainties in weak boundary slopes.

[0029] The method for dividing the bounding rectangle of the target connected component into multiple regions is as follows: determine the boundary position of the bounding rectangle of the target connected component, and divide the bounding rectangle into four regions: upper left region, upper right region, lower left region, and lower right region by the horizontal and vertical midlines of the bounding rectangle; in each region, the system selects the pixel with the largest deviation intensity from the high deviation candidate points as the high deviation representative point of that region; when there is no high deviation candidate point in a certain region, the high deviation representative point is not output in that region.

[0030] The pixel coordinates of the geometric center are obtained by calculating the geometric center of the pixel coordinate set of the target connected component. Specifically, the system obtains the pixel coordinates of each pixel within the target connected component, and averages the x-coordinates and y-coordinates of these pixels to obtain the geometric center position of the target connected component. Since the x-coordinate and y-coordinate of this geometric center position may be non-integer values, the system maps this geometric center position to integer pixel coordinates. The mapping method is as follows: take the nearest integer for both the x-coordinate and y-coordinate. If the decimal part is less than 0.5, take the smaller integer; if the decimal part is not less than 0.5, take the larger integer. This yields the pixel coordinates of the representative point of the geometric center. This representative point of the geometric center is used to characterize the shape center position of the target connected component. It is independent of the deviation intensity and can provide a stable reference when the deviation distribution is uneven or there are local high deviation points, thereby enhancing the adaptability of the anchor point tolerance set to different defect morphologies.

[0031] The high deviation representative point and the geometric center representative point are combined to form the anchor point tolerance set. In the subsequent ring structure establishment and defect feature coding calculation, each anchor point in the anchor point tolerance set is used as the ring center to calculate a defect feature code to evaluate the reproducibility of the code for the uncertainty of the anchor point position.

[0032] like Figure 3 The target connected component screening flowchart provided in this application involves obtaining a brightness residual map and screening candidate deviation points. Spatial connectivity aggregation is then performed on these candidate deviation points to obtain candidate deviated connected components. Two elimination processes are performed: first, candidate deviated connected components with a connected component area below a minimum area threshold are eliminated; second, candidate deviated connected components with a connected component consistency below a consistency threshold are eliminated, thus obtaining valid candidate connected components. It is determined whether there is only one valid candidate connected component: if so, this valid candidate connected component is directly identified as the target connected component; otherwise, the pixel deviation intensities within each valid candidate connected component are accumulated to determine the cumulative deviation, and the valid candidate connected component with the largest cumulative deviation is identified as the target connected component. Finally, after the target connected component is determined, a defect master anchor point and an anchor point tolerance set are generated to provide anchor point input for subsequent ring band coding and reproducibility evaluation.

[0033] In a specific example, the bounding rectangle of the target connected component covers a brighter, unevenly lit area. The system obtains the main anchor point of the defect by deviating from the intensity weighted center, with pixel coordinates of x-coordinate 120 and y-coordinate 180. After setting a high deviation threshold, the system obtains high deviation candidate points and divides the bounding rectangle into four regions. The system selects the high deviation candidate points with the largest deviation intensity from the upper left, upper right, lower left, and lower right regions, respectively, to obtain four representative high deviation points with pixel coordinates of: x-coordinate 110, y-coordinate 170; x-coordinate 130, y-coordinate 165; x-coordinate 105, y-coordinate 190; and x-coordinate 135, y-coordinate 195. The system simultaneously calculates the geometric center of the target connected component. Averaging the x-coordinates of all pixels within the target connected component yields a continuous horizontal coordinate of 117.6, and averaging the y-coordinates of all pixels within the target connected component yields a continuous vertical coordinate of 183.2. The system assigns the value 117.6 to the nearest integer (118) and the value 183 to the nearest integer (183), thus obtaining the pixel coordinates of the representative point of the geometric center as x-coordinate 118 and y-coordinate 183, and designates this pixel coordinate as the representative point of the geometric center. The final anchor point tolerance set includes four high-deviation representative points and the geometric center representative point, for a total of five anchor points. This anchor point tolerance set covers multiple locations with significant deviations within the defect body, as well as the shape center location. This allows subsequent reproducible evaluation to determine whether the defect feature encoding remains consistent when the anchor points change at these reasonable locations, thereby reducing encoding drift and judgment jitter caused by slight anchor point deviations during re-inspection.

[0034] Step 2: Using the main anchor point of the defect and each anchor point in the anchor point tolerance set as the center, establish a ring structure on the brightness residual map. Extract the defect feature code based on the ring structure. Use the defect feature code corresponding to the main anchor point of the defect as the benchmark code. Compare the defect feature codes corresponding to each anchor point in the anchor point tolerance set with the benchmark code to determine whether the defect feature code can be reproduced.

[0035] The system reads the ring zone configuration parameters to determine the boundary distances of the first, second, and third ring zones. These three boundary distances define the spatial range of the core ring zone, transition ring zone, and background ring zone centered on the anchor point. The first ring zone boundary distance corresponds to the outer boundary of the core ring zone, the second ring zone boundary distance corresponds to the outer boundary of the transition ring zone, and the third ring zone boundary distance corresponds to the outer boundary of the background ring zone. For each anchor point in the defect main anchor point and the anchor point tolerance set, the system calculates the distance from each pixel in the brightness residual map to that anchor point, centered on that anchor point. The distance is the planar distance between the pixel coordinates and the anchor point coordinates. The system divides pixels into different ring zones based on distance thresholds: pixels with a distance not greater than the first ring zone boundary distance are assigned to the core ring zone pixel set; pixels with a distance greater than the first ring zone boundary distance but not greater than the second ring zone boundary distance are assigned to the transition ring zone pixel set; and pixels with a distance greater than the second ring zone boundary distance but not greater than the third ring zone boundary distance are assigned to the background ring zone pixel set. A ring zone structure is then established based on the core ring zone pixel set, the transition ring zone pixel set, and the background ring zone pixel set.

[0036] The ring band configuration parameters are pre-calibrated and fixed ring band sampling diameter parameters for different product models and different illumination detection screens. These parameters are stored in the system's configuration table and retrieved during online detection. The ring band configuration parameters define the sampling range of the three-layer ring band centered on the anchor point, including the first ring band boundary distance, the second ring band boundary distance, and the third ring band boundary distance. The first ring band boundary distance defines the outer boundary of the core ring band, the second ring band boundary distance defines the outer boundary of the transition ring band, and the third ring band boundary distance defines the outer boundary of the background ring band. To ensure a clear definition of the ring band structure, the system imposes a fixed size constraint on the three boundary distances: the first ring band boundary distance is less than the second ring band boundary distance, and the second ring band boundary distance is less than the third ring band boundary distance. This ensures that the core ring band is located in the innermost layer, the transition ring band in the middle layer, and the background ring band in the outermost layer.

[0037] The advantages of using a three-layer ring structure are as follows: the core ring is used to stably cover the area where the defect body deviates most concentrated; the transition ring is used to cover the slope area with a slow transition of weak boundaries; and the background ring is used to provide a stable background control caliber. The ring boundaries are fixed and determined by configuration parameters, and do not depend on the hard boundaries of the candidate areas. Therefore, it can reduce the impact of candidate range fluctuations on feature statistical caliber during re-inspection and provide a reproducible sampling range for subsequent defect feature coding. The advantage of establishing ring structures for each anchor point in the anchor point tolerance set is that multiple sets of ring samples with consistent calibers can be formed within a reasonable anchor point deviation range, which can be used to evaluate the reproducibility of defect feature coding with respect to anchor point position uncertainties.

[0038] In a specific example, the system reads from the configuration table that the first ring boundary distance is 20 pixels, the second ring boundary distance is 50 pixels, and the third ring boundary distance is 90 pixels, and uses the pixel coordinates of a certain anchor point as the x-coordinate 120 and y-coordinate 180 as the ring center. The system calculates the distance from any pixel in the brightness residual map to the anchor point. For example, if the distance between a pixel with x-coordinate 130 and y-coordinate 185 and the anchor point is 10.3 pixels, then this pixel is assigned to the core ring pixel set; if the distance between a pixel with x-coordinate 160 and y-coordinate 180 and the anchor point is 40 pixels, then this pixel is assigned to the transition ring pixel set; if the distance between a pixel with x-coordinate 190 and y-coordinate 180 and the anchor point is 70 pixels, then this pixel is assigned to the background ring pixel set; if the distance from a pixel to the anchor point is greater than 90 pixels, then this pixel does not participate in the sampling of the current ring structure. In this way, the system forms a core ring with a radius of no more than 20 pixels, a transition ring with a radius of more than 20 pixels but no more than 50 pixels, and a background ring with a radius of more than 50 pixels but no more than 90 pixels around the anchor point. This ensures that the subsequent statistics on the deviation of the defect subject in the core ring, the statistics on the gradually changing slope morphology in the transition ring, and the statistics on the background baseline comparison in the background ring all have a fixed caliber, thereby improving the consistency of the re-inspection of defect feature coding.

[0039] The system extracts defect feature encoding based on the annular structure. Specifically, it performs robust statistics on the residual values ​​in the core annular pixel set to determine the representative value of the core annular residual, and performs robust statistics on the residual values ​​in the background annular pixel set to determine the representative value of the background annular residual. Robust statistics are used to reduce the impact of a small number of abnormal residual points on the representative value. This is achieved by first taking the median of the residual values ​​as the representative value, and then taking the average value after removing extreme values ​​when the number of pixels is insufficient or there are missing pixels. The system determines the core deviation intensity encoding by performing a difference operation on the representative values ​​of the core annular residual and the representative values ​​of the background annular residual. The difference operation is used to quantify the deviation intensity of the defect subject relative to the background. Using the core-to-background difference encoding can offset the impact of overall brightness drift on absolute grayscale, thereby improving the consistency of intensity features in re-inspection.

[0040] The system performs stratified sampling on the transition ring to extract transition morphology consistency codes: The transition ring is divided into multiple transition sub-rings along the distance direction. The division method involves equally dividing the distance interval of the transition ring according to the number of configured sub-rings, and calculating the residual representative value for each transition sub-ring, thus obtaining a transition sequence arranged from the inside out. The system performs a monotonicity test on the transition sequence to determine the transition morphology consistency code. The monotonicity test is used to determine whether the residual representative value changes unidirectionally from the core to the background, thereby characterizing the slow transition slope morphology of weak boundary brightness unevenness defects. The advantage of using the monotonicity test is that it can distinguish between true slowly varying defects and non-slowly varying structures caused by local steps, reflection spots, or noise fluctuations, making the morphological evidence more interpretable and stable.

[0041] The sign of the core deviation intensity code corresponding to the defect main anchor point is used as the deviation direction: when the core deviation intensity is positive, the deviation direction is determined to be brighter; when the core deviation intensity is negative, the deviation direction is determined to be darker.

[0042] The system divides the coverage area of ​​the ring structure into evaluation units to extract spatial coherence codes: the system divides the coverage area of ​​the ring structure into multiple evaluation units according to a fixed grid, and calculates the representative residual value of each evaluation unit; the system determines the deviation direction by the sign of the core deviation intensity code, and counts the proportion of evaluation units whose representative residual values ​​are consistent with the deviation direction. When the representative residual value of an evaluation unit is the same sign as the deviation direction, the evaluation unit is recorded as a unit with consistent direction; when the representative residual value of an evaluation unit is opposite in sign to the deviation direction or is zero, the evaluation unit is recorded as a unit with inconsistent direction. The ratio of the number of units with consistent direction to the total number of evaluation units is determined as the proportion of units with consistent deviation direction; for each pair of adjacent evaluation units, the absolute value of the difference in their representative residual values ​​is calculated, and robust statistics are performed on the set of absolute values ​​of all adjacent differences to obtain the representative value of the difference between adjacent evaluation units. Robust statistics preferentially take the median as the representative value.

[0043] The representative value of the residual of the evaluation unit is a statistic used to characterize the overall brightness deviation level of the corresponding evaluation unit. The system obtains the brightness residual value of each pixel in the pixel set covered by the evaluation unit, and performs robust statistics on the brightness residual value to obtain the representative value of the residual of the evaluation unit. The robust statistics use the median as the statistical result.

[0044] The deviation direction consistency ratio is compared with the consistency ratio threshold, and the difference representative value of adjacent small units is compared with the difference upper limit threshold. When the deviation direction consistency ratio is not lower than the consistency ratio threshold and the difference representative value of adjacent small units is not greater than the difference upper limit threshold, the spatial coherence code is determined to be satisfied; when either comparison is not satisfied, the spatial coherence code is determined to be unsatisfactory.

[0045] The advantage of using spatial coherence coding is that it can suppress the interference of isolated noise points or local jumps on defect judgment, and make defect evidence show patchy, continuous, low-frequency brightness unevenness characteristics, thereby improving the consistency of re-inspection.

[0046] The core deviation intensity coding, transition morphology consistency coding, and spatial coherence coding are combined to form a defect feature coding, which is then used for subsequent anchor point tolerance set difference comparison and reproducibility assessment.

[0047] In a specific example, the distances between the ring boundaries are r1=20 pixels, r2=50 pixels, and r3=90 pixels, and the number of transition sub-rings is K=4. With a certain anchor point as the center, the representative value of the core ring residual is Rc=8.0, and the representative value of the background ring residual is Rb=1.0. Therefore, the core deviation intensity encoding is Ec=Rc-Rb=7.0. The transition ring band r∈(20, 50] is divided into 4 transition sub-ring bands, and the robust statistical residual values ​​within the pixel set of each transition sub-ring band are taken as the representative residual values ​​of that transition sub-ring band. The representative residual values ​​of the 4 transition sub-ring bands are arranged in order from the inside out, resulting in the transition sequence T=[7.0, 5.2, 3.6, 2.1]. The monotonicity test is performed according to the adjacent difference Δ=[7.0-5.2, 5.2-3.6, 3.6-2.1]=[1.8, 1.6, 1.5], and the monotonicity violation number is found to be 0. The transition morphology consistency code is recorded as satisfied. The ring band coverage area is divided into 3×3 evaluation units, and the representative residual value of each evaluation unit is calculated. The deviation direction is determined by the sign of the core deviation intensity code Ec=7.0 as brighter. The sign of the difference representative value and the deviation direction are the same as the rule for determining direction consistency: when the residual representative value of the evaluation unit is positive, the evaluation unit is recorded as a direction-consistent unit; when the residual representative value of the evaluation unit is negative or 0, the evaluation unit is recorded as a direction-inconsistent unit. In this example, the 3×3 grid contains 9 evaluation units, and the residual representative values ​​of the 9 evaluation units are all positive. Therefore, the number of direction-consistent units is 9, the total number of evaluation units is 9, and the deviation direction consistency ratio is P=9 / 9=1.0. The difference representative value between adjacent small units is D=1.1. If the configured threshold satisfies P>0.8 and D≤2.0, then the spatial coherence encoding is recorded as satisfied. Therefore, the defect feature encoding corresponding to this anchor point can be represented as (Ec=7.0, transition mode=satisfied, spatial coherence=satisfied).

[0048] In the transition sequence where transition rings are arranged from the inside out, the system sequentially obtains the representative residual values ​​of adjacent transition sub-rings and calculates the adjacent differences to form an adjacent difference sequence. The adjacent difference is defined as the representative residual value of the previous transition sub-ring minus the representative residual value of the next transition sub-ring, ensuring that the sign of the adjacent difference directly reflects the direction of change from the inside out. The system determines the transition direction based on the core deviation intensity code corresponding to the defect's main anchor point. When the core deviation intensity code is positive, the transition direction is determined as a direction where the residual gradually decreases from the core ring to the background ring; when the core deviation intensity code is negative, the transition direction is determined as a direction where the residual gradually increases from the core ring to the background ring. The advantage of using the core deviation intensity code to determine the transition direction is that it ensures that the monotonicity test is consistent with the defect deviation direction, thus avoiding misjudgments caused by inconsistencies in positive and negative directions.

[0049] When the transition direction is the direction in which the residual gradually decreases, the system judges whether each adjacent difference in the adjacent difference sequence is not less than zero, and records adjacent differences that are not less than zero as monotonically passing, and adjacent differences that are less than zero as monotonically violating. The judgment means that in the transition process from the inside to the outside, the residual of the next layer should not be greater than the residual of the previous layer, otherwise it indicates that there is a reverse rise or step fluctuation.

[0050] When the transition direction is the direction in which the residual gradually increases, the system judges whether each adjacent difference in the adjacent difference sequence is not greater than zero, and records adjacent differences that are not greater than zero as monotonically passing, and adjacent differences that are greater than zero as monotonically violating; the judgment means that in the transition process from the inside to the outside, the residual of the next layer should not be less than the residual of the previous layer, otherwise it indicates that there is a reverse decline or step fluctuation.

[0051] The advantage of using the above-mentioned item-by-item monotonicity test is that: the weak boundary of uneven brightness usually manifests as a slowly transitioning slope structure, and the residual representative value should change unidirectionally along the distance direction; when multiple reverse changes occur, it usually corresponds to noise, reflection spots or local hard boundary interference, and the monotonicity test can distinguish them from real slowly changing defects.

[0052] The system calculates the monotonicity violation percentage by counting the proportion of adjacent differences with monotonicity violations to the total number of adjacent differences. This percentage is then compared to a threshold: if the monotonicity violation percentage is not greater than the threshold, the monotonicity test is considered passed; if it is greater, the test is considered failed. The advantage of using a threshold is that it allows for minor local fluctuations under weak boundary and noise conditions, but avoids local fluctuations dominating the overall morphological conclusion, thus improving the stability and consistency of transitional morphology determination. The system records a passed monotonicity test as a satisfied transitional morphology consistency code and a failed monotonicity test as a dissatisfied transitional morphology consistency code.

[0053] The system performs a reproducibility assessment on defect feature codes. Specifically, it uses the defect feature code corresponding to the main anchor point as the baseline code and obtains the defect feature codes corresponding to each anchor point in the anchor point tolerance set. The system performs a difference comparison on each anchor point in the anchor point tolerance set and records the comparison results. The core deviation intensity code is a numerical code. The system calculates the core deviation intensity difference by performing a difference operation between the core deviation intensity code corresponding to the anchor point and the core deviation intensity code in the baseline code. The difference operation is the absolute value of the difference between the two. When the core deviation intensity difference is not greater than the core deviation tolerance threshold, the core deviation intensity comparison result is recorded as passed; when the core deviation intensity difference is greater than the core deviation tolerance threshold, the core deviation intensity comparison result is recorded as failed. The advantage of using the core deviation tolerance threshold is that it allows for small fluctuations in the intensity code when the anchor point makes a reasonable offset within the target connected component, avoiding the direct triggering of unreproducibility due to small statistical differences caused by weak boundary slopes.

[0054] Transitional morphology consistency coding and spatial coherence coding are gated coding systems. The system compares these codes using consistency judgment: The system checks if the transitional morphology consistency code corresponding to the anchor point matches the transitional morphology consistency code in the baseline code. If they match, the transitional morphology comparison result is recorded as passed; otherwise, it is recorded as failed. Similarly, the system checks if the spatial coherence code corresponding to the anchor point matches the spatial coherence code in the baseline code. If they match, the spatial coherence comparison result is recorded as passed; otherwise, it is recorded as failed. The advantage of using consistency judgment is that morphology and coherence coding are used to express whether a defect possesses a gradually changing slope and a continuous structure. These two types of evidence should remain consistent under reasonable anchor point deviations. When inconsistencies occur, they often correspond to noise, reflection artifacts, or local jumps, and continuing to output the grade can easily lead to re-inspection jitter.

[0055] The three comparison results are jointly judged: when the core deviation strength comparison result, transition morphology comparison result, and spatial coherence comparison result of the same anchor point are all passed, the anchor point is recorded as a passed anchor point; when any of the comparison results is failed, the anchor point is recorded as a failed anchor point. The system calculates the passing percentage by counting the number of passing anchor points and dividing the number of passing anchor points by the total number of anchor points in the anchor point tolerance set. The passing percentage is then compared with a passing percentage threshold: when the passing percentage is not lower than the passing percentage threshold, the defect feature code is determined to be reproducible; when the passing percentage is lower than the passing percentage threshold, the defect feature code is determined to be non-reproducible. The advantage of using a passing percentage threshold is that it allows a small number of anchor points in the anchor point tolerance set to fall on the slope edge or local noise location and fail, but when most anchor points remain consistent, they are still determined to be reproducible, thereby improving the consistency of re-inspection and reducing the probability of falsely triggering re-inspection.

[0056] like Figure 4 As shown in the flowchart of the ring structure feature encoding construction and reproducibility determination output provided in this application embodiment, a ring structure is established with each anchor point as the center, and it is clear that the ring structure consists of a core ring, a transition ring, and a background ring. Subsequently, the core deviation intensity code, transition morphology consistency code, and spatial coherence code are determined on the ring structure, and further composed of defect feature codes. It is determined whether the defect feature code is reproducible, and two branches are output by determining whether the pass rate is not lower than the pass rate threshold: if yes, the defect feature code is reproducible, and the defect degree of the LCD screen is output based on the defect feature code of the main anchor point; if no, the defect feature code is not reproducible, and the defect degree of the conservative defect or the "re-inspection mark" is output based on the defect feature code of the main anchor point, so as to give a stable output or a re-inspection guidance output in the two cases of reproducibility and non-reproducibility respectively.

[0057] In a specific example, the system obtains the defect master anchor point within the target connected component, with pixel coordinates (120, 180). It then constructs an anchor point tolerance set according to the aforementioned rules. This set includes four high-deviation representative points and one geometric center representative point. The coordinates of the four high-deviation representative points are (110, 170), (130, 165), (105, 190), and (135, 195), respectively. The coordinates of the geometric center representative point are (118, 183). The system uses the defect feature code corresponding to the defect master anchor point as the baseline code, which is (Ec=7.0, Transitional form = satisfied, Spatial coherence = satisfied). The system establishes ring structures at the five anchor points mentioned above and extracts defect feature codes, resulting in the following codes for each anchor point: (110, 170) is coded as (Ec=6.4, transition morphology = satisfied, spatial coherence = satisfied); (130, 165) is coded as (Ec=7.6, transition morphology = satisfied, spatial coherence = satisfied); (105, 190) is coded as (Ec=7.2, transition morphology = satisfied, spatial coherence = satisfied); (135, 195) is coded as (Ec=5.1, transition morphology = not satisfied, spatial coherence = satisfied); and (118, 183) is coded as (Ec=6.8, transition morphology = satisfied, spatial coherence = satisfied). The system sets the core deviation tolerance threshold to 1.5 and the pass rate threshold to 0.7. The system performs a difference comparison with the baseline code for each anchor point: the core deviation intensity differences are |6.4-7.0|=0.6, |7.6-7.0|=0.6, |7.2-7.0|=0.2, |5.1-7.0|=1.9, and |6.8-7.0|=0.2, respectively. Except for (135, 195), the difference for the other four anchor points is no greater than 1.5. The consistency comparison result for the transitional form coding is: except for (135, 195), the other four anchor points are consistent with the baseline. The consistency comparison result for the spatial continuity coding is: all five anchor points are consistent with the baseline. Based on this, the system records (110, 170), (130, 165), (105, 190), and (118, 183) as passing anchor points, and (135, 195) as failing anchor point. With 4 anchor points, a tolerance set of 5 anchor points, and a pass rate of 4 / 5 = 0.8, satisfying 0.8 ≥ 0.7, the system determines that the defect feature code is reproducible.

[0058] Step 3: When it is determined that the defect feature code is reproducible, output the defect degree of the LCD screen based on the defect feature code of the main defect anchor point; when it is determined that the defect feature code is not reproducible, output the conservative defect degree or output a re-inspection mark based on the defect feature code of the main defect anchor point.

[0059] When the system determines that the defect feature code is reproducible, it uses the defect feature code corresponding to the main anchor point as the output basis to generate the LCD screen defect level. The defect level is used to characterize the severity level and deviation direction of the defect. The severity level is obtained by comparing the core deviation intensity code with the defect level classification threshold table. The deviation direction is determined by the sign of the core deviation intensity code; a positive core deviation intensity code results in a brighter output, while a negative core deviation intensity code results in a darker output. The advantage of outputting the defect level only after reproducibility is achieved is that the final level is only output when the code remains consistent within the anchor point tolerance range. This reduces the risk of weak boundary defects skipping levels during re-inspection due to slight anchor point deviations or local noise, improving judgment consistency and traceability.

[0060] When the system determines that the defect feature code is unreproducible, it still uses the defect feature code corresponding to the main anchor point as the conservative output basis, and outputs either the conservative defect level or a re-inspection mark. The conservative defect level is the risk level obtained based on the conservative threshold table. The conservative threshold table adopts a more conservative grading rule than the defect level grading threshold table, which is used to avoid outputting a potentially fluctuating final level when the evidence is unstable. The re-inspection mark is used to indicate that the defect feature code fluctuates within the anchor point tolerance range and needs to enter the re-inspection station or manual review process. The system can select the output method according to the configuration rules: when the core deviation intensity code is not lower than the risk trigger threshold in the conservative threshold table, it outputs the conservative defect level and simultaneously outputs the re-inspection mark; when the core deviation intensity code is lower than the risk trigger threshold, it only outputs the re-inspection mark. The advantage of using conservative output or re-inspection mark when it is unreproducible is that it avoids directly giving a final qualified or unqualified conclusion when the code is unstable, thereby reducing the misleading effect of re-inspection fluctuations on production line decisions and explicitly importing unstable samples into the review link.

[0061] In a specific example, the system is configured with a defect severity grading threshold table as follows: Ec < 3.0 outputs level L1, 3.0 ≤ Ec < 6.0 outputs level L2, and Ec ≥ 6.0 outputs level L3. The risk trigger threshold of the conservative threshold table is configured to trigger conservative defect severity output when Ec ≥ 4.0. If the reproducibility assessment result of a certain detection is reproducible, the defect feature encoding of the defect main anchor point is (Ec = 7.0, transition mode = satisfied, spatial coherence = satisfied). The system outputs defect severity level L3 based on Ec = 7.0 satisfying Ec ≥ 6.0, and outputs a brighter defect result because Ec is positive. If the reproducibility assessment result of another batch of tests is non-reproducible, the defect feature code of the defect main anchor point is (Ec=5.1, transition mode = not satisfied, spatial coherence = satisfied). The system outputs the conservative defect level L2 based on Ec=5.1 and Ec≥4.0 and outputs a re-inspection mark at the same time. When the re-inspection mark triggers the subsequent re-inspection process, the system re-collects and verifies the sample at the re-inspection station to avoid directly outputting a potentially jittery final judgment conclusion under unstable coding conditions.

[0062] In Specific Embodiment Two, based on Specific Embodiment One, when it is determined that the defect feature code is reproducible, the degree of defect of the output LCD screen further includes: forming a passing anchor set by composing the anchors recorded as passing anchors in the anchor tolerance set, and obtaining the defect feature code corresponding to each anchor in the passing anchor set.

[0063] Since the definition of anchor points already requires that the core deviation strength comparison, transition morphology comparison, and spatial coherence comparison all pass, the transition morphology consistency code and spatial coherence code of each anchor point in the anchor point set must be consistent with the code corresponding to the main defect anchor point. The system only performs fusion on the numerical core deviation strength code to further suppress the small fluctuations in strength caused by reasonable offset of anchor points within the target connected block. The system takes the median representative value of the core deviation strength code corresponding to each anchor point in the anchor point set to determine the fused strength code. The median representative value is used to reduce the impact of a small number of extreme anchor point strength values ​​on the fusion result, making the fused strength code more stable and reproducible. The system combines the fused strength code with the transition morphology consistency code and spatial coherence code corresponding to the main defect anchor point to form the fused defect feature code, and outputs the LCD screen defect level based on the fused defect feature code. Using the fused output method can further reduce the sensitivity of single anchor point output to differences in weak boundary slope interception under the premise of reproducibility, thereby reducing the jitter of defect level between adjacent levels and improving the consistency of production line judgment.

[0064] In a specific example, the reproducibility evaluation result of Implementation Example 1 is reproducible. The defect feature code corresponding to the main anchor point is (Ec=7.0, transition mode=satisfied, spatial coherence=satisfied). The anchor point tolerance set is recorded as the anchor points that pass through the anchor point set. The anchor point set contains 4 anchor points with core deviation strength codes of 6.4, 7.6, 7.2, and 6.8, respectively. The corresponding transition mode consistency code and spatial coherence code are both "satisfied". The system takes the median representative value of the core deviation strength code of the anchor point set to obtain the fusion strength code Em=median(6.4, 7.6, 7.2, 6.8)=(6.8+7.2) / 2=7.0. The system determines the fusion defect feature code as (Em=7.0, transition mode=satisfied, spatial coherence=satisfied). If the defect severity grading threshold table is configured as follows: Ec < 3.0 outputs grade L1, 3.0 ≤ Ec < 6.0 outputs grade L2, and Ec ≥ 6.0 outputs grade L3, then the system outputs defect severity grade L3 based on Em = 7.0, satisfying Em ≥ 6.0, and outputs a brighter defect result based on Em as positive. Here, Ec represents the core deviation intensity code corresponding to the main anchor point of the defect, and Em represents the fused intensity code obtained by taking the median representative value of the core deviation intensity codes from the anchor point set. Em is used to replace Ec of a single anchor point in the defect severity grading output. Compared to directly using the strength of a single main anchor point, this embodiment forms a fused intensity by taking the median representative value of the strengths from the anchor point set, making the intensity output less sensitive to local fluctuations of individual anchor points, thus making it easier to maintain grade stability during re-inspection.

[0065] Specific embodiment three, such as Figure 2 The diagram shown is a schematic representation of the structure of a liquid crystal screen defect determination system based on visual defect feature encoding provided in this application embodiment, including: an anchor point generation module, an encoding evaluation module, a result output module, and a determination database.

[0066] The anchor point generation module is connected to the coding evaluation module, and the coding evaluation module is connected to the result output module. The anchor point generation module, coding evaluation module, and result output module are all connected to the judgment database. The judgment database is used to store various parameters involved in the LCD screen defect judgment system based on visual defect feature coding.

[0067] The module comprises the following components: Anchor point generation module, which acquires the brightness image of the LCD screen under the illumination detection screen and generates a brightness residual map; a target connected component is determined based on the brightness residual map, and a defect master anchor point and an anchor point tolerance set are generated within the target connected component; Encoding evaluation module, which establishes a ring structure on the brightness residual map centered on the defect master anchor point and each anchor point in the anchor point tolerance set; Defect feature codes are extracted based on the ring structure; the defect feature codes corresponding to the defect master anchor point are used as the benchmark codes; and the defect feature codes corresponding to each anchor point in the anchor point tolerance set are compared with the benchmark codes to determine whether the defect feature codes are reproducible; Result output module, which outputs the LCD screen defect degree based on the defect feature code of the defect master anchor point when the defect feature code is determined to be reproducible; and outputs a conservative defect degree or a re-inspection mark based on the defect feature code of the defect master anchor point when the defect feature code is determined to be unreproducible.

[0068] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the above functions can be divided into different functional modules to complete all or part of the functions described above.

[0069] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0070] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units, located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the solution, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining defects in liquid crystal displays based on visual defect feature encoding, characterized in that, Includes the following steps: Step 1: Obtain the brightness image of the LCD screen under the illumination detection screen and generate a brightness residual map. Based on the brightness residual map, determine the target connected component and generate the defect main anchor point and anchor point tolerance set within the target connected component. Step 2: Using the main defect anchor point and each anchor point in the anchor point tolerance set as the center, establish a ring structure on the brightness residual map, extract defect feature codes based on the ring structure, use the defect feature code corresponding to the main defect anchor point as the reference code, compare the defect feature codes corresponding to each anchor point in the anchor point tolerance set with the reference code, and determine whether the defect feature codes can be reproduced. Step 3: When it is determined that the defect feature code is reproducible, output the defect degree of the LCD screen based on the defect feature code of the main defect anchor point; when it is determined that the defect feature code is not reproducible, output the conservative defect degree or output a re-inspection mark based on the defect feature code of the main defect anchor point.

2. The LCD screen defect determination method based on visual defect feature encoding as described in claim 1, characterized in that: The specific process for determining the target connected component based on the brightness residual map is as follows: The original brightness image of the LCD screen under the preset lighting detection screen is obtained. Low-frequency background estimation is performed on the original brightness image to obtain the background reference plane. The difference operation between the original brightness image and the background reference plane is performed to obtain a brightness residual map that characterizes the brightness deviation of the original brightness image relative to the background reference plane. The deviation intensity of each pixel is calculated in the brightness residual map, where the deviation intensity is the absolute value of the corresponding pixel residual; Pixels with deviation intensity not lower than a preset deviation intensity threshold are marked as candidate deviation points, and spatial connectivity aggregation is performed on the candidate deviation points to obtain candidate deviation connected components. Candidate deviating connected components are eliminated to determine the target connected component.

3. The LCD screen defect determination method based on visual defect feature encoding as described in claim 2, characterized in that: The process of eliminating candidate deviating connected components includes: The area of ​​a connected component is determined by counting the number of pixels contained in each candidate deviated connected component. When the area of ​​a connected component is lower than the minimum area threshold, the corresponding candidate deviated connected component is removed. For candidate deviated connected components that have not been eliminated, the connectivity consistency is determined by statistically analyzing the percentage of pixels with consistent residual signs within the candidate deviated connected component. When the connectivity consistency is lower than the consistency threshold, the corresponding candidate deviated connected component is eliminated. Candidate off-connectivity components that were not eliminated are identified as valid candidate connectivity components; When there is only one valid candidate connected component, the valid candidate connected component is determined as the target connected component. When there is more than one valid candidate connected component, the cumulative deviation is determined by accumulating the pixel deviation intensity within each valid candidate connected component, and the valid candidate connected component with the largest cumulative deviation is determined as the target connected component.

4. The LCD screen defect determination method based on visual defect feature encoding as described in claim 1, characterized in that: The step of generating the defect master anchor point and anchor point tolerance set within the target connected component includes: The position weighting center is determined by summing the positions of each pixel within the target connected component according to the corresponding deviation intensity, and the position weighting center is mapped to the nearest pixel coordinates to obtain the defect main anchor point; By spatially dispersing the pixels within the target connected component whose deviation intensity reaches the high deviation threshold, multiple sets of high deviation representative points are obtained. The geometric center is calculated by taking the set of pixel coordinates of the target connected component and mapping the geometric center to the nearest pixel coordinates to obtain the representative point of the geometric center; The high deviation representative point and the geometric center representative point together form the anchor point tolerance set.

5. The LCD screen defect determination method based on visual defect feature encoding as described in claim 1, characterized in that: The step of establishing a ring structure on the brightness residual map, centered on the main defect anchor point and each anchor point in the anchor point tolerance set, includes: The boundary distances of the first, second, and third annular zones are determined by the annular zone configuration parameters. For the main defect anchor point and each anchor point in the anchor point tolerance set, calculate the distance from each pixel in the brightness residual map to the anchor point with the corresponding anchor point as the center; The core ring zone pixel set is determined by pixels whose distance is no greater than the distance to the first ring zone boundary. The transition ring zone pixel set is determined by pixels whose distance is greater than the distance to the first ring zone boundary and not greater than the distance to the second ring zone boundary. The background ring zone pixel set is determined by pixels whose distance is greater than the distance to the second ring zone boundary and not greater than the distance to the third ring zone boundary. The ring structure is established based on the core ring pixel set, the transition ring pixel set, and the background ring pixel set.

6. The LCD screen defect determination method based on visual defect feature encoding as described in claim 1, characterized in that: The defect feature encoding based on the ring structure includes: The representative value of the core ring residual is determined by performing robust statistics on the residual values ​​in the core ring pixel set, and the representative value of the background ring residual is determined by performing robust statistics on the residual values ​​in the background ring pixel set. The core deviation intensity code is determined by performing a difference calculation on the representative value of the core ring residual and the representative value of the background ring residual. By dividing the transition ring into multiple transition sub-rings according to the distance direction and determining the residual representative value of each transition sub-ring, a transition sequence arranged from the inside to the outside is obtained; The consistency coding of the transition morphology is determined by performing a monotonicity test on the transition sequence. The evaluation units are divided within the coverage area of ​​the ring structure. The proportion of the evaluation units that are consistent in the deviation direction and the representative value of the difference between adjacent evaluation units are calculated. The spatial coherence code is determined based on the proportion of the consistent deviation direction and the representative value of the difference between adjacent evaluation units. The core deviation intensity encoding, the transition morphology consistency encoding, and the spatial coherence encoding are combined to form the defect feature encoding.

7. The LCD screen defect determination method based on visual defect feature encoding as described in claim 6, characterized in that: The step of performing a monotonicity test on the transition sequence to determine the consistency encoding of the transition morphology includes: By obtaining the residual representative values ​​of two adjacent transition sub-rings in the transition sequence and calculating the adjacent difference, the adjacent difference is the residual representative value of the previous transition sub-ring minus the residual representative value of the next transition sub-ring, forming an adjacent difference sequence. The transition direction is determined based on the core deviation intensity code corresponding to the defect main anchor point. The transition direction is either a direction in which the residual of the core ring zone gradually decreases or a direction in which the residual of the core ring zone gradually increases. When the transition direction is the direction in which the residual gradually decreases, each adjacent difference in the adjacent difference sequence is judged to see if it is not less than zero. Adjacent differences that are not less than zero are recorded as monotonically passing, and adjacent differences that are less than zero are recorded as monotonically violating. When the transition direction is the direction in which the residual gradually increases, each adjacent difference in the adjacent difference sequence is judged to see if it is not greater than zero. Adjacent differences that are not greater than zero are recorded as monotonically passing, and adjacent differences that are greater than zero are recorded as monotonically violating. The monotonicity violation percentage is obtained by statistically analyzing the proportion of adjacent differences with monotonicity violations to the total number of adjacent differences. When the monotonicity violation percentage is not greater than the monotonicity violation percentage threshold, the monotonicity test is considered passed; when the monotonicity violation percentage is greater than the monotonicity violation percentage threshold, the monotonicity test is considered failed. Passing the monotonicity test is denoted as satisfying the transitional form consistency code, while failing the monotonicity test is denoted as not satisfying the transitional form consistency code.

8. The LCD screen defect determination method based on visual defect feature encoding as described in claim 1, characterized in that: The determination of whether the defect feature code is reproducible includes: By using the defect feature code corresponding to the main defect anchor point as the baseline code, and obtaining the defect feature code corresponding to each anchor point in the anchor point tolerance set respectively; For each anchor point in the anchor point tolerance set, the following comparison is performed and the comparison result of the anchor point is recorded: the core deviation strength difference is obtained by performing a difference calculation between the core deviation strength code corresponding to the anchor point and the core deviation strength code in the reference code, and the core deviation strength comparison result is recorded as passed when the core deviation strength difference is not greater than the core deviation tolerance threshold, and as failed when the core deviation strength difference is greater than the core deviation tolerance threshold. By determining whether the transition mode consistency code corresponding to the anchor point is consistent with the transition mode consistency code in the reference code, if they are consistent, the transition mode comparison result is recorded as passed; if they are inconsistent, the transition mode comparison result is recorded as failed. By determining whether the spatial coherence code corresponding to the anchor point is consistent with the spatial coherence code in the reference code, if they are consistent, the spatial coherence comparison result is recorded as passed; if they are inconsistent, the spatial coherence comparison result is recorded as failed. When the core deviation strength comparison result, transition morphology comparison result, and spatial coherence comparison result of the same anchor point are all passed, the anchor point is recorded as a passed anchor point; when any of the comparison results are failed, the anchor point is recorded as a failed anchor point. The pass rate is obtained by statistically analyzing the percentage of the number of passing anchor points relative to the total number of anchor points in the anchor point tolerance set. When the pass rate is not lower than the pass rate threshold, the defect feature code is determined to be reproducible, and the defect feature code of the main defect anchor point is used to output the degree of LCD screen defect. When the pass rate is lower than the pass rate threshold, the defect feature code is determined to be unreproducible, and the conservative defect level or re-inspection mark is output based on the defect feature code of the defect main anchor point.

9. The LCD screen defect determination method based on visual defect feature encoding as described in claim 8, characterized in that: The determination of the defect feature encoding is reproducible, and the output of the LCD screen defect degree based on the defect feature encoding of the main defect anchor point also includes: By forming a passing anchor set from the anchor point tolerance set and obtaining the defect feature code corresponding to each anchor point in the passing anchor set; The fusion strength code is determined by taking the median representative value of the core deviation strength code corresponding to each anchor point in the anchor point set. The fusion intensity coding, transition morphology consistency coding, and spatial coherence coding are combined to form a fusion defect feature coding, and the degree of LCD screen defect is output based on the fusion defect feature coding.

10. A system applying the liquid crystal display defect determination method based on visual defect feature encoding as described in any one of claims 1-9, characterized in that, include: Anchor point generation module, encoding evaluation module, and result output module; The anchor point generation module is used to acquire the brightness image of the LCD screen under the illumination detection screen and generate a brightness residual map, determine the target connected component based on the brightness residual map, and generate the defect main anchor point and anchor point tolerance set in the target connected component. The coding evaluation module is used to establish a ring structure on the brightness residual map with the main defect anchor point and each anchor point in the anchor point tolerance set as the center, extract defect feature codes based on the ring structure, use the defect feature codes corresponding to the main defect anchor point as the benchmark codes, compare the defect feature codes corresponding to each anchor point in the anchor point tolerance set with the benchmark codes, and determine whether the defect feature codes are reproducible. The result output module is used to output the degree of LCD screen defect based on the defect feature code of the main defect anchor point when it is determined that the defect feature code is reproducible; and to output the degree of conservative defect or a re-inspection mark based on the defect feature code of the main defect anchor point when it is determined that the defect feature code is not reproducible.