A liquid crystal panel defect detection method, system, electronic device and product

By using a defect detection method based on RGB subpixel structure, the RGB image of the sample LCD panel is obtained and divided into subpixel regions. A defect detection template is constructed, and grayscale images are used for detection. This solves the problems of high computational resource consumption and low detection efficiency in traditional methods, and achieves efficient and accurate defect identification.

CN120912584BActive Publication Date: 2026-03-03CHENGDU BOSHIDA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511110368.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2026-03-03
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

Traditional LCD panel defect detection methods consume large amounts of computational resources, have long detection cycles, poor real-time performance, and cannot independently identify defects in RGB sub-pixel regions, resulting in low classification accuracy.

Method used

A defect detection method based on RGB subpixel structure is adopted. The RGB image of the sample LCD panel is preprocessed, divided into multiple subpixel regions, template parameters are obtained and a defect detection template is constructed, and the grayscale image is used for defect detection.

Benefits of technology

It improves the speed and accuracy of LCD panel defect detection, reduces computing resource consumption, enhances the ability to identify defects at the sub-pixel level, and improves detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912584B_ABST
    Figure CN120912584B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of computer vision detection, and aims to provide a liquid crystal panel defect detection method, system, electronic device and product. The method comprises: acquiring an RGB image of a sample liquid crystal panel, and pre-processing the RGB image to obtain a pre-processed image; dividing the pre-processed image into a plurality of sub-pixel regions, and acquiring template parameters of each sub-pixel region; constructing a defect detection template according to the template parameters of each sub-pixel region; acquiring a gray-scale image of a liquid crystal panel to be tested, and performing defect detection on the gray-scale image based on the defect detection template to obtain a defect detection result of the liquid crystal panel to be tested. The present application can improve the speed and accuracy of liquid crystal panel defect detection, and has higher detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision inspection technology, and specifically relates to a method, system, electronic device and product for detecting defects in liquid crystal panels. Background Technology

[0002] As a core component of various electronic display terminals, the quality inspection of LCD panels has always been a critical step in the manufacturing process. Traditional LCD panel defect detection methods are mostly based on full-pixel analysis of color images, relying on substantial computational resources to extract image color, structure, and defect features. However, in using existing technologies, the inventors have discovered at least the following problems:

[0003] First, traditional methods require processing three-channel color images and performing full-image pixel-level analysis, resulting in high computational resource consumption, long detection cycles, and poor real-time performance, making them unsuitable for high-throughput production lines. Second, different color channels in color images are subject to interference, and traditional methods cannot independently identify defects in RGB sub-pixel regions, which can easily lead to confusion between defects in red and green sub-pixel regions, thereby reducing the accuracy of defect classification. Summary of the Invention

[0004] The present invention aims to at least partially solve the above-mentioned technical problems, and provides a method, system, electronic device and product for detecting defects in liquid crystal panels.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] In a first aspect, the present invention provides a method for detecting defects in a liquid crystal panel, comprising:

[0007] Obtain the RGB image of the sample LCD panel and preprocess the RGB image to obtain the preprocessed image;

[0008] The preprocessed image is divided into multiple sub-pixel regions, and the template parameters of each sub-pixel region are obtained;

[0009] Construct a defect detection template based on the template parameters of each sub-pixel region;

[0010] A grayscale image of the liquid crystal panel to be tested is acquired, and defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel to be tested.

[0011] In one possible design, the RGB image is preprocessed to obtain a preprocessed image, including:

[0012] Perform histogram equalization on the RGB image to obtain the histogram equalized image;

[0013] The image after histogram equalization is subjected to Gaussian blurring to obtain the preprocessed image.

[0014] In one possible design, the template parameters include size information, position information, channel type identifier, and color threshold; correspondingly, the preprocessed image is divided into multiple sub-pixel regions, and the template parameters for each sub-pixel region are obtained, including:

[0015] The preprocessed image is separated into single-channel grayscale images; wherein, the single-channel grayscale images are divided into R-channel, G-channel, and B-channel grayscale images;

[0016] The single-channel grayscale image is subjected to adaptive binarization processing to obtain a binarized image;

[0017] The binarized image is subjected to connected component analysis, the obtained connected components are set as sub-pixel regions, and the size information, position information and channel type identifier of each sub-pixel region are extracted.

[0018] HSV spatial histogram analysis is performed on the RGB image regions corresponding to each sub-pixel region to obtain the color threshold of each sub-pixel region.

[0019] In one possible design, the single-channel grayscale image is subjected to adaptive binarization to obtain a binary image, including:

[0020] The Otsu method was used to calculate the segmentation threshold of the single-channel grayscale image;

[0021] The single-channel grayscale image is binarized according to the segmentation threshold to obtain a binarized image.

[0022] In one possible design, after constructing a defect detection template based on the template parameters of each sub-pixel region, the method further includes:

[0023] The defect detection template is stored in a structure format.

[0024] In one possible design, the template parameters include size information, position information, channel type identifier, and color threshold; correspondingly, defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test, including:

[0025] Based on the size information, position information and channel type identifier of each sub-pixel region in the defect detection template, the grayscale image is processed for region recognition to obtain the test region in the grayscale image that matches each sub-pixel region;

[0026] Obtain the average gray value of each test area in the grayscale image;

[0027] The defect detection result of the liquid crystal panel under test is obtained based on the average gray value of each test area in the grayscale image and the color threshold of the sub-pixel area corresponding to each test area.

[0028] In one possible design, the defect detection result includes the sub-defect detection result of each test area in the grayscale image; wherein, when the average grayscale value of any test area in the grayscale image is within the range of the color threshold of its corresponding sub-pixel area, the sub-defect detection result of any test area is qualified; otherwise, the sub-defect detection result of any test area is unqualified.

[0029] In a second aspect, the present invention provides a liquid crystal panel defect detection system, comprising:

[0030] The template image processing module is used to acquire the RGB image of the template LCD panel and preprocess the RGB image to obtain the preprocessed image.

[0031] The template parameter acquisition module is communicatively connected to the template image processing module and is used to divide the preprocessed image into multiple sub-pixel regions and acquire the template parameters of each sub-pixel region.

[0032] The template construction module is communicatively connected to the template parameter acquisition module and is used to construct a defect detection template based on the template parameters of each sub-pixel region.

[0033] The defect detection module is communicatively connected to the template construction module. It is used to acquire a grayscale image of the liquid crystal panel under test, and to perform defect detection on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test.

[0034] Thirdly, the present invention provides an electronic device, comprising:

[0035] Memory, used to store computer program instructions; and,

[0036] A processor is configured to execute the computer program instructions to perform the operation of a liquid crystal panel defect detection method as described in any of the preceding claims.

[0037] Fourthly, the present invention provides a computer program product, including a computer program or instructions, wherein the computer program or instructions, when executed by a computer, implement a liquid crystal panel defect detection method as described in any of the above claims.

[0038] The beneficial effects of this invention are as follows:

[0039] This invention discloses a method, system, electronic device, and product for detecting defects in liquid crystal panels, which can improve the speed and accuracy of defect detection in liquid crystal panels and achieve higher detection efficiency. Specifically, in the implementation process, firstly, an RGB image of a sample liquid crystal panel is acquired and preprocessed to obtain a preprocessed image; then, the preprocessed image is divided into multiple sub-pixel regions, and template parameters for each sub-pixel region are acquired; a defect detection template is then constructed based on the template parameters of each sub-pixel region; when defect detection is required on the liquid crystal panel under test, a grayscale image of the liquid crystal panel under test is acquired, and defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test. Based on this, the present invention introduces a defect detection template based on RGB sub-pixel structure and achieves efficient and independent defect detection of each sub-pixel in a grayscale image under grayscale image conditions by matching the grayscale image with the template. This reduces the consumption of computing resources and avoids the high computing cost of full-color detection, thereby significantly improving the detection speed. At the same time, it can enhance the sub-pixel region-level defect recognition capability, thereby improving the detection efficiency. It solves the problems of high computing resource consumption, low detection efficiency and inaccurate sub-pixel defect classification in traditional methods when processing color images, and has good industrial application value.

[0040] Other beneficial effects of the present invention will be further explained in the specific embodiments. Attached Figure Description

[0041] Figure 1 This is a flowchart of the liquid crystal panel defect detection method in Example 1;

[0042] Figure 2 This is a schematic diagram of the RGB image exemplified in Example 1;

[0043] Figure 3 This is a schematic diagram of the preprocessed image exemplified in Example 1;

[0044] Figure 4 This is a schematic diagram illustrating the division of a preprocessed image into multiple sub-pixel regions as shown in Example 1;

[0045] Figure 5 This is a schematic diagram illustrating defect detection of a grayscale image based on a defect detection template, as shown in Example 1.

[0046] Figure 6 This is a block diagram of the liquid crystal panel defect detection system in Example 2;

[0047] Figure 7 This is a block diagram of the electronic device in Example 3. Detailed Implementation

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0049] Example 1:

[0050] This embodiment discloses a method for detecting defects in a liquid crystal panel, which can be executed, but is not limited to, by a computer device or virtual machine with certain computing resources, such as a personal computer, smartphone, personal digital assistant or wearable device, or by a virtual machine.

[0051] like Figure 1 As shown, a method for detecting defects in a liquid crystal panel may include, but is not limited to, the following steps:

[0052] S1. Acquire an RGB image of the sample LCD panel and preprocess the RGB image to obtain a preprocessed image. Specifically, in this embodiment, a high-resolution color camera is used to acquire the RGB image of the sample LCD panel. As an example, Figure 2 A schematic diagram of an RGB image arranged in a PenTile-like manner is given.

[0053] In step S1, the RGB image is preprocessed to obtain a preprocessed image, including:

[0054] S101. Perform histogram equalization on the RGB image to obtain the image after histogram equalization.

[0055] Specifically, in this embodiment, during the histogram equalization process of the RGB image, firstly, the cumulative distribution function is used to obtain the cumulative proportion corresponding to each grayscale value pixel in the original image; wherein, for grayscale values... k The cumulative proportion of each pixel is calculated using the following cumulative distribution function:

[0056] ;

[0057] In the formula, CDF ( k ) indicates that the grayscale value is k The cumulative proportion corresponding to the pixels, that is, the grayscale value. k The following are the cumulative percentages of all pixels in the total number of pixels. n iThis indicates that the grayscale value in the RGB image is i The number of pixels, N This represents the total number of pixels in the RGB image. L Indicates the maximum grayscale value. L =256.

[0058] Subsequently, based on the cumulative ratio corresponding to each grayscale value pixel, the mapped grayscale value of each grayscale value pixel is obtained; wherein, the mapped grayscale value of each grayscale value pixel is obtained by the following formula:

[0059] ;

[0060] In the formula, T ( k ) indicates that the grayscale value is k The mapped grayscale value of the pixel. round ( ) represents the rounding function, used to round numerical values.

[0061] Finally, based on the mapped gray values ​​of each pixel, grayscale conversion processing is performed on the pixels in the RGB image, that is, the gray values ​​of each pixel are converted into mapped gray values, thereby obtaining the image after histogram equalization processing.

[0062] It should be noted that by converting the grayscale values ​​of pixels in the RGB image into their corresponding mapped grayscale values, the originally unevenly distributed grayscale levels can be stretched or compressed to a more uniform grayscale range. This allows some pixels that were clustered in a specific grayscale range in the original image to be redistributed throughout the grayscale space, thereby enhancing the overall contrast of the image and achieving the technical effect of highlighting image details and improving visual effects.

[0063] S102. Perform Gaussian blur processing on the image after histogram equalization to obtain a preprocessed image. As an example, Figure 3 A schematic diagram of the preprocessed image of the example is given.

[0064] Specifically, in this embodiment, the image after histogram equalization is subjected to Gaussian blurring, and the resulting preprocessed image can be represented as follows:

[0065] ;

[0066] In the formula, I ( x , y () represents the image after histogram equalization. G ( x , y () represents the Gaussian kernel, used to suppress noise in the image after histogram equalization; wherein, the expression of the Gaussian kernel is as follows:

[0067] ;

[0068] In the formula, Let represent the standard deviation, which directly determines the noise suppression strength. Let the width of the smallest sub-pixel in the image after histogram equalization be . To remove noise while preserving image edge details, the standard deviation should not be too large or too small. In this embodiment, an empirical formula is used. The standard deviation is assigned a value, where k Take a value of 0.3 to 0.4.

[0069] It should be noted that in this embodiment, histogram equalization can enhance image contrast, and Gaussian blurring can further suppress noise in the image, thereby highlighting important information in the image and improving image quality, which is beneficial to improving the accuracy of subsequent defect detection.

[0070] S2. Divide the preprocessed image into multiple sub-pixel regions and obtain the template parameters for each sub-pixel region. As an example, Figure 4 This diagram illustrates how a preprocessed image is divided into multiple sub-pixel regions, with the colored boxes representing these regions.

[0071] In step S2, the template parameters include size information, position information, channel type identifier, and color threshold; correspondingly, the preprocessed image is divided into multiple sub-pixel regions, and the template parameters for each sub-pixel region are obtained, including:

[0072] S201. Separate the preprocessed image into single-channel grayscale images; wherein the single-channel grayscale images are divided into R-channel, G-channel, and B-channel grayscale images. In this embodiment, the R-channel, G-channel, and B-channel can also be referred to as the red channel, green channel, and blue channel, respectively.

[0073] S202. Perform adaptive binarization processing on the single-channel grayscale image to obtain a binarized image.

[0074] In step S202, the single-channel grayscale image is subjected to adaptive binarization processing to obtain a binarized image, including:

[0075] S2021. The segmentation threshold of the single-channel grayscale image is calculated using the Otsu method.

[0076] Specifically, in step S2021, the step of calculating the segmentation threshold of the single-channel grayscale image using the Otsu method is as follows:

[0077] First, the pixel values ​​in the single-channel grayscale image are statistically analyzed. i Corresponding number of pixels ni The total number of pixels in the single-channel grayscale image is expressed as: ( L Indicates the maximum grayscale value. L If =256), then the ratio of pixels at each gray level to the total number of pixels can be calculated (also known as the gray level probability): ;

[0078] Then, set the candidate values ​​for the segmentation threshold. And based on the segmentation threshold candidate value k Calculate the cumulant, foreground probability, foreground mean, and between-class variance; where the cumulant includes the cumulant probability. Cumulative mean and global mean The foreground probability is: The mean of the foreground is: The variance between classes is: .

[0079] Iterate through all possible candidate segmentation threshold values. k and will meet the conditions Candidate values ​​for segmentation threshold k Set as the optimal threshold That is, the segmentation threshold of the single-channel grayscale image.

[0080] S2022. The single-channel grayscale image is binarized according to the segmentation threshold to obtain a binarized image.

[0081] Specifically, the single-channel grayscale image is binarized according to the segmentation threshold, that is, the separated single-channel grayscale images are binarized. Each pixel is assigned a corresponding segmentation threshold, and pixels with values ​​greater than or equal to the threshold are set to 255; otherwise, they are set to 0. This process ultimately generates binarized images corresponding to each single-channel grayscale image. This is used for subsequent connected component analysis.

[0082] S203. Perform connected component analysis on the binarized image, set the obtained connected components as sub-pixel regions, and extract the size information, position information and channel type identifier of each sub-pixel region.

[0083] Specifically, in step S203, the connected component analysis process for the binarized image is as follows:

[0084] The connected regions in the binarized image are marked using a seed fill algorithm, where each connected region represents a sub-pixel region; for any sub-pixel region corresponding to a connected region in the binarized image, its size and position information are obtained through the following steps:

[0085] Extract the contour point set of any connected region {( x 1, y 1),( x 2, y 2),...,( x n , y n )}, and calculate the width and height of the minimum bounding rectangle of any connected region, where the width is W =max( x i )-min( x i ), height is H =max( y i )-min( y i ), max( x i ), min( x i ) are the x-coordinates of the contour points with the largest and smallest x-coordinates in the contour point set, respectively. max( y i ), min( y i ) are the ordinate values ​​of the contour points with the largest and smallest ordinates in the contour point set, i∈{1,2,..., n}, n Let A be the total number of contour points of any connected region; calculate the area of ​​any connected region based on the width and height of its minimum bounding rectangle: A = W × H And use this area as the size information of the sub-pixel region corresponding to any connected region;

[0086] Calculate the centroid of any of the connected regions. x c , y c The centroid is used as the position information of the corresponding sub-pixel region of any connected region; wherein the horizontal and vertical coordinates of the centroid are respectively: .

[0087] Furthermore, in this embodiment, the channel type identifier of each sub-pixel region is determined by the channel type (R channel, G channel, or B channel) of its corresponding single-channel grayscale image.

[0088] S204. Perform HSV (Hue Saturation Value, a color space created based on the intuitive characteristics of color) histogram analysis on the RGB image regions corresponding to each sub-pixel region to obtain the color threshold of each sub-pixel region. It should be understood that the RGB image region corresponding to any sub-pixel region is also the image connected region in the RGB image corresponding to that sub-pixel region.

[0089] Specifically, in this embodiment, the pixels in the RGB image region corresponding to each sub-pixel region are transformed by HSV, and an H-channel histogram is drawn. The upper and lower p-quantiles of the H-channel histogram in HSV space are recorded, and the upper and lower color thresholds of the corresponding sub-pixel regions are obtained based on the upper and lower p-quantiles, which are used to determine the color of the sub-pixel regions.

[0090] For any sub-pixel region, the upper limit color threshold in its color threshold is as follows:

[0091] ;

[0092] In the formula, This indicates the preset balance ratio between real-time color characteristics and historical statistics; This represents the upper p-quantile of the H-channel histogram; This represents the preset saturation tolerance factor, also known as the tolerance coefficient for saturation noise. This represents a pre-defined statistical confidence factor, used to characterize the confidence level of the historical fluctuation range; This represents the standard deviation calculated based on the RGB image region corresponding to the sub-pixel region, used to suppress noise; The historical statistical mean can be calculated using the exponentially weighted moving average method. It represents the historical statistical standard deviation, used to characterize the degree of grayscale fluctuation in long-term monitoring.

[0093] Among them, obtaining the historical statistical mean and historical statistical standard deviation The steps are as follows:

[0094] Store the grayscale mean sequence of each historical sub-pixel region, denoted as { μ 1, μ 2,…, μ J},in JThe number of historical sub-pixel regions, i.e., the total number of historical samples, is used to obtain the acquisition time series of each historical sub-pixel region, denoted as { t 1, t 2,…, t J}

[0095] The historical statistical mean is calculated using the following formula. and historical statistical standard deviation :

[0096] , .

[0097] In the formula, Indicates the first j The weights of each historical sub-pixel region , t j and t J They represent the first j and J The acquisition time of each historical sub-pixel region τ This represents the preset time constant, used to control the rate of weight decay.

[0098] The lower limit color threshold in color thresholding is as follows:

[0099] ;

[0100] In the formula, This represents the lower p-quantile of the H-channel histogram.

[0101] In this embodiment, the color threshold is constructed based on HSV histogram statistics and historical detection data, which helps to enhance the robustness of subsequent defect judgment.

[0102] S3. Construct a defect detection template based on the template parameters of each sub-pixel region. It should be noted that the defect detection template is a standardized template data structure used to guide the defect detection process of the LCD panel. It serves as a reference for subsequent image detection, enabling rapid location, matching, and defect identification of panels of the same type. It should be understood that the defect detection template can be reused for defect identification of subsequent LCD panels of the same model, significantly improving detection efficiency and consistency.

[0103] In step S3, after constructing the defect detection template based on the template parameters of each sub-pixel region, the method further includes:

[0104] The defect detection template is stored in a structure format. Specifically, in this embodiment, the defect detection template is exported as a standardized Recipe file for use in subsequent detection steps.

[0105] S4. Acquire a grayscale image of the liquid crystal panel to be tested, and perform defect detection on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel to be tested. As an example, Figure 5 A schematic diagram of defect detection in grayscale images based on a defect detection template is given.

[0106] In step S4, defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test, including:

[0107] S401. Based on the size information, position information and channel type identifier of each sub-pixel region in the defect detection template, perform region recognition processing on the grayscale image to obtain the test region in the grayscale image that matches each sub-pixel region.

[0108] S402. Obtain the average gray value of each test area in the grayscale image.

[0109] S403. Based on the average grayscale value of each test area in the grayscale image and the color threshold of the sub-pixel area corresponding to each test area, the defect detection result of the liquid crystal panel under test is obtained.

[0110] In this embodiment, the defect detection result includes the sub-defect detection result of each test area in the grayscale image; wherein, when the average grayscale value of any test area in the grayscale image is within the range of the color threshold of its corresponding sub-pixel area, the sub-defect detection result of any test area is qualified; otherwise, the sub-defect detection result of any test area is unqualified.

[0111] Specifically, in this embodiment, the sub-defect detection result of any region to be tested in the grayscale image is:

[0112] ;

[0113] In the formula, This represents the average gray value of any of the regions to be measured. This represents the upper limit of the color threshold in the color threshold of the sub-pixel region corresponding to any of the tested regions, i.e., the maximum allowed grayscale value boundary. This represents the lower limit of the color threshold in the color threshold of the sub-pixel region corresponding to any of the test regions, which is also the minimum allowed grayscale value boundary.

[0114] It should be understood that when the sub-defect detection result of any test area is... Defect flag When the value is 1, it indicates that any of the tested areas is unqualified; when the value is 0, it indicates that any of the tested areas is qualified.

[0115] As an example, the average gray value of any region to be tested in the grayscale image. The upper color threshold of the color threshold in the corresponding sub-pixel region is:

[0116] ;

[0117] The lower limit color threshold of the color threshold in the corresponding sub-pixel region is:

[0118] ;

[0119] If the sub-defect detection result of any test area is 0, it indicates that the test area is qualified.

[0120] Furthermore, in this embodiment, the defect detection template is periodically tiled in the grayscale image according to the periodicity information of the arrangement of each sub-pixel region, so as to achieve efficient batch defect detection at the sub-pixel level across the entire screen area.

[0121] This embodiment improves the speed and accuracy of LCD panel defect detection, resulting in higher detection efficiency. Specifically, in the implementation process, firstly, an RGB image of a sample LCD panel is acquired and preprocessed to obtain a preprocessed image; then, the preprocessed image is divided into multiple sub-pixel regions, and template parameters for each sub-pixel region are acquired. A defect detection template is then constructed based on the template parameters of each sub-pixel region. When defect detection is required on the LCD panel under test, a grayscale image of the LCD panel under test is acquired, and defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the LCD panel under test. Based on this, this embodiment introduces a defect detection template based on RGB sub-pixel structure and achieves efficient and independent defect detection of each sub-pixel in a grayscale image under grayscale image conditions by matching the grayscale image with the template. This reduces the consumption of computing resources and avoids the high computing cost of full-color detection, thereby significantly improving the detection speed. At the same time, it can enhance the sub-pixel region-level defect recognition capability, thereby improving the detection efficiency. It solves the problems of high computing resource consumption, low detection efficiency and inaccurate sub-pixel defect classification in traditional methods when processing color images, and has good industrial application value.

[0122] Example 2:

[0123] This embodiment discloses a liquid crystal panel defect detection system for implementing the liquid crystal panel defect detection method in Embodiment 1; such as Figure 6 As shown, the liquid crystal panel defect detection system includes:

[0124] The template image processing module is used to acquire the RGB image of the template LCD panel and preprocess the RGB image to obtain the preprocessed image.

[0125] The template parameter acquisition module is communicatively connected to the template image processing module and is used to divide the preprocessed image into multiple sub-pixel regions and acquire the template parameters of each sub-pixel region.

[0126] The template construction module is communicatively connected to the template parameter acquisition module and is used to construct a defect detection template based on the template parameters of each sub-pixel region.

[0127] The defect detection module is communicatively connected to the template construction module. It is used to acquire a grayscale image of the liquid crystal panel under test, and to perform defect detection on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test.

[0128] It should be noted that the working process, working details and technical effects of the liquid crystal panel defect detection system provided in this embodiment 2 can be found in embodiment 1, and will not be repeated here.

[0129] Example 3:

[0130] Based on Embodiment 1 or 2, this embodiment discloses an electronic device, which may be a smartphone, tablet computer, laptop computer, or desktop computer, etc. The electronic device may be referred to as a user terminal, portable terminal, desktop terminal, etc. Figure 7 As shown, the electronic device includes:

[0131] Memory, used to store computer program instructions; and,

[0132] A processor is used to execute the computer program instructions to perform the operation of a liquid crystal panel defect detection method as described in any of Embodiment 1.

[0133] Specifically, processor 301 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 301 may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). Processor 301 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen.

[0134] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 302 are used to store at least one instruction, which is executed by the processor 301 to implement the liquid crystal panel defect detection method provided in Embodiment 1 of this application.

[0135] In some embodiments, the terminal may also optionally include a communication interface 303 and at least one peripheral device. The processor 301, memory 302, and communication interface 303 can be connected via a bus or signal line. Each peripheral device can be connected to the communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 304, a display screen 305, and a power supply 306.

[0136] The communication interface 303 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0137] The radio frequency (RF) circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 304 communicates with communication networks and other communication devices via electromagnetic signals.

[0138] Display screen 305 is used to display the UI (User Interface). The UI may include any combination of graphics, text, icons, and video.

[0139] Power supply 306 is used to supply power to various components in electronic devices.

[0140] Example 4:

[0141] Based on any one of Embodiments 1 to 3, this embodiment discloses a computer program product, including a computer program or instructions, which, when executed by a computer, implements a liquid crystal panel defect detection method as described in any one of Embodiments 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0142] Obviously, those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting defects in a liquid crystal panel, characterized in that, include: Obtain the RGB image of the sample LCD panel and preprocess the RGB image to obtain the preprocessed image; The preprocessed image is divided into multiple sub-pixel regions, and the template parameters of each sub-pixel region are obtained; Construct a defect detection template based on the template parameters of each sub-pixel region; A grayscale image of the liquid crystal panel to be tested is acquired, and defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel to be tested. The template parameters include size information, position information, channel type identifier, and color threshold; correspondingly, the preprocessed image is divided into multiple sub-pixel regions, and the template parameters for each sub-pixel region are obtained, including: The preprocessed image is separated into single-channel grayscale images; wherein, the single-channel grayscale images are divided into R-channel, G-channel, and B-channel grayscale images; The single-channel grayscale image is subjected to adaptive binarization processing to obtain a binarized image; The binarized image is subjected to connected component analysis, the obtained connected components are set as sub-pixel regions, and the size information, position information and channel type identifier of each sub-pixel region are extracted. HSV spatial histogram analysis is performed on the RGB image regions corresponding to each sub-pixel region to obtain the color threshold of each sub-pixel region.

2. The method for detecting defects in a liquid crystal panel according to claim 1, characterized in that, The RGB image is preprocessed to obtain a preprocessed image, including: Perform histogram equalization on the RGB image to obtain the histogram equalized image; The image after histogram equalization is subjected to Gaussian blurring to obtain the preprocessed image.

3. The method for detecting defects in a liquid crystal panel according to claim 1, characterized in that, The single-channel grayscale image is subjected to adaptive binarization processing to obtain a binarized image, including: The Otsu method was used to calculate the segmentation threshold of the single-channel grayscale image; The single-channel grayscale image is binarized according to the segmentation threshold to obtain a binarized image.

4. The method for detecting defects in a liquid crystal panel according to claim 1, characterized in that, After constructing the defect detection template based on the template parameters of each sub-pixel region, the method further includes: The defect detection template is stored in a structure format.

5. The method for detecting defects in a liquid crystal panel according to claim 1, characterized in that, The template parameters include size information, position information, channel type identifier, and color threshold; correspondingly, defect detection is performed on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test, including: Based on the size information, position information and channel type identifier of each sub-pixel region in the defect detection template, the grayscale image is processed for region recognition to obtain the test region in the grayscale image that matches each sub-pixel region; Obtain the average gray value of each test area in the grayscale image; The defect detection result of the liquid crystal panel under test is obtained based on the average gray value of each test area in the grayscale image and the color threshold of the sub-pixel area corresponding to each test area.

6. The method for detecting defects in a liquid crystal panel according to claim 5, characterized in that, The defect detection results include the sub-defect detection results of each test area in the grayscale image; wherein, when the average grayscale value of any test area in the grayscale image is within the range of the color threshold of its corresponding sub-pixel area, the sub-defect detection result of any test area is qualified; otherwise, the sub-defect detection result of any test area is unqualified.

7. A liquid crystal panel defect detection system, characterized in that, include: The template image processing module is used to acquire the RGB image of the template LCD panel and preprocess the RGB image to obtain the preprocessed image. The template parameter acquisition module is communicatively connected to the template image processing module and is used to divide the preprocessed image into multiple sub-pixel regions and acquire the template parameters of each sub-pixel region. The template construction module is communicatively connected to the template parameter acquisition module and is used to construct a defect detection template based on the template parameters of each sub-pixel region. The defect detection module is communicatively connected to the template construction module and is used to acquire a grayscale image of the liquid crystal panel under test, and perform defect detection on the grayscale image based on the defect detection template to obtain the defect detection result of the liquid crystal panel under test. The template parameters include size information, position information, channel type identifier, and color threshold; correspondingly, the preprocessed image is divided into multiple sub-pixel regions, and the template parameters for each sub-pixel region are obtained, including: The preprocessed image is separated into single-channel grayscale images; wherein, the single-channel grayscale images are divided into R-channel, G-channel, and B-channel grayscale images; The single-channel grayscale image is subjected to adaptive binarization processing to obtain a binarized image; The binarized image is subjected to connected component analysis, the obtained connected components are set as sub-pixel regions, and the size information, position information and channel type identifier of each sub-pixel region are extracted. HSV spatial histogram analysis is performed on the RGB image regions corresponding to each sub-pixel region to obtain the color threshold of each sub-pixel region.

8. An electronic device, characterized in that, include: Memory is used to store computer program instructions; as well as, A processor is configured to execute the computer program instructions to perform the operation of a liquid crystal panel defect detection method as described in any one of claims 1 to 6.

9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or the instructions are executed by the computer, they implement a liquid crystal panel defect detection method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Product defect detection method, device and equipment and readable storage medium

    CN114937037A