Method for detecting dense bad points of light-emitting display screen, electronic device and storage medium
By performing binarization and hash mapping calculations on the grayscale image of the luminescent display screen, duplicate dense bad pixels are identified and removed, solving the problem of low detection efficiency caused by the large amount of computation in traditional methods, and achieving efficient and accurate detection of dense bad pixels.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GOVION TECHNOLOGY (SUZHOU) CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional methods require a huge amount of computation to detect dense dead pixels on high-resolution, ultra-large-size light-emitting displays, resulting in low detection efficiency and making it difficult to meet the needs of online, real-time production.
By binarizing the grayscale image based on the illuminated state of the display screen, candidate dense regions are identified, a bad pixel set is extracted, and a hash mapping is used to remove duplicate bad pixel sets, generating dense bad pixel detection results.
It enables efficient and accurate detection of dense dead pixels in light-emitting displays, avoiding redundant calculations and result deviations, and improving detection efficiency and performance.
Smart Images

Figure CN121904039B_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of image processing technology. More specifically, this application relates to a method for detecting dense dead pixels on a light-emitting display screen, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the rapid development of display technology, self-emissive display technologies such as Micro LED, Mini LED, and OLED have been widely used in high-end display fields due to their advantages such as high brightness, high contrast, and high reliability. These displays are typically composed of millions or even hundreds of millions of independently controllable tiny light-emitting units (pixels). During production and quality control, due to factors such as materials and processes, individual pixels may exhibit defects such as failure to light up (dead pixels), insufficient brightness (dark pixels), or excessive brightness (bright pixels). These are collectively referred to as dead pixels. Individual, scattered dead pixels may be acceptable, but if dead pixels are densely distributed in a certain area, they will seriously impair the uniformity and quality of the displayed image. Therefore, rapid and accurate detection of dense dead pixels is a critical step in display panel manufacturing.
[0003] Traditional methods for detecting dense defects typically rely on calculating the relative distances between all defects and identifying clustered areas by determining whether they fall within a preset distance threshold. However, when dealing with high-resolution, ultra-large panels, the number of defects can be extremely large. This method, based on pairwise distance calculations, leads to an exponential increase in computational load, resulting in low detection efficiency and making it difficult to meet the demands of online, real-time production inspection.
[0004] Therefore, there is an urgent need to provide a detection solution for densely packed dead pixels on light-emitting displays, so as to significantly improve detection efficiency while ensuring detection accuracy. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a method for detecting dense dead pixels in a light-emitting display screen, an electronic device, and a computer-readable storage medium solution in several aspects.
[0006] In a first aspect, this application provides a method for detecting dense dead pixels on a light-emitting display screen, comprising: binarizing the grayscale image based on the standard brightness value of the grayscale image under the light-emitting state of the display screen to obtain an initial dead pixel binary image; identifying all candidate dense regions that meet the filtering conditions in the initial dead pixel binary image according to preset dense region shape parameters and filtering conditions, and extracting the dead pixel coordinates contained in each candidate dense region to form a dead pixel set for each candidate dense region; performing hash mapping calculation on each dead pixel set to generate a hash value corresponding to each dead pixel set; removing duplicate dead pixel sets based on the hash value, and outputting the dense dead pixel detection result.
[0007] In some embodiments, the standard brightness value is obtained through the following operations: converting the grayscale values of each pixel in the grayscale image into a one-dimensional array; determining the upper and lower bound positions of the number of elements to be removed in the one-dimensional array according to the length of the one-dimensional array and the preset ratio for removing the first and last elements; iteratively selecting a reference element in the one-dimensional array and dividing the one-dimensional array, and recursively or iteratively performing this process in the subarray containing the target position until the position of the reference element coincides with the target position, wherein the target position is the upper bound position or the lower bound position; removing the elements before the lower bound position and after the upper bound position; and calculating the average value of the remaining elements in the one-dimensional array to obtain the standard brightness value.
[0008] In other embodiments, binarizing the grayscale image to obtain an initial bad pixel binary image includes: determining a bad pixel threshold based on the standard brightness value; setting the grayscale value of the bad pixel determined based on the bad pixel threshold to 255 or 1, and setting the grayscale value of other pixels besides the bad pixel to 0; wherein, in response to the bad pixel threshold including an over-dark threshold, pixels with grayscale values less than the over-dark threshold are determined as bad pixel pixels, and the bad pixel pixels include dead pixels and / or dark pixels; in response to the bad pixel threshold including an over-bright threshold, pixels with grayscale values greater than the over-bright threshold are determined as bad pixel pixels, and the bad pixel pixels include bright pixels.
[0009] In some other embodiments, when the shape parameter of the dense region is rectangular, identifying all candidate dense regions that meet the filtering conditions in the initial binary image of bad pixels includes: constructing an integral image based on the initial binary image of bad pixels; traversing all possible rectangular regions in the integral image according to a preset rectangle size; determining the number of bad pixels contained in each rectangular region based on the integral value of each rectangular region; and recording the rectangular regions whose number of bad pixels meets the filtering conditions as candidate dense regions.
[0010] In some embodiments, when the shape parameter of the dense region is elliptical or circular, identifying all candidate dense regions that meet the filtering conditions in the initial binary image of bad pixels, and extracting the bad pixel coordinates contained in each candidate dense region to form a bad pixel set for each candidate dense region includes: constructing a filter kernel that matches the size of a preset ellipse or preset circle; using the filter kernel to perform a filtering operation on the initial binary image of bad pixels to generate an intermediate image, wherein the pixel value of each pixel in the intermediate image is the number of bad pixels within the coverage area of the filter kernel centered on that pixel; recording the pixels in the intermediate image whose pixel values meet the filtering conditions as the center points of the candidate dense regions; and extracting the coordinates of all bad pixels within the coverage area of the filter kernel centered on each of the center points to form the bad pixel set.
[0011] In other embodiments, before identifying all candidate dense regions that meet the filtering conditions in the initial binary image of bad pixels, the detection method further includes: acquiring a dust mask image; and setting the gray value of the corresponding position in the initial binary image of bad pixels to zero according to the position of the dust pixels in the dust mask image, so as to eliminate the interference of the dust-covered area.
[0012] In some other embodiments, performing hash mapping calculations on each bad pixel set includes: initializing the hash seed value to the number of bad pixels in the current bad pixel set; traversing each bad pixel coordinate (x, y) in the current bad pixel set, and for each bad pixel coordinate (x, y), left-shifting one of the coordinates x and y by a preset number of bits and performing an OR operation with the other of the coordinates x and y, and packaging them into a first integer; performing an XOR operation on the first integer and the current hash seed value, and using the result as the updated hash seed value for XOR operation with the next first integer; after completing the traversal of all bad pixel coordinates in the current bad pixel set and performing the XOR operation on all first integers, multiplying the final hash seed value by a preset large prime number to obtain the hash value corresponding to the current bad pixel set.
[0013] In some embodiments, removing duplicate bad pixel sets based on the hash value includes: comparing the hash values of all bad pixel sets; in response to the existence of multiple bad pixel sets having the same hash value, determining that the multiple bad pixel sets are duplicate sets, and retaining only one bad pixel set from the duplicate sets.
[0014] In other embodiments, retaining only one bad point set from the repeated point set includes: determining the bad point set to be retained based on the distance between the center coordinates of each candidate dense region corresponding to the plurality of bad point sets and the bad point coordinates in the repeated point set.
[0015] In some other embodiments, the filtering criteria include a filtering criterion for the number of defective pixels or a filtering criterion for the proportion of defective pixels.
[0016] In a second aspect, this application provides an electronic device comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform a detection method according to any one of the first aspects of this application.
[0017] In a third aspect, this application provides a computer-readable storage medium storing program instructions that, when loaded and executed by a processor, cause the processor to perform the detection method according to any one of the first aspects of this application.
[0018] The above-described detection scheme for dense dead pixels in a light-emitting display screen utilizes a binarization process based on standard brightness values. It identifies candidate dense regions and extracts dead pixel sets based on preset dense region shape parameters and filtering conditions. Furthermore, it performs hash mapping calculations on each dead pixel set and removes duplicates based on the hash values. This approach efficiently and accurately detects dense dead pixel regions in a light-emitting display screen, avoiding the inefficiency and result deviations caused by repeated calculations and point set statistics in traditional methods. It also avoids the problem of excessive computation caused by calculating dead pixel distances in traditional technologies, effectively improving the overall performance, reliability, and efficiency of the detection. Attached Figure Description
[0019] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0020] Figure 1 An exemplary flowchart of a method for detecting dense dead pixels in a light-emitting display screen according to some embodiments of this application is shown;
[0021] Figure 2a Grayscale images of some embodiments of this application are shown;
[0022] Figure 2b Initial binary images of bad pixels from some embodiments of this application are shown;
[0023] Figure 2c The diagram shows the detection results when the shape parameter of the dense region is circular in some embodiments of this application;
[0024] Figure 2d The diagram shows the detection results when the shape parameter of the dense region is rectangular in some embodiments of this application;
[0025] Figure 3 An exemplary flowchart of a method for obtaining standard brightness values according to some embodiments of this application is shown;
[0026] Figure 4 An exemplary flowchart of a method for obtaining a set of bad pixels according to some embodiments of this application is shown;
[0027] Figure 5a This invention illustrates the principle of calculating the integral value of a rectangular region according to some embodiments of this application;
[0028] Figure 5b This application shows a schematic diagram of a rectangular region containing dead pixels in some embodiments of the present application;
[0029] Figure 6An exemplary flowchart illustrating a method for obtaining a set of bad pixels according to other embodiments of this application is shown;
[0030] Figure 7 A flowchart illustrating a method for calculating hash maps according to some embodiments of this application is shown;
[0031] Figure 8 The diagram shows a representation of hash values and the corresponding number of bad points in some embodiments of this application.
[0032] Figure 9 A schematic block diagram of a dense defect detection system for a light-emitting display screen according to an embodiment of this application is shown. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0035] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0036] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0037] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0038] Figure 1 An exemplary flowchart of a method for detecting dense dead pixels in a light-emitting display screen according to some embodiments of this application is shown. Figure 1 As shown, the detection method 100 includes: step S102, binarizing the grayscale image based on the standard brightness value of the grayscale image under the illumination state of the display screen to obtain an initial bad pixel binary image; step S104, identifying all candidate dense regions that meet the filtering conditions in the initial bad pixel binary image according to preset dense region shape parameters and filtering conditions, and extracting the bad pixel coordinates contained in each candidate dense region to form a bad pixel set for each candidate dense region; step S106, performing hash mapping calculation on each bad pixel set to generate a hash value corresponding to each bad pixel set; step S108, removing duplicate bad pixel sets based on the hash value and outputting the dense bad pixel detection result.
[0039] Step S102 aims to initially identify all candidate pixels with abnormal brightness, i.e. "bad pixels", from grayscale image data and convert them into a binary form that is convenient for subsequent centralized computer analysis.
[0040] The display screen mentioned above refers to a light-emitting panel that uses pixelated self-emissive display technology. For example, the display screen can include Micro LED displays, Mini LED, OLED, or other display panels that require the detection of pixel-level light emission defects. The light emission state refers to the working state in which the display screen is driven to light up during the detection process. It usually displays full white, a specific grayscale, or a test image to ensure that each pixel or sub-pixel is in an active light emission mode, so that its true brightness performance can be captured by optical equipment.
[0041] The grayscale image mentioned above refers to a digital image captured by an image sensor (such as an industrial camera) that reflects the spatial distribution of the luminous intensity of a display screen. In this image, the value of each pixel (i.e., the grayscale value) represents the relative brightness intensity of the corresponding luminous point on the display screen, and the value range is typically between 0 (representing the darkest) and 255 (representing the brightest, for 8-bit images). It is the fundamental data source for all quantitative analyses.
[0042] The standard brightness value is a benchmark calculation parameter in step S102. It does not refer to the brightness of a specific pixel in the image, but rather is a value obtained by statistically analyzing the grayscale values of the entire grayscale image, either globally or in a representative area (e.g., after excluding the influence of potentially extreme abnormal brightness values). This value represents the typical or expected normal brightness of the display screen in its current state. This value serves as an objective benchmark for subsequently determining whether pixel brightness is abnormal.
[0043] For example, in some embodiments, one or more bad pixel thresholds can be determined proportionally based on standard brightness values, thereby classifying each pixel in a grayscale image as a suspected bad pixel or a normal pixel according to the bad pixel threshold, achieving binarization processing. Combined with Figure 2a and Figure 2b As shown, after this binarization process, the original grayscale image with rich grayscale information (such as...) Figure 2a The image shown is converted into an initial binary image of the bad pixels containing only two grayscale values (e.g., using "255" to mark all suspected bad pixels and "0" to mark normal pixels). Figure 2b (As shown).
[0044] In one specific embodiment, step S102 may include: determining a bad pixel threshold based on a standard brightness value; setting the grayscale value of the bad pixel determined based on the bad pixel threshold to 255 or 1, and setting the grayscale value of other pixels besides the bad pixel to 0; wherein, in response to the bad pixel threshold including an over-dark threshold, pixels with grayscale values less than the over-dark threshold are determined as bad pixel pixels, and the bad pixel pixels include dead pixels and / or dark pixels; in response to the bad pixel threshold including an over-bright threshold, pixels with grayscale values greater than the over-bright threshold are determined as bad pixel pixels, and the bad pixel pixels include bright pixels.
[0045] In this embodiment, after determining the standard brightness value that represents the normal luminous level of the display screen, the detection method 100 further performs the determination of the bad pixel threshold and the image binarization operation. The core of this operation is to establish a set of objective and quantitative mathematical criteria based on the calculated standard brightness value, so as to clearly classify each pixel in the grayscale image as a bad pixel or a normal pixel, thereby achieving a precise mapping from the continuous grayscale domain to the discrete binary domain.
[0046] Specifically, the process of "determining the defective pixel threshold based on the standard brightness value" aims to set one or more critical values for judging brightness anomalies. Here, the defective pixel threshold is one or more values that have a specific mathematical relationship with the standard brightness value. For example, the standard brightness value can be multiplied by a coefficient less than 1 (e.g., 0.6) as an overly dark threshold to identify pixels with brightness significantly lower than normal levels, including dead pixels and / or dark pixels. Similarly, the standard brightness value can be multiplied by a coefficient greater than 1 (e.g., 1.6) as an overly bright threshold to identify pixels with abnormally high brightness, i.e., bright pixels. In some embodiments, the overly dark threshold can be set to include only dead pixels used to identify non-emitting dead pixels, such as multiplying the standard brightness value by a lower coefficient (e.g., 0.4) as the overly dark threshold. In this case, defective pixels smaller than this overly dark threshold only include dead pixels. These coefficients can be flexibly configured according to product specifications, process level, the type of defective pixels to be screened, or the user's tolerance for defects, thus making the judgment criteria both objective and adjustable.
[0047] After the threshold is determined, the operation of "setting the grayscale value of the bad pixel determined based on the bad pixel threshold to 255 or 1, and setting the grayscale value of other pixels to 0" is performed. This is the classic image binarization process. Detection method 100 traverses each pixel of the original grayscale image and compares its grayscale value with the set bad pixel threshold. If the grayscale value of the pixel meets the condition for being judged as a bad pixel, a high value representing "target" (usually 255 or 1, which appears as white in the image display) is assigned to its corresponding output image position; otherwise, a low value representing "background" (usually 0, which appears as black) is assigned. Thus, an initial bad pixel binary image with clear black and white contrast is generated, only identifying the locations of suspected bad pixels.
[0048] Specifically, this embodiment differentiates between different types of brightness defects. When an excessively dark threshold is applied, the system identifies pixels with grayscale values below the threshold as bad pixels. These pixels are classified as insufficient brightness defects because their luminous intensity fails to meet the minimum requirements; specific types may include completely non-emitting dead pixels or extremely weakly emitting dark pixels. On the other hand, when an excessively bright threshold is applied, the system identifies pixels with grayscale values above the threshold as bad pixels. These pixels are classified as excessively bright defects, i.e., bright spots, because their luminous intensity exceeds the normal range. In actual detection, only one threshold can be used for unidirectional detection, or both thresholds can be used simultaneously for bidirectional detection, thereby comprehensively capturing both dark and bright abnormal pixels.
[0049] By executing step S102, this detection method 100 achieves significant technical effects. First, by introducing a standard brightness value based on the statistical characteristics of the image itself, it enables the defect criterion to be adaptive, effectively offsetting the overall brightness baseline drift caused by differences in different display modules, shooting conditions, or driving currents, thus maintaining consistency in the judgment criteria across different detection batches. Second, it transforms the problem from a continuous grayscale analysis domain to a discrete binary logic domain, generating an initial binary image of defective pixels with a clear target and clean background. The generated initial binary image filters out all normal grayscale information, highlighting only the locations of suspected defects, greatly simplifying the data complexity of subsequent processing. It allows computational resources to be focused on the morphological, distribution, quantity, and cluster analysis of the identified discrete suspected defective pixels, laying a crucial data foundation for efficient and accurate dense defect detection.
[0050] After completing step S102, in some embodiments, detection method 100 may further include: acquiring a dust mask image; and setting the gray value of the corresponding position in the initial bad pixel binary image to zero according to the position of the dust pixel in the dust mask image, so as to eliminate interference from the dust-covered area.
[0051] The dust mask image is a dedicated binary image whose spatial dimensions perfectly correspond to the initial binary image of bad pixels. In this dust mask image, pixel values are typically preset to two states: for example, a pixel with a grayscale value of 255 is defined as a dust pixel, indicating that the location was covered by dust when the original grayscale image was acquired; while a pixel with a grayscale value of 0 indicates that the corresponding location is not covered by dust. This dust mask image can be acquired through a separate dust detection subsystem, for example, by using specific angle lighting to highlight the height difference between the dust and the display surface, and automatically identifying it through image analysis algorithms; or, in certain precision inspection environments, it can be calculated based on the difference between a pre-acquired reference image obtained under absolutely clean conditions and the current image.
[0052] After obtaining the dust mask image, the detection method 100 performs a crucial data fusion operation: based on the position of the dust pixels in the dust mask image, it sets the grayscale value of the corresponding position in the initial bad pixel binary image to zero. This is achieved by traversing the pixel coordinates one-to-one. For each pixel in the dust mask image marked as dust (e.g., grayscale value 255) (coordinates (i, j)), the detection method forcibly modifies the value of that pixel in the initial bad pixel binary image to 0 at the same coordinate position (i, j). This zeroing operation temporarily excludes that position from the list of suspected bad pixels, regardless of whether its original value in the initial bad pixel binary image is 255 (preliminarily judged as a bad pixel) or 0 (already judged as normal). After this operation, a new binary image corrected for dust information is obtained.
[0053] This processing step incorporates careful and practical engineering considerations. The fundamental reason is that when dust adheres to the display surface, it blocks or scatters light emitted from the underlying pixels, causing abnormal dark spots or uneven brightness in the grayscale image. Without differentiation, these dust-induced dark areas are easily misclassified as dark spots or dead pixels in the previous binarization step, introducing numerous false positives and interfering with the judgment of actual pixel failures. By introducing a dust mask and performing a zeroing operation, this embodiment actively and temporarily marks these contaminated areas as pending or unreliable, thereby effectively avoiding clusters of misjudgments caused by external interference in subsequent dense dead pixel analysis.
[0054] Therefore, this step brings significant technical benefits and practical value. First, it greatly improves the specificity of defect detection results, making the final defect report more accurately reflect the display's own manufacturing or material issues, rather than accidental contamination in the production environment, thus enhancing the guiding value of the detection conclusions. Second, it enables more refined defect management: areas set to zero are not simply ignored but are specially marked, providing a clear data interface for targeted re-inspections that may be needed downstream on the production line after cleaning. Finally, this pre-emptive interference filtering ensures that subsequent dense defect identification steps can operate on a cleaner and more reliable data basis, thereby improving the overall accuracy and robustness of the entire detection system.
[0055] Next, step S104, "based on the preset shape parameters and screening conditions of the dense region, identifying all candidate dense regions that meet the screening conditions in the initial binary image of the defective points, and extracting the coordinates of the defective points contained in each candidate dense region to form a defective point set for each candidate dense region," is the core analysis stage of this application. This step aims to systematically organize and evaluate the discrete defective point identifiers obtained in the preceding steps based on spatial clustering characteristics, thereby elevating simple point detection to the level of regional defect identification with engineering significance.
[0056] This step introduces two key user-configurable parameters: the dense region shape parameter and the filtering criteria. The dense region shape parameter defines the geometry of the baseline spatial range (or neighborhood) used to assess whether defective pixels constitute a dense state. Typical shapes include, but are not limited to, rectangles (including squares), circles, or ellipses. This parameter allows the detection scheme to flexibly adapt to different product specifications or process concerns. For example, a rectangular region may be more suitable for conforming to the regular arrangement of certain chips, while a circular region can more uniformly assess isotropic aggregation. The filtering criteria are quantitative criteria used to determine whether the degree of defective pixel aggregation within a region defined by the shape parameter meets the dense defect standard. This condition is typically set based on the number of defective pixels contained in the region (e.g., the number is greater than a certain lower threshold) or the proportion of defective pixels among all pixels in the region (e.g., the proportion exceeds a certain percentage threshold).
[0057] For example, in some embodiments, the filtering conditions may include a defective pixel count filtering condition or a defective pixel ratio filtering condition. The defective pixel count filtering condition is directly based on the absolute number of defective pixels within a region, for example, setting a lower limit (e.g., more than 5) or a range (e.g., between 4 and 10). When the total number of defective pixels counted within a region meets this numerical condition, it is determined to be a candidate dense region. The defective pixel ratio filtering condition focuses on the relative density of defective pixels. It is determined by calculating the ratio of the number of defective pixels within a region to the total number of pixels covered by that region (i.e., the region area), and comparing it with a preset ratio threshold (e.g., exceeding 4%). These two conditions can be used individually or in combination depending on the actual detection standards. The count condition is intuitive and easy to calculate, while the ratio condition can eliminate the bias caused by different detection region sizes, making the judgment standard more standardized. Together, they ensure the adaptability and accuracy of dense defective pixel identification in different application scenarios. In other embodiments, the defective pixel count filtering condition and the defective pixel ratio filtering condition can be converted into each other. For example, when the filtering condition is the percentage of bad pixels, the number threshold in the region can be calculated based on the shape parameters of the dense region and the preset percentage threshold in the percentage of bad pixels filtering condition, thereby converting the percentage of bad pixels filtering condition into the number of bad pixels filtering condition.
[0058] The process of identifying all candidate dense regions that meet the screening criteria in the initial binary image of bad pixels can be summarized as a spatial sliding matching and statistical calculation process based on a preset shape template. The detection method 100 can systematically traverse the entire initial binary image of bad pixels using a shape window or shape kernel defined by the shape parameters of the dense region. At each traversal position (e.g., aligning the center or a corner of the shape window with a pixel in the initial binary image of bad pixels), the algorithm calculates the total number of pixels marked as bad pixels (non-zero grayscale values, such as 255 or 1) within the image sub-region currently covered by the shape window. Then, this total number of pixels is compared with the quantity threshold set in the screening criteria, or it is converted into the proportion of bad pixels within the area of the shape window and compared with the proportion threshold. If the calculation result meets the screening criteria (e.g., the number of bad pixels falls within a preset range), the area currently covered by the shape window is marked as a candidate dense region. This process exhaustively searches all possible legal positions, thereby ensuring that all potential dense defect areas (i.e., candidate dense regions) that meet the initial definition in the image are found without omission.
[0059] Next, following the identification is the data extraction operation: extracting the coordinates of bad pixels contained in each candidate dense region, forming a bad pixel set for each candidate dense region. For each identified candidate dense region, the detection method 100 accurately obtains the position coordinates (e.g., (x, y)) of all bad pixel pixels within that region in the image coordinate system. The set of these coordinates constitutes an independent bad pixel set. Each bad pixel set uniquely represents a group of spatial points suspected of being dense defects; it not only records the location of the defect but also implicitly defines the specific spatial distribution of the defect through the set of coordinates of its members. Multiple candidate dense regions may generate multiple bad pixel sets, or they may generate the same bad pixel set.
[0060] By executing step S104, this application achieves key technological advancements and effects. First, by introducing flexibly definable dense region shape parameters and screening conditions, it transforms the criteria for judging dense defects from fixed and rigid to customizable and adaptable to different application scenarios, greatly improving the method's versatility and practicality. Second, this step successfully shifts the focus of detection from isolated pixel-level anomalies to regional defect patterns with process analysis value, meeting the urgent need for cluster defect control in modern display manufacturing, without requiring repetitive and extensive calculations of distances between pixels. Finally, by generating structured defect set data, it provides direct, standardized, and complete intermediate data objects for subsequent accurate deduplication and final result output, serving as a crucial link in the entire detection process.
[0061] Furthermore, after determining the bad pixel set, detection method 100 can continue to execute steps S106 and S108. Steps S106 and S108 constitute the key processing stages for data refinement and result deduplication in this application. These two steps aim to solve the problem of the same bad pixel set being repeatedly counted due to the overlapping of detection windows, thereby ensuring the uniqueness and accuracy of the final output result.
[0062] The hash mapping calculation in step S106 is a process of converting data of arbitrary length (here, a set of bad points, i.e., a set of coordinate pairs) into a fixed-length digital digest using a specific hash function. Essentially, this process generates a highly distinctive digital fingerprint for each unique data set. In this embodiment, for multiple sets of bad points consisting of identical coordinate points in the same order and with the same number of coordinates, regardless of the shape of their associated candidate dense regions, the same hash function will produce the exact same hash value; conversely, multiple sets of bad points with different coordinates will produce different hash values.
[0063] Specifically, the hash mapping calculation in step S106 may include: first, normalizing or encoding the coordinate information (e.g., x and y values) of each bad point in the bad point set according to predefined rules to eliminate irrelevant representation differences; then, designing or adopting a hash function that can receive these encoded point information as input and, through a series of arithmetic or bitwise operations (e.g., combining XOR, multiplication, modulo operation, etc.), mixing and compressing these discrete point information into a single integer value, i.e., the final hash value.
[0064] After calculating a unique digital fingerprint (hash value) for each bad pixel set in step S106, the deduplication operation in step S108 can be performed efficiently. In some embodiments, the specific deduplication logic includes: maintaining a set of records of existing hash values (e.g., a hash table); when processing a new bad pixel set and its hash value, the system queries whether the hash value already exists in the record: if it does not exist, the bad pixel set and its hash value are retained and recorded as a new, unique defect instance; if it exists, it indicates that the current bad pixel set is completely identical to a previously processed bad pixel set, constituting a duplicate report of the same physical defect, and is therefore removed. After completing this deduplication screening of all bad pixel sets, each retained bad pixel set uniquely corresponds to an independent dense bad pixel defect on the display screen.
[0065] Finally, outputting the dense bad pixel detection results means that the detection method 100 will organize and present the final valid information. In some embodiments, the dense bad pixel detection results may include, but are not limited to: the total number of dense bad pixel regions, the location of each independent dense bad pixel region (e.g., represented by the center of the bounding rectangle or centroid of its bad pixel set), the specific bad pixel coordinates contained in each dense bad pixel region, and a result illustration that can be marked on the original image (e.g., a grayscale image) (e.g., by drawing a selection box shape), etc. For example, Figure 2c The diagram shows the detection results when the shape parameter of the dense region is circular in some embodiments of this application; Figure 2d The diagram shows the detection results when the shape parameter of the dense region is rectangular, according to some embodiments of this application. Figure 2c and Figure 2d The detection results in the images all mark the locations of areas with densely packed bad spots.
[0066] By leveraging the synergistic effect of steps S106 and S108, the problem of "multiple reports for one defect" caused by overlapping sliding windows in the detection algorithm is fundamentally solved, ensuring the physical uniqueness of the detection results and making the defect count statistics accurate and reliable. Secondly, using hash values for comparison has a much lower computational complexity than directly comparing whether all coordinates within two point sets are completely identical. Especially when the defect set is large or there are many dense candidate areas, this hash-based fast comparison method brings significant performance improvements, making rapid detection of large-scale, high-resolution screens possible. Finally, this mechanism ensures the simplicity, accuracy, and practicality of the entire detection process output, providing high-quality data for production decisions.
[0067] Furthermore, the inventors have discovered that in traditional techniques, calculating the standard brightness value of a grayscale image typically involves averaging all grayscale values in the image, or sorting all grayscale values in the image from smallest to largest, removing a certain percentage of the first and last pixels, and then taking the average of the remaining pixels as the standard brightness value. However, directly averaging is easily affected by extreme bright / dark pixels, causing the standard brightness value to deviate from the true level; while the method of first sorting and then removing the first and last pixels suffers from high computational complexity and low efficiency. Therefore, to obtain a more robust standard brightness value to resist interference from extreme bright / dark pixels in the image, while avoiding the excessively high computational complexity and computational load of traditional full sorting methods, this application proposes an efficient calculation method based on partial sorting. The following will combine... Figure 3 An exemplary description is provided.
[0068] Figure 3 An exemplary flowchart illustrating a method for obtaining standard brightness values according to some embodiments of this application is shown. Figure 3 As shown, the method 300 may include: in step S301, converting the grayscale values of each pixel in the grayscale image into a one-dimensional array; in step S302, determining the upper and lower bounds of the number of elements to be removed in the one-dimensional array based on the length of the one-dimensional array and the preset ratio for removing the first and last elements; in step S303, iteratively selecting a reference element in the one-dimensional array and dividing the one-dimensional array, and recursively or iteratively performing this process in the subarray containing the target position until the position of the reference element coincides with the target position, wherein the target position is the upper bound position or the lower bound position; in step S304, removing the elements before the lower bound position and after the upper bound position; in step S305, calculating the average value of the remaining elements in the one-dimensional array to obtain the standard brightness value.
[0069] It's important to understand that the one-dimensional array mentioned above refers to a linear, continuous data structure formed by arranging the grayscale values of all pixels in a grayscale image sequentially according to a preset scanning order (e.g., row-by-row). Each storage unit is called an element, and each element corresponds to the grayscale value of a pixel. The length of the one-dimensional array is the total number of elements in the array, which is equal to the total number of pixels in the original grayscale image. The upper and lower bound positions are two key index boundaries defined when partially sorting this one-dimensional array to remove extreme values at the beginning and end: the lower bound position is the index of the first element to be retained in the array, and all elements before this position will be removed; the upper bound position is the index of the last element to be retained, and all elements after this position will also be removed. Ultimately, only the subset of elements with indices between the lower and upper bounds (including the boundaries) are retained (i.e., the remaining elements in the one-dimensional array) for calculating the standard brightness value.
[0070] In step S302, the preset ratio for removing the first and last elements can be set as needed, such as removing 10% from each element or other ratios. Based on this preset ratio, the number of first and last elements to be removed is calculated, thereby determining the upper and lower bounds of the array element index range to be retained after removing the first and last elements, i.e., the upper and lower bound positions.
[0071] After determining the boundaries of the elements to be retained, step S303 divides the one-dimensional array by selecting a pivot element and using partial sorting. Furthermore, during the iteration process, partial sorting and partitioning operations can be performed only in the subarray containing the target position, thus avoiding the need to sort all elements from smallest to largest, significantly reducing the amount of computation and computational complexity. To facilitate understanding, a specific example will be used below.
[0072] First, convert the m×n grayscale image into a one-dimensional array of (m×n)×1. Specifically, assume m=5 and n=4, which means a grayscale image containing five rows and four columns of pixels. By scanning row by row, the data is transformed into a one-dimensional array Z=[120, 45, 200, 80, 10, 255,150,50, 100, 90, 50, 250,100, 85, 220, 150, 180, 255,20, 220] containing 20 elements, thus flattening the data. The length L of this one-dimensional array Z is 20.
[0073] Then, based on the preset proportion of the first and last elements to be removed (e.g., about 10% each), the upper and lower bounds of the array element index range to be retained are calculated. For ease of understanding and calculation, numbers 0 to 19 are used to represent the element positions in the one-dimensional array as indices. Based on this, in this example, the calculated lower bound position LowIdx is 2 (i.e., the position of the third element from the front), and the upper bound position UpIdx is 17 (i.e., the position of the 18th element from the front). This means that the goal is to remove elements with indices less than 2 and greater than 17 from the array, and finally retain the elements with indices between 2 and 17 for calculating the average.
[0074] After determining the boundary, the operation of step S303 is executed. Taking the search for the lower bound position LowIdx (2) as an example, that is, the position of index 2 in the array is taken as the target position. The process is as follows: Select a reference element (e.g., 120) from the one-dimensional array Z to divide the elements in the one-dimensional array Z. Elements smaller than the reference element can be moved to its left (or front), and elements larger than the reference element can be moved to its right (or back). In this process, it is only necessary to compare the size of each element with 120, and it is not necessary to compare the size of all elements. The arrangement result of [45, 80, 10, 50, 100, 90, 50, 100, 85, 20, 120, 200, 255, 150, 250, 220, 150, 180, 255, 220] is obtained. At this time, the reference element 120 is located at index 10. Since LowIdx (2) is located to the left of index 10 at the end of the current round, based on the relative position of the target position with respect to the current position of the reference element in the current round, the above process is recursively or iteratively executed in the left subarray [45, 80, 10, 50, 100, 90, 50, 100, 85, 20, 120] containing the reference element 120 and the target position during the next iteration, until the position of the reference element coincides with index 2 (i.e., the target position). This process ensures that when searching for a specified rank element, only the subarray containing that element is partially sorted as necessary, thereby significantly reducing the amount of computation.
[0075] Understandably, in this process, if the target position in the current round is to the right of the current position of the benchmark element—that is, when the target position is after the current split position of the benchmark element—the same partitioning operation can be recursively performed in the right subarray containing the current benchmark element. This is because after partitioning, all elements to the left of the benchmark element are less than or equal to the benchmark value, and all elements to the right are greater than the benchmark value. Since the target index (i.e., the target position to be found) is greater than the current position of the benchmark element, it means that the value of the required element must be greater than the current benchmark value, so it can only exist in the right subarray. The algorithm then ignores the left subarray, only using the right subarray as the new input range, and re-selects the benchmark element within this range, partitions it, and continues to compare the relative position of the target index with the starting point of the new subarray with the new benchmark position. This iteration continues until the position of the benchmark element coincides with the target index, thus efficiently locating the element to be ranked. This mechanism ensures that the algorithm always operates within the subinterval containing the element at the target position, avoiding a complete sorting of the entire dataset, thereby achieving higher computational efficiency.
[0076] It is also understood that in some embodiments, if the target position is located to the right of the current position of the reference element in the current round, other reference elements can be selected in the current subarray to perform the operation in the next round. With this setting, it is not necessary to redetermine the relative position of the target position with respect to the starting point of the new subarray in the next round.
[0077] Furthermore, after determining the lower bound position, elements before the lower bound position can be removed, and then the target position can be set as the upper bound position. Similar operations can be performed on the remaining elements in the one-dimensional array until the upper bound position and the elements after it are determined, and then the elements after the upper bound position are removed.
[0078] In other embodiments, after determining the lower bound position, instead of removing elements before the lower bound position, the element at the lower bound position and the elements before it can be fixed. Then, when determining the element at the upper bound position, the detection method will perform a similar operation on the subarray to the right of the lower bound element. After locating these two boundary elements, all elements before the lower bound position and after the upper bound position can be removed.
[0079] Following the previous example, after removing elements with indices 0-1 and 18-19, the remaining elements, those with indices 2 to 17, are: [120, 45, 200, 80, 150, 50, 100, 90, 50, 250, 100, 85, 220, 150, 180, 220]. Finally, the arithmetic mean of these remaining elements is calculated to obtain the standard brightness value: (45+50+50+80+85+90+100+100+120+150+150+180+200+220+220+250) / 16 = 2090 / 16 = 130.625.
[0080] The above combination Figure 3 The method for obtaining standard brightness values according to embodiments of this application has been described exemplarily. It is understood that, through the aforementioned partial sorting method based on fast selection, embodiments of this application achieve a significant improvement in efficiency and robustness when calculating standard brightness values. Compared with traditional methods that require full sorting, this strategy significantly reduces the amount of computational data and complexity, with particularly significant optimization of computational efficiency when processing high-resolution images (i.e., images with extremely large L values). Simultaneously, because this method accurately removes extreme pixel values (such as excessively dark dead pixels and excessively bright bright pixels) at a predetermined ratio at the beginning and end, the obtained standard brightness values can more reliably represent the normal brightness level of the main body of the display screen, effectively reducing the interference of abnormal pixels on the brightness benchmark, thereby providing a more accurate and stable basis for the subsequent establishment of image binarization thresholds.
[0081] As described above, the shape parameters of dense regions can include rectangles (including squares), circles, ellipses, etc. To facilitate a further understanding of how the bad pixel set is obtained, the following will describe it in conjunction with several embodiments.
[0082] Figure 4 An exemplary flowchart illustrating a method for obtaining a set of bad pixels according to some embodiments of this application is shown. It will be understood that... Figure 4 The method 400 shown can be a combination of the above. Figure 1 The description of step S104 is a specific implementation of the above description of step S104, and therefore the above description of step S104 can also be applied to the following description of method 400.
[0083] like Figure 4As shown, when the shape parameter of the dense region is rectangular, the method 400 for obtaining the bad pixel set may include: in step S401, constructing an integral image based on the initial bad pixel binary image; in step S402, traversing all possible rectangular regions in the integral image according to the preset rectangle size; in step S403, determining the number of bad pixels contained in each rectangular region based on the integral value of each rectangular region; in step S404, recording the rectangular regions whose number of bad pixels meets the screening condition as candidate dense regions; and in step S405, extracting the coordinates of the bad pixels contained in each candidate dense region to form a bad pixel set for each candidate dense region.
[0084] An integral image is a matrix representation method used to quickly calculate the sum of pixel grayscale values in a local region of an image. The integral value at any point in the integral image is the sum of the grayscale values of all points within a rectangular region bounded by the top-left corner of the initial binary image (which contains corrupted pixels) to that point. In other words, for any point (x, y) in the integral image, the integral value at that point (denoted as ii(x, y)) is equal to the sum of the grayscale values of all pixels within the rectangular region formed by the top-left corner of the initial binary image (which contains corrupted pixels) to the point (x, y). This rectangular region refers to the area containing all pixels above and to the left of the point (x, y) (including the point itself).
[0085] Since the background pixels in the initial binary image of bad pixels have grayscale values set to 0, and the pixel values of bad pixels are set to 1 or 255, the integral value at any point in the integral image constructed based on this initial binary image of bad pixels is equal to the number of bad pixels within the rectangular region enclosed by the top-left corner of the initial binary image of bad pixels to that point, or 255 times the number of bad pixels. Based on this principle, the number of bad pixels contained in each rectangular region can be quickly obtained through the integral image.
[0086] Specifically, after calculating the integral image in step S401, the detection window can be set to slide within the integral image, and the integral value of the rectangular region formed each time the detection window stops during the sliding process can be calculated, i.e., the gray value of each rectangular region, thereby obtaining the number of bad pixels contained in each rectangular region. For ease of understanding, the following will combine... Figure 5a and Figure 5b An illustrative example is provided.
[0087] Figure 5a A schematic diagram illustrating the principle of calculating the integral value of a rectangular region according to some embodiments of this application is shown. Figure 5b A schematic diagram showing a rectangular region containing dead pixels is shown in some embodiments of this application.
[0088] like Figure 5a As shown, the origin O is taken as the top left corner of the initial binary image of bad pixels, with the X-axis pointing to the right and the Y-axis pointing downwards. In some implementations, the integral value of each rectangular region is determined based on the following formula:
[0089] Sum(D)=ii(04)+ii(01)-ii(02)-ii(03) (Formula 1);
[0090] Where Sum(D) represents the sum of gray values of the rectangular window in the corresponding region D of the initial bad pixel binary image (i.e., the integral value of region D), and ii(04) represents the point where the lower right corner of region D is located (e.g., ...). Figure 5a The integral value of pixel 04 in the region, ii(01) represents the point where the upper left corner of region D is located (e.g., the pixel 04 in the region D). Figure 5a The integral value of pixel 01 in the region D, where ii(02) represents the upper right corner of region D (e.g., the integral value of pixel 01 in the region D). Figure 5a The integral value of pixel 02 in the region D, where ii(03) represents the lower left corner of region D (e.g., the integral value of pixel 02 in the region D). Figure 5a The integral values of pixel 03 in the image are obtained directly from the integral image.
[0091] Since the integral image and the initial binary image with bad pixels have the same size, and the positions of each pixel in both correspond, the sliding process of the rectangular window in the integral image is equivalent to sliding in the initial binary image with bad pixels. Furthermore, based on the set step size and the size of the rectangular window, the coordinates of the four corner points of each rectangular window can be determined. Therefore, the grayscale value of the rectangular region containing each rectangular window can be directly calculated using Formula 1 above. Here, each rectangular window refers to the position of the rectangular window at each pause during the sliding process.
[0092] This application uses an integral image to calculate the grayscale value of a region. Regardless of the size of the rectangular region, the sum of grayscale values (i.e., the integral value of the rectangular region) can be obtained instantly by performing "one addition + two subtractions" using the above formula. This allows for rapid determination of the number of bad pixels contained within each rectangular region, significantly improving computational efficiency. In some embodiments, when the grayscale value of a bad pixel in the initial binary image is 1, the integral value of the rectangular region equals the number of bad pixels. In other embodiments, when the grayscale value of a bad pixel in the initial binary image is 255, the integral value of the rectangular region equals 255 times the number of bad pixels. Therefore, the number of bad pixels can be obtained by dividing the integral value of the rectangular region by 255.
[0093] like Figure 5b As shown in the diagram, assuming the preset rectangle size is 6×6, each square in the initial binary image 510 represents a pixel. Dark squares represent background pixels, and light squares represent bad pixel pixels. The number 1 in a light square indicates that the value of that bad pixel is set to 1. The rectangular detection box can traverse the integral image row by row or column by column to obtain all possible rectangular regions. To facilitate understanding of the bad pixels contained within the rectangular regions, Figure 5bThe example shows the corresponding positions of rectangular regions 521, 522, 523, and 524 on the initial bad pixel binary image 510. From... Figure 5b As can be seen, rectangular area 521 contains one bad pixel, rectangular area 522 (shown in yellow box) contains two bad pixels, rectangular area 523 (shown in green box) contains two bad pixels, and rectangular area 524 (shown in red box) contains two bad pixels.
[0094] Assuming the filtering condition is the number of bad pixels, and that the number of bad pixels satisfies [2, +∞), then rectangular region 521 does not meet the filtering condition, while rectangular regions 522, 523, and 524 do. Rectangular regions 522, 523, and 524 are recorded as candidate dense regions. Further, based on the initial binary bad pixel image 510, the coordinates of the bad pixels contained in each rectangular region 522, 523, and 524 can be determined, thus forming a bad pixel set for each candidate dense region. This bad pixel set may include information such as the number of bad pixels and their coordinates.
[0095] Understandable, Figures 4-5b The images shown are exemplary and not limiting; for example, the rectangle size may not be limited to... Figure 5b The 6×6 shown can also be other sizes, such as 5×5, 5×6, 4×6, or 4×4. It is understood that when the shape parameter of the dense region described in this article is rectangular, it also includes squares (i.e., rectangles with equal length and width). It is also understood that... Figure 5b The number of dead pixels and pixels shown are illustrative and will vary depending on the actual display in real-world applications; this document does not impose any limitations. It is also understood that the shape parameters of dense areas are not limited to rectangles; they can also be elliptical or circular. The following will combine... Figure 6 An exemplary description is provided.
[0096] Figure 6 Exemplary flowcharts of methods for obtaining a set of bad pixels according to other embodiments of this application are shown. It will be understood that... Figure 6 The method 600 shown can be a combination of the above. Figure 1 This is another specific implementation of step S104, so the previous description of step S104 can also be applied to the following description of method 600.
[0097] like Figure 6As shown, when the shape parameter of the dense region is ellipse or circle, the method 600 for obtaining the bad pixel set may include: in step S601, constructing a filter kernel that matches the size of a preset ellipse or preset circle; in step S602, using the filter kernel to perform a filtering operation on the initial bad pixel binary image to generate an intermediate image, wherein the pixel value of each pixel in the intermediate image is the number of bad pixels within the coverage area of the filter kernel centered on that pixel; in step S603, recording the pixels in the intermediate image whose pixel values meet the filtering conditions as the center points of the candidate dense region; and in step S604, extracting the coordinates of all bad pixels within the coverage area of the filter kernel centered on each center point to form a bad pixel set.
[0098] Step S601 involves creating the core detection tool, namely, "constructing a filter kernel that matches the size of a preset ellipse or a preset circle." The filter kernel here can be a two-dimensional, fixed-size binary template image whose shape strictly corresponds to the shape parameters of the dense region to be detected. If the shape parameter of the dense region is circular, a set of pixels that best approximates the circle in the digital image space is constructed; if the shape parameter of the dense region is elliptical, a corresponding elliptical pixel set is constructed. Within this filter kernel, pixel positions covered by the shape are assigned a value of 1, and positions outside the shape are assigned a value of 0. This filter kernel essentially defines a standardized neighborhood window, which will be used subsequently to slide across the image and count the number of bad pixels within this specific shape range.
[0099] In step S602, the filtering operation is a special type of spatial convolution: the center of the constructed binary filter kernel is sequentially aligned with each pixel position on the initial bad pixel binary image. At each position, the sum of the pixel values in the initial bad pixel binary image corresponding to all positions with a value of 1 within the filter kernel is calculated. Since the bad pixel pixel value in the initial bad pixel binary image is 1 (or 255) and the background is 0, this summation result is directly equal to the number of bad pixels contained in the region centered on the current pixel and bounded by the shape of the filter kernel. This calculation result is used as the new pixel value and assigned to the corresponding position in the output image (i.e., the "intermediate image"). After traversal, the generated intermediate image is no longer a simple binary image, but a grayscale image, where the grayscale value of each pixel precisely represents the total number of bad pixels existing in the specified shape neighborhood centered on it.
[0100] After obtaining the intermediate image, step S603 performs conditional filtering. In this step, preset filtering conditions (such as a lower limit of 5 for the number of bad pixels) are applied to each pixel value in the intermediate image. The system traverses the intermediate image, and if the value of a pixel (i.e., the number of bad pixels in its neighborhood) falls within the preset filtering condition range (e.g., greater than or equal to 5), the coordinates of that pixel are determined to be a valid "candidate dense region center point". All recorded center points constitute the set of center locations of potential dense bad pixel regions.
[0101] In other embodiments, the grayscale values of pixels in the intermediate image that do not meet the screening criteria can be set to 0, thus obtaining an initial dense point result image. In this case, each non-zero pixel in the initial dense point result image represents the center point of a candidate dense region that meets the dense bad pixel screening criteria. Therefore, by recording the coordinates of all non-zero pixels, the set of center positions of the aforementioned potential dense bad pixel regions can be obtained.
[0102] Finally, step S604 completes the information extraction. For each center point coordinate recorded in the previous step, method 600 returns to the initial binary image of bad pixels, locates the center point, and maps the pixel region covered by the same filter kernel constructed in step S601, using it as the center. Within this region, the coordinates of all pixels with a gray value of 1 (i.e., marked as bad pixels) are collected. The set of these coordinates constitutes a "bad pixel set" associated with the current center point. This bad pixel set fully describes the spatial composition of bad pixel defects in a candidate dense region. In some embodiments, the coordinates of all bad pixels in the region can be collected in a uniform traversal order (such as a traversal order from the top left to the bottom right). If there are duplicate point sets in the multiple bad pixel sets obtained in this way, the traversal order, number, and coordinates of the bad pixels in each bad pixel set in the duplicate point sets are the same.
[0103] Through the above steps, this embodiment of the application achieves fast and accurate detection of non-rectangular dense regions. This method transforms the complex shape matching and counting problem into a one-time filtering convolution operation and threshold judgment, avoiding the huge computational overhead of recalculating shape inclusion relationships for each location in traditional methods. Furthermore, the strategy of generating intermediate images before extraction is logically clear and easy to implement, providing a structured data foundation for subsequent deduplication and result output.
[0104] Figure 7 A flowchart illustrating a method for hash map calculation according to some embodiments of this application is shown. It will be understood that... Figure 7 The method 700 shown can be a combination of the above. Figure 1 The description of step S106 is a specific implementation of the above description of step S106, and therefore the above description of step S106 can also be applied to the following description of method 700.
[0105] like Figure 7As shown, the method 700 for hash mapping calculation for each bad point set may include: step S701, initializing the hash seed value to the number of bad points in the current bad point set; step S702, traversing each bad point coordinate (x, y) in the current bad point set, for each bad point coordinate (x, y), shifting one of the coordinates x and y to the left by a preset number of bits and performing an OR operation with the other of the two, and packing them into a first integer; step S703, performing an XOR operation on the first integer and the current hash seed value, and using the result as the updated hash seed value, which is then used for an XOR operation with the next first integer; step S704, after completing the traversal of all bad point coordinates in the current bad point set and performing the XOR operation on all first integers, multiplying the final hash seed value by a preset large prime number to obtain the hash value corresponding to the current bad point set.
[0106] In step S701, the hash seed value is initialized to the number of bad points in the current bad point set, which is equivalent to using the total number of bad points in the bad point set as the initial state for hash mapping calculation. This ensures that even if subsequent coordinate combinations of two bad point sets may accidentally produce the same intermediate calculation result, their initial seed values will be different as long as the number of bad points they contain is different. This reduces the possibility of hash collisions from the source and allows the information on the number of point sets to be naturally incorporated into the final hash value.
[0107] Step S702: Coordinate encoding and compression are performed. Each bad point coordinate (x, y) in the current bad point set is traversed. For each coordinate pair, one of the coordinates x and y (e.g., y) is left-shifted by a preset number of bits (usually 32 bits in a 64-bit system), and then bitwise ORed with the other coordinate (x). This operation efficiently packages two 32-bit integers into a single unique 64-bit integer, i.e., the first integer. For example, after processing coordinates (5, 10), 10 is left-shifted by 32 bits to obtain a number with the high 32 bits being 10 and the low 32 bits being 0. This is then ORed with 5, resulting in a single 64-bit number where the high 32 bits represent the y coordinate (10) and the low 32 bits represent the x coordinate (5). This method ensures that different coordinate pairs are necessarily packaged into different 64-bit integers, providing conflict-free input for subsequent mixed calculations.
[0108] Step S703 involves the core mixing and iterative update. The first integer obtained in step S702 is XORed with the current hash seed value, which is equivalent to injecting (or mixing) the bad pixel coordinate information into the hash seed value. The characteristic of the XOR operation is that any change in the input bits directly leads to a change in the output bits. After each operation, the result is used as the updated hash seed value. This process is repeated cyclically, meaning the next first integer will be XORed with the updated hash seed value again. Through this iterative XOR operation, the coordinate information of each point in the bad pixel set is irreversibly mixed into the constantly changing hash seed value in a certain traversal order, ensuring the consistency of hash values for the same bad pixel set.
[0109] Step S704: Apply a final perturbation to amplify the differences and improve the distribution. After traversing all points and performing XOR accumulation, the final hash seed value is multiplied by a preset large prime number (e.g., a 64-bit Fermat prime "1099511628211ULL"). The multiplication operation, especially multiplication with a large prime number, non-linearly diffuses the result of the previous mixing step, maximizing the small differences in the input values in the high and low bits of the output value, thereby further shuffling the bit pattern and making the final hash value more evenly distributed in the numerical space. This final step greatly enhances the collision resistance of the hash function, making the probability of two different sets of bad points producing the same hash value extremely low.
[0110] In summary, the embodiments of this application provide a sophisticated hash mapping calculation process for bad point sets that combines low collision probability and high computational efficiency. Through a coherent process of "initializing the seed and incorporating the cardinality → packaging coordinates into unique integers → iteratively XORing all point information → final perturbation using large prime number multiplication," a highly efficient hash function tailored for spatial point sets is implemented. This function can generate a compact and unique numerical identifier for each unique bad point set with extremely low collision probability, thus laying a reliable foundation for fast deduplication operations based on hash tables.
[0111] After obtaining the hash value corresponding to each bad pixel set, duplicate bad pixel sets can be removed based on the hash value. In some embodiments, removing duplicate bad pixel sets based on the hash value includes: comparing the hash values of all bad pixel sets; in response to the existence of multiple bad pixel sets having the same hash value, determining that the multiple bad pixel sets are duplicate sets, and retaining only one bad pixel set from the duplicate sets.
[0112] The process of removing duplicate bad pixel sets based on hash values in this embodiment first relies on a systematic comparison of the hash values of all generated bad pixel sets. Because the hash mapping calculation method used in this embodiment has extremely high specificity, the probability of two different bad pixel sets generating the same hash value is extremely low. Therefore, by comparing the hash values of all bad pixel sets, it is possible to efficiently and accurately identify which bad pixel sets have completely identical hash values. When multiple bad pixel sets are detected sharing the same hash value, these bad pixel sets can be reliably determined as duplicate sets based on the determinism of the hash function. This means that although these sets may originate from different starting positions or slight offsets in shape parameters during the sliding of the detection window, they essentially contain the exact same set of spatial coordinates, corresponding to the same physical defect on the display screen.
[0113] For example, Figure 8 The diagram illustrates the hash values and corresponding bad point sets of some embodiments of this application. For example... Figure 8 As shown, each row includes a hash value and the number of bad pixel sets corresponding to it. For example, the hash value in the first row corresponds to 2 bad pixel sets (represented by the size value), indicating that there are two bad pixel sets with the same hash value, and these two bad pixel sets are duplicate sets. As another example, the hash value in the second row corresponds to only one bad pixel set, so there are no duplicate sets.
[0114] The hash-based matching mechanism in this embodiment transforms the complex problem of matching sets of geometric coordinates into an efficient problem of matching digital key values. While ensuring the accuracy of deduplication, it significantly improves the processing speed, making it particularly suitable for high-resolution screen detection scenarios containing a large number of candidate dense areas.
[0115] When a duplicate point set is determined to exist, the detection method of this application embodiment will perform a deduplication operation, that is, retain only one bad point set from this set of duplicate points as the unique representative of the defect, and remove all other duplicates, so that each hash value corresponds to a bad point set. When it is determined that a certain hash value does not have a duplicate point set, no processing is required.
[0116] In some embodiments, bad point sets in the duplicate point set can be removed randomly, and only one bad point set is included. In another preferred embodiment, the set of bad points to be retained can be determined based on the distance between the center coordinates of each candidate dense region corresponding to multiple bad point sets and the coordinates of bad points in the duplicate point set. Here, the center coordinates of the candidate dense region refer to a representative position defined for each candidate dense region when initially identifying the candidate dense region, such as the geometric center of a rectangular region, the center of a circular region, or the center of an elliptical region. The core of this strategy is to select, from all duplicate bad point sets, the one whose center of the associated candidate dense region is most centrally located or closely matches the actual point group formed by this set of bad points in space.
[0117] In practice, the first step is to obtain the common set of bad point coordinates shared by all duplicate point sets (because the hash values are the same, the coordinate sets must be identical). Then, the spatial distance metric from the center point coordinates of the original "candidate dense region" corresponding to each duplicate point set to this common bad point coordinate set is calculated. A typical metric is to calculate the average or maximum distance from the center point to all points in the bad point set. Finally, the bad point set that minimizes this distance metric is selected and retained. For example, if the duplicate point set is generated by selecting the same group of bad points using rectangles at three different locations, the average distance from the center point of each rectangle to all points in the group of bad points can be calculated, and the bad point set corresponding to the rectangle with the shortest average distance can be retained. This selection logic aims to retain the detection result whose preset detection area best and most compactly fits the spatial distribution of the real bad point group.
[0118] For example, with Figure 5b As shown in the example, rectangular regions 522, 523, and 524 have the same set of bad points, and therefore correspond to the same hash value. In one implementation, two of the rectangular regions 522, 523, and 524 can be randomly removed, leaving only one. In another preferred implementation, the average distance from the center point of each rectangular region to the two bad points can be calculated. It can be found that the average distance between the center coordinates of rectangular region 523 and the two bad points in the duplicate point set is the shortest. Therefore, rectangular region 523 and its corresponding bad point set are retained, while rectangular regions 522 and 524 and their corresponding bad point sets are deleted.
[0119] Through the aforementioned deduplication and optimization selection mechanisms, the embodiments of this application achieve significant technical effects and application value. First, hash-based deduplication ensures the absolute accuracy of defect statistics, completely avoiding statistical distortion caused by multiple reports of a single defect. Second, the introduction of an optimization selection strategy based on center point distance makes the defect markers (such as rectangular or circular boxes) presented to the user more visually reasonable and intuitive, typically closer to the true center of the defect area, facilitating rapid location and re-inspection by engineers, and improving the interpretability of the detection results and the user-friendliness of the human-computer interaction. The entire deduplication process is highly automated and logically rigorous, improving algorithm efficiency while ensuring the quality and practicality of the output results.
[0120] In summary, the method for detecting dense defects in a light-emitting display screen described above in conjunction with several accompanying figures significantly improves the automation and accuracy of detection by introducing an adaptive standard brightness value based on image statistics for binarization, combining flexibly definable dense region shape parameters and screening conditions for region identification and defect set extraction, and employing hash mapping technology for efficient deduplication of the defect set. This effectively overcomes the problems of traditional methods, such as sensitivity to overall brightness fluctuations, rigid criteria for dense region judgment, and redundancy caused by repeated detection, thereby achieving efficient, reliable, and highly adaptable detection of dense defects.
[0121] This application also provides an electronic device, including: a processor configured to execute program instructions; and a memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform the functions described above according to this application. Figures 1-8 The detection method described in any one of the above statements. The following will be combined with... Figure 9 The system shown is described.
[0122] Figure 9 A schematic block diagram of a detection system for densely packed dead pixels on a light-emitting display screen according to an embodiment of this application is shown. The detection system 900 may include an electronic device 901 according to an embodiment of this application, as well as its peripheral devices and an external network. The electronic device 901 is used to detect densely packed dead pixels on the light-emitting display screen to achieve the aforementioned combination. Figures 1-8 The technical solutions of any of the embodiments described in this application.
[0123] like Figure 9 As shown, the electronic device 901 may include a CPU 9011, which may be a general-purpose CPU, a dedicated CPU, or other information processing and program execution unit. Furthermore, the electronic device 901 may also include a large-capacity memory 9012 and a read-only memory (ROM) 9013. The large-capacity memory 9012 can be configured to store various types of data, including product images, initial binary images of bad pixels, bad pixel sets, hash tables, and various programs required for running the detection method. The ROM 9013 can be configured to store data required for the power-on self-test of the electronic device 901, the initialization of various functional modules in the system, the drivers for the system's basic input / output, and the data required to boot the operating system.
[0124] Furthermore, the electronic device 901 also includes other hardware platforms or components, such as the TPU 9014, GPU 9015, FPGA 9016, and MLU 9017 shown. It is understood that although various hardware platforms or components are shown in the electronic device 901, they are merely exemplary and not limiting, and those skilled in the art can add or remove corresponding hardware as needed. For example, the electronic device 901 may include only a CPU as a known hardware platform and another hardware platform as the test hardware platform of this application.
[0125] The electronic device 901 of this application also includes a communication interface 9018, through which it can connect to a local area network / wireless local area network (LAN / WLAN) 905, and further connect to a local server 906 or the Internet 907 via the LAN / WLAN. Alternatively or additionally, the electronic device 901 of this application can also directly connect to the Internet or a cellular network via the communication interface 9018 based on wireless communication technology, such as third-generation ("3G"), fourth-generation ("4G"), or fifth-generation ("5G") wireless communication technology. In some application scenarios, the electronic device 901 of this application can also access a server 908 on an external network and a possible database 909 as needed to obtain various known grayscale images of the illuminated products, dense area shape parameters, and filtering conditions, and can remotely store various parameters or intermediate data.
[0126] Peripherals of electronic device 901 may include a display device 902, an input device 903, and a data transmission interface 904. In one embodiment, the display device 902 may include, for example, one or more speakers and / or one or more visual displays, configured to provide voice prompts and / or display images and videos regarding the operation process or detection results of the device. The input device 903 may include, for example, a keyboard, mouse, microphone, camera, or other input buttons or controls, configured to receive input or user instructions such as raw grayscale images or shape parameters of dense areas and filtering conditions. The data transmission interface 904 may include, for example, a serial interface, parallel interface, or Universal Serial Bus interface (“USB”), Small Computer System Interface (“SCSI”), Serial ATA, FireWire (“FireWire”), PCI Express, and High Definition Multimedia Interface (“HDMI”), configured for data transmission and interaction with other devices or systems. According to the scheme of this application, the data transmission interface 904 can receive grayscale images, etc., and transmit various types of data and results to electronic device 901.
[0127] The aforementioned CPU 9011, mass storage 9012, read-only memory ROM 9013, TPU 9014, GPU 9015, FPGA 9016, MLU 9017, and communication interface 9018 of the electronic device 901 of this application can be interconnected via bus 9019, and can interact with peripheral devices through this bus. In one embodiment, the CPU 9011 can control other hardware components and peripheral devices in the electronic device 901 through the bus 9019.
[0128] In operation, the processor CPU 9011 of the electronic device 901 of this application can receive grayscale images through the input device 903 or the data transmission interface 904, and retrieve computer program instructions or code stored in the memory 9012 to perform dense defect detection on the received grayscale images to obtain dense defect detection results. After the CPU 9011 determines the detection results by executing the program instructions, it can display the location and number of dense defect points on the display device 902 or output them through voice prompts. In addition, the electronic device 901 can also upload the defect detection results to a network, such as a remote database 909, through the communication interface 9018.
[0129] It should also be understood that any module, unit, component, server, computer, terminal, or device of the executable instructions in this application may include or otherwise access computer-readable media, such as storage media, computer storage media, or data storage devices (removable) and / or non-removable) such as disks, optical discs, or magnetic tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data.
[0130] Based on the foregoing, this application also provides a computer-readable storage medium storing computer-readable instructions thereon, which, when executed by one or more processors, implement the above-described combination of instructions. Figures 1-8 The detection method described in any of the embodiments.
[0131] Computer-readable storage media can be any suitable magnetic or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc., or any other medium that can be used to store required information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this application can be implemented using computer-readable / executable instructions that can be stored or otherwise retained by such a computer-readable medium.
[0132] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for detecting densely packed dead pixels on a light-emitting display screen, characterized in that, include: Based on the standard brightness value of the grayscale image under the illumination state of the display screen, the grayscale image is binarized to obtain an initial bad pixel binary image. Based on the preset dense region shape parameters and filtering conditions, all candidate dense regions that meet the filtering conditions are identified in the initial binary image of bad pixels, and the coordinates of bad pixels contained in each candidate dense region are extracted to form a set of bad pixels for each candidate dense region. Perform hash mapping calculations on each set of bad pixels to generate a hash value corresponding to each set of bad pixels; Based on the hash value, duplicate bad pixel sets are removed, and dense bad pixel detection results are output. The hash mapping calculation for each bad point set includes: Initialize the hash seed value to the number of bad points in the current bad point set; Iterate through each bad point coordinate (x, y) in the current bad point set. For each bad point coordinate (x, y), shift one of the coordinates x and y to the left by a preset number of positions and then perform a bitwise OR operation with the other of the two coordinates, and pack them into a first integer. Perform an XOR operation between the first integer and the current hash seed value, and use the result as the updated hash seed value to perform an XOR operation with the next first integer. After traversing all bad pixel coordinates in the current bad pixel set and performing the XOR operation on all first integers, the final hash seed value is multiplied by a preset large prime number to obtain the hash value corresponding to the current bad pixel set.
2. The detection method according to claim 1, characterized in that, The standard brightness value is obtained through the following operation: Convert the grayscale values of each pixel in the grayscale image into a one-dimensional array; Based on the length of the one-dimensional array and the preset ratio for removing the first and last elements, determine the upper and lower bounds of the number of elements to be removed in the one-dimensional array. In the one-dimensional array, a reference element is selected iteratively and the one-dimensional array is divided. This process is then recursively or iteratively performed in the subarray containing the target position until the position of the reference element coincides with the target position, where the target position is an upper bound position or a lower bound position. Remove elements before the lower bound position and after the upper bound position; The standard brightness value is obtained by averaging the remaining elements in the one-dimensional array.
3. The detection method according to claim 1 or 2, characterized in that, Binarizing the grayscale image to obtain an initial binary image of bad pixels includes: Based on the standard brightness value, determine the dead pixel threshold; The grayscale value of the defective pixel determined based on the defective pixel threshold is set to 255 or 1, and the grayscale value of all other pixels besides the defective pixel is set to 0; wherein, In response to the bad pixel threshold including an excessively dark threshold, pixels with gray values less than the excessively dark threshold are determined as bad pixel pixels, including dead pixels and / or dark pixels; In response to the bad pixel threshold including an overbrightness threshold, pixels with grayscale values greater than the overbrightness threshold are identified as bad pixel pixels, and the bad pixel pixels include bright spots.
4. The detection method according to claim 1, characterized in that, When the shape parameter of the dense region is rectangular, all candidate dense regions that satisfy the filtering conditions are identified in the initial binary image of bad pixels, including: Based on the initial binary image of bad pixels, an integral image is constructed; Based on the preset rectangle size, traverse all possible rectangular regions in the integral image; Based on the integral value of each rectangular region, determine the number of bad pixels contained in each rectangular region; The rectangular regions whose number of bad pixels meets the filtering criteria are recorded as candidate dense regions.
5. The detection method according to claim 1, characterized in that, When the shape parameter of the dense region is elliptical or circular, all candidate dense regions that meet the filtering conditions are identified in the initial binary image of bad pixels, and the coordinates of bad pixels contained in each candidate dense region are extracted to form the bad pixel set of each candidate dense region, including: Construct a filter kernel that matches the size of a preset ellipse or preset circle; The initial binary image with bad pixels is filtered using the filter kernel to generate an intermediate image. The pixel value of each pixel in the intermediate image is the number of bad pixels within the coverage area of the filter kernel centered on that pixel. Pixels in the intermediate image whose pixel values meet the filtering conditions are recorded as the center points of the candidate dense region; Extract the coordinates of all bad points within the coverage area of the filter kernel, centered on each of the aforementioned center points, to form the bad point set.
6. The detection method according to claim 1, characterized in that, Before identifying all candidate dense regions that meet the filtering conditions in the initial binary image of bad pixels, the detection method further includes: Obtain the dust mask image; Based on the position of the dust pixels in the dust mask image, the gray value of the corresponding position in the initial bad pixel binary image is set to zero to eliminate interference from the dust-covered area.
7. The detection method according to claim 1, characterized in that, The set of duplicate bad points removed based on the hash value includes: Compare the hash values of all bad point sets; If multiple sets of bad points have the same hash value, then the multiple sets of bad points are determined to be duplicate sets, and only one set of bad points in the duplicate sets is retained.
8. The detection method according to claim 7, characterized in that, Retaining only one bad point set from the set of duplicate points includes: The set of bad pixels to be retained is determined based on the distance between the center coordinates of each candidate dense region corresponding to the multiple bad pixel sets and the bad pixel coordinates in the duplicate point set.
9. The detection method according to claim 1, characterized in that, The filtering criteria include filtering criteria based on the number of defective pixels or filtering criteria based on the percentage of defective pixels.
10. An electronic device, characterized in that, include: A processor, configured to execute program instructions; as well as A memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform the detection method according to any one of claims 1-9.
11. A computer-readable storage medium storing program instructions, characterized in that, When the program instructions are loaded and executed by the processor, the processor performs the detection method according to any one of claims 1-9.