Method and system for detecting stripe and colored ribbon type defects of liquid crystal panel
By using image processing and target detection algorithms, the system can automatically detect stripe defects in LCD panels, solving the problems of missed and false detections in manual inspection and achieving efficient defect type determination.
Patent Information
- Application Number
- CN202511031740.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-21
AI Technical Summary
Current methods for detecting stripe defects in LCD panels rely on manual visual inspection, which is prone to missed or false detections and is costly.
By employing image processing and target detection algorithms, the model is trained on LCD panel images to automatically determine defect types through black border removal, RGB three-channel separation, histogram equalization, grayscale conversion, grayscale change curve plotting, and peak and valley identification.
It improves the accuracy of defect detection, reduces missed and false detections, and achieves automated defect category determination.
Smart Images

Figure CN120997143A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of liquid crystal panel defect detection technology, and more specifically, to a method and system for detecting stripe-like defects in liquid crystal panels. Background Technology
[0002] During the manufacturing process, LCD panels undergo a screen-on inspection to check for functional defects; this process is called screen-on inspection. LCD panels consist of many periodic light-emitting units. Defective light-emitting units cause uneven brightness on the LCD screen, resulting in alternating bright and dark stripes. These stripes lead to uneven color imaging and a poor user experience. Traditional stripe defect detection relies on manual visual inspection, which is easily affected by differences in personnel experience and mental state, leading to a high rate of missed and false detections. Furthermore, the labor costs are relatively high. Summary of the Invention
[0003] This invention provides a method and system for detecting stripe-type defects in liquid crystal panels, in order to solve the problems of missed detection and false detection that are common in existing stripe-type defect detection methods.
[0004] In a first aspect, the present invention provides a method for detecting stripe-like defects in a liquid crystal panel, the method flow of which is as follows:
[0005] Remove the black borders from the LCD panel image to obtain the color area image;
[0006] The RGB three-channel separation and red channel image extraction are performed on the color region image to obtain the red region image;
[0007] Histogram equalization and grayscale conversion are performed on the red region image to obtain the grayscale region image;
[0008] The grayscale values of the grayscale region image are statistically analyzed and the grayscale change curve is plotted to obtain the grayscale change curve of the red region image.
[0009] Peaks and troughs are marked on the grayscale change curve of the red region image to obtain a training sample set. The target detection algorithm is then trained based on the training sample set to obtain the target detection model.
[0010] A target detection model is used to identify the peaks and troughs of the grayscale change curve of the red area image, and the defect category is determined based on the peak and trough identification results to obtain the determination result of the striped ribbon type defect.
[0011] In the above embodiments, the present invention first obtains the grayscale change curve of the red area image, then performs peak and trough detection on the grayscale change curve of the red area image, and then combines the peak and trough detection results to obtain the position, width and periodicity of the bright and dark stripes. Finally, the defect type of the liquid crystal panel is classified and determined according to the position, width and periodicity of the bright and dark stripes, which solves the problem of missed detection and false detection in the existing stripe defect detection, and can also realize defect category determination.
[0012] As some optional embodiments of this application, the process for removing black borders from a liquid crystal panel image is as follows:
[0013] The black border and effective area of the LCD panel image are separated to obtain the largest inscribed rectangle containing the effective area;
[0014] The LCD panel image is cropped based on the size information of the largest inscribed rectangle, and the cropped boundary is Gaussian blurred to obtain the color area image.
[0015] In the above embodiments, by removing black borders from the liquid crystal panel image, the present invention can accurately obtain a color area image useful for defect detection and prevent black borders from affecting defect detection.
[0016] As some optional embodiments of this application, the process of performing RGB three-channel separation and red channel image extraction on a color region image is as follows:
[0017] The color area image is separated into RGB three channels to obtain the area images under the blue channel, green channel and red channel;
[0018] Extract the region image under the red channel to obtain the red region image, and map the red region image to the full-color image to obtain the final red region image.
[0019] In the above embodiments, the present invention performs RGB three-channel separation on the color area image to obtain the red area image. The red area image is more sensitive to the edges of objects and can better reflect the contour information of light and dark stripes.
[0020] As some optional implementations of this application, the process of performing histogram equalization and image grayscale conversion on the red region image is as follows:
[0021] The frequency of each gray level in the red region of the image is counted, and the probability of each gray level is calculated to obtain the probability distribution of the gray levels.
[0022] The probability distributions of gray levels are accumulated to obtain the cumulative probability of each gray level, and the cumulative probability is linearly mapped to the target gray range.
[0023] Based on the mapping relationship of the cumulative probability linear mapping, the gray level of each pixel in the red region image is replaced with the new gray level to obtain the gray region image.
[0024] In the above embodiments, the present invention performs histogram equalization and image grayscale conversion on the red region image, which can significantly improve image quality and optimize subsequent processing.
[0025] As some optional implementations of this application, the process of performing grayscale value statistics and drawing grayscale change curves on grayscale region images is as follows:
[0026] Obtain the gray value sequence of the gray area image and perform curve smoothing on the gray value sequence;
[0027] Based on the gray value sequence after curve smoothing, a gray-level change curve is plotted on the red region image to obtain the gray-level change curve of the red region image.
[0028] In the above embodiments, the present invention performs grayscale value statistics and grayscale change curve plotting on grayscale region images, which can reveal the brightness distribution characteristics and change patterns of images from both quantitative and dynamic perspectives, providing a key basis for subsequent target detection.
[0029] As some optional implementations of this application, the process of training the target detection algorithm model based on the training sample set is as follows:
[0030] Obtain grayscale change curves containing peak and trough annotation information from the sample training set;
[0031] The grayscale change curve containing annotation information is input into the object detection algorithm for image feature extraction and iterative training to obtain the object detection model.
[0032] In the above embodiments, the present invention trains a model based on an object detection algorithm, enabling the object detection model to identify peaks and troughs and output corresponding object detection boxes.
[0033] As some optional implementations of this application, the process of using a target detection model to identify peaks and troughs in the grayscale change curve of the red region image, and determining the defect category based on the peak and trough identification results, is as follows:
[0034] The grayscale change curve of the red area image is input into the target detection model to identify peaks and troughs, so as to obtain the target detection boxes corresponding to the peaks and troughs.
[0035] Based on the position information of the target detection box corresponding to the peaks and troughs, the position, width and periodicity of the bright and dark stripes are obtained. The defect type of the LCD panel is classified and judged according to the position, width and periodicity of the bright and dark stripes to obtain the judgment result of the stripe ribbon type defect.
[0036] In the above embodiments, the present invention can comprehensively classify and determine the defect types of liquid crystal panels based on the position, width, and periodicity of the bright and dark stripes.
[0037] In a second aspect, the present invention provides a detection system for stripe-like defects in liquid crystal panels, the system comprising:
[0038] A color image processing unit is used to remove black borders from an image on a liquid crystal panel to obtain a color area image.
[0039] The red image extraction unit is used to perform RGB three-channel separation and red channel image extraction on the color region image to obtain the red region image.
[0040] A grayscale image conversion unit is used to perform histogram equalization and grayscale conversion on the red region image to obtain a grayscale region image.
[0041] A change curve drawing unit is used to perform gray value statistics and gray change curve drawing on the gray area image to obtain the gray change curve of the red area image.
[0042] The detection model training unit is used to mark the peaks and troughs of the gray-level change curve of the red region image to obtain a training sample set, and to train the target detection algorithm based on the training sample set to obtain a target detection model.
[0043] The defect category determination unit uses a target detection model to identify the peaks and troughs of the grayscale change curve of the red area image, and determines the defect category based on the peak and trough identification results to obtain the determination result of the striped ribbon type defect.
[0044] In a third aspect, the present invention 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 detecting stripe-like defects in a liquid crystal panel.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for detecting stripe-like defects in a liquid crystal panel.
[0046] The beneficial effects of this invention are as follows:
[0047] This invention combines traditional CV algorithms and target detection algorithms. First, it obtains the grayscale change curve of the red region image. Then, it performs peak and trough detection on the grayscale change curve of the red region image. Next, it combines the peak and trough detection results to obtain the position, width, and periodicity of the bright and dark stripes. Finally, it classifies and determines the defect type of the LCD panel based on the position, width, and periodicity of the bright and dark stripes. This solves the problem of missed detection and false detection that is easy to occur in the existing stripe defect detection, and can also realize defect category determination. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention 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.
[0049] Figure 1 This is a schematic diagram of the computer device structure of the hardware operating environment described in the embodiments of the present invention;
[0050] Figure 2 This is a flowchart of the detection method described in the embodiments of the present invention;
[0051] Figure 3 This is a schematic diagram of a liquid crystal panel image according to an embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram of the grayscale change curve of the red region image described in the embodiment of the present invention;
[0053] Figure 5 This is a schematic diagram illustrating the valley identification of the grayscale change curve of the red region image as described in an embodiment of the present invention;
[0054] Figure 6 This is a structural block diagram of the detection system described in an embodiment of the present invention. Detailed Implementation
[0055] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0056] To address the issues of missed and false detections in existing stripe band defect detection methods, this application provides a method and system for detecting stripe band defects in liquid crystal panels. Before introducing the specific technical solution of this application, the hardware operating environment involved in the embodiments of this application will be described first.
[0057] Please see Figure 1 , Figure 1 This is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiments of this 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 memory. The communication bus is used 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 storage device; optionally, the memory may also be a storage device independent of the aforementioned processor.
[0059] Those skilled in the art will understand that Figure 1 The structure shown 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.
[0060] like Figure 1 As shown, a memory, as a storage medium, may include an operating system, a network communication module, a user interface module, and a data storage 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 this application can be set in the computer device, and the computer device calls the software product stored in the data storage module in the memory through the processor and executes the detection method of stripe type defects of liquid crystal panel provided in the embodiment of this application.
[0062] Based on the hardware environment of the foregoing embodiments, embodiments of this application provide a method for detecting stripe-like defects in liquid crystal panels. Please refer to [link to relevant documentation]. Figure 2 , Figure 2The flowchart of the detection method is as follows:
[0063] (1) Remove the black borders from the LCD panel image to obtain the color area image. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram of the liquid crystal panel image.
[0064] In this embodiment of the invention, the process for removing black borders from a liquid crystal panel image is as follows:
[0065] (1.1) A global thresholding algorithm is used to separate the black border and the effective area of the liquid crystal panel image in order to obtain the maximum inscribed rectangle containing the effective area.
[0066] Specifically, the formula for the global threshold algorithm is as follows:
[0067] σ 2 (T)=w0w1(μ0-μ1) 2
[0068] Where w0 and w1 represent the weights of the black border and the effective area, respectively, and are preset values, (μ0-μ1). 2 This represents the squared difference between the two means, reflecting the degree of separation. It is achieved by maximizing σ. 2 (T) can find the maximum threshold T and divide the pixels of the LCD panel image into two categories.
[0069] (1.2) The image of the liquid crystal panel is cropped according to the size information of the largest inscribed rectangle, and the boundary of the image cropping is Gaussian blurred to obtain the color area image.
[0070] Specifically, the LCD panel image is cropped based on the coordinates of the top left and bottom right corners of the largest inscribed rectangle, and the cropping boundary is smoothed using a Gaussian kernel to obtain the color area image.
[0071] (2) Perform RGB three-channel separation and red channel image extraction on the color area image to obtain the red area image.
[0072] In this embodiment of the invention, the process of performing RGB three-channel separation and red channel image extraction on a color region image is as follows:
[0073] (2.1) Use array slicing or dedicated functions to separate the RGB three channels of the color area image to obtain two-dimensional area images of the blue, green and red channels.
[0074] Specifically, before performing RGB three-channel separation on the color region image, the color region image needs to be converted to a fixed target resolution image.
[0075] First, the length and width differences between the color region image and the target resolution image are calculated. Then, a geometric transformation is performed on the color region image based on the length and width differences, and a Gaussian kernel is used to smooth the edges of the color region image to obtain a fixed target resolution image.
[0076] (2.2) Extract the region image under the red channel to obtain the red region image, and map the red region image to the full-color image to obtain the final red region image.
[0077] In this embodiment of the invention, by mapping the red region image to a full-color image, the visualization of the image can be enhanced, thereby obtaining a pseudo-color image.
[0078] (3) Perform histogram equalization and image grayscale conversion on the red region image to obtain the grayscale region image.
[0079] In this embodiment of the invention, the process of histogram equalization and image grayscale conversion for the red region image is as follows:
[0080] (3.1) Calculate the frequency of each gray level in the red region image and calculate the probability density function, that is, calculate the probability of each gray level to obtain the probability distribution of the gray levels.
[0081] In this embodiment of the invention, the probability density function is:
[0082] p(k)=Nh(k)
[0083] Where p(k) represents the probability of occurrence of gray level k, N represents the total number of pixels in the red region of the image, and h(k) represents the number of pixels with gray level k.
[0084] (3.2) Accumulate the probability distribution of gray levels, that is, calculate the cumulative distribution function to obtain the cumulative probability of each gray level, and linearly map the cumulative probability to the target gray range.
[0085] In this embodiment of the invention, the cumulative distribution function is:
[0086]
[0087] Where CDF(k) represents the percentage of pixels with gray levels less than k, and h(i) represents the number of pixels with gray levels less than k.
[0088] (3.3) Based on the mapping relationship of the cumulative probability linear mapping, the gray level of each pixel in the red region image is replaced with a new gray level to obtain the gray region image. That is, for each pixel in the red region image, the mapping table is looked up according to the gray level to obtain the new gray level.
[0089] (4) Perform grayscale value statistics and plot grayscale change curves on the grayscale region image to obtain the grayscale change curve of the red region image. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a schematic diagram of the grayscale variation curve of the image in the red region.
[0090] In this embodiment of the invention, the process of drawing grayscale change curves for grayscale region images is as follows:
[0091] (4.1) Obtain the gray value sequence of the gray area image along the horizontal, vertical or diagonal direction, and perform curve smoothing on the gray value sequence. By smoothing the gray value sequence, noise interference can be reduced.
[0092] (4.2) Based on the gray value sequence after curve smoothing, the pixel position is used as the horizontal axis and the gray value is used as the vertical axis to draw the gray value change curve. The gray value change curve is then combined with the red area image to obtain the gray value change curve of the red area image.
[0093] (5) Mark the peaks and valleys of the grayscale change curve of the red area image to obtain a training sample set, and train the target detection algorithm based on the training sample set to obtain the target detection model.
[0094] In this embodiment of the invention, the process of training the target detection algorithm model based on the training sample set is as follows:
[0095] (5.1) Use image annotation tools to annotate the peaks and troughs of the gray-scale change curves of the red area image, and then construct a sample training set. Then, obtain the gray-scale change curves containing annotation information from the sample training set in sequence.
[0096] (5.2) Input the grayscale change curve containing the annotation information into the target detection algorithm in sequence for image feature extraction and iterative training, and set the model hyperparameters to obtain the target detection model, so that the target detection model can identify peaks and valleys and output the corresponding target detection boxes.
[0097] (6) A target detection model is used to identify the peaks and troughs of the grayscale change curve in the red area image, and the defect category is determined based on the peak and trough identification results to obtain the determination result of the striped ribbon type defect. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram illustrating the valley identification of the grayscale variation curve of the red region image.
[0098] In this embodiment of the invention, the process for determining the defect category based on the peak and trough identification results is as follows:
[0099] (6.1) Input the grayscale change curve of the red area image into the target detection model to identify peaks and valleys, so as to obtain the target detection boxes corresponding to the peaks and valleys.
[0100] (6.2) Based on the position information of the target detection box corresponding to the peak and trough, the position, width and periodicity of the bright and dark stripes are obtained, and the defect type of the LCD panel is classified and judged according to the position, width and periodicity of the bright and dark stripes, so as to obtain the judgment result of the stripe ribbon type defect.
[0101] First, target detection frames for all peaks and troughs are acquired. Based on the position information of the target frames, the position, width, and periodicity of bright and dark stripes are obtained. Then, based on the position, width, and periodicity of the bright and dark stripes, the defect type of the LCD panel image is comprehensively determined. For example, if only a single, narrow, non-periodic bright or dark stripe appears, the LCD panel defect type can be preliminarily determined to include electrostatic accumulation-related defects. If a single, wide, non-periodic bright or dark stripe appears, the LCD panel defect type can be preliminarily determined to include short-circuit-related defects. If periodic, uniformly wide alternating bright and dark stripes appear, the LCD panel defect type can be preliminarily determined to include driver board problems, logic board problems, or backlight system malfunctions.
[0102] In summary, this invention combines traditional CV algorithms and target detection algorithms. First, it obtains the grayscale change curve of the red region image. Then, it performs peak and trough detection on the grayscale change curve of the red region image. Next, it combines the peak and trough detection results to obtain the position, width, and periodicity of the bright and dark stripes. Finally, it classifies and determines the defect type of the LCD panel based on the position, width, and periodicity of the bright and dark stripes. This solves the problem of missed detection and false detection that is easy to occur in existing stripe defect detection, and can also realize defect category determination.
[0103] Furthermore, in one embodiment, based on the same inventive concept as the foregoing embodiments, this embodiment of the invention provides a detection system for stripe-like defects in liquid crystal panels. This system corresponds one-to-one with the method described above. Please refer to [link to relevant documentation]. Figure 6 , Figure 6 The following is a structural block diagram of the detection system, which includes:
[0104] A color image processing unit is used to remove black borders from an image on a liquid crystal panel to obtain a color area image.
[0105] The red image extraction unit is used to perform RGB three-channel separation and red channel image extraction on the color region image to obtain the red region image.
[0106] A grayscale image conversion unit is used to perform histogram equalization and grayscale conversion on the red region image to obtain a grayscale region image.
[0107] A change curve drawing unit is used to perform gray value statistics and gray change curve drawing on the gray area image to obtain the gray change curve of the red area image.
[0108] The detection model training unit is used to mark the peaks and troughs of the gray-level change curve of the red region image to obtain a training sample set, and to train the target detection algorithm based on the training sample set to obtain a target detection model.
[0109] The defect category determination unit uses a target detection model to identify the peaks and troughs of the grayscale change curve of the red area image, and determines the defect category based on the peak and trough identification results to obtain the determination result of the striped ribbon type defect.
[0110] It should be noted that each unit in the detection system for stripe-type defects in liquid crystal panels in this embodiment corresponds one-to-one with each step in the detection method for stripe-type defects in liquid crystal panels in the aforementioned embodiment. Therefore, the specific implementation method and the technical effects achieved in this embodiment can be referred to the implementation method for the aforementioned detection method for stripe-type defects in liquid crystal panels, and will not be repeated here.
[0111] Furthermore, in one embodiment, this application also provides a computer device, the 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.
[0112] In addition, in one embodiment, this application also provides a computer storage medium storing a computer program, which is executed by a processor to implement the methods in the foregoing embodiments.
[0113] 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.
[0114] 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.
[0115] 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 collaborative files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0116] 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.
[0117] 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.
[0118] 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 application, 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 application.
[0119] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for detecting stripe-like defects in a liquid crystal panel, characterized in that, The method flow is as follows: Remove the black borders from the LCD panel image to obtain the color area image; The RGB three-channel separation and red channel image extraction are performed on the color region image to obtain the red region image; Histogram equalization and grayscale conversion are performed on the red region image to obtain the grayscale region image; The grayscale values of the grayscale region image are statistically analyzed and the grayscale change curve is plotted to obtain the grayscale change curve of the red region image. Peaks and troughs are marked on the grayscale change curve of the red region image to obtain a training sample set. The target detection algorithm is then trained based on the training sample set to obtain the target detection model. A target detection model is used to identify the peaks and troughs of the grayscale change curve of the red area image, and the defect category is determined based on the peak and trough identification results to obtain the determination result of the striped ribbon type defect.
2. The method for detecting stripe-like defects in a liquid crystal panel according to claim 1, characterized in that, The process for removing black borders from LCD panel images is as follows: The black border and effective area of the LCD panel image are separated to obtain the largest inscribed rectangle containing the effective area; The LCD panel image is cropped based on the size information of the largest inscribed rectangle, and the cropped boundary is Gaussian blurred to obtain the color area image.
3. The method for detecting stripe-like defects in a liquid crystal panel according to claim 1, characterized in that, The process of separating the RGB three channels and extracting the red channel from a color region image is as follows: The color area image is separated into RGB three channels to obtain the area images under the blue channel, green channel and red channel; Extract the region image under the red channel to obtain the red region image, and map the red region image to the full-color image to obtain the final red region image.
4. The method for detecting stripe-like defects in a liquid crystal panel according to claim 1, characterized in that, The process of performing histogram equalization and image grayscale conversion on the red region of the image is as follows: The frequency of each gray level in the red region of the image is counted, and the probability of each gray level is calculated to obtain the probability distribution of the gray levels. The probability distributions of gray levels are accumulated to obtain the cumulative probability of each gray level, and the cumulative probability is linearly mapped to the target gray range. Based on the mapping relationship of the cumulative probability linear mapping, the gray level of each pixel in the red region image is replaced with the new gray level to obtain the gray region image.
5. The method for detecting stripe-like defects in a liquid crystal panel according to claim 1, characterized in that, The process for performing grayscale value statistics and drawing grayscale change curves on a grayscale image is as follows: Obtain the gray value sequence of the gray area image and perform curve smoothing on the gray value sequence; Based on the gray value sequence after curve smoothing, a gray-level change curve is plotted on the red region image to obtain the gray-level change curve of the red region image.
6. The method for detecting stripe-like defects in a liquid crystal panel according to claim 1, characterized in that, The process of training the object detection algorithm model based on the training sample set is as follows: Obtain grayscale change curves containing peak and trough annotation information from the sample training set; The grayscale change curve containing annotation information is input into the object detection algorithm for image feature extraction and iterative training to obtain the object detection model.
7. The method for detecting stripe-like defects in a liquid crystal panel according to claim 1, characterized in that, The process of identifying peaks and troughs in the grayscale variation curve of the red region image using a target detection model, and determining the defect category based on the peak and trough identification results, is as follows: The grayscale change curve of the red area image is input into the target detection model to identify peaks and troughs, so as to obtain the target detection boxes corresponding to the peaks and troughs. Based on the position information of the target detection box corresponding to the peaks and troughs, the position, width and periodicity of the bright and dark stripes are obtained. The defect type of the LCD panel is classified and judged according to the position, width and periodicity of the bright and dark stripes to obtain the judgment result of the stripe ribbon type defect.
8. A detection system for stripe-like defects in liquid crystal panels, characterized in that, The system includes: A color image processing unit is used to remove black borders from an image on a liquid crystal panel to obtain a color area image. The red image extraction unit is used to perform RGB three-channel separation and red channel image extraction on the color region image to obtain the red region image. A grayscale image conversion unit is used to perform histogram equalization and grayscale conversion on the red region image to obtain a grayscale region image. A change curve drawing unit is used to perform gray value statistics and gray change curve drawing on the gray area image to obtain the gray change curve of the red area image. The detection model training unit is used to mark the peaks and troughs of the gray-level change curve of the red region image to obtain a training sample set, and to train the target detection algorithm based on the training sample set to obtain a target detection model. The defect category determination unit uses a target detection model to identify the peaks and troughs of the grayscale change curve of the red area image, and determines the defect category based on the peak and trough identification results to obtain the determination result of the striped ribbon type defect.
9. 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, it implements the method for detecting stripe-like defects in a liquid crystal panel as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for detecting stripe-like defects in a liquid crystal panel as described in any one of claims 1-7.