Defect detection model construction method, defect detection method, and electronic device
By constructing a support vector machine classification model in the row and column directions, the problem of local defect detection in display panels was solved, enabling rapid location of defect areas and improving the efficiency of mura compensation and the yield of display products.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHANGHAI OLEADVISION TECHONOLOGY CO LTD
- Filing Date
- 2025-08-26
- Publication Date
- 2026-05-21
AI Technical Summary
Existing technologies for defect detection mainly target global mura compensation, failing to effectively detect local defects in display panels, especially local mura issues caused by worker fingerprints, dust, and machine disturbances.
A support vector machine (SVM) classification model is constructed in the row and column directions. By acquiring the target defect image of the display panel, row vector samples and column vector samples are constructed, classified and labeled, and the classification hyperplane of the SVM classification model is generated to generate the defect detection model.
It enables automated detection of local defects in display panels, quickly locates defective areas, and improves the efficiency of mura compensation and the yield of display products.
Smart Images

Figure CN2025116843_21052026_PF_FP_ABST
Abstract
Description
Methods for constructing defect detection models, defect detection methods and electronic devices
[0001] This application claims priority to Chinese Patent Application No. 202411611653.3, filed on November 12, 2024, entitled "Method for Constructing a Defect Detection Model, Defect Detection Method and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of display panel manufacturing technology, and in particular to a method for constructing a defect detection model, a defect detection method, and an electronic device. Background Technology
[0003] Active-matrix organic light-emitting diode (AMOLED) screens are increasingly favored by consumers due to their low power consumption and good color rendering. However, during the manufacturing process, fingerprints, dust, and machine disturbances on the production line can cause specific defects to the display panel, namely inherent mura. This defect is obvious and its location is uncertain. Technical issues
[0004] Existing defect detection technologies mainly focus on global mura compensation and generally do not involve the detection of local mura. However, the presence of local defects in display panels is unavoidable in production lines. Therefore, it is necessary to provide improved technical solutions to detect local defects in display panels. Technical solutions
[0005] The purpose of this application is to provide a method for constructing a defect detection model, a defect detection method, and an electronic device that can detect local defects in a display panel.
[0006] To achieve the above objectives:
[0007] In a first aspect, embodiments of this application provide a method for constructing a defect detection model, executed by an electronic device, the method comprising:
[0008] Acquire the target defect image of the display panel;
[0009] Based on the brightness data of each pixel in the target defect image, row vector samples and column vector samples are constructed, and the row vector samples and column vector samples are classified and labeled respectively.
[0010] A classification model for defect detection is constructed, comprising a row-oriented support vector machine classification model and a column-oriented support vector machine classification model;
[0011] Based on the row vector samples, column vector samples, and the classification labeling results of the row vector samples and column vector samples, the first classification hyperplane of the support vector machine classification model in the row direction and the second classification hyperplane of the support vector machine classification model in the column direction are obtained respectively.
[0012] Generate a defect detection model that stores the parameters of the first and second classification hyperplanes.
[0013] In one embodiment, acquiring the target defect image of the display panel includes:
[0014] Acquire the original defect image of the display panel;
[0015] The region containing defects in the original defect image is identified as the Region of Interest (ROI).
[0016] The image of the ROI region is preprocessed to obtain the target defect image.
[0017] In one embodiment, preprocessing the image of the ROI region includes: adjusting the color levels of the ROI region to enhance the contrast of the target defect image;
[0018] The step of adjusting the color levels of the image in the ROI region includes:
[0019] Define the calculation parameters in the color level adjustment, which include: the black threshold Sin and the white threshold Hin in the ROI region, the Gamma adjustment factor Mt required for adjustment, and the adjusted output black threshold Sout and output white threshold Hout.
[0020] Calculate the scaling factor V1 based on the calculation parameters, and calculate the adjustment coefficient V2 after Gamma adjustment based on the scaling factor V1, where
[0021] ; The Pin represents the original brightness data of the pixels within the ROI region.
[0022] An output mapping function is established based on the adjustment coefficient V2 to obtain the output brightness data of pixels within the ROI region after color level adjustment. The output mapping function is as follows:
[0023] .
[0024] In one embodiment, constructing row vector samples and column vector samples based on the brightness data of each pixel in the target defect image includes:
[0025] The brightness data of each row of pixels in the target defect image is taken as a row vector sample, and the row vector sample set X_Ri = [pi1, pi2, ..., piM], M = COL, i = 1, ..., ROW;
[0026] The brightness data of each column of pixels in the target defect image is taken as a column vector sample, and the column vector sample set X_Cj = [p1j, p2j, ..., pNj], N = ROW, j=1, ..., COL;
[0027] Wherein, ROW is the number of rows of pixels in the target defect image, COL is the number of columns of pixels in the target defect image, and piM and pNj are the brightness of pixels in the target defect image.
[0028] In one embodiment, the classification and labeling of the row vector samples and column vector samples respectively includes:
[0029] Based on the brightness data of the pixels in the row vector samples and column vector samples, determine whether the pixel is a defective pixel;
[0030] The row vector samples and column vector samples are classified and labeled according to the judgment results of defective pixels;
[0031] Specifically, when the classification labeling result Ri_y = 1 for the row vector sample, it indicates that the i-th row in the target defect image is a defect row; when Ri_y = -1, it indicates that the i-th row is a non-defect row. When the classification standard result Cj_y = 1 for the column vector sample, it indicates that the j-th column in the target defect image is a defect column; when Cj_y = -1, it indicates that the j-th column is a non-defect column.
[0032] In one embodiment, the support vector machine classification model in the row direction is:
[0033] ;
[0034] The column-direction support vector machine classification model is as follows: ;
[0035] in; , These are row vector samples and column vector samples, respectively. , These are the normal vectors in the row direction and the normal vectors in the column direction, respectively. , The distance between the classification hyperplane and the origin.
[0036] In one embodiment, obtaining the first classification hyperplane of the support vector machine classification model in the row direction and the second classification hyperplane of the support vector machine classification model in the column direction includes:
[0037] Mathematical models of hard-margin support vector machines in the row and column directions are established respectively.
[0038] The mathematical model for the hard-margin support vector machine in the row direction is as follows:
[0039] ;
[0040] The mathematical model for the hard-margin support vector machine in the column direction is:
[0041] ;
[0042] The mathematical models of the hard-margin support vector machines in the row and column directions are solved separately to obtain the optimal parameters of the first classification hyperplane. , and the optimal parameters of the second classification hyperplane .
[0043] Secondly, embodiments of this application provide a defect detection method, executed by an electronic device, which applies a defect detection model constructed using the method described above. The defect detection method includes:
[0044] Acquire the image of the display panel to be inspected;
[0045] The image to be detected is input into the defect detection model to perform defect detection on the display panel to be detected;
[0046] When a defect is detected in the display panel to be tested, the detected defect row and defect column are output.
[0047] In one embodiment, the defect detection method further includes: obtaining the location of the defect region based on the output defect rows and defect columns.
[0048] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein when the processor runs the computer program, it implements the steps of the method described above. Beneficial effects
[0049] The method for constructing a defect detection model provided in this application involves: acquiring a target defect image of a display panel; constructing row vector samples and column vector samples based on the brightness data of each pixel in the target defect image, and classifying and labeling the row vector samples and column vector samples respectively; constructing a classification model for defect detection, which includes a row-direction support vector machine (SVM) classification model and a column-direction SVM classification model; obtaining a first classification hyperplane of the row-direction SVM classification model and a second classification hyperplane of the column-direction SVM classification model based on the row vector samples, column vector samples, and the classification labeling results of the row vector samples and column vector samples respectively; and generating a defect detection model storing the parameters of the first classification hyperplane and the second classification hyperplane. In this way, a detection model capable of automatically detecting defect features can be generated to classify the brightness data of pixels in the defect image, thereby achieving the detection of local defects in the display panel.
[0050] The defect detection method provided in this application involves acquiring an image of a display panel to be inspected; inputting the image into a defect detection model to perform defect detection on the display panel; and outputting the detected defect row and defect column when a defect is detected. This allows for rapid detection of defective areas on the display panel and enables the localization of defective areas. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 is a flowchart illustrating the method for constructing a defect detection model provided in an embodiment of this application.
[0053] Figure 2 is a schematic diagram of the division of the ROI region provided in the embodiment of this application.
[0054] Figure 3 is a schematic diagram of the ROI region after color gradation adjustment provided in the embodiment of this application.
[0055] Figure 4 is a flowchart illustrating the defect detection method provided in the embodiments of this application.
[0056] Figure 5 is a schematic diagram of the structure of the electronic device provided in the embodiment of this application. Embodiments of the present invention
[0057] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0058] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0059] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if," as used herein, can be interpreted as "when," "when," or "in response to determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms "comprising," "including," indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" as used herein are to be interpreted as inclusive, or mean any one or any combination thereof. Therefore, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A, B, and C". Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0060] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0061] It should be noted that step designations such as S101 and S102 are used in this document for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order. In specific implementation, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the protection scope of this application.
[0062] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0063] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0064] Referring to Figure 1, a method for constructing a defect detection model is provided in an embodiment of this application, which is executed by an electronic device. The method specifically includes the following steps:
[0065] Step S110: Obtain the target defect image of the display panel.
[0066] Specifically, in this embodiment, the display image of the defective display panel is acquired and used as training data for the defect detection model. The display panel in this embodiment can be an AMOLED display panel. When acquiring defective images of the display panel, an acquisition device equipped with a camera can be used to acquire display images of the display panel in operation.
[0067] In one embodiment of this application, obtaining a target defect image of a display panel includes: acquiring an original defect image of the display panel; determining the area containing the defect in the original defect image as a Region of Interest (ROI); and preprocessing the image of the ROI region to obtain the target defect image.
[0068] Specifically, the original defect image can be a display image of the defective display panel directly captured by the acquisition device, containing the defective region. As shown in Figure 2, this defective region is typically located in the central area of the display panel. Therefore, a Region of Interest (ROI) containing the defective pixels can be defined according to the shape of the display panel. It should be noted that the shape, position, and size of the ROI can be adaptively adjusted according to the actual application scenario to reduce the computational load of subsequent image processing and model analysis, saving computational resources. As shown in Figure 2, a rectangular area can be delineated in the center of the original image of the display panel as the ROI. By preprocessing the image of the ROI, the image quality is improved, making the defective features of interest more prominent, thus facilitating subsequent extraction of the defective features.
[0069] In one embodiment of this application, preprocessing the image of the ROI region includes: adjusting the color levels of the image of the ROI region to enhance the contrast of the target defect image.
[0070] The steps involved in adjusting the color levels of the ROI region are as follows:
[0071] Step S111: Define the calculation parameters for color level adjustment, including: the black threshold Sin and white threshold Hin in the ROI region, the required Gamma adjustment factor Mt, and the adjusted output black threshold Sout and output white threshold Hout. It should be noted that the values of the above calculation parameters can be customized according to the desired effect.
[0072] Step S112: Calculate the scaling factor V1 based on the calculation parameters, and calculate the adjustment coefficient V2 after Gamma adjustment based on the scaling factor V1, where...
[0073] ; ;
[0074] Pin is the raw brightness data of the pixels within the ROI region, and the range of Pin is [0, 255].
[0075] Specifically, the scaling factor V1 is a coefficient used to adjust image contrast. It linearly stretches the original brightness data of pixels within the ROI region using the set black threshold Sin and white threshold Hin. In this embodiment, V1 is protected against maximum and minimum values to ensure it remains within the range [0, 255]. V2 is a new coefficient after applying a Gamma adjustment factor. It performs a Gamma transformation on the linearly stretched original brightness data using the set Gamma adjustment factor Mt to correct overexposed or underexposed areas.
[0076] Step S113: Establish an output mapping function based on the adjustment coefficient V2 to obtain the output brightness data of pixels within the ROI region after color level adjustment, wherein the output mapping function is:
[0077] .
[0078] In this embodiment, the output brightness data Pout is protected against maximum and minimum values, ensuring that the output brightness data Pout is within the range of [0, 255]. The image data of the ROI region is mapped to the original brightness data Pin, and the corresponding output brightness data Pout is calculated to achieve color level adjustment. The image of the ROI region after color level adjustment is shown in Figure 3. It can be seen that the contrast of the image is enhanced after color level adjustment, making the defect features in the image more obvious and easier to identify.
[0079] Step S120: Based on the brightness data of each pixel in the target defect image, construct row vector samples and column vector samples, and classify and label the row vector samples and column vector samples respectively.
[0080] Specifically, based on the resolution ROW*COL of the target defect image, the number of rows and columns of pixels in the target defect image can be obtained. Each row and each column of the target defect image includes multiple pixels. In one embodiment of this application, the brightness data of each row of pixels in the target defect image is taken as a row vector sample, and the row vector sample set X_Ri = [pi1, pi2, ..., piM], M = COL, i=1, ..., ROW; the brightness data of each column of pixels in the target defect image is taken as a column vector sample, and the column vector sample set X_Cj = [p1j, p2j, ..., pNj], N = ROW, j=1, ..., COL; where ROW is the number of rows of pixels in the target defect image, COL is the number of columns of pixels in the target defect image, and piM and pNj are the brightness of pixels in the target defect image.
[0081] In one embodiment of this application, classifying and labeling row vector samples and column vector samples specifically includes: determining whether a pixel is a defective pixel based on the brightness data of the pixels in the row vector samples and column vector samples; and classifying and labeling the row vector samples and column vector samples based on the determination result of defective pixels.
[0082] In one specific embodiment, when the classification labeling result Ri_y = 1 for the row vector sample, it indicates that the i-th row in the target defect image is a defect row, and when Ri_y = -1, it indicates that the i-th row is a non-defect row; when the classification standard result Cj_y = 1 for the column vector sample, it indicates that the j-th column in the target defect image is a defect column, and when Cj_y = -1, it indicates that the j-th column is a non-defect column.
[0083] Step S130: Construct a classification model for defect detection, which includes a row-oriented support vector machine classification model and a column-oriented support vector machine classification model.
[0084] Specifically, in this embodiment, the Support Vector Machine (SVM) algorithm is used to determine whether each row and column of pixels in the display panel has a defect based on the target defect image. SVM is a binary classification model, its basic model defined as a linear classifier with the largest margin in the feature space. Its learning strategy is margin maximization, which can ultimately be transformed into solving a convex quadratic programming problem. The core of SVM classification is to find a hyperplane WTx+b=0 in the sample space to distinguish different categories, then calculate the intra-class distance between the two classes, and simultaneously optimize the intra-class distance to the hyperplane, thus obtaining the optimal classifier through training.
[0085] In one embodiment of this application, the support vector machine classification model for the row direction is defined as follows: The column-oriented support vector machine classification model is defined as follows: ;in; , These are row vector samples and column vector samples, respectively. , These are the normal vectors in the row direction and the normal vectors in the column direction, respectively. , The distance between the classification hyperplane and the origin.
[0086] Step S140: Based on the classification labeling results of row vector samples, column vector samples, and row vector samples, obtain the first classification hyperplane of the support vector machine classification model in the row direction and the second classification hyperplane of the support vector machine classification model in the column direction, respectively.
[0087] Specifically, the first classification hyperplane and the second classification hyperplane are the optimal hyperplanes of the row-direction support vector machine classification model and the column-direction support vector machine classification model, respectively. By calculating the optimal solutions in the above models, the optimal hyperplane of the SVM model can be obtained.
[0088] In one embodiment of this application, when calculating the optimal solution of the above-mentioned SVM classification model, i.e., obtaining the optimal hyperplane, the classification principle is first defined. For the row-oriented SVM classification model, the following is defined: This means Ri_y = 1. Indicates Ri_y = -1; the above classification principle can be transformed into This indicates that the classification is correct. This indicates a classification error. For a column-oriented SVM classification model, the definition is... This indicates that Cj_y = 1. Indicates Cj_y = -1; the above classification principle can be transformed into This indicates that the classification is correct. This indicates a classification error.
[0089] Based on the above classification principles, mathematical models for hard-margin support vector machines in the row and column directions are established respectively. The mathematical model for the row-direction hard-margin support vector machine is as follows:
[0090] ;
[0091] The mathematical model for a hard-margin support vector machine in the column direction is:
[0092] ;
[0093] The mathematical models of hard-margin support vector machines in both the row and column directions are solved separately to obtain the optimal parameters of the first classification hyperplane. , and the optimal parameters of the second classification hyperplane .
[0094] Specifically, taking the row-oriented SVM classification model as an example, the mathematical model of the row-oriented hard-margin support vector machine described above describes how to find the optimal hyperplane to distinguish the two classes in the dataset. The goal of this optimization problem is to maximize the margin between the two classes while ensuring that all data points are correctly classified. The mathematical model includes two parts: the optimization objective and the constraints. The optimization objective represents finding a weight vector Wr and a bias br such that for all samples xi, the ratio of WrTxi+br to the norm ||Wr|| of Wr is large. This ratio represents the margin between the two classes. The norm of Wr is defined as... Here, ||Wr|| represents the Euclidean norm of the weight vector Wr, which is the square root of the sum of the squares of all elements of Wr. The constraints ensure that all samples xi are correctly classified.
[0095] During the calculation process, the above optimization objective is scaled and redefined: ;
[0096] Define the Lagrange function as:
[0097] ;
[0098] By combining the constraints and the fact that the gradient is zero, we can obtain the following solution:
[0099] ; ;in, For a certain support vector, This refers to the classification labeling results for the corresponding support vectors.
[0100] By adjusting Wr and br and selecting appropriate Lagrange factors The optimal parameters of the first classifying hyperplane can then be obtained. Similarly, the optimal parameters of the second classification hyperplane... The calculation process is similar to that of the row-oriented SVM classification model, and will not be elaborated upon in this embodiment.
[0101] Step S150: Generate a defect detection model that stores the parameters of the first and second classification hyperplanes.
[0102] Specifically, the optimal parameters calculated above... and The parameters are saved as the first and second classification hyperplane parameters, respectively, to generate a classification model for defect detection. When using the trained model parameters to detect defects on the display panel, for each row and column of the displayed image, the corresponding SVM model is used to determine whether a defect exists. The overlapping part of the defect row and defect column is the final detected defect location.
[0103] The method for constructing a defect detection model provided in this application involves: acquiring a target defect image of a display panel; constructing row vector samples and column vector samples based on the brightness data of each pixel in the target defect image, and classifying and labeling the row vector samples and column vector samples respectively; constructing a classification model for defect detection, which includes a row-direction support vector machine (SVM) classification model and a column-direction SVM classification model; obtaining a first classification hyperplane of the row-direction SVM classification model and a second classification hyperplane of the column-direction SVM classification model based on the row vector samples, column vector samples, and the classification labeling results of the row vector samples and column vector samples respectively; and generating a defect detection model storing the parameters of the first classification hyperplane and the second classification hyperplane. In this way, a detection model capable of automatically detecting defect features can be generated to classify the brightness data of pixels in the defect image, thereby achieving the detection of local defects in the display panel.
[0104] Referring to Figure 4, a defect detection method provided in an embodiment of this application is executed by an electronic device. This method applies a defect detection model constructed as described in the above embodiments. The defect detection method specifically includes the following steps:
[0105] Step S210: Obtain the image of the display panel to be inspected.
[0106] Step S220: Based on the image to be inspected and the defect detection model, perform defect detection on the display panel to be inspected.
[0107] Specifically, the brightness data of each row of pixels in the image to be detected is used as a new row vector sample XN_Ri, and the brightness data of each column of pixels is used as a new column vector sample XN_Ci. When using the trained SVM classification model for detection, WrTXN_Ri+br>0 represents that the row is a defective row, WrTXN_Ri+br<0 represents that the row is a non-defective row, WcTXN_Ci+bc>0 represents that the column is a defective column, and WcTXN_Ci+bc<0 represents that the column is a non-defective column.
[0108] Step S230: When a defect is detected in the display panel to be inspected, output the detected defect row and defect column.
[0109] In one embodiment, the defect detection method further includes: obtaining the location of the defect region based on the output defect rows and defect columns.
[0110] Specifically, since the overlapping part of the defect row and defect column is the final detected defect area, four coordinates of the defect area (top left, bottom left, top right, and bottom right) can be generated based on the number of defect rows and defect columns in the defect area to locate the defect area.
[0111] The defect detection method provided in this application involves acquiring an image of a display panel to be inspected; inputting the image into a defect detection model to perform defect detection on the display panel; and outputting the detected defect row and defect column when a defect is detected in the display panel. This allows for rapid detection of defective areas in the display panel, enabling the localization of defective areas, thereby improving Mura compensation efficiency, enhancing screen brightness uniformity, and increasing the yield of display products.
[0112] In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as shown in Figure 5. The electronic device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a device debugging method. The display screen may be a liquid crystal display (LCD) or an e-ink display. The input device may be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0113] Those skilled in the art will understand that the structure shown in Figure 5 is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Based on the same inventive concept as the foregoing embodiments, this application also provides an electronic device, including a processor and a memory storing a computer program, wherein when the processor runs the computer program, it implements the steps of the method described in the above embodiments. Specific limitations of the electronic device can be found in the limitations of the method for constructing a defect detection model and the defect detection method in the above embodiments, and will not be repeated here.
[0114] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0115] In this document, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.
[0116] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of constructing a defect detection model, performed by an electronic device, comprising: include: Acquire the target defect image of the display panel; Based on the brightness data of each pixel in the target defect image, row vector samples and column vector samples are constructed, and the row vector samples and column vector samples are classified and labeled respectively. A classification model for defect detection is constructed, comprising a row-oriented support vector machine classification model and a column-oriented support vector machine classification model; Based on the row vector samples, column vector samples, and the classification labeling results of the row vector samples and column vector samples, the first classification hyperplane of the support vector machine classification model in the row direction and the second classification hyperplane of the support vector machine classification model in the column direction are obtained respectively. Generate a defect detection model that stores the parameters of the first and second classification hyperplanes.
2. The method of claim 1, wherein, The acquisition of the target defect image of the display panel includes: Acquire the original defect image of the display panel; The region containing defects in the original defect image is identified as the Region of Interest (ROI). The image of the ROI region is preprocessed to obtain the target defect image.
3. The method of claim 2, wherein, Preprocessing the image of the ROI region includes adjusting the color levels of the ROI region to enhance the contrast of the target defect image.
4. The method of claim 3, wherein, The step of adjusting the color levels of the ROI region includes: Define the calculation parameters in the color level adjustment, which include: the black threshold Sin and the white threshold Hin in the ROI region, the Gamma adjustment factor Mt required for adjustment, and the adjusted output black threshold Sout and output white threshold Hout. Calculate the scaling factor V1 based on the calculation parameters, and calculate the adjustment coefficient V2 after Gamma adjustment based on the scaling factor V1, where... ; The Pin represents the original brightness data of the pixels within the ROI region. An output mapping function is established based on the adjustment coefficient V2 to obtain the output brightness data of pixels within the ROI region after color level adjustment. The output mapping function is as follows: 。 5. The method of claim 1, wherein, The step of constructing row vector samples and column vector samples based on the brightness data of each pixel in the target defect image includes: The brightness data of each row of pixels in the target defect image is taken as a row vector sample, and the row vector sample set X_Ri = [pi1, pi2, ..., piM], M = COL, i = 1, ..., ROW; The brightness data of each column of pixels in the target defect image is taken as a column vector sample, and the column vector sample set X_Cj = [p1j, p2j, ..., pNj], N = ROW, j=1, ..., COL; Wherein, ROW is the number of rows of pixels in the target defect image, COL is the number of columns of pixels in the target defect image, and piM and pNj are the brightness of pixels in the target defect image.
6. The method of claim 1, wherein, The classification and labeling of the row vector samples and column vector samples respectively includes: Based on the brightness data of the pixels in the row vector samples and column vector samples, determine whether the pixel is a defective pixel; The row vector samples and column vector samples are classified and labeled according to the judgment results of defective pixels; Specifically, when the classification labeling result Ri_y = 1 for the row vector sample, it indicates that the i-th row in the target defect image is a defect row; when Ri_y = -1, it indicates that the i-th row is a non-defect row. When the classification standard result Cj_y = 1 for the column vector sample, it indicates that the j-th column in the target defect image is a defect column; when Cj_y = -1, it indicates that the j-th column is a non-defect column.
7. The method for constructing a defect detection model according to claim 6, characterized in that, The support vector machine classification model in the row direction is: ; The column direction support vector machine classification model is: ; in ; 、 are row vector samples and column vector samples, respectively, 、 a normal vector in the row direction and a normal vector in the column direction, respectively, 、 The distance between the classification hyperplane and the origin.
8. The method of claim 7, wherein, Obtaining the first classification hyperplane of the support vector machine classification model in the row direction and the second classification hyperplane of the support vector machine classification model in the column direction includes: Mathematical models of hard-margin support vector machines in the row and column directions are established respectively. The mathematical model for the hard-margin support vector machine in the row direction is as follows: ; The mathematical model for the hard-margin support vector machine in the column direction is: ; Solving the mathematical model of the hard interval support vector machine in the row direction and the column direction respectively to obtain optimal parameters of the first classification hyperplane and the optimal parameters of the second classification hyperplane 。 9.A defect detection method, executed by an electronic device, the method comprising: The defect detection model constructed using the method described in any one of claims 1 to 8, the method comprising: Acquire the image of the display panel to be inspected; Based on the image to be detected and the defect detection model, defect detection is performed on the display panel to be detected; When a defect is detected in the display panel to be tested, the detected defect row and defect column are output.
10. The defect detection method of claim 9, wherein, The method further includes obtaining the location of the defect region based on the output defect rows and defect columns.
11. An electronic device, comprising: It includes a processor and a memory storing a computer program, wherein when the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 10.