Mura defect detection method and device of TFT-LCD display screen and electronic equipment
By preprocessing and multi-scale feature analysis of the original image of the TFT-LCD display, combining adaptive weight fusion and morphological operations, the target Mura defect area was selected, solving the problems of low manual detection efficiency and poor accuracy in the prior art, and achieving high-precision automated detection.
Patent Information
- Application Number
- CN202510105587.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, Mura defect detection of TFT-LCD display screens mainly relies on artificial visual inspection, which is inefficient and has low accuracy.
By obtaining the original image collected when the TFT-LCD display displays a full white picture, image noise reduction and enhancement preprocessing are performed, multi-scale feature maps are constructed, including local mean maps and local variance maps, adaptive weight fusion is performed, suspected defect areas are extracted, shape and contrast analysis are performed, and the target Mura defect areas are finally screened out.
It significantly improves the accuracy of Mura defect detection, reduces false detection and missed detection, and ensures the reliability and accuracy of the detection results.
Smart Images

Figure CN119540245A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display screens, and in particular to a method, device and electronic device for detecting Mura defects of a TFT-LCD display screen. Background Art
[0002] With the rapid development of modern display technology, TFT-LCD (Thin Film Transistor Liquid Crystal Display) has been widely used in smart phones, TVs, computer monitors and other digital display devices. High-quality display effects have become one of the important criteria for consumers to choose electronic products. Therefore, ensuring the quality of display screens, especially timely detection and removal of defective display screens during the production process, is of vital importance to maintaining production efficiency and product quality. Mura defects, which means "uneven" or "spots", are used in the display industry to describe any form of visible optical unevenness on the display screen, such as dark or bright areas in the form of clouds, spots or stripes. These defects may be caused by various factors such as uneven material distribution during the production process, uneven arrangement of liquid crystals, and backlight module problems. Mura defects seriously affect the display effect and visual experience, so timely detection and removal of these defects are crucial to maintaining high-quality product standards.
[0003] At present, the related art Mura defect detection method mainly relies on manual visual inspection. Manual inspection is not only inefficient, but also the results are affected by operator fatigue, experience and subjective judgment, which is prone to misjudgment, resulting in low accuracy of Mura defect detection.
[0004] Therefore, there is an urgent need for a method, device and electronic equipment for detecting Mura defects of a TFT-LCD display screen. Summary of the invention
[0005] The present application provides a method, device and electronic equipment for detecting Mura defects of a TFT-LCD display screen, thereby improving the accuracy of Mura defect detection.
[0006] In a first aspect of the present application, a method for detecting mura defects of a TFT-LCD display screen is provided, the method comprising: obtaining an original image of a TFT-LCD display screen to be detected, the original image being an image captured when the TFT-LCD display screen displays a full white screen; preprocessing the original image to obtain a target image, the preprocessing comprising image denoising and image enhancement; constructing a multi-scale feature map of mura defects based on the target image, the multi-scale feature map comprising a local mean map and a local variance map at multiple scales; performing adaptive weight fusion on the local mean map and the local variance map to obtain a confidence map of the mura defect; extracting suspected defect regions using morphological operations according to the confidence map, the morphological operations comprising an open operation and a closed operation, wherein the open operation is used to eliminate a small bright area in the confidence map, and the closed operation is used to fill a small dark area in the confidence map; performing shape analysis and contrast analysis on the suspected defect region to obtain shape features and contrast features of the suspected defect region; and screening out a target mura defect region from the suspected defect region based on the shape features and the contrast features. This technical solution significantly improves the detection accuracy of mura defects by performing advanced image preprocessing and multi-scale feature analysis on the original images of TFT-LCD displays. Through adaptive weight fusion and morphological operations, real defects are effectively distinguished from background noise, reducing false detections and missed detections. Finally, comprehensive shape and contrast analysis further ensures the reliability and accuracy of the detection results.
[0007] By adopting the above technical solution, by obtaining the original image collected when the TFT-LCD display screen displays a full white screen, and pre-processing the original image by image denoising and image enhancement, a target image with higher quality and less noise can be obtained, providing better input for subsequent Mura defect detection. The multi-scale feature map constructed based on the target image, including the local mean map and local variance map at multiple scales, can extract the feature information of Mura defects from different scales, and improve the accuracy and robustness of defect detection. By adaptively weighting the local mean map and the local variance map, a Mura defect confidence map that integrates multi-scale feature information can be obtained to better highlight the defect area. According to the confidence map, the suspected defect area is extracted by using morphological opening and closing operations, which can effectively eliminate the small bright and dark areas in the confidence map and obtain a more accurate suspected defect area. Shape analysis and contrast analysis are performed on the suspected defect area to obtain shape features and contrast features that reflect the shape and contrast characteristics of the defect, providing a basis for subsequent defect area screening. Finally, the target Mura defect area is screened out from the suspected defect area based on the shape features and contrast features, and the final Mura defect detection result can be obtained to realize the automatic identification and positioning of Mura defects.
[0008] Optionally, constructing a multi-scale feature map of Mura defects based on the target image specifically includes: sliding a preset sliding window of multiple scales on the target image to obtain local areas at each scale; calculating the local mean and local variance of the local area at each scale to obtain a local mean map and a local variance map at each scale; and combining the local mean map and the local variance map at each scale to form the multi-scale feature map.
[0009] By adopting the above technical solution, by sliding a preset sliding window of multiple scales on the target image, local areas at different scales can be obtained, which fully considers the characteristic performance of Mura defects at different scales. The local mean and local variance are calculated for the local areas at each scale, and the local mean map and local variance map at different scales can be obtained, and the grayscale statistical features of the local area are extracted. The local mean map and local variance map at each scale are combined to form a multi-scale feature map, which not only retains the local feature information at different scales, but also enhances the expressiveness of the features through multi-scale fusion. The construction method of the multi-scale feature map is simple, efficient, and easy to implement. It can provide reliable feature input for the subsequent defect confidence map calculation and defect area extraction, and improve the accuracy and efficiency of Mura defect detection.
[0010] Optionally, the local mean and local variance are calculated for each local area at each scale to obtain a local mean map and a local variance map at each scale, specifically including: for each local area at each scale, calculating the arithmetic mean of the grayscale values of all pixels in the local area to obtain the local mean of the local area, and splicing the local means of each local area to obtain the local mean map at each scale; for each local area at each scale, calculating the mean of the sum of squares of the differences between the grayscale values of all pixels in the local area and the local mean to obtain the local variance of the local area, and splicing the local variances of each local area to obtain the local variance map at each scale.
[0011] By adopting the above technical solution, by calculating the arithmetic mean of the grayscale values of all pixels in the local area at each scale, the local mean reflecting the overall grayscale level of the local area can be obtained, and the local mean map at each scale is obtained by splicing the local means of each local area, which intuitively shows the grayscale distribution of the image at different scales. By averaging the sum of the squares of the difference between the grayscale values of all pixels in the local area at each scale and the local mean, the local variance reflecting the degree of change of the grayscale of the pixels in the local area can be obtained, and the local variance map at each scale is spliced by the local variance of each local area, which intuitively shows the texture complexity of the image at different scales. Through the local mean map and the local variance map. The grayscale statistical features of the image at different scales can be accurately extracted, providing reliable feature input for the subsequent defect confidence map calculation, which is conducive to improving the accuracy and efficiency of Mura defect detection.
[0012] Optionally, the adaptively weighted fusion of the local mean map and the local variance map to obtain a confidence map of the Mura defect specifically includes: calculating a first standard deviation of the local mean map at each scale, and calculating a second standard deviation of the local variance map at each scale; determining a first weight of the local mean map at each scale according to the first standard deviation, and determining a second weight of the local variance map at each scale according to the second standard deviation, wherein a larger standard deviation corresponds to a larger weight; multiplying the local mean map at each scale by the first standard deviation to obtain a weighted local mean map, and multiplying the local variance map at each scale by the second standard deviation to obtain a weighted local variance map; and performing pixel-level fusion of the weighted local mean map and the weighted local variance map to obtain a confidence map of the Mura defect.
[0013] By adopting the above technical solution, by calculating the standard deviation of the local mean map and the local variance map at each scale, the degree of dispersion of the local grayscale mean and variance at different scales can be quantified. The weights of the local mean map and the local variance map are determined according to the standard deviation. The larger the standard deviation, the more obvious the change of the local features at the scale, and the larger the corresponding weight. On the contrary, the smaller the weight, the adaptive feature weight distribution is achieved, and the features at the scale with greater impact on the Mura defect are highlighted. The local mean map and the local variance map are multiplied by the corresponding weights to obtain the weighted local mean map and the weighted local variance map, and the adaptive weighting of features at different scales is achieved. The weighted local mean map and the weighted local variance map are fused at the pixel level to obtain the Mura defect confidence map that integrates multi-scale weighted features. Compared with the simple multi-scale feature superposition, the feature fusion method based on adaptive weights can better highlight the defect area and suppress the response of the non-defect area, thereby obtaining a defect confidence map with higher contrast and more accurate positioning, providing reliable input for the subsequent extraction of suspected defect areas and improving the accuracy of Mura defect detection.
[0014] Optionally, the method of extracting suspected defect areas based on the confidence map using morphological operations specifically includes: binarizing the confidence map to obtain a binarized image; performing a morphological opening operation on the binarized image using a preset first rectangular structure element to eliminate small bright areas in the binarized image; performing a morphological closing operation on the binarized image after the opening operation using a preset second rectangular structure element to fill small dark areas in the binarized image after the opening operation to obtain the suspected defect area; wherein the size of the preset second rectangular structure element is larger than the size of the preset first rectangular structure element.
[0015] By adopting the above technical solution, the confidence map can be converted into a binary image by binarizing the defect confidence map, which facilitates the subsequent morphological operation. The morphological opening operation of the binary image using the preset first rectangular structure element can eliminate the small bright area in the binary image and remove the spot-like area caused by noise or pseudo-defects. Then, the morphological closing operation of the binary image after the opening operation using the preset second rectangular structure element with a larger size can fill the small dark area in the binary image after the opening operation and bridge the fracture phenomenon caused by the small cracks or holes in the defect area. Through the morphological processing of opening operation first and then closing operation, the noise and pseudo-defect areas in the binary image can be effectively eliminated, while retaining and enhancing the real suspected defect area, obtaining the suspected defect area with more regular shape and boundary, reducing the difficulty of subsequent defect area screening, and improving the accuracy and reliability of Mura defect detection. Reasonable setting of the size of the preset first rectangular structure element and the preset second rectangular structure element can adapt to defects of different sizes and shapes and improve the applicability of the algorithm.
[0016] Optionally, the suspected defect areas are subjected to shape analysis and contrast analysis to obtain shape features and contrast features of each suspected defect area, specifically including: calculating the area, perimeter, aspect ratio of the minimum circumscribed rectangle and circularity of each suspected defect area as the shape features, wherein the circularity is the ratio of the area of the suspected defect area to the area of the minimum circumscribed circle corresponding to the suspected defect area; extracting the grayscale value of each suspected defect area in the original image, and calculating the first average grayscale value inside the suspected defect area; extracting the grayscale value of the background area around each suspected defect area at the corresponding position in the original image, and calculating the second average grayscale value of the background area; calculating the contrast features of each suspected defect area, wherein the contrast feature is the absolute value of the difference between the first average grayscale value and the second average grayscale value.
[0017] By adopting the above technical solution, the shape characteristics of the suspected defect area can be fully characterized by calculating the geometric shape parameters such as the area, perimeter, aspect ratio of the minimum circumscribed rectangle, and circularity of the suspected defect area. These shape features can be used for subsequent defect area screening to filter out non-defect areas with irregular shapes or too small sizes. By extracting the grayscale value of the suspected defect area in the original image and calculating the average grayscale value inside the suspected defect area, the grayscale statistical characteristics of the suspected defect area can be obtained. By extracting the grayscale value of the background area around the suspected defect area at the corresponding position in the original image and calculating the average grayscale value of the background area, the grayscale statistical characteristics of the background area can be obtained. The absolute value of the difference between the average grayscale value inside the suspected defect area and the average grayscale value of the background area is calculated to obtain the contrast characteristics of the suspected defect area, which reflects the degree of grayscale difference between the suspected defect area and the surrounding background, and can be used for subsequent defect area screening. By combining shape features and contrast features, the suspected defect area can be analyzed from the two perspectives of shape and grayscale to obtain a more comprehensive and reliable description of the defect area, providing an important basis for the final determination of the Mura defect area.
[0018] Optionally, the screening out a target Mura defect area from the suspected defect area based on the shape feature and the contrast feature specifically includes: determining whether the shape feature is within a preset shape range, and determining whether the contrast feature is within a preset contrast range; if it is determined that the shape feature is within the preset shape range and the contrast feature is within the preset contrast range, determining that the suspected defect area is the target Mura defect area; if it is determined that the shape feature is not within the preset shape range or the contrast feature is not within the preset contrast range, determining that the suspected defect area is not the target Mura defect area.
[0019] By adopting the above technical solution, compared with the single shape feature or contrast feature screening, the fusion of shape and contrast features for joint screening can more comprehensively and reliably identify the real Mura defect area, effectively reduce the risk of missed detection and false detection, and improve the precision and accuracy of Mura defect detection. At the same time, by presetting the shape range and the preset contrast range, it can flexibly adapt to different types and degrees of Mura defects, enhancing the robustness and applicability of the algorithm.
[0020] In a second aspect of the present application, a Mura defect detection device for a TFT-LCD display screen is provided, the device comprising: an acquisition module and a processing module, wherein: the acquisition module is used to acquire an original image of the TFT-LCD display screen to be detected, the original image is an image captured when the TFT-LCD display screen displays a full white screen; the processing module is used to pre-process the original image to obtain a target image, the pre-processing includes image denoising and image enhancement; the processing module is also used to construct a multi-scale feature map of Mura defects based on the target image, the multi-scale feature map includes a local mean map and a local variance map at multiple scales; the processing module is also used to pre-process the original image to obtain a target image The local mean map and the local variance map are adaptively weighted fused to obtain a confidence map of the Mura defect; the processing module is further used to extract the suspected defect area by using morphological operation according to the confidence map, and the morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate the small bright area in the confidence map, and the closing operation is used to fill the small dark area in the confidence map; the processing module is further used to perform shape analysis and contrast analysis on the suspected defect area to obtain the shape characteristics and contrast characteristics of the suspected defect area; the processing module is further used to screen out the target Mura defect area from the suspected defect area based on the shape characteristics and the contrast characteristics.
[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.
[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.
[0023] In summary, one or more technical solutions provided by this application have at least the following technical effects or advantages: 1. By obtaining the original image collected when the TFT-LCD display screen displays a full white screen and pre-processing the original image by image denoising and image enhancement, a target image with higher quality and less noise can be obtained, providing better input for subsequent Mura defect detection. The multi-scale feature map constructed based on the target image, including the local mean map and local variance map at multiple scales, can extract the feature information of Mura defects from different scales to improve the accuracy and robustness of defect detection. By adaptively weighting the local mean map and the local variance map, a Mura defect confidence map that integrates multi-scale feature information can be obtained to better highlight the defect area. According to the confidence map, the suspected defect area is extracted using morphological opening and closing operations, which can effectively eliminate the small bright and dark areas in the confidence map and obtain a more accurate suspected defect area. Shape analysis and contrast analysis are performed on the suspected defect area to obtain shape features and contrast features that reflect the shape and contrast characteristics of the defect, providing a basis for subsequent defect area screening. Finally, the target Mura defect area is screened out from the suspected defect area based on the shape features and contrast features, and the final Mura defect detection result can be obtained to realize the automatic identification and positioning of Mura defects.
[0024] 2. By sliding a preset sliding window of multiple scales on the target image, local areas at different scales can be obtained, which fully considers the characteristic performance of Mura defects at different scales. The local mean and local variance are calculated for the local areas at each scale, and the local mean map and local variance map at different scales can be obtained, and the grayscale statistical features of the local area are extracted. The local mean map and local variance map at each scale are combined to form a multi-scale feature map, which not only retains the local feature information at different scales, but also enhances the expressiveness of the features through multi-scale fusion. The construction method of the multi-scale feature map is simple, efficient, and easy to implement. It can provide reliable feature input for the subsequent defect confidence map calculation and defect area extraction, and improve the accuracy and efficiency of Mura defect detection.
[0025] 3. By calculating the arithmetic mean of the grayscale values of all pixels in the local area at each scale, the local mean reflecting the overall grayscale level of the local area can be obtained, and the local mean map at each scale is obtained by splicing the local means of each local area, which intuitively shows the grayscale distribution of the image at different scales. By averaging the sum of the squares of the difference between the grayscale values of all pixels in the local area at each scale and the local mean, the local variance reflecting the degree of change of the pixel grayscale in the local area can be obtained, and the local variance map at each scale is spliced by the local variance of each local area, which intuitively shows the texture complexity of the image at different scales. Through the local mean map and local variance map. The grayscale statistical features of the image at different scales can be accurately extracted, providing reliable feature input for the subsequent defect confidence map calculation, which is conducive to improving the accuracy and efficiency of Mura defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of a method for detecting Mura defects of a TFT-LCD display screen disclosed in an embodiment of the present application; Figure 2 It is a module schematic diagram of a Mura defect detection device for a TFT-LCD display screen disclosed in an embodiment of the present application; Figure 3 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0027] Explanation of the reference numerals: 201, acquisition module; 202, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION
[0028] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0029] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0030] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0031] This application provides a method for detecting Mura defects in a TFT-LCD display screen. Figure 1 , Figure 1 1 is a flow chart of a method for detecting Mura defects of a TFT-LCD display screen provided in an embodiment of the present application. The method is applied to a server, which is a server for executing a Mura defect detection program for a TFT-LCD display screen. The server may be a single server, or a server cluster composed of multiple servers, or a cloud computing service center. The method includes steps S101 to S107, which are as follows: Step S101: obtaining an original image of the TFT-LCD display screen to be detected, where the original image is an image captured when the TFT-LCD display screen displays a full white image.
[0032] In step S101, the server can obtain the original image in a variety of ways. One is to install a high-resolution industrial camera on the production line of the TFT-LCD display screen. When the TFT-LCD display screen displays a full white screen during the production process, the camera collects the image of the TFT-LCD display screen in real time and transmits the collected image data to the server. After receiving the image data, the server can store it in the memory or hard disk for subsequent processing and analysis.
[0033] Another possible way is that the server is connected to the test equipment of the TFT-LCD display screen through the network, and the test equipment uploads the collected image data to the server when performing a full white screen test on the display screen. This method is suitable for the situation where the inspection of the TFT-LCD display screen is not carried out on the production line, but in a special test link.
[0034] Step S102: preprocessing the original image to obtain a target image, wherein the preprocessing includes image denoising and image enhancement.
[0035] In step 102, the server preprocesses the acquired original image. The preprocessing mainly includes two steps: image denoising and image enhancement. Image denoising refers to removing various noises in the image. The image denoising methods include median filtering, bilateral filtering and wavelet transform. Image enhancement refers to improving the visual quality of the original image, such as contrast, sharpness, brightness, etc., so that the outline and details of the objects in the image are clearer and more prominent. Image enhancement methods include histogram equalization, gamma correction and Retinex algorithm.
[0036] For example, suppose the original image obtained by the server has Gaussian noise and is dark, which may be caused by the inherent noise of the camera sensor and insufficient light in the shooting environment. In this case, the server first uses the bilateral filtering algorithm to reduce the noise of the original image. Bilateral filtering can remove Gaussian noise while retaining the edge and texture information in the original image. Then, the server uses the Gamma correction algorithm to adjust the brightness and contrast of the original image, raising the brightness of the original image to an appropriate level, making the Mura defects in the original image more obvious. Finally, the server uses the Retinex algorithm to enhance the details of the original image, making the subtle defects and contours in the original image clearer and sharper.
[0037] Step S103: constructing a multi-scale feature map of Mura defects based on the target image, wherein the multi-scale feature map includes local mean maps and local variance maps at multiple scales.
[0038] In step S103, based on the target image, a multi-scale feature map of Mura defects is constructed, specifically including: sliding a preset sliding window of multiple scales on the target image to obtain local areas at each scale; calculating the local mean and local variance of the local area at each scale to obtain the local mean map and local variance map at each scale; combining the local mean map and the local variance map at each scale to form a multi-scale feature map.
[0039] Specifically, the server constructs a multi-scale feature map of mura defects based on the target image obtained through preprocessing. The multi-scale feature map is a method for representing local features of an image. It extracts local statistical features of the image at different scales, such as the local mean and local variance, to describe information such as texture, edge, and brightness changes in the image, thereby providing a richer and more robust feature representation for defect detection.
[0040] Specifically, the server first defines preset sliding windows of multiple scales, such as square windows of different sizes such as 3x3, 5x5, 7x7, and 9x9. Then, the server uses these sliding windows to slide on the target image, moving in the row and column directions of the target image with a fixed step size (such as 1 pixel), and each slide obtains a local area. At each scale, the sliding window scans the entire image to obtain all local areas at that scale.
[0041] Next, the server calculates the local mean and local variance for each local area at each scale. The local mean represents the average value of the pixel grayscale value in the local area, reflecting the brightness level of the local area; the local variance represents the difference between the pixel grayscale value in the local area and the local mean, reflecting the contrast and texture complexity of the local area. The formula for calculating the local mean is as follows: ; Where μ(x, y) is the local mean, (x, y) is the center pixel position of the current window in the target image, and I(i, j) is the pixel value at position (i, j) in the target image. N is the number of pixels in the window W (e.g., for a 3x3 window, N=9); The formula for calculating local variance is as follows: ; Where μ(x, y) is the local mean, (x, y) is the center pixel position of the current window in the target image, and I(i, j) is the pixel value at position (i, j) in the target image. N is the number of pixels in the window W (e.g., for a 3x3 window, N=9).
[0042] By scanning the target image with a sliding window, the server can obtain the local mean map and local variance map at each scale. Each pixel value of the local mean map is the mean of the local area at the corresponding position, and each pixel value of the local variance map is the variance of the local area at the corresponding position. Finally, the server combines the local mean map and local variance map at all scales to form a multi-scale feature map of Mura defects. The multi-scale feature map contains the local texture, edge, brightness and other information of the target image at different scales, and can comprehensively describe the multi-scale characteristics of Mura defects.
[0043] For example, the server selects sliding windows of 3x3, 5x5, and 7x7 scales and slides them on the target image with a step size of 1 pixel. The local mean map and local variance map at three scales can be obtained, and the size of each map is the same as that of the target image. Combining these six maps together constitutes a multi-scale feature map containing six channels, each channel corresponding to a local mean map or local variance map at a scale. This multi-scale feature map comprehensively describes the multi-scale features of the mura defects in the target image, providing rich feature information for subsequent defect detection and classification.
[0044] In a possible implementation, the local mean and local variance are calculated for the local regions at each scale to obtain the local mean map and local variance map at each scale, specifically including: for the local regions at each scale, calculating the arithmetic mean of the grayscale values of all pixels in the local region to obtain the local mean of the local region, and splicing the local means of each local region to obtain the local mean map at each scale; for the local regions at each scale, calculating the mean of the sum of squares of the differences between the grayscale values of all pixels in the local region and the local mean to obtain the local variance of the local region, and splicing the local variances of each local region to obtain the local variance map at each scale.
[0045] Specifically, the server calculates the local mean and local variance for each local area at each scale, and obtains the local mean map and local variance map at each scale. For the calculation of the local mean, the server traverses all local areas at each scale, and performs arithmetic averaging on the grayscale values of all pixels in each local area to obtain the local mean of the local area. The server calculates the local mean for all local areas at each scale, and then splices these local means into a matrix of the same size as the original image according to the position order of the local areas in the original image, that is, the local mean map at that scale is obtained.
[0046] For the calculation of local variance, the server also traverses all local areas at each scale, squares the difference between the grayscale value of all pixels in each local area and the local mean, and then calculates the mean of the sum of squares to obtain the local variance of the local area. The server calculates the local variance for all local areas at each scale, and then splices these local variances into a matrix of the same size as the original image according to the position order of the local areas in the original image, that is, the local variance map at that scale is obtained.
[0047] Step S104: performing adaptive weight fusion on the local mean map and the local variance map to obtain a confidence map of the mura defect.
[0048] In step S104, the local mean map and the local variance map are adaptively weighted to obtain a confidence map of the Mura defect, specifically including: calculating the first standard deviation of the local mean map at each scale, and calculating the second standard deviation of the local variance map at each scale; determining the first weight of the local mean map at each scale according to the first standard deviation, and determining the second weight of the local variance map at each scale according to the second standard deviation, wherein the larger the standard deviation, the larger the corresponding weight; multiplying the local mean map at each scale with the first standard deviation to obtain a weighted local mean map, and multiplying the local variance map at each scale with the second standard deviation to obtain a weighted local variance map; and performing pixel-level fusion on the weighted local mean map and the weighted local variance map to obtain a confidence map of the Mura defect.
[0049] Specifically, the server performs adaptive weight fusion on the local mean map and the local variance map to obtain the confidence map of the mura defect. First, the server calculates the standard deviation of the local mean map and the local variance map at each scale. The standard deviation reflects the degree of discreteness of the grayscale value in the local area of the image. The larger the standard deviation, the greater the change in the grayscale value in the local area. For the local mean map, the server calculates the standard deviation of all local means at each scale to obtain the first standard deviation; for the local variance map, the server calculates the standard deviation of all local variances at each scale to obtain the second standard deviation.
[0050] Then, the server adaptively determines the weights of the local mean map and the local variance map at each scale based on the first standard deviation and the second standard deviation. The size of the weight is proportional to the corresponding standard deviation, that is, the larger the standard deviation, the greater the weight. The rationality of this principle lies in that the larger the standard deviation, the richer the defect information contained in the local mean or local variance features at this scale, and it should be given a higher weight in the fusion result. The server maps the standard deviation to a weight range of [0, 1] by normalization. This application does not limit the specific values of the first weight value and the second weight value, and can be limited according to actual needs in practical applications.
[0051] Next, the server multiplies the local mean map at each scale by the corresponding first weight to obtain a weighted local mean map; and multiplies the local variance map at each scale by the corresponding second weight to obtain a weighted local variance map. The server performs pixel-level fusion on the weighted local mean map and weighted local variance map at all scales to obtain the final confidence map of the Mura defect. Pixel-level fusion refers to adding the values of all weighted feature maps at the corresponding pixel positions to obtain the fused pixel value. The fused pixel value reflects the possibility or confidence of the existence of the Mura defect at that position. The larger the pixel value, the more likely it is that there is a defect at that position.
[0052] For example, suppose the server obtains the local mean map and local variance map at the scales of 3x3, 5x5, and 7x7, and their standard deviations are 0.2, 0.3, 0.4 and 0.1, 0.2, 0.3, respectively. The server first normalizes these standard deviations to obtain the weights of the local mean map as 0.22, 0.33, 0.44, and the weights of the local variance map as 0.17, 0.33, 0.50. Then, the server multiplies the local mean map and local variance map at each scale by the corresponding weights to obtain the weighted feature map. Finally, the server adds all the weighted feature maps at each pixel position to obtain the fused confidence map. The area with larger pixel values in the confidence map indicates that the area is more likely to have mura defects.
[0053] Step S105: According to the confidence map, the suspected defect area is extracted by using morphological operation, and the morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate the small bright area in the confidence map, and the closing operation is used to fill the small dark area in the confidence map.
[0054] In step S105, according to the confidence map, morphological operations are used to extract suspected defect areas, specifically including: binarizing the confidence map to obtain a binary image; performing a morphological opening operation on the binary image using a preset first rectangular structure element to eliminate small bright areas in the binary image; performing a morphological closing operation on the binary image after the opening operation using a preset second rectangular structure element to fill the small dark areas in the binary image after the opening operation to obtain the suspected defect area; wherein the size of the preset second rectangular structure element is larger than the size of the preset first rectangular structure element.
[0055] Specifically, the server uses morphological operations to extract suspected defect areas based on the confidence map of the Mura defect. In the embodiment of the present application, morphological operations can be understood as an image processing method based on morphological theory, by performing a series of morphological operations on the image, such as corrosion, expansion, opening operations, and closing operations. In this step, the server mainly uses two morphological operations, opening operations and closing operations, to extract suspected defect areas in the confidence map. First, the server performs binarization processing on the confidence map and converts it into a binary image. Binarization processing is to divide the grayscale value of the image into two categories according to a preset threshold, and the pixels greater than or equal to the preset threshold are set as the foreground (usually white), and the pixels less than the preset threshold are set as the background (usually black). In the embodiment of the present application, the binarization threshold can be adaptively selected according to the characteristics of the confidence map and the requirements of defect detection to obtain an accurate binary image, in which the suspected defect area is the foreground (white) and the non-defect area is the background (black). The specific value of the preset threshold is not limited in this application.
[0056] Then, the server uses the preset first rectangular structure element to perform a morphological opening operation on the binary image. The opening operation is to first perform an erosion operation on the image and then perform an expansion operation on the result of the erosion, which has the effect of eliminating small bright areas (foreground) in the image while retaining large bright areas. The first rectangular structure element is a preset rectangular template, and its size and shape determine the effect of the opening operation. The server can design a suitable first rectangular structure element based on the typical size and shape of the Mura defect to effectively eliminate noise and interference in the binary image. For example, the size of the preset first rectangular structure element can be 3×3.
[0057] Next, the server uses the preset second rectangular structure element to perform a morphological closing operation on the binary image after the opening operation. The closing operation is to first dilate the image and then erode the result of the dilation. The effect is to fill the small dark area (background) in the image while retaining the large dark area. The second rectangular structure element here is also a preset rectangular template, and its size and shape determine the effect of the closing operation. The server can design a suitable second rectangular structure element based on the typical shape and integrity of the Mura defect area to effectively fill the breaks and holes in the binary image after the opening operation. For example, the size of the preset second rectangular structure element can be 5×5. Among them, due to the different functions of the opening operation and the closing operation, the size relationship between the first rectangular structure element and the second rectangular structure element should meet the following requirements: The size of the first rectangular structure element should be small so as to effectively eliminate the small bright areas in the binary image. If the size of the first rectangular structure element is too large, some larger bright areas may also be eliminated, thus affecting the subsequent defect area extraction.
[0058] The size of the second rectangular structure element should be larger than that of the first rectangular structure element. This is because after the opening operation, the small bright areas in the binary image have been eliminated, and the remaining bright areas are relatively large. In order to effectively fill the small dark areas of the binary image after the opening operation, the size of the second rectangular structure element needs to be large enough to cover these dark areas.
[0059] After opening and closing operations, the suspected defect area in the binary image is extracted, the small area of noise and interference is eliminated, and the shape and integrity of the suspected defect area are improved. The server uses this processed binary image as a mask for the suspected defect area for subsequent defect analysis and judgment.
[0060] For example, suppose the server obtains a Mura defect confidence map of size 1000x1000, in which the confidence value of the defective area is high (close to 255) and the confidence value of the non-defective area is low (close to 0). The server first binarizes this confidence map and selects a suitable threshold (such as 128) to obtain a binary image in which the suspected defective area is white and the non-defective area is black. Then, the server selects a 3x3 rectangular structure element and performs an open operation on the binary image to eliminate the small white noise and interference. Next, the server selects a 5x6 rectangular structure element and performs a closed operation on the binary image after the open operation to fill the small black holes and fractures. Finally, the server obtains a clean and complete mask of the suspected defective area, which can be used for subsequent defect analysis and judgment.
[0061] Step S106: performing shape analysis and contrast analysis on the suspected defect area to obtain shape features and contrast features of the suspected defect area.
[0062] In step S106, shape analysis and contrast analysis are performed on the suspected defect areas to obtain shape features and contrast features of each suspected defect area, specifically including: calculating the area, perimeter, aspect ratio of the minimum circumscribed rectangle and circularity of each suspected defect area as shape features, wherein the circularity is the ratio of the area of the suspected defect area to the area of the minimum circumscribed circle corresponding to the suspected defect area; extracting the grayscale value of each suspected defect area in the original image, and calculating the first average grayscale value inside the suspected defect area; extracting the grayscale value of the background area around each suspected defect area at the corresponding position in the original image, and calculating the second average grayscale value of the background area; calculating the contrast feature of each suspected defect area, wherein the contrast feature is the absolute value of the difference between the first average grayscale value and the second average grayscale value.
[0063] Specifically, the server calculates the area, perimeter, aspect ratio of the minimum circumscribed rectangle, and circularity of each suspected defect area as shape features. The area calculation is achieved by counting the number of pixels in the suspected defect area. The perimeter calculation is achieved by counting the number of pixels on the boundary of the suspected defect area. The aspect ratio of the minimum circumscribed rectangle is calculated by finding the minimum circumscribed rectangle of the suspected defect area and calculating the ratio of the long side to the short side of the rectangle. The circularity calculation is achieved by the ratio of the area of the suspected defect area to the area of its minimum circumscribed circle, where the minimum circumscribed circle can be obtained by the classic minimum circle covering algorithm.
[0064] For example, suppose a suspected defect area contains 100 pixels, there are 30 pixels on its border, the long side of the minimum circumscribed rectangle is 20 pixels, the short side is 10 pixels, and the radius of the minimum circumscribed circle is 8 pixels. Then the area of the suspected defect area is 100, the perimeter is 30, the aspect ratio of the minimum circumscribed rectangle is 20 / 10=2, and the circularity is 100 / (3.14×8×8)≈0.5.
[0065] Then, the server extracts the grayscale value of each suspected defect area in the original image, and calculates the first average grayscale value inside the suspected defect area. Extracting the grayscale value of the suspected defect area can be achieved by searching the grayscale value of the corresponding pixel in the original image through the position coordinates of the suspected defect area. Calculating the first average grayscale value can be achieved by summing the grayscale values of all pixels in the suspected defect area and dividing it by the number of pixels. Next, the server extracts the grayscale value of the background area around each suspected defect area at the corresponding position in the original image, and calculates the second average grayscale value of the background area. The background area can be obtained by setting a border of a certain width on the periphery of the suspected defect area. The grayscale value extraction and second average grayscale value calculation methods of the background area are similar to those of the suspected defect area.
[0066] Finally, the server calculates the contrast feature of each suspected defect area, where the contrast feature is the absolute value of the difference between the first average grayscale value and the second average grayscale value. The larger the absolute value of the difference between the first average grayscale value and the second average grayscale value, the higher the contrast between the suspected defect area and the surrounding background area, and the more likely it is a real defect.
[0067] Step S107: based on the shape features and contrast features, select the target Mura defect area from the suspected defect area.
[0068] In step S107, based on the shape feature and the contrast feature, the target Mura defect area is screened out from the suspected defect area, specifically including: determining whether the shape feature is within a preset shape range, and determining whether the contrast feature is within a preset contrast range; if it is determined that the shape feature is within the preset shape range and the contrast feature is within the preset contrast range, then determining that the suspected defect area is the target Mura defect area; if it is determined that the shape feature is not within the preset shape range or the contrast feature is not within the preset contrast range, then determining that the suspected defect area is not the target Mura defect area.
[0069] Specifically, the server screens out the target Mura defect area from the suspected defect area based on the shape features and contrast features. The server determines whether the shape features of the suspected defect area are within the preset shape range. The preset shape range is pre-set according to the typical shape features of the Mura defect. For example, the preset shape range may include: an area between 10 and 100 square pixels, a perimeter between 20 and 80 pixels, an aspect ratio of the minimum circumscribed rectangle between 0.5 and 2, and a circularity between 0.6 and 1. The server compares the shape features of the suspected defect area, such as the area, perimeter, aspect ratio of the minimum circumscribed rectangle, and circularity, with the preset shape range to determine whether it is within the preset shape range.
[0070] Next, the server determines whether the contrast characteristics of the suspected defect area are within a preset contrast range. The preset contrast range is pre-set based on the typical contrast characteristics of the Mura defect. For example, the preset contrast range can be 30 to 150. The server compares the contrast characteristics of the suspected defect area with the preset contrast range to determine whether it is within the preset contrast range.
[0071] Then, the server determines whether the suspected defect area is the target Mura defect area based on the judgment results of the shape feature and the contrast feature. If the shape feature is within the preset shape range and the contrast feature is within the preset contrast range, the server determines that the suspected defect area is the target Mura defect area. If the shape feature is not within the preset shape range or the contrast feature is not within the preset contrast range, the server determines that the suspected defect area is not the target Mura defect area.
[0072] Reference Figure 2The present application also provides a Mura defect detection device for a TFT-LCD display screen, the device is a server, the server includes an acquisition module 201 and a processing module 202, the acquisition module 201 is used to acquire an original image of the TFT-LCD display screen to be detected, the original image is an image captured when the TFT-LCD display screen displays a full white screen; the processing module 202 is used to pre-process the original image to obtain a target image, the pre-processing includes image denoising and image enhancement; the processing module 202 is also used to construct a multi-scale feature map of Mura defects based on the target image, the multi-scale feature map includes a local mean map and a local variance map at multiple scales: the processing module Block 202 is also used to perform adaptive weight fusion on the local mean map and the local variance map to obtain a confidence map of the Mura defect; the processing module 202 is also used to extract the suspected defect area according to the confidence map using morphological operations, and the morphological operations include opening operations and closing operations, wherein the opening operation is used to eliminate the small bright areas in the confidence map, and the closing operation is used to fill the small dark areas in the confidence map; the processing module 202 is also used to perform shape analysis and contrast analysis on the suspected defect area to obtain the shape features and contrast features of the suspected defect area; the processing module 202 is also used to screen out the target Mura defect area from the suspected defect area based on the shape features and contrast features.
[0073] In a possible implementation, based on the target image, a multi-scale feature map of Mura defects is constructed, specifically including: sliding a preset sliding window of multiple scales on the target image to obtain local areas at each scale; calculating the local mean and local variance of the local area at each scale to obtain a local mean map and a local variance map at each scale; combining the local mean map and the local variance map at each scale to form a multi-scale feature map.
[0074] In one possible implementation, the processing module 202 calculates the local mean and local variance for the local area at each scale, respectively, to obtain the local mean map and the local variance map at each scale, specifically including: the processing module 202 calculates the arithmetic mean of the grayscale values of all pixels in the local area at each scale to obtain the local mean of the local area, and the local mean map at each scale is obtained by splicing the local means of each local area; the processing module 202 calculates the mean of the sum of squares of the differences between the grayscale values of all pixels in the local area and the local mean for the local area at each scale to obtain the local variance of the local area, and the local variance map at each scale is obtained by splicing the local variances of each local area.
[0075] In a possible implementation, the processing module 202 performs adaptive weight fusion on the local mean map and the local variance map to obtain a confidence map of the Mura defect, specifically including: the processing module 202 calculates the first standard deviation of the local mean map at each size, and calculates the second standard deviation of the local variance map at each size; the processing module 202 determines the first weight of the local mean map at each size according to the first standard deviation, and determines the second weight of the local variance map at each size according to the second standard deviation, wherein the larger the standard deviation, the larger the corresponding weight; the processing module 202 multiplies the local mean map at each size by the first standard deviation to obtain a weighted local mean map, and multiplies the local variance map at each size by the second standard deviation to obtain a weighted local variance map; the processing module 202 performs pixel-level fusion on the weighted local mean map and the weighted local variance map to obtain a confidence map of the Mura defect.
[0076] In a possible implementation, the processing module 202 uses morphological operations to extract suspected defect areas based on the confidence map, specifically including: the processing module 202 performs binarization processing on the confidence map to obtain a binary image; the processing module 202 uses a preset first rectangular structure element to perform a morphological opening operation on the binary image to eliminate small bright areas in the binary image; the processing module 202 uses a preset second rectangular structure element to perform a morphological closing operation on the binary image after the opening operation to fill the small dark area of the binary image after the opening operation to obtain the suspected defect area; wherein the size of the preset second rectangular structure element is larger than the size of the preset first rectangular structure element.
[0077] In a possible implementation, the processing module 202 performs shape analysis and contrast analysis on the suspected defect areas to obtain shape features and contrast features of each suspected defect area, specifically including: the processing module 202 calculates the area, perimeter, aspect ratio of the minimum circumscribed rectangle and circularity of each suspected defect area as shape features, wherein the circularity is the ratio of the area of the suspected defect area to the area of the minimum circumscribed circle corresponding to the suspected defect area; the processing module 202 extracts the grayscale value of each suspected defect area in the original image, and calculates the first average grayscale value inside the suspected defect area; the processing module 202 extracts the grayscale value of the background area surrounding each suspected defect area at the corresponding position in the original image, and calculates the second average grayscale value of the background area; the processing module 202 calculates the contrast feature of each suspected defect area, wherein the contrast feature is the absolute value of the difference between the first average grayscale value and the second average grayscale value.
[0078] In a possible implementation, the processing module 202 screens out a target Mura defect area from a suspected defect area based on the shape feature and the contrast feature, specifically including: the processing module 202 determines whether the shape feature is within a preset shape range, and determines whether the contrast feature is within a preset contrast range; if the processing module 202 determines that the shape feature is within the preset shape range and the contrast feature is within the preset contrast range, the suspected defect area is determined to be a target Mura defect area; if the processing module 202 determines that the shape feature is not within the preset shape range or the contrast feature is not within the preset contrast range, the suspected defect area is determined not to be a target Mura defect area.
[0079] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0080] The present application also provides an electronic device. Figure 3 , Figure 3 The electronic device 300 may include: at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0081] The communication bus 302 is used to realize the connection and communication between these components.
[0082] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0083] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0084] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.
[0085] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally also be at least one storage device located away from the aforementioned processor 301. Refer to Figure 3 The memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program of a method for detecting Mura defects of a TFT-LCD display screen.
[0086] exist Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call the application program of a Mura defect detection method for a TFT-LCD display screen stored in the memory 305. When executed by one or more processors 301, the electronic device 300 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0087] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors 301, the electronic device 300 executes one or more of the methods described in the above embodiments.
[0088] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0093] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0094] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for detecting Mura defects of a TFT-LCD display screen, characterized in that: The method comprises: Acquire an original image of the TFT-LCD display screen to be detected, wherein the original image is an image captured when the TFT-LCD display screen displays a full white image; Preprocessing the original image to obtain a target image, wherein the preprocessing includes image denoising and image enhancement; Based on the target image, a multi-scale feature map of Mura defects is constructed, wherein the multi-scale feature map includes a local mean map and a local variance map at multiple scales: Performing adaptive weight fusion on the local mean map and the local variance map to obtain a confidence map of the Mura defect; According to the confidence map, using morphological operations to extract suspected defect areas, the morphological operations include opening operations and closing operations, wherein the opening operations are used to eliminate small bright areas in the confidence map, and the closing operations are used to fill small dark areas in the confidence map; Performing shape analysis and contrast analysis on the suspected defect area to obtain shape features and contrast features of the suspected defect area; Based on the shape feature and the contrast feature, a target Mura defect area is screened out from the suspected defect area.
2. The method according to claim 1, characterized in that The constructing a multi-scale feature map of Mura defects based on the target image specifically includes: Sliding a preset sliding window of multiple scales on the target image to obtain a local area at each scale; Calculating the local mean and the local variance for each local area at each scale to obtain a local mean map and a local variance map at each scale; The local mean map and the local variance map at each scale are combined to form the multi-scale feature map.
3. The method according to claim 2, characterized in that The calculating of the local mean and the local variance of the local area at each scale to obtain the local mean map and the local variance map at each scale specifically includes: For each local area at the scale, calculating the arithmetic mean of the grayscale values of all pixels in the local area to obtain a local mean of the local area, and concatenating the local means of the local areas to obtain a local mean map at each scale; For each local area at the scale, the mean of the sum of squares of the differences between the grayscale values of all pixels in the local area and the local mean is calculated to obtain the local variance of the local area, and the local variance maps at each scale are obtained by splicing the local variances of the local areas.
4. The method according to claim 1, characterized in that: The adaptive weight fusion of the local mean map and the local variance map to obtain a confidence map of the Mura defect specifically includes: Calculating a first standard deviation of the local mean map at each of the scales, and calculating a second standard deviation of the local variance map at each of the scales; Determine a first weight of the local mean map at each of the scales according to the first standard deviation, and determine a second weight of the local variance map at each of the scales according to the second standard deviation, wherein a larger standard deviation corresponds to a larger weight; Multiplying the local mean map at each scale by the first standard deviation to obtain a weighted local mean map, and multiplying the local variance map at each scale by the second standard deviation to obtain a weighted local variance map; The weighted local mean map and the weighted local variance map are fused at the pixel level to obtain a confidence map of the Mura defect.
5. The method according to claim 1, characterized in that The extracting suspected defect areas by using morphological operations according to the confidence map specifically includes: Binarizing the confidence map to obtain a binary image; Using a preset first rectangular structure element to perform a morphological opening operation on the binary image to eliminate a small bright area in the binary image; A morphological closing operation is performed on the binary image after the opening operation using a preset second rectangular structure element to fill the small dark area of the binary image after the opening operation to obtain the suspected defect area; wherein the size of the preset second rectangular structure element is larger than the size of the preset first rectangular structure element.
6. The method according to claim 1, characterized in that The performing of shape analysis and contrast analysis on the suspected defect regions to obtain shape features and contrast features of each suspected defect region specifically includes: Calculating the area, perimeter, aspect ratio of the minimum circumscribed rectangle and circularity of each of the suspected defect regions as the shape features, wherein the circularity is the ratio of the area of the suspected defect region to the area of the minimum circumscribed circle corresponding to the suspected defect region; Extracting the grayscale value of each of the suspected defect areas in the original image, and calculating a first average grayscale value inside the suspected defect area; Extracting the grayscale value of the background area around each of the suspected defect areas at the corresponding position in the original image, and calculating the second average grayscale value of the background area; The contrast feature of each of the suspected defect areas is calculated, wherein the contrast feature is the absolute value of the difference between the first average grayscale value and the second average grayscale value.
7. The method according to claim 1, characterized in that The screening out a target Mura defect area from the suspected defect area based on the shape feature and the contrast feature specifically includes: Determining whether the shape feature is within a preset shape range, and determining whether the contrast feature is within a preset contrast range; If it is determined that the shape feature is within the preset shape range and the contrast feature is within the preset contrast range, then determining that the suspected defect area is the target Mura defect area; If it is determined that the shape feature is not within the preset shape range or the contrast feature is not within the preset contrast range, it is determined that the suspected defect area is not the target Mura defect area.
8. A Mura defect detection device for a TFT-LCD display screen, characterized in that: The device comprises an acquisition module (201) and a processing module (202), wherein: The acquisition module (201) is used to acquire an original image of the TFT-LCD display screen to be detected, wherein the original image is an image captured when the TFT-LCD display screen displays a full white image; The processing module (202) is used to pre-process the original image to obtain a target image, wherein the pre-processing includes image denoising and image enhancement; The processing module (202) is further used to construct a multi-scale feature map of Mura defects based on the target image, wherein the multi-scale feature map includes a local mean map and a local variance map at multiple scales: The processing module (202) is further used to perform adaptive weight fusion on the local mean map and the local variance map to obtain a confidence map of the Mura defect; The processing module (202) is further used to extract the suspected defect area according to the confidence map by using morphological operation, wherein the morphological operation includes an opening operation and a closing operation, wherein the opening operation is used to eliminate the small bright area in the confidence map, and the closing operation is used to fill the small dark area in the confidence map; The processing module (202) is further used to perform shape analysis and contrast analysis on the suspected defect area to obtain shape features and contrast features of the suspected defect area; The processing module (202) is further configured to screen out a target Mura defect region from the suspected defect region based on the shape feature and the contrast feature.
9. An electronic device, characterized in that: The electronic device (300) comprises a processor (301), a memory (305), a user interface (303) and a network interface (304), wherein the memory (305) is used to store instructions, the user interface (303) and the network interface (304) are used to communicate with other devices, and the processor (301) is used to execute the instructions stored in the memory (305) so that the electronic device (300) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Mobile phone TFT-LCD screen Mura defect online automatic detection method
CN108460757A
Liquid crystal screen Mura defect detection method based on computer vision
CN111563889A
Color display point defect detection method
CN114998189A
Method and system for automatically detecting surface defects of flexible touch screen
CN119205777A
High-precision detection method based on image analysis
CN119251232A
Cited By
Liquid crystal screen Mura defect detection system based on convolutional neural network
CN119937195A
Method for detecting quality of functional layer of outer wall of building by unmanned aerial vehicle
CN120495306A
Method for detecting quality of functional layer of building outer wall by using unmanned aerial vehicle
CN120495306B
Casting surface defect detection method and system
CN120976216A
Method for detecting Mura defect on display screen, electronic equipment and computer readable storage medium
CN121190479A