A method and apparatus for detecting and classifying defects in glass substrates for liquid crystal displays
By using machine vision and deep learning models to automatically detect defects in LCD glass substrates, the problem of low detection efficiency and high subjectivity in existing technologies has been solved, achieving efficient and accurate defect identification and classification.
Patent Information
- Application Number
- CN202310924744.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-07-26
AI Technical Summary
Existing methods for inspecting LCD glass substrates are time-consuming, labor-intensive, inefficient, highly subjective, and greatly affected by personnel's emotions, eyesight, and lighting conditions, with inconsistent judgment standards.
Using machine vision technology, defect identification is performed through image processing and deep learning models, including target area identification, data augmentation, threshold calculation and defect classification, automatically identifying defects such as scratches, dents, bumps, leaks, and cracks.
It improves the efficiency and accuracy of defect detection, reduces misjudgments and time costs associated with manual identification, and achieves high-precision defect classification.
Smart Images

Figure CN117197527B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and particularly relates to a defect detection and classification method and device for a glass substrate of a liquid crystal display screen. BACKGROUND
[0002] With the development of society and the improvement of people's living standards, the demand for liquid crystal display screens and the quality requirements are also increasing. The existing liquid crystal display screen is mainly composed of a fluorescent tube, a light guide plate, a polarizing plate, a filter plate, a glass substrate, an alignment film, liquid crystal material, a thin mode transistor, etc. In the production process of the liquid crystal display screen, two glass substrates are bonded to each other to form a mother plate of a liquid crystal panel. The mother plate of the liquid crystal panel is arranged and cut into a plurality of independent liquid crystal panels.
[0003] Since the glass substrate is an important component in the production of the liquid crystal display screen, the glass substrate needs to be detected in the production process of the liquid crystal display screen. The existing technology detects the surface of the glass substrate manually, and the detected defects include scratches (with feeling & without feeling), concave points, convex points, liquid leakage, breakage & cracks, dirt & stains & foreign matter, and uneven etching, so as to screen out unqualified glass substrates.
[0004] The existing technology at least has the following problems:
[0005] 1. The existing manual operation detection method is time-consuming and labor-intensive, has low efficiency, is complicated, and is highly subjective, and is affected by personnel emotions, vision, environmental light, and different eye judgment standards. SUMMARY
[0006] The application provides a defect detection and classification method and device for a glass substrate of a liquid crystal display screen, and aims to solve the technical problems of time-consuming and labor-intensive, low efficiency, complicated process, high subjectivity, and being affected by personnel emotions, vision, environmental light, and different eye judgment standards in the prior art.
[0007] The technical solution of the application to solve the above technical problems is as follows: a defect detection and classification method for a glass substrate of a liquid crystal display screen, comprising:
[0008] S1: acquiring a to-be-detected image, performing target region recognition processing on the to-be-detected image to obtain a detection region of the to-be-detected image;
[0009] S2: dividing the detection region to obtain a plurality of single screen display areas;
[0010] S3: performing data enhancement on optical collection images of the plurality of single screen display areas respectively to obtain a plurality of data enhancement images, performing threshold calculation on the plurality of data enhancement images respectively to obtain a plurality of defect binary images;
[0011] S4: training a defect classification model, inputting the plurality of defect binary images into the trained defect classification model, performing defect recognition and classification on the defect binary images by using the trained defect classification model, and obtaining defect classification results of the plurality of defect binary images respectively.
[0012] The present application has the advantages that the present application uses a machine to recognize defects of a glass substrate, replaces a traditional manual recognition mode, and improves the efficiency and accuracy of defect detection.
[0013] Based on the above technical solution, the present application can be further improved as follows.
[0014] Further, the above S1 is specifically: obtaining a to-be-detected image, performing edge detection of the glass substrate on the to-be-detected image, and obtaining an ROI region; wherein the ROI region is the detection region.
[0015] The above further scheme has the advantages that the ROI region can be automatically obtained by edge detection, and generally, the method does not need to set parameters, and if the ROI region is inaccurate due to special circumstances, the problem can be solved by increasing the threshold parameters (Extract->Threshold2, ThresholdMax2).
[0016] Further, the above S2 is specifically: obtaining corner point coordinates of the ROI region, and dividing the detection region into a plurality of feature regions according to the corner point coordinates.
[0017] Each of the feature regions includes a single screen edge region, a to-be-detected image edge region, and a single screen display region, and the single screen display region is surrounded by the single screen edge region and the to-be-detected image edge region.
[0018] The above further scheme has the advantages that since the entire glass substrate is cut into a plurality of independent liquid crystal panels, the single screen display region is obtained, which is convenient for subsequent detection of the single screen display region.
[0019] Further, the above S3 is specifically:
[0020] S3.1: obtaining an optical acquisition image of the single screen display region in the feature region;
[0021] S3.2: performing contrast enhancement on the optical acquisition image to obtain a data enhancement image;
[0022] S3.3: Based on the adaptive threshold method, the pixel points in the data enhancement graph are divided into target pixel points and background pixel points according to the segmentation threshold in the adaptive threshold method, and the proportions of the target pixel points and the background pixel points in the data enhancement graph are calculated; wherein the formula for calculating the proportions of the target pixel points and the background pixel points in the data enhancement graph is as follows:
[0023]
[0024] Wherein, ω1 represents the proportion of the target pixel points in the data enhancement graph, ω2 represents the proportion of the background pixel points in the data enhancement graph, and ω1+ω2=1; MxN represents the size of the data enhancement graph, and MxN=N1+N2, specifically, N1 represents the number of pixels with a pixel gray scale greater than the segmentation threshold in the data enhancement graph; N2 represents the number of pixels with a pixel gray scale less than the segmentation threshold in the data enhancement graph;
[0025] S3.4: According to the proportions of the target pixel points and the background pixel points in the data enhancement graph, the total average gray scale of the data enhancement graph is calculated; wherein the formula for calculating the total average gray scale of the data enhancement graph is as follows:
[0026] μ=μ1×ω1+μ2×ω2
[0027] Wherein, μ represents the total average gray scale of the data enhancement graph; μ1 represents the average gray scale of the target pixel points; μ2 represents the average gray scale of the background pixel points;
[0028] S3.5: According to the total average gray scale of the data enhancement graph, the inter-class variance is calculated, and the maximum value of the inter-class variance is taken as the local binary threshold of the pixel points; wherein the formula for calculating the inter-class variance is as follows:
[0029] g=ω1×(μ-μ1) 2 +ω2×(μ-μ2) 2 ;
[0030] Wherein, g is the inter-class variance;
[0031] S3.6: The data enhancement graph is processed by the local binary threshold to obtain a defect binary graph.
[0032] The beneficial effects of the above further scheme are: the local binary threshold of the pixel points is obtained by the adaptive threshold method, and different binary thresholds can be adaptively calculated for different regions of the image, so that the binary threshold of each pixel in the image changes with the change of the surrounding neighborhood pixels.
[0033] Further, the contrast enhancement of the optical acquisition graph in S3.2 is specifically as follows:
[0034] S3.2.1: Statistics of the proportion of each gray value corresponding to the pixel point in the entire optical acquisition graph in all pixel points in the optical acquisition graph;
[0035] S3.2.2: Optionally, a pixel point of the optical acquisition graph is selected, the gray value of the selected pixel point is obtained, and the gray value of the selected pixel point is taken as the current gray value;
[0036] S3.2.3: Add the proportion of all pixel points with a gray value less than the current gray value in the optical acquisition graph in the entire optical acquisition graph to obtain a proportion addition result, and take the proportion addition result as the gain coefficient of the selected pixel point;
[0037] S3.2.4: Adjust the contrast of the selected pixel point in the optical acquisition graph through the gain coefficient of the selected pixel point to realize the contrast enhancement of the selected pixel point;
[0038] S3.2.5: Traverse all pixel points in the optical acquisition graph, and adjust the contrast of all pixel points in the optical acquisition graph by the method of S3.2.2-S3.2.4 to realize the contrast enhancement of the optical acquisition graph.
[0039] The beneficial effects of the above further scheme are: adjusting the optical acquisition graph through the gain coefficient, increasing the contrast of the optical acquisition graph, so that the image after enhancement is brighter and darker.
[0040] Further, the defect classification model includes an input layer, a convolution layer, a down-sampling pooling layer, a full connection layer and an output layer; the defect binary graph is input into the trained defect classification model, and the trained defect classification model is used for defect recognition and classification of the defect binary graph, which is specifically:
[0041] S4.1: Input the defect binary graph into the input layer;
[0042] S4.2: The defect binary graph is transmitted to the convolution layer through the input layer, and the convolution layer is used for feature extraction of the defect binary graph to obtain a defect feature map;
[0043] S4.3: The defect feature map is input into the down-sampling pooling layer, and the down-sampling pooling layer is used for down-sampling processing of the defect feature map to obtain a down-sampling map;
[0044] S4.4: The down-sampling map is input into the full connection layer, and the full connection layer is used for dimension reduction processing of the down-sampling map to obtain a dimension reduction map;
[0045] S4.5: Input the dimensionality reduction graph into the output layer, use the output layer to judge the classification confidence of the dimensionality reduction graph, output the classification confidence of the dimensionality reduction graph, and take the category with the higher confidence among the classification confidence as the defect classification result.
[0046] The beneficial effects of adopting the above-mentioned further scheme are: by classifying defects in the binary image of defects using the above-mentioned defect classification model, the defect classification results can be obtained quickly and accurately, avoiding the misjudgment and high time cost of manual identification.
[0047] Furthermore, in the above S4, the defect types include: scratches, leakage, uneven etching, pits, bumps, dirt, cracks, and fissures.
[0048] The beneficial effect of adopting the above-mentioned further scheme is that it enables the model to be trained for multiple defect types and multiple interferences, so that the trained defect classification model can achieve high-precision identification and classification.
[0049] Secondly, in order to solve the above-mentioned technical problems, the present invention also provides a defect detection and classification device for a glass substrate of a liquid crystal display screen, comprising:
[0050] The detection region acquisition module is used to acquire the image to be detected, perform target region recognition processing on the image to be detected, and obtain the detection region of the image to be detected.
[0051] Division module: used to divide the detection area into multiple individual screen display areas;
[0052] Data augmentation module: used to augment the optical acquisition images of multiple individual screen display areas to obtain multiple data augmented images, and to perform threshold calculations on the multiple data augmented images to obtain multiple defect binary images;
[0053] Defect classification module: used to train a defect classification model. Multiple defect binary images are input into the trained defect classification model, and the trained defect classification model is used to identify and classify defects in the defect binary images to obtain the defect classification results of multiple defect binary images.
[0054] Thirdly, in order to solve the above-mentioned technical problems, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the defect detection and classification method for the glass substrate of the liquid crystal display screen of the present application.
[0055] Fourthly, in order to solve the above-mentioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the defect detection and classification method for the glass substrate of the liquid crystal display screen of the present application.
[0056] Additional aspects and advantages of this application will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating a defect detection and classification method for a glass substrate of a liquid crystal display screen, provided in one embodiment of the present invention.
[0058] Figure 2 A schematic diagram of a defect detection and classification device for a glass substrate of a liquid crystal display screen provided in one embodiment of the present invention;
[0059] Figure 3 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention;
[0060] Figure 4 A schematic diagram illustrating the various stages of processing a single screen display area according to an embodiment of the present invention;
[0061] Figure 5 This is a schematic diagram of various defect types provided for one embodiment of the present invention. Detailed Implementation
[0062] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0063] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0064] The solutions provided in these embodiments of the invention are applicable to any application scenario requiring data storage. These solutions can be executed by any electronic device, such as a user's terminal device, including at least one of the following: smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, smart TV, or smart in-vehicle device.
[0065] This invention provides a possible implementation, such as... Figure 1 The diagram illustrates a flowchart of a defect detection and classification method for a glass substrate of a liquid crystal display screen. This method can be executed by any electronic device, such as a terminal device, or jointly executed by a terminal device and a server. For ease of description, the method provided in this embodiment will be described below using a server as the execution entity as an example.Figure 1 The method can include the following steps according to the flowchart shown in the figure:
[0066] S1: Obtain an image to be detected, and perform target region identification processing on the image to be detected to obtain a detection region of the image to be detected;
[0067] S2: Divide the detection region to obtain a plurality of single-screen display areas;
[0068] S3: Perform data enhancement on optical acquisition images of the plurality of single-screen display areas respectively to obtain a plurality of data enhancement images, and perform threshold calculation on the plurality of data enhancement images respectively to obtain a plurality of defect binary images;
[0069] As shown in the figure, Figure 4 As shown in the figure, Figure 4 The left side of the figure is an optical acquisition image of a single-screen display area, the middle is a data enhancement image, and the right side is a defect binary image.
[0070] S4: Train a defect classification model, input the plurality of defect binary images into the trained defect classification model, and use the trained defect classification model to perform defect identification and classification on the defect binary images to obtain a plurality of defect classification results of the plurality of defect binary images respectively.
[0071] In the present application, the glass substrate is identified by a machine instead of a traditional manual identification method, thereby improving the efficiency and accuracy of defect detection.
[0072] Optionally, S1 specifically comprises: obtaining an image to be detected, performing edge detection of the glass substrate on the image to be detected to obtain an ROI region; wherein the ROI region is the detection region.
[0073] In this way, the ROI region can be automatically obtained by edge detection, and in general, this method does not need to set parameters, and if the ROI region is inaccurate due to special circumstances, the problem can be solved by increasing the threshold parameters (Extract->Threshold2, ThresholdMax2).
[0074] Optionally, S2 specifically comprises: obtaining corner point coordinates of the ROI region, and dividing the detection region into a plurality of feature regions according to the corner point coordinates.
[0075] Each of the feature regions includes a single-screen edge area, an image edge area to be detected, and a single-screen display area, and the single-screen display area is surrounded by the single-screen edge area and the image edge area to be detected.
[0076] Wherein, since the whole glass substrate will be cut into a plurality of independent liquid crystal panels, a single screen display area is obtained, which is convenient for subsequent detection of the single screen display area.
[0077] Optionally, S3 is specifically:
[0078] S3.1: obtaining an optical acquisition image of a single screen display area in the feature area;
[0079] S3.2: contrast enhancement is performed on the optical acquisition image to obtain a data enhancement image;
[0080] S3.3: based on an adaptive threshold method, pixel points in the data enhancement image are divided into target pixel points and background pixel points according to a segmentation threshold in the adaptive threshold method, and the proportions of the target pixel points and the background pixel points in the data enhancement image are calculated; wherein the formula for calculating the proportions of the target pixel points and the background pixel points in the data enhancement image is as follows:
[0081]
[0082] Wherein, ω1 represents the proportion of the target pixel points in the data enhancement image, ω2 represents the proportion of the background pixel points in the data enhancement image, and ω1+ω2=1; M×N represents the size of the data enhancement image, and M×N=N1+N2; Specifically, N1 represents the number of pixels with a pixel gray value greater than the segmentation threshold in the data enhancement image; N2 represents the number of pixels with a pixel gray value less than the segmentation threshold in the data enhancement image;
[0083] S3.4: according to the proportions of the target pixel points and the background pixel points in the data enhancement image, the total average gray value of the data enhancement image is calculated; wherein the formula for calculating the total average gray value of the data enhancement image is as follows:
[0084] μ=μ1×ω1+μ2×ω2
[0085] Wherein, μ represents the total average gray value of the data enhancement image; μ1 represents the average gray value of the target pixel points; μ2 represents the average gray value of the background pixel points;
[0086] S3.5: according to the total average gray value of the data enhancement image, the inter-class variance is calculated, the maximum value of the inter-class variance is traversed, and the maximum value of the inter-class variance is taken as the local binary threshold of the pixel points; wherein the formula for calculating the inter-class variance is as follows:
[0087] g=ω1×(μ-μ1) 2 +ω2×(μ-μ2) 2 ;
[0088] Substitute the formula of the total average gray value of the data enhancement image into the formula to obtain a new formula of the inter-class variance, as shown in the following formula:
[0089] g = ω1 x ω2 x (μ1 - μ2) 2
[0090] wherein g is the inter-class variance;
[0091] S3.6: processing the data enhanced graph through the local binarization threshold to obtain a defect binary graph.
[0092] wherein the local binarization threshold of the pixel point is obtained by the adaptive threshold method, and different binarization thresholds can be adaptively calculated for different regions of the image, so that the binarization threshold of each pixel in the image changes with the change of the surrounding neighborhood pixels.
[0093] Optionally, the contrast enhancement of the optical acquisition graph in S3.2 is specifically:
[0094] S3.2.1: counting the proportion of the pixel points corresponding to each gray value in the entire optical acquisition graph;
[0095] S3.2.2: optionally selecting a pixel point of the optical acquisition graph, obtaining the gray value of the selected pixel point, and taking the gray value of the selected pixel point as the current gray value;
[0096] S3.2.3: adding the proportions of all pixel points in the optical acquisition graph whose gray values are less than the current gray value in the entire optical acquisition graph to obtain a proportion addition result, and taking the proportion addition result as the gain coefficient of the selected pixel point;
[0097] S3.2.4: adjusting the contrast of the selected pixel point in the optical acquisition graph through the gain coefficient of the selected pixel point to realize the contrast enhancement of the selected pixel point;
[0098] S3.2.5: traversing all pixel points in the optical acquisition graph, and adjusting the contrast of all pixel points in the optical acquisition graph by the method of S3.2.2-S3.2.4 to realize the contrast enhancement of the optical acquisition graph.
[0099] wherein the optical acquisition graph is adjusted by the gain coefficient to increase the contrast of the optical acquisition graph, so that the image after enhancement is brighter and darker.
[0100] Optionally, the defect classification model comprises an input layer, a convolution layer, a down-sampling pooling layer, a full connection layer and an output layer; the defect binary graph is input into the trained defect classification model, and the trained defect classification model is used to classify the defect binary graph. The defect recognition classification is specifically:
[0101] S4.1: inputting the defect binary graph into the input layer;
[0102] S4.2: transmitting the defect binary graph to a convolution layer through an input layer, performing feature extraction on the defect binary graph by using the convolution layer to obtain a defect feature graph;
[0103] S4.3: inputting the defect feature graph into a down-sampling pooling layer, performing down-sampling processing on the defect feature graph by using the down-sampling pooling layer to obtain a down-sampling graph;
[0104] S4.4: inputting the down-sampling graph into a full connection layer, performing dimension reduction processing on the down-sampling graph by using the full connection layer to obtain a dimension reduction graph;
[0105] S4.5: inputting the dimension reduction graph into an output layer, performing classification confidence judgment on the dimension reduction graph by using the output layer, outputting the classification confidence of the dimension reduction graph, and taking the class with high confidence in the classification confidence as the defect classification result.
[0106] Wherein, through the above defect classification model, the defect classification result can be quickly obtained, and the misjudgment and high time cost of manual recognition are avoided.
[0107] Optionally, in S4, the defect types include scratches, liquid leakage, etching unevenness, concave points, convex points, dirt, breakage and cracks.
[0108] As shown in Figure 5 , the defect types of the defect graph from left to right are scratch defect, liquid leakage defect, etching unevenness defect, concave point defect, convex point defect, dirt defect, breakage defect and crack defect.
[0109] Wherein, the model is trained for multiple defect types and multiple interference, so that the trained defect classification model achieves high-precision recognition and classification.
[0110] Wherein, the glass substrate is recognized by the machine, instead of the traditional manual recognition method, improving the efficiency and accuracy of defect detection.
[0111] Based on the same principle as shown in Figure 1 , the embodiment of the present application also provides a defect detection and classification device for a glass substrate of a liquid crystal display screen, as shown in Figure 2 , the defect detection and classification device for a glass substrate of a liquid crystal display screen can include:
[0112] In a second aspect, in order to solve the above technical problems, the present application also provides a defect detection and classification device for a glass substrate of a liquid crystal display screen, which includes:
[0113] An acquisition detection area module is configured to acquire a to-be-detected image, perform target area recognition processing on the to-be-detected image, and obtain a detection area of the to-be-detected image.
[0114] The dividing module is configured to divide the detection area to obtain a plurality of single screen display areas.
[0115] The data enhancement module is configured to perform data enhancement on the optical acquisition images of the plurality of single screen display areas respectively to obtain a plurality of data enhancement images, and perform threshold calculation on the plurality of data enhancement images respectively to obtain a plurality of defect binary images.
[0116] The defect classification module is configured to train a defect classification model, input the plurality of defect binary images into the trained defect classification model, and perform defect recognition and classification on the defect binary images by using the trained defect classification model to obtain defect classification results of the plurality of defect binary images respectively.
[0117] The liquid crystal display glass substrate defect detection and classification device provided in the embodiments of the present application can execute the liquid crystal display glass substrate defect detection and classification method provided in the embodiments of the present application, and the implementation principles are similar. The actions performed by each module and unit in the liquid crystal display glass substrate defect detection and classification device in each embodiment of the present application correspond to the steps in the liquid crystal display glass substrate defect detection and classification method in each embodiment of the present application. The detailed functions of each module of the liquid crystal display glass substrate defect detection and classification device can be specifically referred to the description of the corresponding liquid crystal display glass substrate defect detection and classification method in the foregoing, and will not be described here again.
[0118] The liquid crystal display glass substrate defect detection and classification device can be a computer program (including program code) running in a computer device, for example, the liquid crystal display glass substrate defect detection and classification device is an application software. The device can be used to execute the corresponding steps in the method provided in the embodiments of the present application.
[0119] In some embodiments, the glass substrate defect detection and classification apparatus for liquid crystal display provided by the embodiments of the present application can be implemented in a combination of software and hardware. For example, the glass substrate defect detection and classification apparatus for liquid crystal display provided by the embodiments of the present application can be a hardware decoding processor programmed to execute the glass substrate defect detection and classification method for liquid crystal display provided by the embodiments of the present application. For example, the hardware decoding processor can be one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic elements.
[0120] In some other embodiments, the glass substrate defect detection and classification apparatus for liquid crystal display provided by the embodiments of the present application can be implemented in software, Figure 2 The glass substrate defect detection and classification apparatus for liquid crystal display stored in the memory can be software in the form of programs and plug-ins, and includes a series of modules, including an acquisition detection area module, a division module, a data enhancement module, and a defect classification module, for implementing the method provided by the embodiments of the present application.
[0121] The modules described in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not limit the modules themselves.
[0122] Based on the same principles as the method shown in the embodiments of the present application, the embodiments of the present application also provide an electronic device, which can include but is not limited to a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any of the embodiments of the present application by calling the computer program.
[0123] In an optional embodiment, an electronic device is provided, as shown in Figure 3 The electronic device shown in Figure 3 The electronic device shown in the embodiments of the present application includes a processor and a memory. The processor and the memory are connected, such as through a bus. Optionally, the electronic device can also include a transceiver, which can be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver is not limited to one, and the structure of the electronic device does not limit the embodiments of the present application.
[0124] The processor can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. The processor 4001 can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0125] A bus can include a pathway for transmitting information between the aforementioned components. The bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0126] The memory may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these.
[0127] The memory is configured to store application code (computer program) for implementing the method of the present application, and the processor is configured to execute the application code stored in the memory to implement the method of the present application.
[0128] The electronic device can also be a terminal device, Figure 3 The electronic device shown is only an example and should not limit the function and use range of the embodiments of the present application.
[0129] The embodiments of the present application provide a computer readable storage medium, which stores a computer program. When the computer program is run on a computer, the computer can execute the corresponding content in the above-mentioned method embodiments.
[0130] According to another aspect of the present application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the method provided in the above-mentioned various embodiments.
[0131] Computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including object oriented programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0132] It should be understood that the flow diagrams and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of various embodiments of the present application. In this regard, each block in the flow diagrams and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each of the blocks of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented with special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and
[0133] The computer readable storage medium of embodiments of the present application may, for example, be— but is not limited to— an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer readable storage medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, the computer readable storage medium can be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0134] The computer readable storage medium described above can bear one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0135] The above description merely illustrates the preferred embodiments of the present application and the principles of the technology applied. It is understood that the disclosed scope of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present application (but not limited to) having similar functions.
Claims
1. A method for defect detection and classification of glass substrates for liquid crystal displays, characterized in that, include: S1: Acquire the image to be detected, perform target region recognition processing on the image to be detected, and obtain the detection region of the image to be detected; S2: Divide the detection area into multiple individual screen display areas; S3: Perform data enhancement on the optical acquisition images of the multiple individual screen display areas to obtain multiple data-enhanced images. Then, perform threshold calculation on the multiple data-enhanced images to obtain multiple defect binary images. Specifically: S3.1: Acquire an optical image of a single screen display area within the feature region; S3.2: Perform contrast enhancement on the optical acquisition image to obtain a data-enhanced image; S3.3: Based on the adaptive thresholding method, the pixels in the data augmentation image are divided into target pixels and background pixels according to the segmentation threshold in the adaptive thresholding method, and the proportions of target pixels and background pixels in the data augmentation image are calculated respectively; the formulas for calculating the proportions of target pixels and background pixels in the data augmentation image are as follows: Where ω1 represents the proportion of target pixels in the data augmentation map, ω2 represents the proportion of background pixels in the data augmentation map, and ω1+ω2=1; M×N represents the size of the data augmentation map, and M×N=N1+N2. Specifically, N1 represents the number of pixels in the data augmentation map whose gray level is greater than the segmentation threshold; N2 represents the number of pixels in the data augmentation map whose gray level is less than the segmentation threshold. S3.4: Calculate the total average gray level of the data augmentation image based on the proportions of the target pixels and background pixels in the data augmentation image; the formula for calculating the total average gray level of the data augmentation image is as follows: μ = μ1 × ω1 + μ2 × ω2 Where μ represents the total average gray level of the data augmentation map; μ1 represents the average gray level of the target pixel; and μ2 represents the average gray level of the background pixel. S3.5: Calculate the inter-class variance based on the total average grayscale of the data augmentation image, iterate through the maximum values of the inter-class variances, and use the maximum value of the inter-class variance as the local binarization threshold for the pixel; the formula for calculating the inter-class variance is shown below: g=ω1×(μ-μ1) 2 +ω2×(μ-μ2) 2 ; Where g is the inter-class variance; S3.6: The data augmentation map is processed by the local binarization threshold to obtain a defect binary map; S4: Train the defect classification model. Input the multiple defect binary images into the trained defect classification model, and use the trained defect classification model to identify and classify the defects in the defect binary images to obtain the defect classification results of the multiple defect binary images.
2. The defect detection and classification method for a glass substrate of a liquid crystal display screen according to claim 1, characterized in that, S1 specifically involves: acquiring an image to be detected, performing edge detection on the glass substrate of the image to be detected, and obtaining a Region of Interest (ROI); wherein the ROI is the detection area.
3. The defect detection and classification method for a glass substrate of a liquid crystal display screen according to claim 2, characterized in that, S2 specifically involves: obtaining the corner coordinates of the ROI region, and dividing the detection region into multiple feature regions based on the corner coordinates; Each of the aforementioned feature regions includes a single screen edge region, a detection image edge region, and a single screen display region, wherein the single screen display region is surrounded by the single screen edge region and the detection image edge region.
4. The defect detection and classification method for a glass substrate of a liquid crystal display screen according to claim 1, characterized in that, The contrast enhancement of the optically acquired image in S3.2 specifically involves: S3.2.1: Calculate the proportion of each grayscale value in the optical acquisition image to all pixels in the entire optical acquisition image; S3.2.2: Select any pixel in the optical acquisition image, obtain the grayscale value of the selected pixel, and use the grayscale value of the selected pixel as the current grayscale value; S3.2.3: Add up the proportions of all pixels in the optical acquisition image whose gray values are less than the current gray value in the entire optical acquisition image, and use the proportion summation result as the gain coefficient of the selected pixel; S3.2.4: Adjust the contrast of the selected pixel in the optical acquisition image by using the gain coefficient of the selected pixel to enhance the contrast of the selected pixel; S3.2.5: Traverse all pixels in the optical acquisition image and adjust the contrast of all pixels in the optical acquisition image using the methods in S3.2.2-S3.2.4 to enhance the contrast of the optical acquisition image.
5. The defect detection and classification method for a glass substrate of a liquid crystal display screen according to claim 1, characterized in that, The defect classification model includes an input layer, a convolutional layer, a downsampling pooling layer, a fully connected layer, and an output layer. The defect binary image is input into the trained defect classification model, and the trained model is used to identify and classify defects in the binary image. Specifically, this involves: S4.1: Input the binary image of the defect into the input layer; S4.2: The defect binary map is transmitted to the convolutional layer through the input layer, and the convolutional layer is used to extract features from the defect binary map to obtain the defect feature map; S4.3: Input the defect feature map into the downsampling pooling layer, and use the downsampling pooling layer to downsample the defect feature map to obtain the downsampled map; S4.4: Input the downsampled graph into the fully connected layer, and use the fully connected layer to perform dimensionality reduction on the downsampled graph to obtain a dimensionality-reduced graph; S4.5: Input the dimensionality reduction graph into the output layer, use the output layer to judge the classification confidence of the dimensionality reduction graph, output the classification confidence of the dimensionality reduction graph, and take the category with the higher confidence among the classification confidence as the defect classification result.
6. The defect detection and classification method for a glass substrate of a liquid crystal display screen according to claim 1, characterized in that, In S4, defect types include: scratches, leakage, uneven etching, pits, bumps, dirt, cracks, and fissures.
7. A defect detection and classification device for a glass substrate of a liquid crystal display screen, characterized in that, include: The detection region acquisition module is used to acquire the image to be detected, perform target region recognition processing on the image to be detected, and obtain the detection region of the image to be detected. Division module: used to divide the detection area into multiple individual screen display areas; Data augmentation module: used to augment the optical acquisition images of multiple individual screen display areas to obtain multiple data augmented images, and to perform threshold calculations on the multiple data augmented images to obtain multiple defect binary images, specifically: S3.1: Acquire an optical image of a single screen display area within the feature region; S3.2: Perform contrast enhancement on the optical acquisition image to obtain a data-enhanced image; S3.3: Based on the adaptive thresholding method, the pixels in the data augmentation image are divided into target pixels and background pixels according to the segmentation threshold in the adaptive thresholding method, and the proportions of target pixels and background pixels in the data augmentation image are calculated respectively; the formulas for calculating the proportions of target pixels and background pixels in the data augmentation image are as follows: Where ω1 represents the proportion of target pixels in the data augmentation map, ω2 represents the proportion of background pixels in the data augmentation map, and ω1+ω2=1; M×N represents the size of the data augmentation map, and M×N=N1+N2. Specifically, N1 represents the number of pixels in the data augmentation map whose gray level is greater than the segmentation threshold; N2 represents the number of pixels in the data augmentation map whose gray level is less than the segmentation threshold. S3.4: Calculate the total average gray level of the data augmentation image based on the proportions of the target pixels and background pixels in the data augmentation image; the formula for calculating the total average gray level of the data augmentation image is as follows: μ = μ1 × ω1 + μ2 × ω2 Where μ represents the total average gray level of the data augmentation map; μ1 represents the average gray level of the target pixel; and μ2 represents the average gray level of the background pixel. S3.5: Calculate the inter-class variance based on the total average grayscale of the data augmentation image, iterate through the maximum values of the inter-class variances, and use the maximum value of the inter-class variance as the local binarization threshold for the pixel; the formula for calculating the inter-class variance is shown below: g=ω1×(μ-μ1) 2 +ω2×(μ-μ2) 2 ; Where g is the inter-class variance; S3.6: The data augmentation map is processed by the local binarization threshold to obtain a defect binary map; Defect classification module: used to train a defect classification model. Multiple defect binary images are input into the trained defect classification model, and the trained defect classification model is used to identify and classify defects in the defect binary images to obtain the defect classification results of multiple defect binary images.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-6.
9. 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 of any one of claims 1-6.
Citation Information
Patent Citations
Screen detection method and device and head-mounted display equipment
CN111627009A
Display screen defect detection method, training method, device, equipment and medium
CN114677377A