Method and system for implementing panel defect detection on basis of image grayscale equalization
By performing grayscale value statistics and adaptive histogram equalization on panel images, the imaging features of Mura defects are enhanced. A target detection model is constructed by using neural networks for feature annotation and training, which solves the problem of easy missed detection of Mura defects and improves the detection accuracy.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CHENGDU UNION BIG DATA TECH CO LTD
- Filing Date
- 2025-07-30
- Publication Date
- 2026-07-02
AI Technical Summary
Existing Mura defect detection methods are prone to missing defects.
By performing grayscale value statistics and adaptive histogram equalization on panel images, the imaging characteristics of Mura defects are enhanced. A target detection model is constructed by using neural networks for feature annotation and training.
It improves the accuracy of Mura defect detection and prevents missed detections.
Smart Images

Figure CN2025111545_02072026_PF_FP_ABST
Abstract
Description
A method and system for panel defect detection based on image grayscale equalization
[0001] Cross-reference to related applications
[0002] This disclosure claims priority to Chinese Patent Application No. 2024119317144, filed on December 26, 2024, entitled "A Method and System for Panel Defect Detection Based on Image Gray-Scale Equalization", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of panel defect detection technology, and more specifically, to a method and system for panel defect detection based on image grayscale equalization. Background Technology
[0004] The display panel industry is booming, with market demand continuing to grow. Improving production efficiency and increasing capacity while reducing production costs and improving product quality are major development trends. Artificial intelligence-based defect detection methods are gradually being applied to various stages of display panel production, replacing manual visual inspection and effectively improving the stability and effectiveness of quality control.
[0005] Mura defects in the color filter (CF) of a display panel are common defects in the manufacturing process, directly affecting the quality of the displayed image. Mura defects refer to various traces caused by uneven brightness and color between pixels when displaying images. This unevenness may manifest as spots, stripes, or patches. Because the image features of mura defects are not obvious, artificial intelligence-based defect detection is prone to missed detection.
[0006] Application content
[0007] This disclosure provides a method and system for panel defect detection based on image grayscale equalization, which solves the problem of missed detection in existing Mura defect detection.
[0008] This disclosure provides a method for panel defect detection based on image grayscale equalization, the method comprising the following steps:
[0009] The grayscale values of the panel image are statistically analyzed to obtain the grayscale histogram of the panel image.
[0010] Based on the grayscale histogram of the panel image, an adaptive histogram equalization algorithm is used to perform grayscale value equalization processing on the panel image to obtain an equalized image.
[0011] The balanced image is labeled with features, and the neural network is trained based on the balanced image with the labeled features to obtain the object detection model;
[0012] The trained object detection model is used to perform panel defect detection on the balanced image to obtain the defect detection results.
[0013] In the above embodiments, based on the characteristic that Mura defects are more obvious under different grayscale backgrounds, this disclosure enhances the imaging features of Mura defects by performing grayscale value statistics and grayscale value equalization processing on the panel image, thereby enabling the target detection model to accurately detect and locate defects and increasing the accuracy of Mura defect detection.
[0014] As some optional embodiments of this disclosure, the process of performing grayscale value statistics on a panel image using image grayscale value statistics is as follows:
[0015] Perform grayscale conversion on the panel image to convert the color panel image into a grayscale panel image;
[0016] Iterate through each pixel of the grayscale panel image and count the grayscale value of each pixel to obtain the grayscale value statistics for each pixel;
[0017] The distribution probability of gray values is calculated based on the statistical results of gray values of all pixels to generate a gray-level histogram.
[0018] In the above embodiments, this disclosure uses image grayscale value statistics to perform grayscale statistics on the panel image, which can understand the overall distribution of grayscale values of the image and preliminarily determine whether there are obvious defects. If the grayscale value distribution is relatively concentrated, subsequent grayscale value equalization processing is required. At the same time, by referring to the overall distribution of grayscale values of the image, the upper limit of the comparison of the grayscale histogram of the subsequent sub-blocks can be accurately obtained.
[0019] As some optional embodiments of this disclosure, the process of performing gray-level equalization processing on the panel image using an adaptive histogram equalization algorithm based on the gray-level histogram of the panel image is as follows:
[0020] The grayscale panel image is divided into several non-overlapping sub-blocks of equal size, and histogram statistics are performed on each sub-block to obtain the number of grayscale histogram groups for each sub-block, that is, the grayscale level of each sub-block.
[0021] The gray-level histogram of each sub-block is equalized based on its gray level, and then the equalized sub-blocks are stitched together according to the division method to obtain an equalized image.
[0022] In the above embodiments, the present disclosure uses an adaptive histogram equalization algorithm to perform grayscale value equalization processing on the panel image, which has advantages such as improving local contrast, strong adaptability and enhancing detail expression. It can highlight the Mura defect without causing overall image distortion.
[0023] As some optional embodiments of this disclosure, the process of equalizing the gray-level histogram of each sub-block based on the gray-level of each sub-block is as follows:
[0024] The gray-level histogram H(i) corresponding to each sub-block is calculated as follows: H(i) = ∑{(x,y)∈R|I(x,y)=i}, where I(x,y) represents the gray-level value of the pixel at coordinate (x,y), and i represents the gray level of each sub-block.
[0025] The grayscale histogram is normalized to obtain the grayscale probability distribution P(i)=H(i) / N, where N represents the total number of pixels in the sub-block;
[0026] The cumulative distribution function of gray levels R(i) is calculated based on the gray level probability distribution of each sub-block, where R(i) = ∑{P(j)|j≤i}}, and R(i) represents the proportion of pixels with gray level not greater than i in the sub-block.
[0027] The original gray level is mapped to a new gray level based on the cumulative distribution function of the gray level of each sub-block, where S = (L-1) × R(i), i is the original gray level, S represents the mapped gray level, and L represents the default number of gray levels.
[0028] In the above embodiments, this disclosure changes the image contrast by calculating the local histogram of the image and redistributing the brightness, thereby improving the local contrast of the image and preserving and enhancing more image details.
[0029] As one of the alternative implementations of this disclosure, a contrast limiting mechanism needs to be introduced before equalizing the grayscale histogram of each sub-block based on the grayscale level of each sub-block.
[0030] In the above embodiments, the present disclosure uses smaller sub-blocks to adjust local contrast more finely, but this may increase computational complexity and noise amplification. Therefore, a contrast limiting mechanism is introduced to limit the degree of contrast enhancement, thereby avoiding excessive amplification of image noise.
[0031] As some optional embodiments of this disclosure, the process of introducing a contrast limiting mechanism is as follows:
[0032] The upper limit of contrast is obtained based on the grayscale histogram of the panel image;
[0033] The histogram of each sub-block is validated, and histograms that exceed the contrast limit are clipped and the clipped portions are redistributed.
[0034] In the above embodiments, by referring to the overall grayscale distribution of the image, this disclosure can accurately obtain the upper limit of contrast, effectively avoiding excessive amplification of image noise.
[0035] As some optional embodiments of this disclosure, the process of performing feature annotation on the equalization image and training a neural network based on the feature-annotated equalization image is as follows:
[0036] Defect classification and feature annotation are performed on the balanced images to construct a training sample set;
[0037] The sample images from the training sample set are input into the neural network to train the model and obtain the object detection model.
[0038] In the above embodiments, this disclosure trains the target detection model so that the model can learn and detect Mura defect features.
[0039] As some alternative embodiments of this disclosure, the object detection model employs Faster R-CNN or YOLO.
[0040] This disclosure also provides a system for panel defect detection based on image grayscale equalization, the system comprising:
[0041] The grayscale statistics unit performs grayscale value statistics on the panel image using an image grayscale value statistics method to obtain a grayscale histogram of the panel image.
[0042] A gray-level equalization unit, which uses an adaptive histogram equalization algorithm to perform gray-level equalization processing on the panel image based on the gray-level histogram of the panel image, so as to obtain an equalized image.
[0043] A model training unit is configured to perform feature annotation on a balanced image and train a neural network based on the feature-annotated balanced image to obtain a target detection model.
[0044] A defect detection unit performs panel defect detection on the balanced image based on a trained target detection model to obtain defect detection results.
[0045] This disclosure also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for panel defect detection based on image grayscale equalization.
[0046] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for panel defect detection based on image grayscale equalization.
[0047] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method for panel defect detection based on image grayscale equalization.
[0048] The beneficial effects of this disclosure are as follows: Based on the characteristic that Mura defects are more obvious under different grayscale backgrounds, this disclosure enhances the imaging features of Mura defects by performing grayscale value statistics and grayscale value equalization processing on the panel image, thereby enabling the target detection model to accurately detect and locate defects, increasing the accuracy of Mura defect detection and preventing the problem of missed detection. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 is a schematic diagram of the computer device structure of the hardware operating environment described in the embodiments of this disclosure;
[0051] Figure 2 is a flowchart of the panel defect detection method according to an embodiment of this disclosure;
[0052] Figure 3 is an example diagram of a panel image according to an embodiment of this disclosure;
[0053] Figure 4 is a schematic diagram of the grayscale histogram distribution of the panel image described in the embodiments of this disclosure;
[0054] Figure 5 is an example diagram of the equalization image described in an embodiment of this disclosure;
[0055] Figure 6 is a schematic diagram of the gray-level histogram distribution of the equalized image according to an embodiment of this disclosure;
[0056] Figure 7 is a schematic diagram comparing the surface defects of the panel image and the balanced image before and after grayscale value equalization processing according to the embodiments of this disclosure.
[0057] Figure 8 is a structural block diagram of the panel defect detection system according to an embodiment of this disclosure. Detailed Implementation
[0058] It should be understood that the specific embodiments described herein are merely illustrative of this disclosure and are not intended to limit this disclosure.
[0059] To address the issue of missed detections in existing Mura defect detection methods, this disclosure provides a method and system for metal performance testing based on neural networks. Before introducing the specific technical solutions of this disclosure, the hardware operating environment involved in the embodiments of this disclosure will be described first.
[0060] Please refer to Figure 1, which is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiments of this disclosure.
[0061] As shown in Figure 1, the computer device may include: a processor, such as a central processing unit (CPU), a communication bus, a user interface, a network interface, and memory. The communication bus is configured to enable communication between these components. The user interface may include a display screen and an input unit such as a keyboard; optionally, the user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive; optionally, the memory may also be a storage device independent of the aforementioned processor.
[0062] Those skilled in the art will understand that the structure shown in Figure 1 does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0063] As shown in Figure 1, a memory, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and an electronic program module.
[0064] In the computer device shown in Figure 1, the network interface is mainly configured to communicate with the network server; the user interface is mainly configured to interact with the user; the processor and memory in the computer device of this disclosure can be set in the computer device, and the computer device calls the computer program product stored in the electronic program module through the processor and executes the panel defect detection method based on image grayscale equalization provided in the embodiments of this disclosure.
[0065] Based on the hardware environment of the foregoing embodiments, the present disclosure provides a method for panel defect detection based on image grayscale equalization. Please refer to Figure 2, which is a flowchart of the panel defect detection method. The method flow is as follows:
[0066] (1) Obtain several panel images and perform gray value statistics on the panel images to obtain the gray value histogram of the panel images.
[0067] In this embodiment of the disclosure, the process of performing grayscale value statistics on the panel image using image grayscale value statistics is as follows:
[0068] (1.1) Perform grayscale conversion on the panel image. Grayscale conversion can convert a color panel image into a grayscale panel image, which facilitates the display of Mura defects and subsequent pixel statistics. Please refer to Figure 3, which is an example of the grayscale panel image.
[0069] (1.2) Iterate through each pixel of the grayscale panel image and count the grayscale value of each pixel to obtain the grayscale value statistics of each pixel.
[0070] (1.3) Calculate the distribution probability of gray values based on the statistical results of gray values of all pixels to generate a gray histogram. Please refer to Figure 4. Figure 4 is a schematic diagram of the gray histogram distribution of the panel image. It can be seen from the gray histogram that the overall gray values of the image are concentrated in the range of 50 to 80. The gray value difference is low, which makes the location features of the Mura defect invisible.
[0071] (2) Based on the grayscale histogram of the panel image, an adaptive histogram equalization algorithm is used to perform grayscale value equalization processing on the panel image to obtain an equalized image. Please refer to Figures 5, 6 and 7. Figure 5 is an example of the equalized image, Figure 6 is the grayscale histogram of the equalized image, and Figure 7 is a schematic diagram comparing the grayscale panel image and the equalized image. Figure 5 shows that the background of the image is more clearly distinguished, Figure 6 shows that the overall grayscale value of the image is more dispersed, and Figure 7 shows that the Mura defect features are more obvious.
[0072] In this embodiment of the disclosure, the process of performing grayscale value equalization processing on the panel image using the adaptive histogram equalization algorithm is as follows:
[0073] (2.1) Divide the grayscale panel image into several non-overlapping sub-blocks of equal size, and perform histogram statistics on each sub-block to obtain the number of grayscale histogram groups for each sub-block, i.e., the grayscale level of each sub-block; for example, divide the grayscale panel image into 8*8 blocks for a total of 64 sub-blocks, and perform histogram statistics on each of the 64 sub-blocks to obtain the grayscale level of the 64 sub-blocks.
[0074] (2.2) Based on the gray level of each sub-block, the gray-level histogram of each sub-block is equalized, and the equalized sub-blocks are then stitched together according to the division method to obtain a balanced image. Since histogram equalization of each sub-block will result in discontinuous gray values between different sub-blocks, interpolation is required to smooth the transition during the region stitching process. Commonly used interpolation methods include, but are not limited to, bilinear interpolation and linear interpolation.
[0075] Optionally, the process of equalizing the gray-level histogram of each sub-block based on the gray level of each sub-block is as follows:
[0076] (2.21) Calculate the gray-level histogram H(i) corresponding to each sub-block: H(i) = ∑{(x,y)∈R|I(x,y)=i}, where I(x,y) represents the gray-level value of the pixel at coordinate (x,y), and i represents the gray level of each sub-block.
[0077] (2.22) Normalize the grayscale histogram to obtain the grayscale probability distribution P(i)=H(i) / N, where N represents the total number of pixels in the sub-block.
[0078] (2.23) Calculate the cumulative distribution function of gray level R(i) = ∑{P(j)|j≤i}} based on the gray level probability distribution of each sub-block, where R(i) represents the proportion of pixels with gray level not greater than i in the sub-block.
[0079] (2.24) Based on the cumulative distribution function of the gray level of each sub-block, the original gray level is mapped to a new gray level, where S = (L-1) × R(i), where i is the original gray level, S represents the mapped gray level, and L represents the default number of gray levels. Optionally, the number of gray levels L = 256.
[0080] In the embodiments of this disclosure, using smaller sub-blocks can finely adjust the local contrast, but may increase computational complexity and noise amplification. Therefore, before equalizing the gray-level histogram of each sub-block based on its gray level, a contrast limiting mechanism needs to be introduced. By introducing a contrast limiting mechanism, the degree of contrast enhancement can be limited, thereby avoiding excessive amplification of image noise.
[0081] In this embodiment of the disclosure, the process of introducing a contrast limiting mechanism is as follows:
[0082] ① Obtain the upper limit of contrast based on the grayscale histogram of the panel image. That is, obtain the average grayscale value and the maximum grayscale value of the panel image through the grayscale histogram of the panel image. Determine the magnification factor based on the difference between the maximum grayscale value and the average grayscale value. That is, if the difference is twice the average grayscale value, the upper limit of contrast is twice the average grayscale value. If the difference is 0.5 times the average grayscale value, the upper limit of contrast is the average grayscale value. Optionally, the maximum grayscale value can also be the average value of the maximum grayscale values within a specific range.
[0083] ② Verify the histogram of each sub-block, crop the histograms that exceed the contrast limit, and redistribute the cropped parts to other parts to form the final grayscale histogram of the sub-block.
[0084] (3) The balanced image is labeled with features, and the neural network is trained based on the balanced image with the labeled features to obtain the target detection model; wherein the target detection model adopts Faster RCNN or YOLO.
[0085] In this embodiment of the disclosure, the process of training a neural network based on a balanced image with labeled features is as follows:
[0086] (3.1) Perform defect classification and feature annotation on the balanced image, that is, label the type and location of the Mura defect, and construct a training sample set based on the balanced image with several feature annotations.
[0087] (3.2) Input the sample images of the training sample set into the neural network for model training, so that the model learns the features of the Mura defect until the model converges to obtain the target detection model;
[0088] (4) Based on the trained target detection model, panel defects are detected in the balanced image to obtain defect detection results; that is, the panel image to be trained is first processed by steps (1) to (2) to obtain the balanced image to be detected; then the balanced image to be detected is input into the trained target detection model to perform Mura defect position detection, and the defect detection results are output through the target detection model.
[0089] In summary, this disclosure, based on the characteristic that Mura defects are more obvious under different grayscale backgrounds, enhances the imaging features of Mura defects by performing grayscale value statistics and grayscale value equalization processing on the panel image. This enables the target detection model to accurately detect and locate defects, increases the accuracy of Mura defect detection, and prevents missed detections.
[0090] Furthermore, in one embodiment, based on the same inventive concept as the foregoing embodiments, this disclosure provides a system for panel defect detection based on image grayscale equalization. This system corresponds one-to-one with the method described in Embodiment 1. Please refer to Figure 8, which is a structural block diagram of the panel defect detection system. The system includes:
[0091] The grayscale statistics unit performs grayscale value statistics on the panel image using an image grayscale value statistics method to obtain a grayscale histogram of the panel image.
[0092] A gray-level equalization unit, which uses an adaptive histogram equalization algorithm to perform gray-level equalization processing on the panel image based on the gray-level histogram of the panel image, so as to obtain an equalized image.
[0093] A model training unit is configured to perform feature annotation on a balanced image and train a neural network based on the feature-annotated balanced image to obtain a target detection model.
[0094] A defect detection unit performs panel defect detection on the balanced image based on a trained target detection model to obtain defect detection results.
[0095] It should be noted that each unit in the system for panel defect detection based on image grayscale equalization in this embodiment corresponds one-to-one with each step in the method for panel defect detection based on image grayscale equalization in the aforementioned embodiment. Therefore, the specific implementation method and the technical effects achieved in this embodiment can be referred to the implementation method of the aforementioned method for panel defect detection based on image grayscale equalization, and will not be repeated here.
[0096] Furthermore, in one embodiment, this disclosure also provides a computer device including a processor, a memory, and a computer program stored in the memory, the computer program being executed by the processor to implement the methods in the foregoing embodiments.
[0097] Furthermore, in one embodiment, this disclosure also provides a computer storage medium storing a computer program that is executed by a processor to implement the methods described in the foregoing embodiments.
[0098] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a device including one or any combination of the above-mentioned memories. The computer may be a variety of computing devices, including smart terminals and servers.
[0099] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0100] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0101] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0102] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0103] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0105] The above are merely preferred embodiments of this disclosure and do not limit the patent scope of this disclosure. Any equivalent structural or procedural transformations made using the content of this disclosure and its drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this disclosure. Industrial applicability
[0106] This disclosure provides a method and system for panel defect detection based on image grayscale equalization, which enables the target detection model to accurately detect and locate defects, increases the accuracy of Mura defect detection, and prevents missed detections.
Claims
1. A method for panel defect detection based on image grayscale equalization, characterized in that, The method The process includes the following steps: The grayscale values of the panel image are statistically analyzed to obtain the grayscale histogram of the panel image. Based on the grayscale histogram of the panel image, an adaptive histogram equalization algorithm is used to perform grayscale value equalization processing on the panel image to obtain an equalized image. The balanced image is labeled with features, and the neural network is trained based on the balanced image with the labeled features to obtain the object detection model; The trained object detection model is used to perform panel defect detection on the balanced image to obtain the defect detection results.
2. The method for panel defect detection based on image grayscale equalization according to claim 1, characterized in that, The process of performing grayscale value statistics on panel images using image grayscale value statistics is as follows: Perform grayscale conversion on the panel image to convert the color panel image into a grayscale panel image; Iterate through each pixel of the grayscale panel image and count the grayscale value of each pixel to obtain the grayscale value statistics for each pixel; The distribution probability of gray values is calculated based on the statistical results of gray values of all pixels to generate a gray-level histogram.
3. The method for panel defect detection based on image grayscale equalization according to claim 1, characterized in that, The process of performing gray-level equalization on the panel image using an adaptive histogram equalization algorithm based on the panel image's gray-level histogram is as follows: The grayscale panel image is divided into several non-overlapping sub-blocks of equal size, and histogram statistics are performed on each sub-block to obtain the number of grayscale histogram groups for each sub-block, that is, the grayscale level of each sub-block. The gray-level histogram of each sub-block is equalized based on its gray level, and then the equalized sub-blocks are stitched together according to the division method to obtain an equalized image.
4. The method for panel defect detection based on image grayscale equalization according to claim 3, characterized in that, The process of equalizing the gray-level histogram of each sub-block based on its gray-level is as follows: The gray-level histogram H(i) corresponding to each sub-block is calculated as follows: H(i) = ∑{(x,y)∈R|I(x,y)=i}, where I(x,y) represents the gray-level value of the pixel at coordinate (x,y), and i represents the gray level of each sub-block. The grayscale histogram is normalized to obtain the grayscale probability distribution P(i)=H(i) / N, where N represents the total number of pixels in the sub-block; The cumulative distribution function of gray levels R(i) is calculated based on the gray level probability distribution of each sub-block, where R(i) = ∑{P(j)|j≤i}}, and R(i) represents the proportion of pixels with gray level not greater than i in the sub-block. The original gray level is mapped to a new gray level based on the cumulative distribution function of the gray level of each sub-block, where S = (L-1) × R(i), i is the original gray level, S represents the mapped gray level, and L represents the default number of gray levels.
5. The method for panel defect detection based on image grayscale equalization according to claim 4, characterized in that, Before equalizing the grayscale histogram of each sub-block based on its grayscale level, a contrast limiting mechanism needs to be introduced.
6. The method for panel defect detection based on image grayscale equalization according to claim 5, characterized in that, The process for introducing a contrast limiting mechanism is as follows: The upper limit of contrast is obtained based on the grayscale histogram of the panel image; The histogram of each sub-block is validated, and histograms that exceed the contrast limit are clipped and the clipped portions are redistributed.
7. The method for panel defect detection based on image grayscale equalization according to claim 1, characterized in that, The process of performing feature annotation on the equalized image and training the neural network based on the feature-annotated equalized image is as follows: Defect classification and feature annotation are performed on the balanced images to construct a training sample set; The sample images from the training sample set are input into the neural network to train the model and obtain the object detection model.
8. The method for panel defect detection based on image grayscale equalization according to claim 7, characterized in that, The target detection model uses Faster R-CNN or YOLO.
9. A system for panel defect detection based on image grayscale equalization, characterized in that, The system includes: The grayscale statistics unit performs grayscale value statistics on the panel image using an image grayscale value statistics method to obtain a grayscale histogram of the panel image. A gray-level equalization unit, which uses an adaptive histogram equalization algorithm to perform gray-level equalization processing on the panel image based on the gray-level histogram of the panel image, so as to obtain an equalized image. A model training unit is configured to perform feature annotation on a balanced image and train a neural network based on the feature-annotated balanced image to obtain a target detection model. A defect detection unit performs panel defect detection on the balanced image based on a trained target detection model to obtain defect detection results.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes a computer program, it implements the method for panel defect detection based on image grayscale equalization as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for panel defect detection based on image grayscale equalization as described in any one of claims 1-8.
12. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements a method for panel defect detection based on image grayscale equalization as described in any one of claims 1-8.