A MURA defect detection method based on background reconstruction and related equipment
Through a background reconstruction method, discrete cosine transformation and singular value decomposition denoising, polynomial surface fitting and reconstruction of background images, and contrast enhancement, the missed detection and false detection problems in MURA defect detection are solved, and high-precision defect detection and positioning are achieved.
Patent Information
- Application Number
- CN202510340873.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-03-21
AI Technical Summary
In the prior art, when detecting MURA defects in the display panel, especially defects with small areas and not much difference from the background grayscale, it is prone to missed detection or missed detection, resulting in low detection accuracy.
A background reconstruction method is adopted to extract low-frequency background components through discrete cosine transformation, de-noise with singular values, reconstruct background images by polynomial surface fitting, and contrast enhancement is performed to generate a difference-value image to highlight defect areas, and detect it in combination with deep learning models.
It significantly improves the detection accuracy and reliability of MURA defects, can effectively identify and locate low-contrast defects in small areas, reduce background interference, and improve detection sensitivity and accuracy.
Smart Images

Figure CN119850636B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a MURA defect detection method based on background reconstruction and related equipment. Background Art
[0002] MURA (Multi-Image Recognition) defects are a type of display anomaly that occurs during the display panel production process. These defects primarily manifest as uneven brightness, spots, and streaks. These defects severely impact the display quality and overall performance of the display panel. MURA not only affects the appearance of the display panel but can also distort the displayed content, reducing the user's visual experience. Therefore, accurately detecting and controlling MURA defects is crucial for improving display panel production quality.
[0003] In the related art, a solution based on an edge detection algorithm is used to detect edge changes in a display panel image, thereby identifying MURA defects.
[0004] However, when the MURA area is relatively small and the grayscale difference with the image background is not large, the MURA defect is easily ignored, and missed detection or false detection often occurs, resulting in low MURA defect detection accuracy of related technologies. Summary of the Invention
[0005] In view of the above technical problems and defects, the purpose of the present invention is to provide a MURA defect detection method based on background reconstruction and related equipment, which can improve the accuracy of MURA defect detection.
[0006] To achieve the above-mentioned objectives, in a first aspect, the present invention provides a MURA defect detection method based on background reconstruction, comprising: acquiring an initial image displayed by a display panel; performing discrete cosine transform processing on the initial image to extract low-frequency background components; performing denoising processing on the low-frequency background components based on a singular value decomposition algorithm to obtain main background features; fitting and reconstructing the main background features through a polynomial surface fitting algorithm to obtain a background reconstructed image; performing contrast enhancement processing on the background reconstructed image to obtain a background enhanced image; subtracting the background enhanced image from the initial image to obtain a difference image, which is used to highlight MURA defects; determining a MURA defect to-be-detected area based on the difference image; identifying the MURA defect to-be-detected area through a preset MURA defect detection model to obtain a MURA defect detection result of the display panel, which includes whether a MURA defect exists or the location of the MURA defect.
[0007] This invention effectively improves the accuracy of MURA defect detection through high-precision background reconstruction and contrast enhancement techniques. First, discrete cosine transform (DCT) is used to extract low-frequency background information from the initial image. Singular value decomposition (SVD) is then used to reduce dimensionality and remove noise. Finally, a polynomial surface fitting method is used to reconstruct the background image. Contrast enhancement is then performed on the reconstructed background image to highlight MURA defects. Even if the MURA region is small and the grayscale difference from the background is minimal, background subtraction can produce a difference image that highlights the defect. Image processing and deep learning model detection achieve high-precision detection and location, effectively improving MURA defect detection accuracy.
[0008] Optionally, in some embodiments, the main background features are fitted and reconstructed using a polynomial surface fitting algorithm to obtain a background reconstructed image, including: constructing an input data set for surface fitting based on the main background features; constructing a background fitting polynomial based on the structure and complexity of the input data set; solving the coefficients of the background fitting polynomial through an optimization algorithm based on the input data set to obtain a solved polynomial model; and generating the background reconstructed image based on the solved polynomial model.
[0009] Using the technical solutions of the above-mentioned embodiments, a method for fitting and reconstructing the main background features using a polynomial surface fitting algorithm is provided to obtain a background reconstructed image. This method constructs an input data set for surface fitting, constructs a background fitting polynomial based on the structure and complexity of the input data set, and solves the polynomial coefficients using an optimization algorithm to generate a background reconstructed image. The beneficial effect of this method is that it can accurately fit the main background features, generate a smooth and continuous background image, effectively remove noise and interference, provide a high-quality background reference for subsequent MURA defect detection, and improve the accuracy and reliability of detection.
[0010] Optionally, in some embodiments, the mathematical expression of the background fitting polynomial includes:
[0011] ;
[0012] in, B ( x, y ) is the background gray value, indicating the pixel coordinates ( x, y ) at the background brightness; w k ( x, y ) is the k The weight function of each sub-region; K is the total number of sub-regions into which the image is divided; i, j are powers respectively; a ijk Indicates the k In the sub-area x iy j The coefficient of the term; N k Indicates the k The polynomial order of the subregions; λ is the regularization coefficient; b ijk is the coefficient of the regularized cross term; β represents the exponential decay coefficient; e is a natural constant.
[0013] The technical solution of the above embodiment further details the mathematical expression of the background fitting polynomial, introducing parameters such as the sub-region weight function, regularization coefficient, and exponential decay coefficient. This detailed mathematical expression makes background fitting more flexible and precise, adapting to the changes in background characteristics in different regions, and improving the accuracy and generalization ability of the fitting. In this way, the background reconstructed image can better reflect the actual background characteristics, reduce the risk of model overfitting, and improve the robustness and adaptability of the detection model.
[0014] Optionally, in some embodiments, the background reconstructed image is generated based on the solved polynomial model, including: generating a reconstructed background surface covering the pixel positions of the entire image based on the solved polynomial model; determining the local difference between the reconstructed background surface and the main background features; dynamically adjusting the polynomial order of the solved polynomial model based on the local difference to obtain an optimized polynomial surface; and generating the background reconstructed image based on the optimized polynomial surface.
[0015] Using the technical solutions of the above-mentioned embodiments, the process of generating a background reconstruction image based on the solved polynomial model is described in detail. By generating a reconstructed background surface covering all pixel positions in the image, determining the local differences between the reconstructed background surface and the primary background features, and dynamically adjusting the polynomial order based on these local differences, an optimized polynomial surface is obtained, ultimately generating a background reconstruction image. This method has the beneficial effect of dynamically adapting to changes in background features, optimizing the background fitting model, and further improving the accuracy and quality of background reconstruction, making the background reconstruction image closer to the actual background and reducing background interference with MURA defect detection.
[0016] Optionally, in some embodiments, the background reconstructed image is subjected to contrast enhancement processing to obtain a background enhanced image, including: determining a dynamic threshold for distinguishing between defect areas and background areas based on a grayscale histogram of the background reconstructed image; dividing the pixels of the background reconstructed image into low grayscale areas and high grayscale areas based on the dynamic threshold; performing dynamic range expansion processing on the low grayscale area through a preset first γ exponential transformation algorithm to amplify the MURA defect contrast and obtain an enhanced low grayscale area; performing dynamic range compression processing on the high grayscale area through a preset second γ exponential transformation algorithm to smooth background grayscale fluctuations and obtain a suppressed high grayscale area; and fusing the enhanced low grayscale area with the suppressed high grayscale area to generate the background enhanced image.
[0017] Using the technical solutions of the above-mentioned embodiments, a method for contrast enhancement of a background reconstructed image is provided. Image pixels are divided into low-grayscale and high-grayscale regions using a dynamic threshold. A first gamma exponential transformation algorithm and a second gamma exponential transformation algorithm are then applied to each region, respectively, and finally a background-enhanced image is generated by fusion. This method advantageously adjusts contrast adaptively based on the image's grayscale distribution, amplifying the contrast of MURA defects in low-grayscale regions while smoothing background grayscale fluctuations in high-grayscale regions. This improves the quality and visual quality of the background-enhanced image and enhances the detectability of MURA defects.
[0018] Optionally, in some embodiments, the formula of the first gamma exponential transformation algorithm includes:
[0019] ;
[0020] in, I enhanced ( x, y ) represents the pixel value of the enhanced low grayscale area, x, y is the pixel coordinate, I low ( x, y ) represents the pixel value of the low grayscale area, I min Represents the minimum pixel value of the low grayscale area, I max Represents the maximum value of pixels in the low grayscale area; γ1 is the first γ index, representing the contrast expansion coefficient, and its value range is 0<γ1<1.
[0021] Using the technical solutions of the above embodiments, a new formula for the first gamma exponential transformation algorithm is provided. By introducing the contrast expansion coefficient γ1, the dynamic range expansion degree of low-grayscale areas can be precisely controlled. This detailed formula description makes contrast amplification of MURA defects in low-grayscale areas more accurate and effective, improving defect detection sensitivity and facilitating better identification and location of low-contrast MURA defects.
[0022] Optionally, in some embodiments, the formula of the second gamma exponential transformation algorithm includes:
[0023] ;
[0024] in, I compressed ( x, y ) represents the high grayscale area after the suppression, x, y is the pixel coordinate, I high ( x, y ) represents the pixel value of the high grayscale area, I min Represents the minimum pixel value of the high grayscale area, I max Represents the maximum value of pixels in high grayscale areas; γ2 is the second γ index, representing the dynamic range compression coefficient, γ2>1.
[0025] Using the technical solutions of the above embodiments, a formula for a second gamma exponential transformation algorithm is provided. By introducing the dynamic range compression coefficient γ2, the degree of dynamic range compression in high-grayscale areas can be precisely controlled. This detailed formula enables more accurate and effective smoothing of background grayscale fluctuations in high-grayscale areas, reducing background interference with MURA defect detection, improving detection accuracy and reliability, and ensuring the quality and visual quality of background-enhanced images.
[0026] In a second aspect, an embodiment of the present invention provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0027] In a third aspect, the present invention provides a computer-readable storage medium comprising instructions, which, when executed on the electronic device, enables the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0028] In a fourth aspect, the present invention provides a computer program product comprising instructions, which, when the computer program product is run on the electronic device, enables the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0029] It is understood that the electronic device provided in the second aspect, the storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the method provided by the present invention. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here.
[0030] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0031] 1. Improving MURA defect detection accuracy: This invention significantly improves MURA defect detection accuracy through high-precision background reconstruction and contrast enhancement techniques. First, discrete cosine transform (DCT) is used to extract low-frequency background information from the initial image. Singular value decomposition (SVD) is then used to reduce the dimensionality and remove noise, generating a precise background image. The reconstructed background image is then contrast-enhanced using a double-gamma piecewise exponential transform to highlight MURA defects. Even if the MURA region is small and its grayscale difference from the background is minimal, background subtraction can produce a difference image that highlights the defect. This image processing and deep learning model detection enable high-precision detection and location.
[0032] 2. Enhance the contrast of low-contrast MURA defects: This invention uses a dual-gamma segmented exponential transform to perform dynamic range expansion on low-grayscale areas, amplifying the grayscale difference between the MURA defect and the background. This makes previously imperceptible low-contrast defects more visible and easier to detect. Simultaneously, dynamic range compression is performed on high-grayscale areas to smooth background grayscale fluctuations and reduce background interference with defect detection. This results in a background-enhanced image that more clearly highlights MURA defects, improving detection sensitivity and accuracy.
[0033] 3. Improved detection efficiency and reliability: This invention integrates multiple advanced image processing and machine learning technologies to automate the entire process from image acquisition to defect detection. This not only improves detection efficiency but also reduces the uncertainty and errors caused by manual intervention. Furthermore, by dynamically adjusting the polynomial order and optimizing the algorithm, the accuracy and adaptability of background reconstruction and contrast enhancement are ensured, improving the generalization and robustness of the detection model and resulting in more reliable detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0035] Figure 1 is a flow chart of a MURA defect detection method based on background reconstruction according to an embodiment of the present invention;
[0036] Figure 2 It is a schematic diagram of the architecture of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The terms used in the following embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. As used in the specification of the present invention, the singular expressions "a," "an," "above," "the," and "this" are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used in the present invention refers to any and all possible combinations of one or more of the listed items.
[0038] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the quantity of the technical features indicated. Thus, a feature designated "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present invention, unless otherwise specified, "plurality" means two or more.
[0039] It should also be noted that, unless otherwise clearly specified and limited, in the embodiments of the present invention, terms such as "setting" and "connection" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal connection of two components; it can be a wired communication connection or a wireless communication connection. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The embodiments of the present invention are described in detail below.
[0040] The embodiment of the present invention provides a MURA defect detection method based on background reconstruction, such as Figure 1 As shown, the following steps are included:
[0041] Step 201: Acquire an initial image displayed by a display panel.
[0042] Specifically, high-precision image acquisition equipment can be used. First, place the display panel to be inspected on a stable inspection platform to ensure that the panel surface is flat and free of external light interference. Subsequently, use a high-resolution industrial camera or scanning equipment with a uniform light source to capture images of the display panel. The brightness and angle of the light source must be precisely calibrated to ensure uniformity and consistency of image brightness. During the acquisition process, the control device captures a full-screen image of the display panel with a fixed exposure time and resolution to ensure that the image can completely cover the display area of the panel.
[0043] The initial image collected is usually a grayscale image or a color image, and needs to be preprocessed according to the detection requirements, such as grayscale conversion and denoising, to eliminate environmental noise and interference introduced by the acquisition equipment.
[0044] Finally, the preprocessed image is input as the initial image into the subsequent defect detection algorithm, providing a high-quality data basis for the identification and analysis of MURA defects.
[0045] This process places high demands on the accuracy of the image acquisition equipment, the stability of the light source, and the standardization of the operating procedures to ensure that the initial image can truly reflect the actual display status of the display panel.
[0046] Step 202: Perform discrete cosine transform on the initial image to extract low-frequency background components.
[0047] The Discrete Cosine Transform (DCT) is a mathematical tool that converts images from the spatial domain to the frequency domain. Its core concept is to represent the image's grayscale distribution as a linear combination of different frequency components through basis function decomposition. In this step, the DCT is used to separate the image's low-frequency background components from high-frequency details and noise. The specific implementation is as follows:
[0048] First, the initial image is divided into several fixed-size sub-blocks (e.g., 8×8 or 16×16 pixels), and a two-dimensional DCT transform is performed on each sub-block. The DCT basis functions have a concentrated energy characteristic: low-frequency components (corresponding to the coefficients in the upper left corner of the basis functions) represent slowly changing background regions in the image, while high-frequency components (coefficients in the lower right corner) correspond to edges, texture, and noise. By retaining only the low-frequency coefficients (e.g., the low-frequency coefficients in the upper left quarter of each sub-block) and setting the remaining high-frequency coefficients to zero, low-frequency background components can be extracted.
[0049] The low-frequency coefficients retained after processing are then subjected to an inverse DCT transform (IDCT) to reconstruct a sub-block image containing only the low-frequency background. By traversing all sub-blocks and splicing the reconstructed results, the low-frequency background component of the entire image is finally obtained.
[0050] This process effectively filters out high-frequency noise and local detail interference, highlighting the global grayscale distribution characteristics of the background. For example, in MURA defect detection of display panels, the panel's uniform brightness background primarily corresponds to low-frequency energy, while the defective area contains high-frequency components due to sudden grayscale changes. Therefore, the low-frequency separation characteristics of DCT can effectively distinguish between background and potential defects.
[0051] Step 203: De-noising the low-frequency background components based on a singular value decomposition algorithm to obtain main background features.
[0052] Among them, the main background features refer to the core structural information of the image retained after denoising the low-frequency background components through singular value decomposition (SVD), such as the overall brightness uniformity of the display panel, large-scale gradient trends (such as edge brightness attenuation or central uniform area), and the smooth base after noise removal.
[0053] The singular value decomposition algorithm is a matrix decomposition method that can decompose any matrix into the product form of three matrices (A=UΣV T ), where U and V are orthogonal matrices, and Σ is a diagonal matrix whose diagonal elements (singular values) are arranged in descending order, representing the energy intensity of different components in the matrix. In this step, SVD is used to denoise and extract features from low-frequency background components. The specific implementation is as follows:
[0054] First, the grayscale image of the low-frequency background component is treated as a two-dimensional matrix A and subjected to SVD decomposition. After decomposition, larger singular values correspond to the main structural features of the image (such as the global grayscale distribution of the background), while smaller singular values correspond to noise or minor details. Noise components can be suppressed by setting a threshold (for example, retaining the first k largest singular values, where k is determined based on the energy accumulation ratio) or truncating singular values (setting singular values below the threshold to zero). For example, in the low-frequency background of a display panel, the overall brightness uniformity of the panel is dominated by the first few large singular values, while local grayscale fluctuations (such as sensor noise) are characterized by small singular values.
[0055] After truncation, the matrix A′=UΣ′V is reconstructed using the retained singular values T (where Σ' is the truncated diagonal matrix) to obtain the main background features after denoising. This process significantly improves the robustness of the background model by retaining the principal components, while eliminating the interference of random noise on subsequent defect detection.
[0056] In this embodiment, the background feature matrix after SVD denoising more accurately reflects the ideal uniform background of the display panel, further amplifying the grayscale difference between it and the defect area, providing input data with a high signal-to-noise ratio for subsequent defect segmentation. For example, under complex lighting conditions, SVD can effectively eliminate residual gradient noise in the low-frequency background, ensuring that the defect detection algorithm focuses only on the true MURA defect signal.
[0057] Step 204 : reconstructing the main background features by fitting using a polynomial surface fitting algorithm to obtain a background reconstructed image.
[0058] Specifically, the main background feature data obtained through singular value decomposition are first organized into a two-dimensional matrix, where the rows and columns of the matrix correspond to the pixel rows and columns of the image.
[0059] Next, the area for polynomial surface fitting is determined based on the distribution range of the main background features. Usually, this area covers the entire image or the area where the main background features are concentrated.
[0060] Then, according to the complexity of the background features, the appropriate polynomial order is selected. For simple background features, a low-order polynomial such as a quadratic or cubic polynomial can be selected, while for complex background features, a higher-order polynomial may be required.
[0061] Next, a polynomial surface fitting model is established based on the selected polynomial order. For example, for a quadratic polynomial, the model can be expressed as z=a0+a1x+a2y+a3x 2 +a4xy+a5y 2 , where z is the fitted grayscale value, x and y are the coordinates of the pixel, and a0, a1, …, a5 are the polynomial coefficients.
[0062] Afterwards, the parameters of the polynomial surface fitting model are solved using algorithms such as the least squares method. The least squares method finds the optimal fitting parameters by minimizing the sum of squares of the residuals to ensure that the fitted surface is as close as possible to the actual background features.
[0063] Finally, the fitted polynomial surface is used as the background to reconstruct the image. Specifically, for each pixel point (x, y) in the image, its corresponding grayscale value z is calculated according to the polynomial model to generate a new image matrix.
[0064] If the image is processed in blocks, the background reconstructed images of each block must be fused to generate a complete background reconstructed image. This image must then be post-processed, such as smoothing and denoising, to improve image quality and visual quality. This process effectively removes background interference, improves background smoothness and continuity, and provides more accurate background information for subsequent MURA defect detection.
[0065] Step 205: Perform contrast enhancement processing on the background reconstructed image to obtain a background enhanced image.
[0066] Contrast enhancement is designed to adjust the grayscale dynamic range of the background reconstructed image to amplify the potential difference between the background and the defect area, providing a highly discriminative input for subsequent differential operations. This step can be achieved using adaptive gamma correction combined with histogram stretching technology.
[0067] First, the grayscale histogram distribution of the background reconstructed image is analyzed to determine its main grayscale concentration interval. For the low-contrast area outside this interval, a dual-segment gamma transformation function is designed: for grayscale values below the first threshold T L In the area where the gray value is higher than the second threshold T, an exponential transformation with a gamma value γ1<1 is applied to expand the dark details; H In the area with gamma value γ2>1, the transformation is used to compress the dynamic range of the highlight area; the middle grayscale range maintains linear mapping to avoid excessive distortion.
[0068] By dynamically adjusting the γ1, γ2, and threshold parameters, the enhanced image maintains background smoothness while enhancing the grayscale gradient at the edges of potential defects. For example, in display panels, MURA defects typically manifest as localized grayscale shifts, which can be made more prominent against the background through contrast enhancement.
[0069] Furthermore, histogram equalization is performed on the enhanced image to further widen the intervals between different grayscale levels, maximizing the grayscale difference between the defect and the background. This process, through a parameter adaptive mechanism, avoids the local overexposure or loss of detail caused by traditional global enhancement methods, laying a high-quality data foundation for subsequent differential calculations.
[0070] Step 206 : Subtract the background enhanced image from the initial image to obtain a difference image. The difference image is used to highlight MURA defects.
[0071] The generation of the difference image is achieved through pixel-level grayscale difference operation, and its mathematical expression is D(x,y)=|I original (x,y)−I enhanced (x,y)|, where I original is the initial image, I enhanced is the background enhanced image, x,y are the pixel coordinates.
[0072] This step separates the grayscale anomaly of the MURA defect from the complex background by eliminating the idealized background components.
[0073] In specific implementation, the initial image and the background-enhanced image are first spatially aligned and grayscale normalized to ensure they have the same size, resolution, and grayscale quantization range. The grayscale difference is then calculated pixel by pixel, and the absolute value is taken to avoid positive and negative offsets. Because the background-enhanced image approximates an ideal uniform background through fitting and contrast enhancement, true defect regions (such as localized brightness shifts in MURA) will produce significant non-zero values after the difference calculation, while the uniform background regions are suppressed to near-zero values due to their consistent grayscale.
[0074] To further improve the signal-to-noise ratio, the difference image is subjected to nonlinear mapping (such as logarithmic transformation or S-curve adjustment) to amplify the response intensity of the defect area while compressing the amplitude of the background residual noise. For example, in OLED panel inspection, the differential signal of a tiny MURA defect may only occupy a few grayscale levels. Nonlinear mapping can make it clearly visible in the final image.
[0075] In this embodiment, the signal-to-noise ratio of the difference image can be improved by 3-5 times compared with the original image, and the sharpness of the defect edge is significantly increased. It can be directly used for threshold segmentation or morphological processing to achieve accurate positioning and quantitative analysis of defects.
[0076] Step 207: Determine the MURA defect detection area based on the difference image.
[0077] The core goal of determining the MURA defect detection area is to extract candidate areas of potential defects from the difference image while eliminating background residual noise and artifact interference. The specific implementation is divided into the following steps:
[0078] First, adaptive threshold segmentation is performed on the difference image, dynamically setting the segmentation threshold based on the statistical characteristics of the grayscale distribution. For example, the Otsu algorithm or the mean-standard deviation method based on a local window is used to divide the difference image into foreground (potential defect area) and background (uniform area). Because MURA defects typically appear as continuous, small-area grayscale anomalies, morphological operations (such as closing) are required after segmentation to connect adjacent foreground pixels and eliminate isolated points or fragmented areas caused by noise.
[0079] Subsequently, connected component analysis (CCA) is used to mark all candidate regions, extracting features such as their position, area, and shape factor (such as aspect ratio and circularity). Based on prior knowledge, screening conditions (such as a minimum defect area threshold and shape regularity index) are set to eliminate pseudo targets that do not meet the characteristics of MURA defects. For example, in display panel inspection, true MURA defects typically appear as irregular flakes or linear structures with an area larger than 5×5 pixels and a shape factor below the threshold, while noise points appear as scattered points or extremely small areas. To further improve positioning accuracy, sub-pixel edge refinement is performed on the candidate regions, using Canny edge detection or a gradient amplitude-based non-maximum suppression algorithm to accurately demarcate the defect boundaries.
[0080] Finally, a set of candidate region coordinates and masks are output as MURA defect targets to be detected. This process significantly reduces the false detection rate through multi-level screening and feature verification, while ensuring sensitivity to subtle defects. For example, in low-contrast scenes, this embodiment can detect MURA defects with grayscale differences of only 3-5 units, with a positioning error of less than 1 pixel.
[0081] Step 208 : Identify and process the MURA defect detection area using a preset MURA defect detection model to obtain a MURA defect detection result of the display panel.
[0082] The MURA defect detection result includes whether a MURA defect exists or the location of the MURA defect.
[0083] The MURA defect detection model is designed based on a deep learning architecture (such as convolutional neural networks (CNN), U-Net, or YOLOv4-Tiny) and achieves defect classification and precise location through end-to-end training. The implementation process of the MURA defect detection model is as follows:
[0084] First, the candidate regions output in step 207 are cropped from the initial image into local image patches and subjected to standardization preprocessing (e.g., normalization to a uniform size and grayscale equalization). The model input is multi-channel data, consisting of original grayscale image patches, difference image patches, and background reconstructed image patches, to fuse information from different feature levels. The model's main body utilizes a multi-scale convolutional module, capturing both the global context and local detail features of the defect through parallel dilated convolutions. It also incorporates an attention mechanism (such as SENet or CBAM) to dynamically weight the feature responses of important regions.
[0085] For classification tasks, the MURA defect detection model outputs binary classification probabilities (defect / non-defect), optimized using the cross-entropy loss function. For localization tasks, the model outputs pixel-level defect masks, using Dice loss or boundary-weighted loss functions to enhance edge accuracy. During the inference phase, the model independently predicts each candidate region and makes a comprehensive judgment based on the classification confidence and localization results. For example, if the classification probability of a region is greater than 0.95 and the overlap between the mask coverage area and the candidate region exceeds 90%, it is determined to be a true MURA defect, and its center coordinates and bounding box information are recorded.
[0086] The final output includes a defect's presence indicator, location coordinates, area, and morphological description (e.g., point, line, or sheet). In this embodiment, the MURA defect detection model achieves a recall rate exceeding 95% for tiny defects (less than 10×10 pixels), a significant improvement over traditional template matching or threshold segmentation methods. Furthermore, the model supports real-time inference, processing a single image in less than 50ms, meeting the efficiency requirements of industrial production lines.
[0087] In this embodiment, the training method of the MURA defect detection model is as follows:
[0088] First, original images of display panels under different lighting conditions, production processes and defect morphologies are collected. Manual and semi-automatic annotation tools are used to perform pixel-level annotation of MURA defect areas to construct a balanced dataset containing normal and defective samples.
[0089] Second, training data is generated by enhancing display panel images from real industrial scenarios, including synthetic samples with varying brightness, contrast, and defect morphology to improve model generalization. Furthermore, data augmentation strategies (such as random rotation, brightness perturbation, Gaussian noise injection, and simulated panel moiré generation) can be used to expand the dataset's diversity and further enhance the model's generalization capabilities for complex industrial scenarios.
[0090] The model architecture uses an encoder-decoder structure that integrates U-Net and the attention mechanism. The encoder extracts multi-scale features through ResNet-50, and the decoder uses skip connections and spatial pyramid pooling modules to fuse local details with global context information. At the same time, a channel attention module (CBAM) is embedded in the skip connections to enhance the feature response of the defect area.
[0091] During the training process, a combined loss function (weighted Dice loss and Focal loss) was used to address the problem of class imbalance, and the Adam optimizer was used to dynamically adjust the learning rate. Early stopping strategy and cross-validation were used to prevent overfitting. Finally, the model was verified on an independent test set, achieving a detection accuracy of 98.5% and a recall rate of over 95%. It also supports real-time inference under GPU acceleration, meeting the needs of industrial detection.
[0092] This embodiment addresses the issues of missed and false detections in MURA defect detection caused by traditional edge detection methods. By constructing a multi-layered processing framework consisting of "background separation, feature enhancement, and difference focusing," the proposed method improves the recognition accuracy of small, low-contrast MURA defects. First, a discrete cosine transform (DCT) is used to extract low-frequency background components. Frequency domain separation effectively removes high-frequency noise interference, retaining the weak MURA defect signal in the mid- and high-frequency regions. This solves the problem of feature blurring caused by aliasing of background and defect spectra in traditional methods. Singular value decomposition (SVD) is then used to reduce the low-frequency background matrix dimension. By retaining the primary eigenvalues and filtering out random noise, the background features become purer and more stable. Furthermore, a polynomial surface fitting algorithm is used to create a high-precision mathematical model of the de-noised background. Least squares methods are used to construct a surface equation that closely matches the true background morphology. This accurately approximates the display panel's gradient background (such as edge brightness decay or process gradients), avoiding the underfitting problem of traditional linear fitting for complex backgrounds and generating a high-fidelity background reconstruction image. After enhancing the grayscale dynamic range of the reconstructed background through contrast enhancement, a pixel-level difference calculation is performed with the original image to decouple the weak signal of MURA defects from the background. This embodiment effectively improves the detection accuracy of MURA defects through this multi-level background reconstruction and difference enhancement mechanism. The improvement in detection accuracy is particularly significant when the MURA area is relatively small and the grayscale difference from the image background is not significant.
[0093] This embodiment also provides a MURA defect detection method, including the following steps:
[0094] S1, obtaining an initial image displayed by the display panel.
[0095] This step refers to the relevant description in the above embodiment and will not be repeated here.
[0096] S2, performing discrete cosine transform processing on the initial image to extract low-frequency background components.
[0097] This step refers to the relevant description in the above embodiment and will not be repeated here.
[0098] S3, based on the singular value decomposition algorithm, the low-frequency background components are denoised to obtain the main background features.
[0099] This step refers to the relevant description in the above embodiment and will not be repeated here.
[0100] S4, constructs the input data set for surface fitting based on the main background features.
[0101] Among them, the construction of the input data set is the basis for realizing background surface fitting. Its core is to convert the main background feature matrix after SVD denoising into structured data suitable for polynomial fitting.
[0102] Specifically, each pixel in the primary background feature matrix corresponds to a spatial coordinate (x, y) and its denoised grayscale value z, forming a raw data set of triples (x, y, z). Since display panel images are typically high-resolution (e.g., 4K×2K pixels), directly using full-pixel data would result in a surge in computational complexity. Therefore, downsampling is necessary: while preserving the macroscopic distribution characteristics of the background, uniform sampling is performed at fixed intervals (e.g., every 10 pixels) to generate a sparse but highly representative sub-dataset. For example, for panels with a gradient brightness background, sampling must cover the uniform center region, the edge decay region, and the transition region to ensure a balanced spatial distribution.
[0103] At the same time, the coordinates (x, y) are normalized and mapped to the interval [−1, 1] to eliminate dimensional differences and avoid computational instability caused by excessively large numerical ranges in high-order polynomial terms. Finally, the input dataset D can be expressed as , where N is the number of sampling points, z i is the grayscale value after denoising. This process, through spatial downsampling and normalization, significantly reduces the computational complexity of fitting while preserving the global background trend, providing an efficient and high-fidelity data foundation for subsequent modeling.
[0104] S5, constructing a background fitting polynomial based on the structure and complexity of the input data set.
[0105] Among them, the construction of the background fitting polynomial needs to adaptively select the polynomial order according to the data distribution characteristics and background complexity to balance the model expression ability and overfitting risk. For the panel background with good uniformity (such as the central area), a low-order polynomial (such as quadratic: f(x,y)= a0+a1x+a2y+a3x 2 +a4xy+a5y 2 ) can accurately describe its smooth characteristics; for backgrounds with complex gradients or nonlinear attenuation (such as edge brightness gradients), higher-order terms (such as cubic or quartic polynomials) need to be introduced to improve fitting accuracy.
[0106] In practice, we first analyze the grayscale distribution of the input dataset visually (e.g., a 3D surface plot or contour map) to qualitatively determine the curvature and nonlinearity of the background. We then quantitatively assess the goodness of fit of different order models based on statistical metrics (e.g., residual sum of squares and adjusted R²). We select the lowest order that results in an adjusted R² close to 1 and no significant trend in the residuals. For example, if the residuals after fitting a quadratic polynomial still exhibit a systematic spatial distribution (e.g., persistently high residuals in edge regions), we need to upgrade to a cubic polynomial (adding the terms x³, y³, x²y, and xy²).
[0107] The final polynomial form must meet the requirements of fitting accuracy and computational efficiency at the same time to avoid unstable coefficient solution or increased computational time due to excessively high order.
[0108] In some embodiments, the mathematical expression of the background fitting polynomial may specifically include:
[0109] ;
[0110] in, x, y is the two-dimensional spatial coordinate of the pixel, which serves as the input variable of the polynomial model.
[0111] B ( x, y ) is the image at coordinates ( x, y ) indicates the background gray value at the pixel coordinate ( x, y ) at the background brightness.
[0112] w k ( x, y )yes k The weight function of the sub-region reflects the pixel ( x, y ) belongs to this sub-region (the sum of weights is 1).
[0113] K It is the total number of sub-regions into which the image is divided, and is used to fit the complex background in different regions.
[0114] i, j are powers respectively.
[0115] a ijk Indicates the k In the sub-area x i y j The coefficient of the term is solved by the optimization algorithm to fit the background characteristics.
[0116] N k express kThe highest order of the polynomial for each sub-region is dynamically adjusted according to the local background complexity (such as curvature or gradient).
[0117] λ is the regularization coefficient, which controls the influence of cross terms on the overall model and prevents overfitting of high-order terms.
[0118] b ijk is the regularized cross term x i y j The coefficients of are used to suppress the polynomial oscillations in the edge region.
[0119] β represents the exponential decay coefficient, which determines the decay rate of the cross term as it moves away from the center ( β The larger the value, the faster the decay).
[0120] In the background fitting polynomial of this embodiment, the weight function w k ( x, y ) The image is divided into K sub-regions (such as the central uniform region, the edge gradient region, and the four-corner attenuation region), and each sub-region is independently fitted with a polynomial of different orders ( N k For the k The local adaptability of background modeling is achieved by weighted fusion.
[0121] The exponential regularization term is used to suppress edge high-frequency distortion. The exponential decay term appended , the attenuation rate is controlled by the parameter β to achieve the high-order terms (i+j=N k ) space constraints.
[0122] The background fitting polynomial is collaboratively designed based on region, order, and regularization constraints. This mathematically ensures the stability and accuracy of the fitting surface, and engineeringly adapts to the spatial heterogeneity of the display panel background, providing a high-fidelity background benchmark for MURA defect detection.
[0123] S6, solving the coefficients of the background fitting polynomial by an optimization algorithm according to the input data set to obtain a solved polynomial model.
[0124] Specifically, the data points in the input dataset are first substituted into the background fitting polynomial to construct an objective function. This objective function is usually defined as the sum of squared errors between the polynomial model predictions and the actual observed values.
[0125] Next, an appropriate optimization algorithm is selected to minimize this objective function. Common optimization algorithms include least squares, gradient descent, and Newton's method. For example, the least squares method solves a system of linear equations to find the polynomial coefficients that minimize the sum of squared errors. During the calculation process, the partial derivative of the objective function with respect to each polynomial coefficient is first taken, resulting in a set of linear equations. This system is then solved using matrix operations to obtain estimated values for the polynomial coefficients.
[0126] Next, verify the accuracy and fit of the resulting polynomial model. You can evaluate model performance by calculating the model's prediction error on the input dataset and using methods such as cross-validation. If the model fit is unsatisfactory, you may need to adjust the polynomial order or optimize the algorithm parameters and try again.
[0127] In this way, the coefficients of the background fitting polynomial are obtained by using the input data set and the optimization algorithm, thereby obtaining a polynomial model that can accurately describe the main background features, providing a mathematical model basis for generating background reconstruction images.
[0128] S7: Generate the background reconstructed image based on the solved polynomial model.
[0129] Specifically, the size and pixel coordinate range of the background reconstructed image are first determined. This is usually consistent with the size of the original input image to ensure spatial correspondence between the reconstructed image and the original image. Then, for each pixel in the image, based on its pixel coordinates (x, y), x and y are substituted into the solved polynomial model to calculate the corresponding grayscale value z.
[0130] Next, the grayscale values of all pixels are combined into a two-dimensional matrix to form the grayscale matrix of the background reconstructed image. The rows and columns of this grayscale matrix correspond to the pixel rows and columns of the image, and each element in the matrix is the grayscale value of the corresponding pixel.
[0131] Finally, convert the grayscale matrix to an image format. This conversion can typically be performed using an image processing library or tool, such as the OpenCV library or Matplotlib library in Python, to save the grayscale matrix as an image file or display it as an image. The resulting background reconstructed image must meet the following properties: 1) be globally smooth and continuous, without local abrupt changes or jagged edges; 2) be highly consistent with the low-frequency background components of the initial image (verified by the SSIM structural similarity index); and 3) grayscale differences in defective areas (such as MURA) are effectively suppressed in the reconstructed image.
[0132] The background reconstructed image can accurately reflect the main background features, has a smooth background and clear structure, effectively removes the noise and interference information in the original image, highlights the main trends and features of the background, and provides a high-quality background reference image for subsequent MURA defect detection, which helps to improve the accuracy and reliability of defect detection.
[0133] In some embodiments, this step may specifically include steps S71-S74:
[0134] S71: Generate a reconstructed background surface covering all pixel positions of the image based on the solved polynomial model.
[0135] First, determine the size and pixel coordinate range of the reconstructed background image to ensure it matches the size of the original input image to maintain spatial correspondence. Then, for each pixel in the image, based on its pixel coordinates (x, y), substitute x and y into the solved polynomial model to calculate the corresponding grayscale value z. For example, for the quadratic polynomial model z = a0 + a1x + a2y + a3x² + a4xy + a5y², substitute the x and y values of each pixel and, combined with the solved coefficients a0, a1, …, a5, calculate the corresponding z value, which is the grayscale value of that pixel.
[0136] Next, the grayscale values of all pixels are combined into a two-dimensional matrix to form a grayscale matrix for reconstructing the background surface. The rows and columns of this grayscale matrix correspond to the pixel rows and columns of the image, and each element in the matrix is the grayscale value of the corresponding pixel.
[0137] Finally, convert the grayscale matrix into an image format. You can usually use an image processing library or tool to achieve this conversion, such as using the OpenCV library or Matplotlib library in Python to save the grayscale matrix as an image file or display it as an image.
[0138] The generated reconstructed background surface can accurately cover the pixel positions of the entire image, reflect the main background features, have a smooth background and clear structure, effectively remove the noise and interference information in the original image, highlight the main trends and features of the background, and provide a high-quality background reference image for subsequent MURA defect detection.
[0139] S72: Determine the local difference between the reconstructed background surface and the main background feature.
[0140] Specifically, the reconstructed background surface and the main background features are first represented as two two-dimensional matrices, where the rows and columns of the matrices correspond to the pixel rows and columns of the image, and each element in the matrix is the grayscale value of the corresponding pixel. Then, the difference in the grayscale values of the corresponding pixels in the two matrices is calculated to generate a difference matrix. For example, for each pixel point (x, y), the grayscale value z of the point in the reconstructed background surface is calculated. reconstruct And the gray value z of the point in the main background feature featur The difference between e, that is, delta = z reconstruct -z feature This difference can be expressed in absolute terms or squared terms, depending on the difference measure used.
[0141] Next, the difference matrix is analyzed to determine the areas with large local differences. A threshold can be set to mark areas with difference values greater than the threshold as areas with large local differences. For example, indicators such as mean square error (MSE) or mean absolute error (MAE) can be used to quantify the overall degree of difference. In addition, visualization tools such as heat maps can be used to intuitively display the distribution of local differences. Through the above steps, the local differences between the reconstructed background surface and the main background features can be accurately determined, providing a basis for the subsequent dynamic adjustment of the polynomial model.
[0142] S73, dynamically adjusting the polynomial order of the solved polynomial model based on the local difference to obtain an optimized polynomial surface.
[0143] Specifically, we first analyze the distribution of local differences to determine the areas that require adjustment and the direction of adjustment. If the local differences are large in certain areas, we may need to increase the order of the polynomial in these areas to better fit the background features. If the local differences are large across the entire image, we may need to increase the order of the polynomial globally.
[0144] Then, based on the determined adjustment strategy, the background fitting polynomial is reconstructed. For example, if the original polynomial is a quadratic polynomial and now needs to be increased to a cubic polynomial, the new polynomial form is z = a0 + a1x + a2y + a3x² + a4xy + a5y² + a6x³ + a7x²y + a8xy² + a9y³.
[0145] Next, the system of equations is reconstructed using the original input dataset and the adjusted polynomial. An optimization algorithm is then used to solve for the new polynomial coefficients. This step is similar to the previous process for solving for the polynomial coefficients, except that the order of the polynomial and the corresponding coefficients are changed. For example, an optimization algorithm, such as the least squares method, is used to solve for the new polynomial coefficients, ensuring that the adjusted polynomial model better fits the primary background features and reduces local variations.
[0146] Finally, verify the accuracy and fit of the optimized polynomial model. You can evaluate model performance by calculating the prediction error on the input dataset and using methods such as cross-validation. If the model fit is still unsatisfactory, you may need to further adjust the polynomial order or the parameters of the optimization algorithm. Repeat the above process until a satisfactory optimized polynomial surface is obtained.
[0147] S74: Generate the background reconstructed image according to the optimized polynomial surface.
[0148] Specifically, the size and pixel coordinate range of the background reconstructed image are first determined to ensure consistency with the size of the original input image to maintain spatial correspondence.
[0149] Then, for each pixel in the image, based on its pixel coordinates (x, y), substitute x and y into the optimized polynomial model to calculate the corresponding grayscale value z. For example, for the optimized cubic polynomial model z = a0 + a1x + a2y + a3x² + a4xy + a5y² + a6x³ + a7x²y + a8xy² + a9y³, substitute the x and y values of each pixel and, combined with the solved coefficients a0, a1, ..., a9, calculate the corresponding z value, which is the grayscale value of that pixel.
[0150] Next, the grayscale values of all pixels are combined into a two-dimensional matrix to form the grayscale matrix of the optimized background reconstructed image. The rows and columns of this grayscale matrix correspond to the pixel rows and columns of the image, and each element in the matrix is the grayscale value of the corresponding pixel.
[0151] Finally, convert the grayscale matrix into an image format. You can usually use an image processing library or tool to achieve this conversion, such as using the OpenCV library or Matplotlib library in Python to save the grayscale matrix as an image file or display it as an image.
[0152] The generated background reconstructed image can more accurately reflect the main background features, has a smoother background and clearer structure, further removes noise and interference information in the original image, highlights the main trends and features of the background, and provides a higher quality background reference image for subsequent MURA defect detection, which helps to improve the accuracy and reliability of defect detection.
[0153] S8, determining a dynamic threshold for distinguishing the defect area from the background area according to the grayscale histogram of the background reconstructed image.
[0154] The determination of the dynamic threshold is based on the statistical characteristics of the grayscale histogram and the bimodal separation criterion, and the distinction between background and defects is achieved through an adaptive algorithm.
[0155] First, the grayscale histogram of the background reconstructed image is smoothed (e.g., using a Gaussian kernel convolution) to eliminate glitches caused by noise or local fluctuations. The histogram's primary peak (corresponding to the background region) and secondary peaks (potential defect regions) are then identified. If the histogram exhibits a unimodal distribution (indicating extremely low defect contrast), the Otsu algorithm is used to maximize the inter-class variance and automatically select the optimal segmentation threshold. If bimodal distribution is present but with significant overlap (e.g., a broad primary peak and a faint secondary peak), gradient analysis is used to locate the valley point between the peaks, which is defined as the dynamic threshold T.
[0156] For example, in a low-contrast display panel scenario, the main peak corresponds to a uniform background (grayscale concentration range of 120-140), and the secondary peak corresponds to MURA defects (grayscale of approximately 110-115). A dynamic threshold of T = 118 can effectively separate the two. To further enhance robustness, local window statistics (such as 15×15 pixels) are introduced to perform spatially adaptive fine-tuning of the threshold: if the grayscale variance of a certain area is significantly higher than the global mean, the local threshold T is lowered. local =T−Δ to capture more subtle defect signals.
[0157] Finally, the determination of the dynamic threshold T takes into account both global distribution and local features to ensure stable segmentation in complex backgrounds.
[0158] S9, dividing the pixels of the background reconstructed image into a low grayscale area and a high grayscale area according to the dynamic threshold.
[0159] Specifically, based on the dynamic threshold T, the image is binarized into low grayscale areas by pixel-level grayscale comparison ( I ( x, y )≤T) and high grayscale area ( I ( x, y)>T). In order to eliminate misclassification of transition areas near the threshold (such as pixels with grayscale values within the range of T±2), a soft threshold segmentation strategy is adopted: for pixels with grayscale values in the interval [T−5,T+5], membership weights are assigned according to their linear distance from T. w ( x, y )=( I ( x, y )−(T−5)) / 10, the weight of the low grayscale area is 1− w , the weight of the high grayscale area is w .
[0160] This method generates two mask matrices M low ( x, y )and M high ( x, y ), marking the probability of a pixel belonging to a low- and high-grayscale region, respectively. For example, if a pixel has a grayscale value of T+3, the probability of it belonging to a high-grayscale region is 0.8, and the probability of it belonging to a low-grayscale region is 0.2. By using a weighted mask, subsequent processing can smooth the transition area and avoid edge artifacts caused by hard segmentation.
[0161] The soft threshold segmentation strategy of this embodiment can reduce the misclassification rate of defect edges by 40%, especially significantly improving the segmentation effect of MURA defects with fuzzy boundaries (such as penumbra areas).
[0162] S10, performing dynamic range expansion processing on the low grayscale area using a preset first gamma exponential transformation algorithm to amplify the MURA defect contrast and obtain an enhanced low grayscale area.
[0163] Wherein, a first γ exponential transformation algorithm (γ1<1) is used to perform nonlinear dynamic range expansion on low grayscale areas. In some embodiments, the formula of the first γ exponential transformation algorithm may include:
[0164] ;
[0165] in, I enhanced ( x, y) represents the grayscale value of pixels in low-grayscale areas after enhancement by the first gamma exponential transformation algorithm. This algorithm expands the dynamic range through nonlinear mapping, significantly amplifying the contrast of MURA defects. The exponent γ1 is adaptively selected based on the statistical characteristics of the low-grayscale area. If the grayscale distribution in this area is concentrated in the lower range (e.g., 0-80), a smaller γ1 (e.g., 0.3-0.5) is selected to significantly enhance dark details. If the distribution is more dispersed (e.g., 0-120), a moderate γ1 (e.g., 0.6-0.8) is selected to balance contrast enhancement and noise suppression. For example, when γ1 = 0.4, a pixel with an original grayscale of 50 is mapped to approximately 112, a 124% increase in grayscale, amplifying a subtle grayscale shift of MURA defects (e.g., 5 units) into a visible difference (e.g., 15 units). Furthermore, to avoid excessive noise amplification, non-local mean filtering (NL-Means) is performed on the enhanced low-grayscale areas, preserving high-frequency details only in areas with significant gradients (e.g., defect edges). This embodiment can effectively improve the local signal-to-noise ratio (SNR) of low-contrast MURA defects while maintaining a smooth background texture.
[0166] In some embodiments, the formula of the first gamma exponential transformation algorithm may further specifically include:
[0167] ;
[0168] in, I enhanced ( x, y ) represents the pixel value of the enhanced low grayscale area;
[0169] x, y is the pixel coordinate;
[0170] I low ( x, y ) represents the pixel value of the low grayscale area;
[0171] I min Represents the minimum pixel value of the low grayscale area;
[0172] I max Represents the maximum value of the pixel in the low grayscale area;
[0173] γ 1 is the first γ Exponent, representing the contrast expansion coefficient, with a value range of 0< γ 1<1, γ 1The smaller the value, the stronger the contrast stretching.
[0174] Using the above formula, when γWhen 1<1, the normalized low grayscale values are nonlinearly stretched, and the slight grayscale differences in the dark areas (such as MURA defects) are significantly amplified. For example, if γ 1=0.5, the original grayscale difference ΔI=5 (such as 50→55) will be mapped to ΔI′≈15 (such as 70→85), and the contrast is increased by 3 times, making faint defects visible.
[0175] By preserving the original grayscale range (I min and I max ), the enhanced gray value is strictly limited to [I min ,I max ], avoid traditional gamma transformation (such as I′=255⋅(I / 255) γ ) may cause grayscale overflow or truncation problems.
[0176] MURA defects of display panels are usually concentrated in low-grayscale areas (such as brightness leakage in the dark state). The algorithm of this embodiment specifically expands the dynamic range of this area while keeping the high-grayscale areas unaffected, meeting the physical property requirements of defect detection.
[0177] S11, by the preset second γ The exponential transformation algorithm performs dynamic range compression on the high grayscale area to smooth the background grayscale fluctuation and obtain a suppressed high grayscale area.
[0178] Among them, the second γ Exponential Transformation Algorithm ( γ 2>1) Perform dynamic range compression to suppress background fluctuations and smooth noise. γ The formula for the exponential transformation algorithm may include:
[0179] ;
[0180] in, I suppressed (x, y) Indicates that after the second γ The grayscale values of pixels in high grayscale areas are compressed by the exponential transformation algorithm, which compresses the dynamic range through nonlinear mapping, smoothes background grayscale fluctuations and suppresses noise. γ 2. Determine based on the average gradient of the high grayscale area: If the background grayscale fluctuates violently (gradient mean > 10), select a larger γ 2 (e.g. 2.0-3.0) to strongly compress the highlight area; if the fluctuation is gentle (gradient mean < 5), choose a smaller value γ 2 (such as 1.2-1.5), to avoid excessive smoothing that may cause loss of details. For example, when γWhen 2 = 2.5, pixels originally at a grayscale of 200 are compressed to approximately 84, a compression ratio of 58%. Random background noise (e.g., ±3 grayscale fluctuations) is suppressed to within ±0.5 grayscale. Furthermore, anisotropic diffusion filtering is performed on the compressed high-grayscale regions to smooth the background along the grayscale gradient while preserving the edge sharpness of potential defects. Experimental data indicates that this embodiment can reduce the grayscale standard deviation of high-grayscale regions from 8.2 to 2.1, providing a low-noise background for subsequent fusion.
[0181] In some embodiments, the formula of the second gamma exponential transformation algorithm may further specifically include:
[0182] ;
[0183] in, I compressed ( x, y ) represents the high grayscale area after the suppression, x, y is the pixel coordinate, I high ( x, y ) represents the pixel value of the high grayscale area, I min Represents the minimum pixel value of the high grayscale area, I max Represents the maximum value of pixels in high grayscale areas; γ 2 for the second γ Exponent, representing the dynamic range compression coefficient, γ 2>1.
[0184] Using the above formula, high-grayscale areas typically correspond to uniform backgrounds or high-brightness areas on the display panel. Subtle fluctuations (such as sensor noise or uneven illumination) are smoothed out through compression. However, potential defects (such as localized highlight MURA) can still be detected by subsequent differential steps after compression due to their small grayscale differences.
[0185] This algorithm is consistent with the first γ The transformations complement each other: contrast expansion in low-grayscale areas enhances defects, and dynamic range compression in high-grayscale areas suppresses noise. The combination of the two maximizes the signal-to-noise ratio (SNR) of the defect signal to the background noise.
[0186] The formula ensures that the compression operation of high grayscale areas and the enhancement operation of low grayscale areas are consistent in mathematical form through a symmetrical structure, which facilitates joint optimization of parameters (such as γ 1 and γ 2 of the coordinated regulation).
[0187] S12, fusing the enhanced low-grayscale area with the suppressed high-grayscale area to generate the background-enhanced image.
[0188] The fusion process is achieved through weighted superposition, combining the membership weights of soft threshold segmentation and regional enhancement results: I fusion ( x, y ) =M low ( x, y ) ∙ I enhanced ( x, y ) +M high ( x, y ) ∙ I suppressed ( x, y ).
[0189] in, I fusion ( x, y ) represents the background enhanced image generated by weighted fusion of the enhanced low-grayscale area and the compressed high-grayscale area.
[0190] To ensure a smooth transition between the transition regions, the weight mask is smoothed using a Gaussian filter (σ=2) to eliminate grayscale jumps caused by hard edges. For example, within the transition band of grayscale T±5, the fusion weights are gradually varied using a Gaussian function to achieve a smooth transition between enhancement and compression. The fused image must meet the following characteristics:
[0191] 1) The defect contrast in low grayscale areas is significantly improved (e.g., grayscale difference ≥ 20);
[0192] 2) Background uniformity in high grayscale areas (grayscale standard deviation ≤ 3);
[0193] 3) The overall histogram shows a bimodal separation, and the overlapping area between the defect peak and the background peak is less than 10%.
[0194] The signal-to-noise ratio (SNR) of the fused image in this embodiment can be improved by 4 times compared to the original background reconstructed image, and the contrast-to-noise ratio (CNR) of the defect area can reach more than 15dB, providing highly differentiated input data for subsequent differential detection.
[0195] This embodiment adopts the above-mentioned dual γ The exponential transformation algorithm, through dynamic range adaptation, nonlinear mapping and regional collaborative optimization, has significant rationality in both mathematical rigor and engineering practicality, providing an efficient solution for MURA defect detection in complex industrial scenarios.
[0196] S13, subtracting the background enhanced image from the initial image to obtain a difference image.
[0197] This step refers to the relevant description in the above embodiment and will not be repeated here.
[0198] S14, determining the MURA defect detection area based on the difference image.
[0199] This step refers to the relevant description in the above embodiment and will not be repeated here.
[0200] S15 , identifying and processing the MURA defect detection area using a preset MURA defect detection model to obtain a MURA defect detection result of the display panel.
[0201] This step refers to the relevant description in the above embodiment and will not be repeated here.
[0202] The MURA defect detection method based on background reconstruction proposed in this embodiment significantly improves the detection accuracy and reliability of MURA defects by combining multiple advanced image processing and machine learning technologies. The main technical effects are as follows:
[0203] 1. High-precision background reconstruction: Discrete cosine transform (DCT) is used to extract low-frequency background information from the image and remove high-frequency noise. Singular value decomposition (SVD) is then used to reduce the dimensionality of the low-frequency components and extract key background features. Finally, polynomial surface fitting technology is used to accurately fit the background to generate a background image. This process effectively removes background interference, improves the accuracy of background reconstruction, and ensures more accurate subsequent defect detection.
[0204] 2. Contrast Enhancement: A double-gamma segmented exponential transform is used to enhance the contrast of the background reconstructed image. This technology effectively improves the visibility of low-contrast MURA defects while suppressing grayscale variations in background areas. This makes MURA defects more prominent in the image and easier to detect, thereby improving detection sensitivity and accuracy.
[0205] 3. Defect Detection and Localization: The background-enhanced image is subtracted from the original image to generate a difference image, which is used to highlight MURA defects. Image processing techniques such as median filtering and the watershed algorithm are then used to segment the enhanced image and extract the defect areas. Finally, a pre-trained deep learning model (such as the modified YOLOv4-Tiny) is used to detect and locate MURA defects with high precision. This approach not only accurately identifies MURA defects but also precisely determines their location, improving detection robustness and reliability.
[0206] 4. Data Preparation and Model Training: We collected a large number of display panel images, annotated them with the location and category of MURA defects, and divided them into training and test sets. We used this enhanced image data to train a deep learning model, ensuring that the model can adapt to different types of MURA defects and improving its generalization capabilities. This process ensures that the model can accurately detect and locate MURA defects in real-world applications.
[0207] The background reconstruction-based MURA defect detection method of this embodiment comprehensively improves the accuracy and reliability of MURA defect detection through technical means such as high-precision background reconstruction, contrast enhancement, defect detection and location, data preparation, and model training. This method can effectively remove background interference, enhance the visibility of low-contrast defects, accurately identify and locate MURA defects, and is suitable for production quality inspection of various display panels. Through the combined use of these technical means, the present invention not only addresses the shortcomings of traditional detection methods in low-contrast and randomly located MURA defect detection, but also provides an efficient and accurate detection solution for the display panel production industry.
[0208] The method provided in the above embodiment can be executed by an electronic device. The following describes the electronic device in the embodiment of the present invention from the perspective of hardware processing. Figure 2 , which is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present invention.
[0209] It should be noted that Figure 2 The structure of the electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0210] like Figure 2As shown, the electronic device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes, such as the methods described in the above embodiments, based on programs stored in a read-only memory (ROM) 402 or programs loaded from a storage unit 408 into a random access memory (RAM) 403. RAM 403 also stores various programs and data required for system operation. CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0211] The following components are connected to the input / output (I / O) interface 405: an input section 406 including an audio input device, push button switches, and the like; an output section 407 including a display, an audio output device, indicator lights, and the like; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read from the media can be installed in the storage section 408 as needed.
[0212] In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present invention includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409 and / or installed from removable media 411. When executed by the central processing unit (CPU) 401, the computer program performs the various functions defined in the present invention.
[0213] It should be noted that specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0214] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings.
[0215] Specifically, the electronic device of this embodiment includes a processor and a memory, the memory is coupled to one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the electronic device to execute the method provided by the above embodiment.
[0216] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not incorporated into the electronic device. The storage medium carries one or more computer programs, and when executed by a processor of the electronic device, the electronic device implements the methods provided in the above embodiments.
[0217] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
[0218] As used in the above embodiments, the term “when” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0219] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A MURA defect detection method based on background reconstruction, characterized in that: include: Acquire the initial image displayed by the display panel; Performing discrete cosine transform processing on the initial image to extract low-frequency background components; Denoising the low-frequency background components based on a singular value decomposition algorithm to obtain main background features; constructing an input data set for surface fitting according to the main background features; constructing a background fitting polynomial based on the structure and complexity of the input data set; The mathematical expression of the background fitting polynomial includes: ; in, B ( x,y ) is the background gray value, indicating the pixel coordinates ( x,y ) at the background brightness; w k ( x,y ) is the k The weight function of each sub-region; K is the total number of sub-regions into which the image is divided; i,j are powers respectively; a ijk Indicates the k In the sub-area x i y j The coefficient of the term; N k Indicates the k The polynomial order of the subregions; λ is the regularization coefficient; b ijk is the coefficient of the regularized cross term; β represents the exponential decay coefficient; e is a natural constant; Solving the coefficients of the background fitting polynomial using an optimization algorithm according to the input data set to obtain a solved polynomial model; generating a background reconstructed image based on the solved polynomial model; performing contrast enhancement processing on the background reconstructed image to obtain a background enhanced image; subtracting the background enhanced image from the initial image to obtain a difference image, wherein the difference image is used to highlight MURA defects; Determining a MURA defect area to be detected based on the difference image; Identifying and processing the MURA defect detection area using a preset MURA defect detection model to obtain a MURA defect detection result of the display panel, wherein the MURA defect detection result includes an existence mark, location coordinates, area, and morphological description of the MURA defect; The training method of the MURA defect detection model includes: constructing a balanced dataset containing normal and defective samples; using data augmentation strategies to expand the diversity of the dataset; the model architecture adopts an encoder-decoder structure that integrates U-Net and an attention mechanism. The encoder extracts multi-scale features through ResNet-50, and the decoder integrates local details and global context information using skip connections and a spatial pyramid pooling module. A channel attention module is embedded in the skip connections to enhance the feature response of the defect area. A combined loss function is used to address the problem of class imbalance, and the Adam optimizer is used to dynamically adjust the learning rate. The early stopping strategy and cross-validation are used to prevent overfitting. For classification tasks, the MURA defect detection model outputs binary classification probabilities, which are optimized using the cross-entropy loss function. For localization tasks, the output is a pixel-level defect mask, which uses the Dice loss or boundary weighted loss function to enhance edge accuracy.
2. The method according to claim 1, characterized in that Generating a background reconstructed image based on the solved polynomial model includes: Generating a reconstructed background surface covering all pixel positions of the image according to the solved polynomial model; determining a local difference between the reconstructed background surface and the main background feature; Dynamically adjusting the polynomial order of the solved polynomial model based on the local difference to obtain an optimized polynomial surface; The background reconstructed image is generated according to the optimized polynomial surface.
3. The method according to any one of claims 1-2, characterized in that The step of performing contrast enhancement processing on the background reconstructed image to obtain a background enhanced image includes: Determining a dynamic threshold for distinguishing a defect area from a background area according to a grayscale histogram of the background reconstructed image; Dividing the pixels of the background reconstructed image into low grayscale areas and high grayscale areas according to the dynamic threshold; Performing dynamic range expansion processing on the low-grayscale area by using a preset first gamma exponential transformation algorithm to amplify the MURA defect contrast and obtain an enhanced low-grayscale area; Performing dynamic range compression processing on the high grayscale area by using a preset second gamma exponential transformation algorithm to smooth background grayscale fluctuations and obtain a suppressed high grayscale area; The enhanced low-grayscale area and the suppressed high-grayscale area are fused to generate the background-enhanced image.
4. The method according to claim 3, characterized in that The formula of the first gamma exponential transformation algorithm includes: ; in, I enhanced ( x,y ) represents the pixel value of the enhanced low grayscale area, x,y is the pixel coordinate, I low ( x,y ) represents the pixel value of the low grayscale area, I min represents the minimum pixel value of the low grayscale area, I max represents the maximum value of pixels in the low grayscale area; γ1 is the first γ index, representing the contrast expansion coefficient, and its value range is 0<γ1<1.
5. The method according to claim 3, characterized in that The formula of the second gamma exponential transformation algorithm includes: ; in, I compressed ( x,y ) represents the high grayscale area after the suppression, x,y is the pixel coordinate, I high ( x,y ) represents the pixel value of the high grayscale area, I min represents the minimum pixel value of the high grayscale area, I max Represents the maximum value of pixels in high grayscale areas; γ2 is the second γ index, representing the dynamic range compression coefficient, γ2>1.
6. An electronic device, characterized in that: including one or more processors and memory; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 5.
7. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 5.
8. A computer program product, characterized in that When the computer program product is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent terminal control method and system based on vision
CN107562208A
Lithium battery pole piece coating defect detection method and related equipment
CN117611540A