Method and system for realizing panel defect detection based on image gray scale equalization
By performing grayscale value statistics and adaptive histogram equalization on the panel images, the imaging characteristics of Mura defects are enhanced and defect detection is used using neural networks to solve the problem that existing Mura defect detection is prone to missed detection and improve the detection accuracy.
Patent Information
- Application Number
- CN202411931714.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-01
AI Technical Summary
Existing Mura defect detection is prone to missed detection.
By performing grayscale value statistics and adaptive histogram equalization on the panel images, the imaging characteristics of Mura defects are enhanced, and the object detection model is trained using neural networks for defect detection.
Improve the accuracy of Mura defect detection and prevent missed detection problems.
Smart Images

Figure CN119741292A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of panel defect detection, and in particular to a method and system for realizing panel defect detection based on image grayscale equalization. Background Art
[0002] The display panel industry is booming, and market demand continues to grow. Improving the production efficiency and increasing production capacity of display panels while reducing production costs and improving product quality is a major development trend. Defect detection methods with artificial intelligence as the core are gradually being applied to various process stages of display panel production, replacing manual visual inspection while effectively improving the stability and effectiveness of quality control.
[0003] The Mura defect of the panel color filter (CF) is a common defect in the display panel manufacturing process, which directly affects the quality of the display image. Mura defects refer to various traces caused by uneven brightness and color between pixels when the display panel displays an image. This unevenness may appear as spots, stripes, and blocks. Since the image features of Mura defects are not obvious, it is easy to miss detection when using artificial intelligence for defect detection. Summary of the invention
[0004] The present invention provides a method and system for realizing panel defect detection based on image grayscale balance, which solves the problem that the existing Mura defect detection is prone to missed detection.
[0005] In a first aspect, an embodiment of the present invention provides a method for panel defect detection based on image grayscale equalization, the method comprising the following process:
[0006] The grayscale value of the panel image is counted by using the image grayscale value statistics method to obtain the grayscale histogram of the panel image;
[0007] 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 a balanced image;
[0008] Performing feature annotation on the equalized image, and performing neural network training based on the feature-annotated equalized image to obtain a target detection model;
[0009] Panel defect detection is performed on the equalized image based on the trained target detection model to obtain defect detection results.
[0010] In the above embodiments, based on the fact that Mura defects are more obvious under different grayscale backgrounds, the present invention enhances the imaging characteristics of Mura defects by performing grayscale value statistics and grayscale value balancing processing on the panel image, so that the target detection model can accurately detect and locate defects, thereby increasing the accuracy of Mura defect detection.
[0011] As some optional implementations of the present application, the process of performing grayscale value statistics on the panel image by using image grayscale value statistics is as follows:
[0012] Performing grayscale conversion on the panel image to convert the color panel image into a grayscale panel image;
[0013] Traverse each pixel of the grayscale panel image and count the grayscale value of each pixel to obtain the grayscale value statistical result of each pixel;
[0014] The distribution probability of the grayscale value is calculated based on the grayscale value statistics of all pixels to generate a grayscale histogram.
[0015] In the above embodiment, the present invention uses image grayscale value statistics to perform grayscale statistics on the panel image, which can understand the distribution of the grayscale values of the entire 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 distribution of the grayscale values of the entire image, the contrast upper limit value of the grayscale histogram of the subsequent sub-block can be accurately obtained.
[0016] As some optional implementations of the present application, based on the grayscale histogram of the panel image, the process of using an adaptive histogram equalization algorithm to perform grayscale value equalization processing on the panel image is as follows:
[0017] The grayscale panel image is divided into a number of non-overlapping sub-blocks of equal size, and a histogram is performed on each sub-block to obtain the number of groups of the grayscale histogram of each sub-block, that is, the grayscale level of each sub-block;
[0018] The grayscale histogram of each sub-block is equalized based on the grayscale level of each sub-block, and each sub-block subjected to equalization is subjected to regional splicing according to a division method to obtain a balanced image.
[0019] In the above embodiment, the present invention adopts an adaptive histogram equalization algorithm to perform grayscale value equalization processing on the panel image, which has the advantages of improving local contrast, strong adaptability and enhancing detail expression, and can highlight Mura defects without causing overall image distortion.
[0020] As some optional implementations of the present application, the process of equalizing the grayscale histogram of each sub-block based on the grayscale of each sub-block is as follows:
[0021] Count the grayscale histogram H(i)=∑{(x,y)∈R|I(x,y)=i} corresponding to each sub-block, where I(x,y) represents the grayscale value of the pixel at the coordinate (x,y) position, and i represents the grayscale level of each sub-block;
[0022] 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;
[0023] Based on the gray level probability distribution of each sub-block, the gray level cumulative distribution function R(i)=∑{P(j)|j≤i}} is calculated, where R(i) represents the proportion of pixels with gray levels not greater than i in the sub-block;
[0024] The original gray level is mapped to a new gray level based on the cumulative distribution function of each sub-block 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 gray level number.
[0025] In the above embodiment, the present invention 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 retaining and enhancing more image details.
[0026] As some optional implementations of the present application, before equalizing the grayscale histogram of each sub-block based on the grayscale of each sub-block, a contrast limiting mechanism needs to be introduced.
[0027] In the above embodiment, the present invention uses smaller sub-blocks to adjust the local contrast more finely, but there may be problems of increased computational complexity and noise amplification. Therefore, a contrast limitation mechanism is introduced to limit the degree of contrast enhancement, thereby avoiding excessive amplification of image noise.
[0028] As some optional implementations of the present application, the process of introducing the contrast limitation mechanism is as follows:
[0029] Obtaining the upper limit value of contrast based on the grayscale histogram of the panel image;
[0030] The histogram of each sub-block is checked, the histogram exceeding the upper contrast limit is clipped, and the clipped part is redistributed.
[0031] In the above embodiment, the present invention can accurately obtain the upper limit of contrast by referring to the distribution of gray values of the entire image, thereby effectively avoiding excessive amplification of image noise.
[0032] As some optional implementations of the present application, the process of feature labeling the equalized image and training the neural network based on the feature-labeled equalized image is as follows:
[0033] Perform defect classification and feature labeling on the balanced image to construct a training sample set;
[0034] The sample images of the training sample set are input into the neural network for model training to obtain the target detection model.
[0035] In the above embodiment, the present invention trains the target detection model so that the model can learn and detect the characteristics of Mura defects.
[0036] As some optional implementations of the present application, the target detection model adopts Faster RCNN or YOLO.
[0037] In a second aspect, the present invention provides a system for panel defect detection based on image grayscale equalization, the system comprising:
[0038] A grayscale statistics unit, wherein the grayscale statistics unit performs grayscale value statistics on the panel image in a grayscale value statistics manner to obtain a grayscale histogram of the panel image;
[0039] A grayscale equalization unit, wherein the grayscale equalization unit performs grayscale value equalization processing on the panel image based on a grayscale histogram of the panel image by using an adaptive histogram equalization algorithm to obtain a balanced image;
[0040] A model training unit, the model training unit is used to perform feature annotation on the equalized image, and perform neural network training based on the feature-annotated equalized image to obtain a target detection model;
[0041] A defect detection unit performs panel defect detection on the equalized image based on the trained target detection model to obtain a defect detection result.
[0042] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for panel defect detection based on image grayscale equalization when executing the computer program.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for panel defect detection based on image grayscale equalization is implemented.
[0044] In a fifth aspect, the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the method for panel defect detection based on image grayscale equalization.
[0045] The beneficial effects of the present invention are as follows: Based on the characteristic that Mura defects are more obvious under different grayscale backgrounds, the present invention enhances the imaging characteristics of Mura defects by performing grayscale value statistics and grayscale value balancing processing on the panel image, so that the target detection model can accurately detect and locate defects, thereby increasing the accuracy of Mura defect detection and preventing the problem of missed detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 is a schematic diagram of the computer device structure of the hardware operating environment described in the embodiment of the present invention;
[0048] Figure 2 is a flow chart of a panel defect detection method according to an embodiment of the present invention;
[0049] Figure 3 is an example diagram of the panel image described in the embodiment of the present invention;
[0050] Figure 4 is a schematic diagram of the grayscale histogram distribution of the panel image according to the embodiment of the present invention;
[0051] Figure 5 is an example diagram of the equalized image described in the embodiment of the present invention;
[0052] Figure 6 is a schematic diagram of the grayscale histogram distribution of the balanced image according to an embodiment of the present invention;
[0053] Figure 7 is a schematic diagram comparing surface defects of a panel image and a balanced image before and after the gray value equalization processing according to an embodiment of the present invention;
[0054] Figure 8 It is a structural block diagram of a system for panel defect detection according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] In order to solve the problem that the existing Mura defect detection is prone to missed detection, the present application provides a metal property detection method and system based on a neural network. Before introducing the specific technical solution of the present application, the hardware operating environment involved in the embodiment of the present application is first introduced.
[0057] See also Figure 1 , Figure 1 A schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application.
[0058] like Figure 1 As shown, the computer device may include: a processor, such as a central processing unit (CPU), a communication bus, a user interface, a network interface, and a memory. Among them, the communication bus is used to realize the connection and communication between these components. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally, the user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity interface). The memory may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory may optionally be a storage device independent of the aforementioned processor.
[0059] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.
[0060] like Figure 1 As shown, the memory 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.
[0061] exist Figure 1 In the computer device shown, the network interface is mainly used for data communication with the network server; the user interface is mainly used for data interaction with the user; the processor and memory in the computer device of the present application 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 method for panel defect detection based on image grayscale equalization provided in the embodiment of the present application.
[0062] Based on the hardware environment of the aforementioned embodiment, the embodiment of the present application provides a method for panel defect detection based on image grayscale balance, please refer to Figure 2 , Figure 2 The flowchart of the panel defect detection method is as follows:
[0063] (1) Obtain a number of panel images, and perform grayscale value statistics on the panel images using an image grayscale value statistics method to obtain a grayscale histogram of the panel images.
[0064] In the embodiment of the present invention, the process of performing grayscale value statistics on the panel image by using image grayscale value statistics is as follows:
[0065] (1.1) Grayscale conversion of panel images. Grayscale conversion can convert color panel images into grayscale panel images, which is convenient for the characteristic display of Mura defects and subsequent pixel statistics. Please refer to Figure 3 , Figure 3 is an example image of the grayscale panel image.
[0066] (1.2) Traverse each pixel of the grayscale panel image and count the grayscale value of each pixel to obtain the grayscale value statistical result of each pixel.
[0067] (1.3) Based on the gray value statistics of all pixels, the distribution probability of the gray value is calculated to generate a gray histogram. Please refer to Figure 4 , Figure 4 Schematic diagram of the grayscale histogram distribution of the panel image. It can be seen from the grayscale histogram that the grayscale value of the entire image is concentrated in the range of 50 to 80, and the grayscale value difference is low, resulting in invisible Mura defect position features.
[0068] (2) Based on the grayscale histogram of the panel image, an adaptive histogram equalization algorithm is used to perform grayscale value equalization on the panel image to obtain a balanced image. Please refer to Figure 5 , Figure 6 as well as Figure 7 , Figure 5 is an example diagram of the equalized image, Figure 6 is the grayscale histogram of the equalized image, Figure 7 It is a schematic diagram of the comparison of the surface defects of the grayscale panel image and the balanced image. Figure 5 It can be seen that the image background is more clearly distinguished. Figure 6 It can be seen that the overall grayscale value of the image is more dispersed. Figure 7 It can be seen that the Mura defect characteristics are more obvious.
[0069] In an embodiment of the present invention, the process of using an adaptive histogram equalization algorithm to perform grayscale value equalization processing on a panel image is as follows:
[0070] (2.1) The grayscale panel image is divided into a number of non-overlapping sub-blocks of equal size, and histogram statistics are performed on each sub-block to obtain the number of groups of the grayscale histogram of each sub-block, that is, the grayscale level of each sub-block; for example, the grayscale panel image is divided into 8*8 sub-blocks, a total of 64 sub-blocks, and histogram statistics are performed on each of the 64 sub-blocks to obtain the grayscale levels of the 64 sub-blocks.
[0071] (2.2) Based on the gray level of each sub-block, the gray histogram of each sub-block is equalized, and each sub-block subjected to equalization is regionally spliced according to the division method to obtain a balanced image; since the histogram equalization of each sub-block will result in discontinuity of gray values between different sub-blocks, an interpolation method is required to smooth the transition during regional splicing. Commonly used interpolation methods include but are not limited to bilinear interpolation and linear interpolation.
[0072] Specifically, the process of equalizing the grayscale histogram of each sub-block based on the grayscale of each sub-block is as follows:
[0073] (2.21) Count the grayscale histogram H(i)=Σ{(x,y)∈R|I(x,y)=i} corresponding to each sub-block, where I(x,y) represents the grayscale value of the pixel at the coordinate (x,y) position, and i represents the grayscale level of each sub-block.
[0074] (2.22) 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.
[0075] (2.23) Based on the gray level probability distribution of each sub-block, the cumulative distribution function of gray level is calculated as R(i)=∑{P(j) | j≤i}}, where R(i) represents the proportion of pixels with grayscale levels not greater than i in the sub-block.
[0076] (2.24) Based on the cumulative distribution function of the grayscale level of each sub-block, the original grayscale is mapped to a new grayscale level, where S = (L-1) × R(i), where i is the original grayscale level, S represents the mapped grayscale level, and L represents the default number of grayscale levels. Specifically, the number of grayscale levels L = 256.
[0077] In the embodiment of the present invention, using smaller sub-blocks can adjust the local contrast more finely, but it may increase the computational complexity and noise amplification problem. Therefore, before equalizing the grayscale histogram of each sub-block based on the grayscale level of each sub-block, it is necessary to introduce a contrast limiting mechanism. By introducing the contrast limiting mechanism, the degree of contrast enhancement is limited, thereby avoiding excessive amplification of image noise.
[0078] In the embodiment of the present invention, the process of introducing the contrast limiting mechanism is as follows:
[0079] ① Obtain the upper limit value 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, and determine the magnification 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, then the upper limit value of contrast is twice the average grayscale value; if the difference is 0.5 times the average grayscale value, then the upper limit value of contrast is the average grayscale value; specifically, the maximum grayscale value may also be the average value of the maximum grayscale values within a specific size interval.
[0080] ② Check the histogram of each sub-block, crop the histogram that exceeds the contrast upper limit, and redistribute the cropped part to other parts to form the final grayscale histogram of the sub-block.
[0081] (3) Feature annotation is performed on the equalized image, and a neural network is trained based on the feature-annotated equalized image to obtain a target detection model; wherein the target detection model adopts Faster RCNN or YOLO.
[0082] In an embodiment of the present invention, the process of training a neural network based on a feature-annotated balanced image is as follows:
[0083] (3.1) Defect classification and feature annotation are performed on the balanced image, that is, the type and location of the mura defect are annotated, and a training sample set is constructed based on several feature-annotated balanced images.
[0084] (3.2) Inputting sample images of the training sample set into the neural network for model training, so that the model learns the characteristics of the mura defect until the model converges to obtain the target detection model;
[0085] (4) Based on the trained target detection model, the panel defect detection is performed on the balanced image to obtain the defect detection result; that is, the panel image to be trained is first subjected to the relevant processing from step (1) to step (2) to obtain the balanced image to be detected; then the balanced image to be detected is input into the trained target detection model for Mura defect detection, and the defect detection result is output through the target detection model.
[0086] In summary, based on the fact that Mura defects are more obvious under different grayscale backgrounds, the present invention enhances the imaging characteristics of Mura defects by performing grayscale value statistics and grayscale value balancing on the panel image, so that the target detection model can accurately detect and locate defects, thereby increasing the accuracy of Mura defect detection and preventing the problem of missed detection.
[0087] In addition, in one embodiment, based on the same inventive concept as the above embodiment, the embodiment of the present invention provides a system for panel defect detection based on image grayscale balance, and the system corresponds to the method of embodiment 1 one by one, please refer to Figure 8 , Figure 8 The structural block diagram of the system for panel defect detection is as follows:
[0088] A grayscale statistics unit, wherein the grayscale statistics unit performs grayscale value statistics on the panel image in a grayscale value statistics manner to obtain a grayscale histogram of the panel image;
[0089] A grayscale equalization unit, wherein the grayscale equalization unit performs grayscale value equalization processing on the panel image based on a grayscale histogram of the panel image by using an adaptive histogram equalization algorithm to obtain a balanced image;
[0090] A model training unit, the model training unit is used to perform feature annotation on the equalized image, and perform neural network training based on the feature-annotated equalized image to obtain a target detection model;
[0091] A defect detection unit performs panel defect detection on the equalized image based on the trained target detection model to obtain a defect detection result.
[0092] It should be noted that each unit in the system for realizing panel defect detection based on image grayscale equalization in this embodiment corresponds one-to-one to each step in the method for realizing panel defect detection based on image grayscale equalization in the aforementioned embodiment. Therefore, the specific implementation manner and technical effects achieved by this embodiment can refer to the implementation manner of the aforementioned method for realizing panel defect detection based on image grayscale equalization, and will not be repeated here.
[0093] In addition, in one embodiment, the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory, and the computer program implements the method in the aforementioned embodiment when executed by the processor.
[0094] In addition, in one embodiment, the present application further provides a computer storage medium, on which a computer program is stored, and the computer program implements the method in the aforementioned embodiment when executed by a processor.
[0095] 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 various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0096] In some embodiments, executable instructions may be in 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 stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0097] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0098] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0099] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0100] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0102] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for panel defect detection based on image grayscale equalization, characterized in that: The method The following processes are included: The grayscale value of the panel image is counted by using the image grayscale value statistics method 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 a balanced image; Performing feature annotation on the equalized image, and performing neural network training based on the feature-annotated equalized image to obtain a target detection model; Panel defect detection is performed on the equalized image based on the trained target detection model to obtain 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: Performing grayscale conversion on the panel image to convert the color panel image into a grayscale panel image; Traverse each pixel of the grayscale panel image and count the grayscale value of each pixel to obtain the grayscale value statistical result of each pixel; The distribution probability of the grayscale value is calculated based on the grayscale value statistics of all pixels to generate a grayscale histogram.
3. The method for panel defect detection based on image grayscale equalization according to claim 1, characterized in that: Based on the grayscale histogram of the panel image, the process of using the adaptive histogram equalization algorithm to perform grayscale value equalization on the panel image is as follows: The grayscale panel image is divided into a number of non-overlapping sub-blocks of equal size, and a histogram is performed on each sub-block to obtain the number of groups of the grayscale histogram of each sub-block, that is, the grayscale level of each sub-block; The grayscale histogram of each sub-block is equalized based on the grayscale level of each sub-block, and each sub-block subjected to equalization is subjected to regional splicing according to a division method to obtain a balanced 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 grayscale histogram of each sub-block based on the grayscale level of each sub-block is as follows: Count the grayscale histogram H(i)=Σ{(x,y)∈R | I(x,y)=i}, where I(x,y) represents the grayscale value of the pixel at the coordinate (x,y), and i represents the grayscale level of each sub-block; 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; Based on the gray level probability distribution of each sub-block, the cumulative distribution function of gray level is calculated as R(i)=Σ{P(j) | j≤i}}, where R(i) represents the proportion of pixels with grayscale 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 each sub-block 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 gray level number.
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 the grayscale level of each sub-block, 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 of introducing the contrast limiting mechanism is as follows: Obtaining the upper limit value of contrast based on the grayscale histogram of the panel image; The histogram of each sub-block is checked, the histogram exceeding the upper contrast limit is clipped, and the clipped part is redistributed.
7. The method for panel defect detection based on image grayscale equalization according to claim 1, characterized in that: The process of feature labeling the balanced image and training the neural network based on the feature labeled balanced image is as follows: Perform defect classification and feature labeling on the balanced image to construct a training sample set; The sample images of the training sample set are input into the neural network for model training to obtain the target 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 RCNN or YOLO.
9. A system for panel defect detection based on image grayscale equalization, characterized in that: The system comprises: A grayscale statistics unit, wherein the grayscale statistics unit performs grayscale value statistics on the panel image in a grayscale value statistics manner to obtain a grayscale histogram of the panel image; A grayscale equalization unit, wherein the grayscale equalization unit performs grayscale value equalization processing on the panel image based on a grayscale histogram of the panel image by using an adaptive histogram equalization algorithm to obtain a balanced image; A model training unit, the model training unit is used to perform feature annotation on the equalized image, and perform neural network training based on the feature-annotated equalized image to obtain a target detection model; A defect detection unit performs panel defect detection on the equalized image based on the trained target detection model to obtain a defect detection result.
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 the computer program, the method for panel defect detection based on image grayscale equalization as described in any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for panel defect detection based on image grayscale equalization as described in any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a method for panel defect detection based on image grayscale equalization as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Method and system for detecting corrosion of train body equipment compartment of motor train unit based on deep learning
CN120807513A
Method and system for implementing panel defect detection on basis of image grayscale equalization
WO2026137839A1