MURA defect detection method based on background reconstruction and related equipment

Through the background reconstruction method, the low-frequency background components of the display panel image are extracted and denoised, and contrast is enhanced, the problem of low detection accuracy of MURA defects in the prior art is solved, and higher detection accuracy and reliability are achieved.

CN119850636AActive Publication Date: 2025-04-18SHENZHEN ZHENGTONG RENHE TECH CO LTD

Patent Information

Application Number
CN202510340873.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-04-18
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

In the prior art, when detecting MURA defects in the display panel, especially when the MURA area is small and the grayscale from the image background is not much different, the detection accuracy is not high, and missed detection or false detection is prone to occur.

Method used

The MURA defect detection method based on background reconstruction is adopted, and the low-frequency background components of the initial image are extracted through discrete cosine transformation, and the singular value decomposition and denoising process is used to reconstruct the background image, and the contrast enhancement process is performed to highlight the MURA defect.

Benefits of technology

It significantly improves the accuracy and reliability of MURA defect detection. Even if the MURA area is small and there is little difference from the background grayscale, it can effectively detect and locate defects, reducing the risk of missed detection and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850636A_ABST
    Figure CN119850636A_ABST
Patent Text Reader

Abstract

The invention discloses an MURA defect detection method based on background reconstruction and related equipment, and relates to the field of image processing. The method comprises the following steps: acquiring an initial image displayed by a 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; performing fitting reconstruction on the main background features through a polynomial surface fitting algorithm to obtain a background reconstruction image; performing contrast enhancement processing on the background reconstruction image to obtain a background enhancement image; subtracting the background enhancement image from the initial image to obtain a difference image; determining an MURA defect area to be detected according to the difference image; and performing identification processing on the MURA defect to-be-detected area through a preset MURA defect detection model to obtain an MURA defect detection result of the display panel. According to the technical scheme, the MURA defect detection precision can be improved.
Need to check novelty before this filing date? Find Prior Art

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 defect refers to an abnormal display phenomenon that occurs during the production process of display panels, which is mainly manifested as uneven display brightness, spots, stripes, etc. These defects seriously affect the display effect and product quality of the display panel. MURA defects not only affect the appearance of the display panel, but may also cause distortion of the displayed content and reduce the user's visual experience. Therefore, accurate detection and control of MURA defects is very important for improving the production quality of display panels.

[0003] In the related art, there is a solution based on an edge detection algorithm 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 object of the present invention is to provide a MURA defect detection method based on background reconstruction and related equipment, which can improve the MURA defect detection accuracy.

[0006] To achieve the above-mentioned purpose, 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; performing fitting and reconstruction on the main background features by 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 according to the difference image; performing identification processing on the MURA defect to-be-detected area by 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] The present invention effectively improves the MURA defect detection accuracy through high-precision background reconstruction and contrast enhancement technology. First, the low-frequency background information of the initial image is extracted by discrete cosine transform, and the noise is removed by singular value decomposition and dimensionality reduction, and then the background image is reconstructed by polynomial surface fitting. Then, the background reconstructed image is contrast enhanced to highlight the MURA defects. Even if the MURA area is small and the grayscale difference with the background is not large, the difference image of the prominent defect can be obtained by background subtraction, and then high-precision detection and positioning are achieved through image processing and deep learning model detection, which effectively improves the MURA defect detection accuracy.

[0008] Optionally, in some embodiments, the main background features are fitted and reconstructed by 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] By adopting the technical solution of the above embodiment, a method for fitting and reconstructing the main background features through 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 through 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. Optionally, in some embodiments, the mathematical expression of the background fitting polynomial includes: ; in, B ( x, y ) is the background gray value, indicating that at 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 k In the sub-area x i y j The coefficient of the term;N k Indicates 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.

[0010] The technical solution of the above embodiment is adopted to further describe the mathematical expression of the background fitting polynomial in detail, and introduce parameters such as sub-region weight function, regularization coefficient and exponential decay coefficient. This detailed mathematical expression makes the background fitting more flexible and accurate, can adapt to the background feature changes in different regions, and improve the accuracy and generalization ability of fitting. In this way, the background reconstruction image can better reflect the actual background features, reduce the risk of model overfitting, and improve the robustness and adaptability of the detection model.

[0011] 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 according to 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 according to the optimized polynomial surface.

[0012] The technical solution of the above embodiment is used to describe in detail how to generate a background reconstruction image based on the solved polynomial model. By generating a reconstructed background surface covering the pixel positions of the entire image, determining the local difference between the reconstructed background surface and the main background features, and dynamically adjusting the polynomial order based on the local difference, an optimized polynomial surface is obtained, and finally a background reconstruction image is generated. The beneficial effect of this method is that it can dynamically adapt to changes in background features, optimize the background fitting model, further improve the accuracy and quality of background reconstruction, make the background reconstruction image closer to the real background, and reduce the interference of the background on MURA defect detection.

[0013] 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.

[0014] By adopting the technical solution of the above embodiment, a method for contrast enhancement processing of a background reconstructed image is provided, wherein the image pixels are divided into low grayscale areas and high grayscale areas by a dynamic threshold, and the first γ exponential transformation algorithm and the second γ exponential transformation algorithm are respectively applied for processing, and finally a background enhanced image is generated by fusion. The beneficial effect of this method is that the contrast can be adaptively adjusted according to the grayscale distribution of the image, the MURA defect contrast in the low grayscale area can be amplified, and the background grayscale fluctuation in the high grayscale area can be smoothed, thereby improving the quality and visual effect of the background enhanced image and enhancing the detectability of the MURA defect.

[0015] Optionally, in some embodiments, 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 pixel value of the low grayscale area; γ1 is the first γ index, representing the contrast expansion coefficient, and its value range is 0<γ1<1.

[0016] By adopting the technical solution of the above embodiment, a new formula of the first γ exponential transformation algorithm is provided, and by introducing the contrast expansion coefficient γ1, the dynamic range expansion degree of the low grayscale area can be accurately controlled. This detailed formula description makes the contrast amplification of MURA defects in low grayscale areas more accurate and effective, improves the sensitivity of defect detection, and helps to better identify and locate low-contrast MURA defects.

[0017] Optionally, in some embodiments, the formula of the second gamma exponential transformation algorithm includes: ; in, I compressed ( x, y ) represents the high grayscale area after 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.

[0018] By adopting the technical solution of the above embodiment, a formula of the second γ exponential transformation algorithm is provided, and by introducing the dynamic range compression coefficient γ2, the dynamic range compression degree of the high grayscale area can be accurately controlled. This detailed formula description makes the background grayscale fluctuation smoothing in the high grayscale area more accurate and effective, reduces the interference of the background on MURA defect detection, improves the accuracy and reliability of detection, and ensures the quality and visual effect of the background enhanced image.

[0019] 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 method of the first aspect or the second aspect.

[0020] In a third aspect, the present invention provides a computer-readable storage medium comprising instructions, which, when executed on the electronic device, causes 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.

[0021] 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.

[0022] It is understandable 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 in the present invention. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.

[0023] One or more technical solutions provided by the present invention have at least the following technical effects or advantages: 1. Improve the detection accuracy of MURA defects: The present invention significantly improves the detection accuracy of MURA defects through high-precision background reconstruction and contrast enhancement technology. First, the low-frequency background information of the initial image is extracted by discrete cosine transform, and the noise is removed by singular value decomposition and dimensionality reduction to generate an accurate background image. Then, the background reconstructed image is contrast enhanced by double γ piecewise exponential transform to highlight MURA defects. Even if the MURA area is small and the grayscale difference with the background is not large, the difference image of the prominent defect can be obtained by background subtraction, and then high-precision detection and positioning can be achieved through image processing and deep learning model detection.

[0024] 2. Enhance the contrast of low-contrast MURA defects: The present invention uses a double-gamma segmented exponential transform to perform dynamic range expansion processing on low-grayscale areas, amplifying the grayscale difference between MURA defects and the background, making the originally imperceptible low-contrast defects more obvious and easier to detect. At the same time, dynamic range compression processing is performed on high-grayscale areas to smooth background grayscale fluctuations and reduce background interference with defect detection. In this way, the background-enhanced image can more clearly highlight MURA defects and improve the sensitivity and accuracy of detection.

[0025] 3. Improve detection efficiency and reliability: This invention integrates a variety of advanced image processing and machine learning technologies to achieve full-process automation from image acquisition to defect detection. This not only improves the efficiency of detection, but also reduces the uncertainty and errors caused by manual intervention. At the same time, by dynamically adjusting the polynomial order and optimizing the algorithm solution, the accuracy and adaptability of background reconstruction and contrast enhancement are ensured, the generalization ability and robustness of the detection model are improved, and the detection results are more reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into and constitute a part of the specification, showing 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 for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 is a flow chart of a MURA defect detection method based on background reconstruction according to an embodiment of the present invention; Figure 2 It is a schematic diagram of the architecture of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The terms used in the following embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to be limiting of the present invention. As used in the specification of the present invention, the singular expressions "a", "a", "above", "the" and "this" are intended to also include plural expressions, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present invention refers to any or all possible combinations comprising one or more of the listed items.

[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, unless otherwise specified, the meaning of "plurality" is two or more.

[0029] It should also be noted that, unless otherwise clearly specified and limited, in the embodiments of the present invention, the 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, it can be the internal connection of two components; it can be a wired communication connection or a wireless communication connection. For ordinary technicians in this field, 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.

[0030] 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: Step 201: Acquire an initial image displayed by a display panel.

[0031] Specifically, high-precision image acquisition equipment can be used. First, place the display panel to be tested on a stable testing 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 to capture images of the display panel in conjunction with a uniform light source. The brightness and angle of the light source must be precisely calibrated to ensure the uniformity and consistency of the 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.

[0032] 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, denoising and other operations to eliminate environmental noise and interference introduced by the acquisition equipment.

[0033] 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.

[0034] 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 state of the display panel.

[0035] Step 202: Perform discrete cosine transform processing on the initial image to extract low-frequency background components.

[0036] Among them, Discrete Cosine Transform (DCT) is a mathematical tool that converts images from the spatial domain to the frequency domain. Its core idea is to represent the grayscale distribution of an image as a linear combination of different frequency components through basis function decomposition. In this step, DCT is used to separate the low-frequency background components of the image from the high-frequency details and noise. The specific implementation is as follows: 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 basis function of DCT has the characteristic of energy concentration. The low-frequency component (corresponding to the upper left corner coefficient in the basis function) represents the slowly changing background area in the image, while the high-frequency component (lower right corner coefficient) corresponds to the edge, texture, and noise. By retaining only the low-frequency coefficients (e.g., retaining the low-frequency coefficients of the upper left corner of each sub-block) and setting the remaining high-frequency coefficients to zero, the low-frequency background components can be extracted.

[0037] Then, the low-frequency coefficients retained after processing are subjected to 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 components of the entire image are finally obtained.

[0038] This process effectively filters out high-frequency noise and local detail interference, making the global grayscale distribution characteristics of the background stand out. For example, in MURA defect detection of display panels, the uniform brightness background of the panel mainly corresponds to low-frequency energy, while the defective area contains high-frequency components due to grayscale mutations. Therefore, the low-frequency separation characteristics of DCT can effectively distinguish between background and potential defects.

[0039] Step 203: De-noising the low-frequency background components based on a singular value decomposition algorithm to obtain main background features.

[0040] 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 smooth base after noise removal.

[0041] 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, Σ 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, which is specifically implemented as follows: First, the grayscale image of the low-frequency background component is regarded as a two-dimensional matrix A, and SVD decomposition is performed on it. 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. The noise component can be suppressed by setting a threshold (such as retaining the first k largest singular values, k is determined according to the energy accumulation ratio) or truncating the singular values ​​(setting the singular values ​​less than 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.

[0042] After truncation, the matrix A′=UΣ′V is reconstructed using the retained singular values T (where Σ' is the truncated diagonal matrix), the main background features after denoising can be obtained. This process significantly improves the robustness of the background model by retaining the main components, while eliminating the interference of random noise on subsequent defect detection.

[0043] In this embodiment, the background feature matrix after SVD denoising can more accurately reflect the ideal uniform background of the display panel, and the grayscale difference with the defect area is further amplified, providing high signal-to-noise ratio input data for subsequent defect segmentation. For example, under complex lighting conditions, SVD can effectively eliminate the residual gradient noise in the low-frequency background, ensuring that the defect detection algorithm only focuses on the real MURA defect signal.

[0044] Step 204: Fit and reconstruct the main background features using a polynomial surface fitting algorithm to obtain a background reconstructed image.

[0045] Specifically, the main background feature data obtained through singular value decomposition processing are first organized into a two-dimensional matrix, wherein the rows and columns of the matrix correspond to the pixel rows and columns of the image.

[0046] Next, the region for polynomial surface fitting is determined based on the distribution range of the main background features. Usually, this region covers the entire image or the region where the main background features are concentrated.

[0047] Then, according to the complexity of the background features, a suitable polynomial order is selected. For simple background features, a low-order polynomial, such as a quadratic or cubic polynomial, may be selected, while for complex background features, a higher-order polynomial may be required.

[0048] Next, based on the selected polynomial order, a polynomial surface fitting model is established. 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.

[0049] Afterwards, the least squares method and other algorithms are used to solve the parameters of the polynomial surface fitting model. The least squares method finds the best 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.

[0050] 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.

[0051] If the image is processed in blocks, the background reconstructed images of each block need to be fused to generate a complete background reconstructed image, and the generated background reconstructed image needs to be post-processed, such as smoothing and denoising, to improve the image quality and visual effect. This process can effectively remove background interference, improve the smoothness and continuity of the background, and provide more accurate background information for subsequent MURA defect detection.

[0052] Step 205: Perform contrast enhancement processing on the background reconstructed image to obtain a background enhanced image.

[0053] Among them, contrast enhancement processing aims to adjust the grayscale dynamic range of the background reconstructed image to amplify the potential difference between the background and the defect area, and provide a high-distinction input for the subsequent difference operation. This step can be achieved by using adaptive gamma correction combined with histogram stretching technology.

[0054] 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 LIn 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 For the area with gamma value γ2>1, a transformation is used to compress the dynamic range of the highlight area; the middle gray range maintains linear mapping to avoid excessive distortion.

[0055] By dynamically adjusting γ1, γ2 and threshold parameters, the enhanced image can retain the background smoothness while strengthening the grayscale gradient of the potential defect edge. For example, in display panels, MURA defects usually appear as local grayscale shifts, and contrast enhancement can make such shifts more prominent in the background.

[0056] In addition, the enhanced image is histogram-equalized to further increase the interval between different gray levels and maximize the gray difference between the defect and the background. This process avoids the problem of local overexposure or detail loss caused by traditional global enhancement methods through a parameter adaptive mechanism, laying a high-quality data foundation for subsequent differential calculations.

[0057] Step 206: subtract the background enhanced image from the initial image to obtain a difference image, which is used to highlight the MURA defect.

[0058] 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.

[0059] This step separates the grayscale anomaly of the MURA defect from the complex background by eliminating the idealized background components.

[0060] In the specific implementation, the initial image and the background enhanced image are first spatially aligned and grayscale normalized to ensure that they have the same size, resolution, and grayscale quantization range. Then the grayscale difference is calculated pixel by pixel, and the absolute value is taken to avoid the positive and negative cancellation problem. Since the background enhanced image has been approximated to the ideal uniform background through fitting and contrast enhancement, the real defect area (such as the local brightness offset of MURA) will produce a significant non-zero value after the difference, while the uniform background area is suppressed to a value close to zero due to the consistency of grayscale.

[0061] To further improve the signal-to-noise ratio, nonlinear mapping (such as logarithmic transformation or S-curve adjustment) is performed on the difference image to expand the response intensity of the defect area and compress 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 gray levels, which can be clearly seen in the final image through nonlinear mapping.

[0062] 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, which can be directly used for threshold segmentation or morphological processing to achieve accurate positioning and quantitative analysis of defects.

[0063] Step 207: Determine the MURA defect detection area according to the difference image.

[0064] The core goal of determining the MURA defect test area is to extract the candidate area of ​​potential defects from the difference image while excluding background residual noise and artifact interference. The specific implementation is divided into the following processes: First, the difference image is segmented by adaptive threshold, and the segmentation threshold is dynamically set according to the statistical characteristics of the grayscale distribution. For example, the difference image is divided into foreground (potential defect area) and background (uniform area) using the Otsu algorithm or the mean-standard deviation method based on the local window. Since MURA defects usually appear as continuous and small grayscale anomalies, morphological operations (such as closing operations) are required to connect adjacent foreground pixels after segmentation to eliminate isolated points or fragmented areas caused by noise.

[0065] Subsequently, connected component analysis (CCA) is used to mark all candidate regions and extract their features such as position, area, shape factor (such as aspect ratio, circularity), etc. The screening conditions (such as the minimum defect area threshold and shape regularity index) are set according to prior knowledge to eliminate pseudo targets that do not meet the MURA defect characteristics. For example, in display panel inspection, real MURA defects usually appear as irregular flakes or linear structures with an area greater than 5×5 pixels and a shape factor lower than the threshold, while noise points appear as scattered points or very small areas. To further improve the positioning accuracy, the candidate regions are subjected to sub-pixel edge refinement, and the defect boundaries are accurately calibrated using Canny edge detection or non-maximum suppression algorithm based on gradient amplitude.

[0066] Finally, a set of candidate region coordinates and masks are output as the MURA defect targets to be detected. This process significantly reduces the false detection rate through multi-level screening and feature verification, while ensuring the sensitivity of weak defects. For example, in low-contrast scenes, this embodiment can detect MURA defects with grayscale differences of only 3-5 units, and the positioning error is less than 1 pixel.

[0067] Step 208 : 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.

[0068] The MURA defect detection result includes whether a MURA defect exists or the location of the MURA defect.

[0069] 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 positioning through end-to-end training. The implementation process of the MURA defect detection model is as follows: First, the candidate regions outputted in step 207 are cropped from the initial image into local image blocks and subjected to standardized preprocessing (e.g., normalization to a uniform size, grayscale equalization). The model input is multi-channel data, including original grayscale image blocks, difference image blocks, and background reconstruction image blocks, to fuse information at different feature levels. The main body of the model uses a multi-scale convolution module to capture the global context and local detail features of the defect through parallel dilated convolutions, and dynamically weights the feature responses of important areas in combination with an attention mechanism (e.g., SENet or CBAM).

[0070] For classification tasks, the output of the MURA defect detection model is a binary classification probability (defect / non-defect), which is optimized using the cross entropy loss function; for positioning tasks, the output is a pixel-level defect mask, and the Dice loss or boundary weighted loss function is used to enhance edge accuracy. In the inference stage, the model makes independent predictions for each candidate area and makes a comprehensive judgment based on the classification confidence and positioning results. For example, if the classification probability of a certain area is higher than 0.95 and the overlap between the mask coverage area and the candidate area exceeds 90%, it is determined to be a real MURA defect, and its center coordinates and bounding box information are recorded.

[0071] The final output results include the existence mark, location coordinates, area and morphological description (such as point, line or sheet) of the defect. In this embodiment, the MURA defect detection model has a recall rate of more than 95% for tiny defects (area less than 10×10 pixels), which is significantly improved compared with traditional template matching or threshold segmentation methods. In addition, the model supports real-time reasoning, and the processing time of a single image is less than 50ms, which meets the efficiency requirements of industrial assembly lines.

[0072] In this embodiment, the training method of the MURA defect detection model is as follows: Firstly, the original images of display panels under different lighting conditions, production processes and defect morphologies are collected, and the MURA defect areas are annotated at the pixel level by combining manual and semi-automatic annotation tools to construct a balanced dataset containing normal samples and defective samples.

[0073] Secondly, the training data is generated by enhancing the display panel images in real industrial scenarios, including synthetic samples of different brightness, contrast and defect morphology to improve the generalization ability of the model. Furthermore, data enhancement strategies (such as random rotation, brightness perturbation, Gaussian noise injection and simulated panel moiré generation) can be used to expand the diversity of the data set to better improve the generalization ability of the model for complex industrial scenarios.

[0074] 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 and global context information. At the same time, a channel attention module (CBAM) is embedded in the skip connection to enhance the feature response of the defect area.

[0075] During the training process, a combined loss function (weighted Dice loss and Focal loss) was used to solve the category imbalance problem, 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 more than 95%. It also supports real-time reasoning under GPU acceleration to meet industrial detection needs.

[0076] This embodiment aims at the problems of missed detection and false detection in MURA defect detection by traditional edge detection methods. By constructing a multi-level processing framework of "background separation-feature enhancement-difference focusing", the recognition accuracy of tiny low-contrast MURA defects is improved. First, discrete cosine transform (DCT) is used to extract low-frequency background components, and high-frequency noise interference is effectively removed through frequency domain separation, so that the weak signal of MURA defects is retained in the medium and high frequency regions, which solves the problem of feature blurring caused by the aliasing of background and defect spectrum in traditional methods. Then, singular value decomposition (SVD) is used to perform matrix dimensionality reduction processing on the low-frequency background, and random noise is filtered out by retaining the main eigenvalues, making the background features purer and more stable. On this basis, a polynomial surface fitting algorithm is used to perform high-precision mathematical modeling on the background after noise reduction, and a surface equation that is highly consistent with the real background morphology is constructed through the least squares method, accurately approximating the gradient background of the display panel (such as edge brightness attenuation or process gradient), avoiding the under-fitting problem of traditional linear fitting on complex backgrounds, and generating a high-fidelity background reconstruction image. After the grayscale dynamic range of the reconstructed background is enhanced by contrast enhancement, a pixel-level differential operation is performed with the initial image to decouple the weak signal of the MURA defect from the background. This embodiment effectively improves the detection accuracy of MURA defects through the above-mentioned multi-level background reconstruction and differential enhancement mechanism. In particular, when the MURA area is relatively small and the grayscale difference with the image background is not large, the detection accuracy improvement effect is more obvious.

[0077] This embodiment also provides a MURA defect detection method, including the following steps: S1, obtaining an initial image displayed by the display panel.

[0078] This step refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0079] S2, performing discrete cosine transform processing on the initial image to extract low-frequency background components.

[0080] This step refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0081] S3, denoising the low-frequency background components based on the singular value decomposition algorithm to obtain the main background features.

[0082] This step refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0083] S4, construct an input data set for surface fitting based on the main background features.

[0084] Among them, the construction of the input data set is the basis for realizing background surface fitting, and its core is to transform the main background feature matrix after SVD denoising into structured data suitable for polynomial fitting.

[0085] Specifically, each pixel of the main 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 usually high-resolution (such as 4K×2K pixels), directly using full-pixel data will lead to a surge in computational complexity, so downsampling is required: while retaining the background macroscopic distribution characteristics, uniform sampling is performed at fixed intervals (such as every 10 pixels) to generate a sparse but representative sub-data set. For example, for a panel with a gradient brightness background, sampling needs to cover the central uniform area, edge attenuation area, and transition area to ensure the balance of spatial distribution.

[0086] At the same time, the coordinates (x, y) are normalized and mapped to the interval [−1, 1] to eliminate the dimension difference and avoid the high-order polynomial terms causing computational instability due to the large value range. Finally, the input data set D can be expressed as , where N is the number of sampling points, z i is the gray value after denoising. This process significantly reduces the complexity of fitting calculations while retaining the global trend of the background through spatial downsampling and normalization, providing an efficient and high-fidelity data foundation for subsequent modeling.

[0087] S5, constructing a background fitting polynomial based on the structure and complexity of the input data set.

[0088] 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 gradient), high-order terms (such as cubic or quartic polynomials) need to be introduced to improve fitting accuracy.

[0089] In the specific implementation, we first analyze the grayscale distribution of the input data set visually (such as 3D surface map or contour map) to qualitatively judge the curvature change and nonlinearity of the background; then, we quantitatively evaluate the goodness of fit of different order models based on statistical indicators (such as residual sum of squares and adjusted R2), and select the lowest order that makes the adjusted R2 approach 1 and the residual has no significant trend. For example, if the residual still shows a systematic spatial distribution after fitting the quadratic polynomial (such as the residual in the edge area is continuously high), it is necessary to upgrade to a cubic polynomial (adding x3, y3, x2y, xy2 terms).

[0090] 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 too high an order.

[0091] In some embodiments, the mathematical expression of the background fitting polynomial may specifically include: ; in, x, y is the two-dimensional spatial coordinate of the pixel, which serves as the input variable of the polynomial model.

[0092] 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.

[0093] 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).

[0094] K It is the total number of sub-regions into which the image is divided, and is used to fit the complex background by region.

[0095] i, j are powers respectively.

[0096] a ijk Indicates k In the sub-area x i y j The coefficients of the terms are solved by an optimization algorithm to fit the background characteristics.

[0097] N k express k The maximum order of the polynomial for each sub-region is dynamically adjusted according to the local background complexity (such as curvature or gradient).

[0098] λ is the regularization coefficient, which controls the influence of cross terms on the overall model and prevents overfitting of high-order terms.

[0099] b ijk is the regularized cross term x i y j The coefficients of are used to suppress polynomial oscillations in the edge region.

[0100] β 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).

[0101] 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.

[0102] The exponential regularization term is used to suppress the edge high-frequency distortion. The exponential decay term added later , the attenuation rate is controlled by parameter β to achieve the high-order terms (i+j=N k ) space constraints.

[0103] The background fitting polynomial is collaboratively designed by region, order, and regularization constraints, which mathematically guarantees the stability and accuracy of the fitting surface, and adapts to the spatial heterogeneity of the display panel background in engineering, providing a high-fidelity background benchmark for MURA defect detection.

[0104] S6, according to the input data set, solving the coefficients of the background fitting polynomial by using an optimization algorithm to obtain a solved polynomial model.

[0105] Specifically, the data points in the input data set are first substituted into the background fitting polynomial to construct an objective function, which is usually defined as the sum of squared errors between the polynomial model predictions and the actual observed values.

[0106] Then, select a suitable optimization algorithm to minimize the objective function. Common optimization algorithms include least squares method, gradient descent method, Newton method, etc. Taking the least squares method as an example, it finds the polynomial coefficient value that minimizes the sum of squared errors by solving the least squares solution of the linear equations. In the calculation process, firstly, the partial derivative of the objective function is calculated for each polynomial coefficient to obtain a set of linear equations, and then the equations are solved by matrix operations to obtain the estimated values ​​of the polynomial coefficients.

[0107] Next, verify the accuracy and fit of the polynomial model. You can evaluate the performance of the model by calculating the prediction error of the model on the input data set and using cross-validation. If the model fit is not satisfactory, you may need to adjust the polynomial order or optimize the algorithm parameters and solve it again.

[0108] In the above way, the coefficients of the background fitting polynomial are solved 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.

[0109] S7, generating the background reconstructed image based on the solved polynomial model.

[0110] Specifically, first determine the size and pixel coordinate range of the background reconstructed image, which is usually consistent with the size of the original input image to ensure the spatial correspondence between the reconstructed image and the original image. Then, for each pixel in the image, according to its pixel coordinates (x, y), substitute x and y into the solved polynomial model to calculate the corresponding gray value z.

[0111] Next, the grayscale values ​​of all pixels are combined into a two-dimensional matrix to form the grayscale matrix of the background reconstruction 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.

[0112] Finally, the grayscale matrix is ​​converted to an image format. This conversion can usually be achieved using an image processing library or tool, 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. The final background reconstruction image must meet the following characteristics: 1) Global smoothness and continuity, without local mutations or jagged edges; 2) Highly consistent with the low-frequency background components of the initial image (verified by the SSIM structural similarity index); 3) The grayscale differences in defect areas (such as MURA) are effectively suppressed in the reconstructed image.

[0113] 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.

[0114] In some embodiments, this step may specifically include steps S71-S74: S71, generating a reconstructed background surface covering all pixel positions of the image based on the solved polynomial model.

[0115] First, determine the size and pixel coordinate range of the background reconstructed image to ensure that it is consistent with the size of the original input image to maintain the spatial correspondence. Then, for each pixel in the image, according to 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 combine the coefficients a0, a1, ..., a5 obtained by the solution to calculate the corresponding z value, that is, the grayscale value of the pixel.

[0116] 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.

[0117] Finally, the grayscale matrix is ​​converted to an image format. This conversion can usually be achieved 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.

[0118] 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.

[0119] S72, determining the local difference between the reconstructed background surface and the main background feature.

[0120] 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 The difference can be expressed in absolute terms or in squared terms, depending on the difference measure used.

[0121] Next, analyze the difference matrix to determine the areas with large local differences. A threshold can be set to mark the 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. S73, dynamically adjusting the polynomial order of the solved polynomial model based on the local difference to obtain an optimized polynomial surface.

[0122] Specifically, we first analyze the distribution of local differences to determine the areas that need to be adjusted and the direction of adjustment. If the local differences are large in some 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.

[0123] Then, according to 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³.

[0124] Next, the system of equations is reconstructed using the original input data set and the adjusted polynomial, and the new polynomial coefficients are solved by an optimization algorithm. This step is similar to the previous process of solving the polynomial coefficients, except that the order of the polynomial and the corresponding coefficients have changed. For example, an optimization algorithm such as the least squares method is used to solve the new polynomial coefficients so that the adjusted polynomial model can better fit the main background features and reduce local differences.

[0125] Finally, verify the accuracy and fitting effect of the optimized polynomial model. The performance of the model can be evaluated by calculating the prediction error of the model on the input data set and using cross-validation. If the fitting effect of the model is still not ideal, it may be necessary to further adjust the polynomial order or the parameters of the optimization algorithm and repeat the above process until a satisfactory optimized polynomial surface is obtained.

[0126] S74, generating the background reconstructed image according to the optimized polynomial surface.

[0127] 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 so as to maintain a spatial correspondence.

[0128] Then, for each pixel in the image, according to 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 combine the coefficients a0, a1, ..., a9 obtained by solving, to calculate the corresponding z value, that is, the grayscale value of the pixel.

[0129] Next, the grayscale values ​​of all pixels are combined into a two-dimensional matrix to form the grayscale matrix of the optimized background reconstruction 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.

[0130] Finally, the grayscale matrix is ​​converted to an image format. This conversion can usually be achieved 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.

[0131] The generated background reconstructed image can reflect the main background features more accurately, has a smoother background and clearer structure, further removes the 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.

[0132] S8, determining a dynamic threshold for distinguishing the defect area from the background area according to the grayscale histogram of the background reconstructed image.

[0133] The dynamic threshold is determined based on the statistical characteristics of the grayscale histogram and the bimodal separation criterion, and the background and defects are distinguished through an adaptive algorithm.

[0134] First, the grayscale histogram of the background reconstructed image is smoothed (such as Gaussian kernel convolution) to eliminate burr interference caused by noise or local fluctuations, and then the main peak (corresponding to the background area) and the secondary peak (potential defect area) of the histogram are identified. If the histogram is unimodal (indicating that the defect contrast is extremely low), the Otsu algorithm is used to maximize the inter-class variance and automatically select the optimal segmentation threshold; if there are two peaks but the overlap is serious (such as the main peak is wide and the secondary peak is weak), the gradient analysis method is combined to locate the valley point between the peaks, which is defined as the dynamic threshold T.

[0135] For example, in a low-contrast display panel scenario, the main peak corresponds to a uniform background (grayscale concentration interval is 120-140), and the secondary peak corresponds to a MURA defect (grayscale is about 110-115). The dynamic threshold T=118 can effectively separate the two. To further enhance the robustness, local window statistics (such as 15×15 pixels) are introduced to perform spatial 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.

[0136] Finally, the determination of the dynamic threshold T takes into account both global distribution and local features to ensure stable segmentation in complex backgrounds.

[0137] S9, dividing the pixels of the background reconstructed image into a low grayscale area and a high grayscale area according to the dynamic threshold.

[0138] 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 the misclassification of the transition area 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 low grayscale area is 1− w , the weight of the high grayscale area is w .

[0139] This method generates two mask matrices M low ( x, y )and M high ( x, y ), respectively marking the probability of the pixel belonging to the low / high grayscale area. For example, if the grayscale value of a pixel is T+3, the probability that it belongs to the high grayscale area is 0.8, and the probability that it belongs to the low grayscale area is 0.2. Through the weighted mask, subsequent processing can smooth the transition area and avoid edge artifacts caused by hard segmentation.

[0140] 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).

[0141] S10, 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.

[0142] Wherein, the first γ exponential transformation algorithm (γ1<1) is used to perform nonlinear dynamic range expansion on the low grayscale area. In some embodiments, the formula of the first γ exponential transformation algorithm may include: ; in, I enhanced ( x, y) represents the grayscale value of the low grayscale area pixel after enhancement by the first γ exponential transformation algorithm, which expands the dynamic range through nonlinear mapping and significantly amplifies the contrast of the MURA defect. The exponent γ1 is adaptively selected according to the statistical characteristics of the low grayscale area: if the grayscale distribution of the area is concentrated in a lower range (such as 0-80), a smaller γ1 (such as 0.3-0.5) is selected to greatly stretch the dark details; if the distribution is more dispersed (such as 0-120), a medium γ1 (such as 0.6-0.8) is selected to balance contrast enhancement and noise suppression. For example, when γ1=0.4, the original grayscale 50 pixels are mapped to about 112, and the stretching amplitude is 124%, so that the slight grayscale offset of the MURA defect (such as 5 units) is amplified to a visible difference (such as 15 units). At the same time, in order to avoid excessive noise amplification, the low grayscale area after enhancement is filtered by non-local mean (NL-Means), and only high-frequency details are retained in the gradient-significant area (such as the defect edge). This embodiment can effectively improve the local signal-to-noise ratio (SNR) of low-contrast MURA defects while keeping the background texture smooth.

[0143] In some embodiments, the formula of the first gamma exponential transformation algorithm may further specifically include: ; 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 the pixel in the low grayscale area; γ 1 for first γ Exponent, representing the contrast expansion coefficient, with a value range of 0< γ 1<1, γ 1The smaller the value, the stronger the contrast stretch.

[0144] 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. γ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.

[0145] By preserving the original grayscale range (I min and I max ), the enhanced gray value is strictly limited to [I min ,I max ], avoiding traditional gamma transformation (such as I′=255⋅(I / 255) γ ) may cause grayscale overflow or truncation problems.

[0146] The MURA defects of a display panel are usually concentrated in low grayscale areas (such as brightness leakage in a dark state). The algorithm of this embodiment specifically expands the dynamic range of this area while keeping the high grayscale area unaffected, which meets the physical property requirements of defect detection.

[0147] S11, by default the second γ The exponential transformation algorithm performs dynamic range compression processing on the high grayscale area to smooth the background grayscale fluctuation and obtain a suppressed high grayscale area.

[0148] 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: ; 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 (such as 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 lead to loss of detail. γWhen 2=2.5, the original grayscale 200 pixels are compressed to about 84, with a compression rate of 58%, and the random noise in the background (such as ±3 grayscale fluctuations) is suppressed to within ±0.5 grayscale. In addition, anisotropic diffusion filtering is performed on the compressed high grayscale area to smooth the background along the grayscale gradient direction while retaining the edge sharpness of potential defects. Some experimental data show that this embodiment can reduce the grayscale standard deviation of the high grayscale area from 8.2 to 2.1, providing a low-noise background base for subsequent fusion.

[0149] In some embodiments, the formula of the second gamma exponential transformation algorithm may further specifically include: ; in, I compressed ( x, y ) represents the high grayscale area after 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 factor, γ 2>1.

[0150] Using the above formula, the high grayscale area usually corresponds to the uniform background or high brightness area of ​​the display panel. Its slight fluctuations (such as sensor noise or uneven illumination) are smoothed by compression, while potential defects (such as local highlight MURA) can still be detected by the subsequent differential step after compression due to the small grayscale difference.

[0151] This algorithm is similar to the first γ The transformations are complementary: low-grayscale areas are contrast-expanded to enhance defects, and high-grayscale areas are dynamic-range compressed to suppress noise, and the combination of the two maximizes the signal-to-noise ratio (SNR) of the defect signal to the background noise.

[0152] The formula uses a symmetrical structure to ensure that the compression operation of the high grayscale area is consistent with the enhancement operation of the low grayscale area in mathematical form, which is convenient for joint optimization of parameters (such as γ 1 and γ 2 of coordinated regulation).

[0153] S12, fusing the enhanced low-grayscale area with the suppressed high-grayscale area to generate the background enhanced image.

[0154] The fusion process is achieved through weighted superposition, combining the membership weights of soft threshold segmentation and the regional enhancement results: I fusion ( x, y ) =M low ( x, y ) ∙ I enhanced ( x, y ) +M high ( x, y ) ∙ I suppressed ( x, y ).

[0155] 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.

[0156] To ensure the natural connection of the transition area, the weight mask is smoothed by Gaussian filtering (σ=2) to eliminate the grayscale jump caused by the hard boundary. For example, in the transition band of grayscale T±5, the fusion weight is gradually changed according to the Gaussian function to make the enhancement and compression effects transition smoothly. The fused image must meet the following characteristics: 1) The defect contrast in low grayscale areas is significantly improved (e.g. grayscale difference ≥ 20); 2) Background uniformity in high grayscale areas (grayscale standard deviation ≤ 3); 3) The overall histogram presents a bimodal separation pattern, and the overlapping area between the defect peak and the background peak is less than 10%.

[0157] The signal-to-noise ratio (SNR) of the fused image of this embodiment can be improved by 4 times compared with 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.

[0158] This embodiment adopts the above-mentioned double γ 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.

[0159] S13, subtracting the background enhanced image from the initial image to obtain a difference image.

[0160] This step refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0161] S14, determining the MURA defect area to be tested according to the difference image.

[0162] This step refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0163] S15, identifying and processing the MURA defect detection area by using a preset MURA defect detection model to obtain a MURA defect detection result of the display panel.

[0164] This step refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0165] The above-mentioned MURA defect detection method based on background reconstruction proposed in this embodiment significantly improves the detection accuracy and reliability of MURA defects by combining a variety of advanced image processing and machine learning technologies. The main technical effects are as follows: 1. High-precision background reconstruction: The low-frequency background information of the image is extracted through discrete cosine transform (DCT), high-frequency noise is removed, and then the low-frequency components are reduced in dimension using singular value decomposition (SVD) to extract the main background features. Finally, the background is accurately fitted through polynomial surface fitting technology to generate a background image. This process can effectively remove background interference, improve the accuracy of background reconstruction, and make subsequent defect detection more accurate.

[0166] 2. Contrast enhancement: Double gamma segmented exponential transform is used to perform contrast enhancement on the background reconstructed image. This technology can effectively improve the visibility of low-contrast MURA defects while suppressing grayscale changes in the background area. In this way, MURA defects are more prominent in the image and easier to detect, thereby improving the sensitivity and accuracy of detection.

[0167] 3. Defect detection and positioning: Subtract the background enhanced image from the original image to obtain a difference image, which is used to highlight the MURA defect. Then, the enhanced image is segmented using image processing techniques such as median filtering and watershed algorithm to extract the defect area. Finally, MURA defects are detected and positioned with high precision through pre-trained deep learning models (such as improved YOLOv4-Tiny). This method can not only accurately identify MURA defects, but also accurately determine their location, improving the robustness and reliability of detection.

[0168] 4. Data preparation and model training: By collecting a large number of display panel images and annotating the location and category of MURA defects, the images are divided into training sets and test sets. The deep learning model is trained using enhanced image data to ensure that the model can adapt to different types of MURA defects and improve the generalization ability of detection. This process ensures that the model can accurately detect and locate MURA defects in practical applications.

[0169] The MURA defect detection method based on background reconstruction 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 positioning, 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 solves the shortcomings of traditional detection methods in low-contrast and random position MURA defect detection, but also provides an efficient and accurate detection solution for the display panel production industry.

[0170] 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 , is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present invention.

[0171] It should be noted that Figure 2 The structure of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0172] like Figure 2 As shown, the electronic device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In the random access memory (RAM) 403, various programs and data required for system operation are also stored. The central processing unit (CPU) 401, the read-only memory (ROM) 402 and the random access memory (RAM) 403 are connected to each other through a bus 404. The input / output (I / O) interface 405 is also connected to the bus 404.

[0173] The following components are connected to the input / output (I / O) interface 405: an input section 406 including an audio input device, a button switch, etc.; an output section 407 including a display and an audio output device, an indicator light, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. 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. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.

[0174] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes 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 through the communication part 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the present invention are performed.

[0175] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a 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 may be used by or in combination with an instruction execution system, apparatus, or device.

[0176] 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 may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a 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 may also occur in an order different from that marked in the accompanying drawings.

[0177] 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.

[0178] 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 embodiment; or may exist independently without being assembled into the electronic device. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the electronic device, the electronic device implements the method provided in the above embodiment.

[0179] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may 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.

[0180] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0181] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

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; De-noising the low-frequency background components based on a singular value decomposition algorithm to obtain main background features; The main background features are fitted and reconstructed by 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, wherein the difference image is used to highlight MURA defects; Determine the MURA defect area to be tested according to the difference image; The MURA defect detection area is identified and processed by a preset MURA defect detection model to obtain a MURA defect detection result of the display panel, wherein the MURA defect detection result includes whether a MURA defect exists or the location of the MURA defect.

2. The method according to claim 1, characterized in that: The method of fitting and reconstructing the main background features by a polynomial surface fitting algorithm to obtain a background reconstructed image includes: constructing an input data set for surface fitting according to the main background features; Based on the structure and complexity of the input data set, construct a background fitting polynomial; According to the input data set, solving the coefficients of the background fitting polynomial by an optimization algorithm to obtain a solved polynomial model; The background reconstructed image is generated based on the solved polynomial model.

3. The method according to claim 2, characterized in that The mathematical expression of the background fitting polynomial includes: ; in, B ( x,y ) is the background gray value, indicating that at 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 k In the sub-area x i y j The coefficient of the term; N k Indicates 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.

4. The method according to claim 2, characterized in that: The generating the background reconstructed image based on the solved polynomial model comprises: Generate a reconstructed background surface covering pixel positions of the entire image according to the solved polynomial model; Determining local differences 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; The background reconstructed image is generated according to the optimized polynomial surface.

5. The method according to any one of claims 1 to 4, 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; According to the dynamic threshold, pixels of the background reconstructed image are divided into a low grayscale area and a high grayscale area; Performing dynamic range expansion processing on the low grayscale area by using a preset first γ exponential transformation algorithm to amplify the MURA defect contrast and obtain an enhanced low grayscale area; By using a preset second gamma exponential transformation algorithm, a dynamic range compression process is performed on the high grayscale area to smooth the background grayscale fluctuation and obtain a suppressed high grayscale area; The enhanced low-grayscale area is fused with the suppressed high-grayscale area to generate the background enhanced image.

6. The method according to claim 5, characterized in that The first γ The formula for the 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 for first γ Exponent, representing the contrast expansion coefficient, with a value range of 0< γ 1<1.

7. The method according to claim 5, characterized in that The second γ The formula for the 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 for the second γ Exponent, representing the dynamic range compression factor, γ 2>1.

8. An electronic device, characterized in that: including one or more processors and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and 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 7.

9. 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 as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent terminal control method and system based on vision

    CN107562208A

  • Nuclear power pipeline defect detection system based on deep learning attention mechanism

    CN111899224A

  • Wafer SEM image defect segmentation method based on improved UNet model

    CN116342522A

  • Backlight source Mura defect detection method based on image reconstruction

    CN117333471A

  • Lithium battery pole piece coating defect detection method and related equipment

    CN117611540A

Cited By

  • Intelligent discrimination method for pseudo soldering microcracks based on intelligent visual identification technology

    CN120765605A

  • PWO layer defect detection method and system for folding screen production

    CN121120620A

  • A method and system for detecting defects in the PWO layer of foldable screen production

    CN121120620B

  • Defect enhancement method and device based on image adaptive threshold segmentation

    CN121213444A

  • Display screen bright and dark line adjustment optimization method and system and LED display screen

    CN121214850A