A display defect detection method and device, computer equipment and storage medium
By adaptively adjusting the scale parameters to correct the exposure of the display image, the problem of inaccurate detection caused by uneven exposure is solved, and more efficient display defect detection is achieved.
Patent Information
- Application Number
- CN202311247473.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-09-25
AI Technical Summary
Traditional machine vision-based display defect detection methods suffer from inaccurate detection on images with uneven exposure.
By acquiring the image to be inspected from the target display, traversing the exposure difference feature information of each pixel, adaptively adjusting the correction scale parameter, correcting the image, obtaining an enhanced image, and performing texture analysis to detect defects.
It improves the robustness of display defect detection, effectively handles the problem of uneven image exposure, and improves detection accuracy.
Smart Images

Figure CN117197111B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and specifically to a method, apparatus, computer device, and storage medium for detecting display defects. Background Technology
[0002] As a core output component of a computer, the quality requirements for monitors are constantly increasing. Monitors are characterized by their large size and susceptibility to damage from impacts, therefore, it is necessary to conduct quality testing during the production of computer monitors.
[0003] Common defects in computer monitors include dead pixels, uneven brightness, scratches, and cracks. To detect these problems, experienced workers would observe and inspect each monitor produced, but this would be time-consuming and labor-intensive. Therefore, machine vision-based inspection is usually used instead.
[0004] However, when using traditional machine vision-based methods for detection, the accuracy of the detection results is often affected by exposure issues, resulting in inaccurate detection of images with uneven exposure. Summary of the Invention
[0005] In view of this, the present invention provides a method, apparatus, computer device and storage medium for detecting display defects, in order to solve the problem of inaccurate detection of images under test with uneven exposure.
[0006] In a first aspect, the present invention provides a display defect detection method, the display defect detection method comprising: acquiring a target display image to be detected; traversing each pixel in the target display image, determining a correction scale parameter for correcting the target display image based on exposure difference feature information between each pixel and other pixels; correcting the pixels in the target display image based on the correction scale parameter to obtain an enhanced image; performing texture analysis on the enhanced image, and obtaining a display defect detection result of the target display image based on the texture analysis result.
[0007] In one optional implementation, determining the correction scale parameter for correcting the image to be detected based on the exposure difference feature information of each pixel and other pixels includes: calculating a heterogeneity coefficient feature representing the degree of gray-level difference between the pixel and other pixels based on the gray-level difference between the pixel and other pixels; calculating a gray-level co-occurrence contrast feature matrix representing the degree of contrast difference between the pixel and other pixels based on the contrast difference between the pixel and other pixels; and calculating the correction scale parameter based on the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix; wherein the correction scale parameter is inversely proportional to the product of the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix.
[0008] In one optional implementation, the step of calculating the heterogeneity coefficient feature representing the degree of grayscale difference between the pixel and other pixels based on the grayscale difference between the pixel and other pixels includes: for each pixel, constructing a search region of a first preset size, a difference region of a second preset size, and a sliding window centered on the pixel; wherein the first preset size is larger than the second preset size; traversing the search region using the sliding window to obtain multiple sliding window results; calculating the difference skewness feature of the difference region and the sliding skewness feature of each sliding window result; and calculating the heterogeneity coefficient feature based on the difference skewness feature and the sliding skewness feature.
[0009] In one optional implementation, the step of calculating the gray-level co-occurrence contrast feature matrix representing the degree of contrast difference between the pixel and other pixels based on the contrast difference between the pixel and other pixels includes: performing gray-level quantization on each pixel based on a preset pixel quantization rule; constructing a matrix region of a third preset size centered on each gray-level quantized pixel, calculating multiple gray-level co-occurrence matrices of the matrix region according to multiple different preset angles; and calculating the gray-level co-occurrence contrast feature matrix based on the gray-level co-occurrence matrices.
[0010] In one optional implementation, the step of correcting the pixels in the image to be detected based on the correction scale parameter to obtain an enhanced image includes: determining the filter component when the pixels are subjected to deexposure filtering based on the correction scale parameter; determining the incident component constituting the image to be detected based on the image to be detected and the filter component; and obtaining the enhanced image based on the incident component and the image to be detected.
[0011] In one optional implementation, the step of performing texture analysis on the enhanced image and obtaining the display defect detection result of the target display based on the texture analysis result includes: extracting the display image from the enhanced image; dividing the display image into multiple display sub-images; calculating the sub-grayscale value of each display sub-image; and recording the display sub-images whose sub-grayscale value difference is greater than a preset difference value as defect areas to obtain the display defect detection result.
[0012] In one optional implementation, acquiring the captured image of the target display includes: taking a first captured image of the target display displaying a white image, a second captured image of the target display displaying a black image, a third captured image of the target display displaying a neutral color, and a fourth captured image of the target display displaying a screen-off state, obtained by taking a picture of the target display using a shooting device, and using these as the captured image; wherein the image obtained by the shooting device is composed of RGB three-color channel images.
[0013] Secondly, the present invention provides a display defect detection device, the display defect detection device comprising: an acquisition module for acquiring an image to be detected of a target display; a preprocessing module for preprocessing the acquired image to obtain an image to be detected; a correction scale determination module for traversing each pixel in the image to be detected and determining a correction scale parameter for correcting the image to be detected based on the exposure difference feature information between each pixel and other pixels; an image correction module for correcting each pixel based on the correction scale parameter of each pixel to obtain an enhanced image; and an analysis module for performing texture analysis based on the enhanced image and obtaining a display defect detection result of the target display based on the texture analysis result.
[0014] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the display defect detection method of the first aspect or any corresponding embodiment described above.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the display defect detection method of the first aspect or any corresponding embodiment described above.
[0016] This invention provides a display defect detection method, comprising: acquiring a target display image to be detected; traversing each pixel in the target display image, determining a correction scale parameter for correcting the target display image based on exposure difference feature information between each pixel and other pixels; correcting the pixels in the target display image based on the correction scale parameter to obtain an enhanced image; performing texture analysis on the enhanced image, and obtaining a display defect detection result for the target display based on the texture analysis result. The display defect detection method provided by this invention, when dealing with image exposure problems, can adaptively adjust the correction scale parameter according to the exposure difference feature information of different pixels in the image, and use the adaptive correction scale parameter to correct the pixels in the target display image. It can adaptively adjust the exposure of the target display image for different exposure differences of pixels in the target display image, and use the adjusted image for display defect detection, thus improving the robustness of the detection. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a display defect detection method according to an embodiment of the present invention;
[0019] Figure 2 This is a flowchart of another display defect detection method according to an embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of a display defect detection method according to an embodiment of the present invention;
[0021] Figure 4 This is a flowchart of another display defect detection method according to an embodiment of the present invention;
[0022] Figure 5 This is a structural block diagram of a display defect detection device according to an embodiment of the present invention;
[0023] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] This invention provides a display defect detection method, comprising: acquiring a target display image to be detected; traversing each pixel in the target display image, determining a correction scale parameter for correcting the target display image based on exposure difference feature information between each pixel and other pixels; correcting the pixels in the target display image based on the correction scale parameter to obtain an enhanced image; performing texture analysis on the enhanced image, and obtaining a display defect detection result for the target display based on the texture analysis result. The display defect detection method provided by this invention, when dealing with image exposure problems, can adaptively adjust the correction scale parameter according to the exposure difference feature information of different pixels in the image, and use the adaptive correction scale parameter to correct the pixels in the target display image. It can adaptively adjust the exposure of the target display image for different exposure differences of pixels in the target display image, and use the adjusted image for display defect detection, thus improving the robustness of the detection.
[0026] According to an embodiment of the present invention, a method for detecting display defects is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0027] This embodiment provides a method for detecting display defects, which can be used in mobile terminals such as mobile phones and tablets. Figure 1 This is a flowchart of a display defect detection method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0028] Step S101: Obtain the image to be detected from the target display.
[0029] In this embodiment, the image to be detected of the target display can be obtained by capturing images of the target display with a camera device; as a possible implementation, the image to be detected can be obtained by capturing images of the target display under multiple colors and images of the target display in a screen-off state with the camera device.
[0030] For example, a CCD camera can be used to take pictures of the target display to obtain a color image composed of RGB three color channels. During the image acquisition process, images of different colors displayed on the target display in the working state are acquired as test images. In addition, images of the target display in the off state are acquired to check for defects in appearance.
[0031] For example, after acquiring the image to be detected, the image is preprocessed. First, the image is stretched and transformed so that the display area is centered in the image; second, the image is converted from a three-color RGB image to a grayscale image. For example, mean filtering is used to smooth and denoise the image to be detected.
[0032] Step S102: Traverse each pixel in the image to be detected, and determine the correction scale parameter for correcting the image to be detected based on the exposure difference feature information between each pixel and other pixels.
[0033] Since the image to be detected suffers from uneven exposure due to uneven light intensity during shooting, it is necessary to adaptively correct the image based on the exposure difference information between each pixel in the image and other pixels. That is, to adaptively correct the image based on the exposure scene corresponding to the target pixel, thereby eliminating the impact of uneven exposure on the detection results.
[0034] In this embodiment, Retinex theory is used to determine the correction scale parameter for correcting the image to be detected based on the exposure difference feature information. Specifically, in Retinex theory, image I(x,y) consists of an illuminance image and a reflectance image. The illuminance image is determined by the incident component and is denoted by L(x,y); the reflectance image is determined by the reflectance component and reflects the inherent properties of the object itself, denoted by R(x,y). The specific expression is as follows:
[0035] I(x,y)=R(x,y)*L(x,y)
[0036] In this invention, the properties of the object itself are calculated using the incident component. Since the logarithmic form is closest to the human perception of brightness, the above expression is transformed into the logarithmic domain, and mathematical operations are performed on the expression to obtain the new expression as follows:
[0037] log(R(x,y))=log(I(x,y))-log(L(x,y))
[0038] Where L(x,y) can be represented by the original image and the Gaussian filter function; therefore, performing attribute operations on the above expression yields the following new expression:
[0039] log(L(x,y))=log(I(x,y))+log(G(x,y,λ))
[0040] In the formula, G(x,y,λ) represents the Gaussian filter function used for filtering; in the Gaussian filter function, λ represents its filtering scale parameter, which is determined by the exposure difference feature information between each pixel and other pixels; when λ is larger, the color information of the image is better preserved, but high-frequency information such as details is more severely damaged; conversely, when λ is smaller, detail information can be better preserved, but color distortion and halo phenomena are more likely to occur; considering that the light distribution intensity in different locations in the image is also different, and different scale parameters should be adopted when performing Gaussian filtering for different light intensities, this invention can adaptively adjust the scale parameter according to the exposure difference of different pixels in the image.
[0041] Step S103: Correct the pixels in the image to be detected based on the corrected scale parameter to obtain an enhanced image.
[0042] In this embodiment, the pixels in the image to be detected are corrected based on the correction scale parameter corresponding to each pixel in the image to be detected, which enables adaptive exposure adjustment of the image to be detected for different exposure differences of pixels in the image to be detected.
[0043] Step S104: Perform texture analysis on the enhanced image, and obtain the display defect detection result of the target display based on the texture analysis result.
[0044] For example, texture analysis can be performed by analyzing the uniformity of the image distribution in the enhanced image; specifically, firstly, the uniformity of pixel grayscale distribution in each region of the enhanced image is calculated, and the difference in distribution attribute parameters between each region in the image is calculated; images with a difference in distribution attribute parameters greater than a preset value are identified as images containing defects.
[0045] The display defect detection method provided by this invention can adaptively adjust the correction scale parameter according to the exposure difference feature information of different pixels in the image when dealing with image exposure problems. The adaptive correction scale parameter is used to correct the pixels in the image to be detected. It can adaptively adjust the exposure of the image to be detected for different exposure differences of pixels in the image to be detected, and use the adjusted image to detect display defects, thereby improving the robustness of the detection.
[0046] In the Gaussian filtering function G(x,y,λ), λ represents the filtering scale parameter, determined by the exposure difference characteristics between each pixel and other pixels. A larger λ preserves color information better but severely damages high-frequency information such as details. Conversely, a smaller λ preserves detail better but is prone to color distortion and halo effects. Therefore, in one optional implementation... Figure 2This is a flowchart of another display defect detection method according to an embodiment of the present invention, such as... Figure 2 As shown, step S102, determining the correction scale parameters for correcting the image to be detected based on the exposure difference feature information between each pixel and other pixels, includes:
[0047] Step S1021: Calculate the heterogeneity coefficient feature, which represents the degree of grayscale difference between the pixel and other pixels, based on the grayscale difference between the pixel and other pixels.
[0048] In this embodiment, the heterogeneity coefficient feature of the grayscale difference is determined by the skewness of the pixel to other pixels, and is used to represent the degree of difference in the grayscale distribution balance between the current pixel and other pixels. The smaller the degree of difference in the grayscale distribution balance between the current pixel and other pixels, the more obvious the surrounding details of the current pixel are. In this case, a smaller correction scale parameter should be selected for correction. The larger the degree of difference in the grayscale distribution balance between the current pixel and other pixels, the more blurred the surrounding details of the current pixel are. In this case, a larger correction scale parameter should be selected for correction.
[0049] Step S1022: Calculate the gray-level co-occurrence contrast feature matrix representing the degree of contrast difference between the pixel and other pixels based on the contrast difference between the pixel and other pixels;
[0050] In this embodiment, the gray-level co-occurrence contrast feature matrix is determined by the spatial correlation between the pixel and other pixels, and is used to represent the spatial distribution characteristics of the pixel in the image to be detected as it changes with space. The larger and smaller the gray-level co-occurrence contrast of the current pixel, the more obvious the surrounding details of the current pixel are, and a smaller correction scale parameter should be selected for correction. The larger the gray-level co-occurrence contrast of the current pixel, the more blurred the surrounding details of the current pixel are, and a larger correction scale parameter should be selected for correction.
[0051] Step S1023: Calculate the corrected scale parameter based on the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix; wherein the corrected scale parameter is inversely proportional to the product of the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix.
[0052] In this embodiment, the expression for the modified scale parameter λ is exemplarily given as follows:
[0053]
[0054] Where, λ x α represents the scale parameter of the Gaussian wrap function of pixels in the image to be detected. x Q represents the heterogeneity coefficient of pixel X. x This represents the contrast between pixel X and the grayscale values of surrounding pixels.
[0055] In an optional implementation, step S1021, calculating the heterogeneity coefficient feature representing the degree of grayscale difference between the pixel and other pixels based on the grayscale difference between the pixel and other pixels, includes:
[0056] Step a1: For each pixel, construct a search region of a first preset size, a difference region of a second preset size, and a sliding window centered on the pixel; wherein the first preset size is larger than the second preset size.
[0057] In this embodiment, the first preset size can be an area of N×N pixels, where N is a positive integer; the second preset size can be an area of M×M pixels, where M is less than N and M is a positive integer. Figure 3 This is a schematic diagram of a display defect detection method according to an embodiment of the present invention, as shown below. Figure 3 As shown, for example, the search area 51 is a 17×17 pixel area, the difference area 52 is a 5×5 pixel area, and the sliding window 53 is a 5×5 pixel area.
[0058] Step a2: Use the sliding window to traverse the search area to obtain multiple sliding window results.
[0059] In this embodiment, the search area is traversed using the sliding window with a preset sliding step size; for example, the preset sliding step size can be 5.
[0060] In this embodiment, when a pixel at the edge of the search area has a missing value during the sliding process, the average value of the entire image is used to fill it.
[0061] Step a3: Calculate the difference skewness characteristics of the difference regions and the sliding skewness characteristics of each sliding window result;
[0062] In this embodiment, the specific calculation process for the difference skewness characteristics of the difference region is as follows:
[0063]
[0064] Where, α x Let represent the skewness of the difference bounding box region of pixel X in the image to be detected, m be the total number of pixels in the region, represent the j-th pixel in the difference region, μ be the mean of the gray values of the pixels in the difference region, and represent the standard deviation of all pixels in the region. The calculated skewness represents the uniformity of the gray value distribution of all pixels in the region.
[0065] The specific calculation process for the sliding skewness characteristic of each sliding window result is as follows;
[0066] dif(I x ,I h,i ) = Norm(a x -a i )
[0067] Among them, a x a represents the skewness of the difference box in the X-neighborhood of a pixel. i Indicates the i-th sliding window I h,i The skewness, Norm() indicates that the data is normalized;
[0068] Step a4: Calculate the heterogeneity coefficient feature based on the difference skewness feature and the sliding skewness feature.
[0069] In this embodiment, the specific calculation process is as follows:
[0070]
[0071] Where, α x This represents the heterogeneity of pixel X in the image to be detected compared to other pixels in its neighborhood, where n represents the total number of sliding windows in the entire neighborhood, and dif(I x ,I h,i ) represents the difference box I of pixel X. x With its i-th sliding window I h,i Differences.
[0072] To consider the distribution of grayscale values of each pixel, this invention constructs a contrast matrix of the image using a grayscale co-occurrence matrix. Specifically, in an optional implementation, step S1022, calculating a grayscale co-occurrence contrast feature matrix representing the degree of contrast difference between the pixel and other pixels based on the contrast difference between the pixel and other pixels, includes:
[0073] Step b1: Perform grayscale quantization on each pixel based on a preset pixel quantization rule.
[0074] In this embodiment, the preset pixel quantization rule can be to quantize pixels to P pixel levels, where P is a positive integer; for example, P is 8.
[0075] Step b2: For each pixel after gray-level quantization, construct a matrix region of a third preset size centered on the pixel, and calculate multiple gray-level co-occurrence matrices of the matrix region according to multiple different preset angles; based on the gray-level co-occurrence matrices, calculate the gray-level co-occurrence contrast feature matrix.
[0076] In this embodiment, for each pixel after gray-level quantization, a 7×7 pixel matrix region is constructed with the pixel as the center, the gray-level co-occurrence matrix of the matrix region is calculated, and the corresponding gray-level co-occurrence matrices are obtained from the four directions of 0°, 45°, 90° and 135° respectively.
[0077] After obtaining the corresponding gray-level co-occurrence matrix, the four corresponding contrast feature values are obtained based on the four gray-level co-occurrence matrices, and their average value is taken as the contrast feature of the pixel.
[0078] Perform the above calculation process for each pixel to obtain the corresponding gray-level co-occurrence contrast matrix Q.
[0079] In one alternative implementation, Figure 4 This is a flowchart of another display defect detection method according to an embodiment of the present invention, such as... Figure 4 As shown, step S104 performs texture analysis on the enhanced image and obtains the display defect detection result of the target display based on the texture analysis result, including:
[0080] Step S1041: Extract the display image from the enhanced image.
[0081] In this embodiment, in order to reduce the amount of computation, the display image is extracted from the enhanced image for computation; for example, the image is divided into regions of interest (ROI) based on the display, and the display portion is divided into regions of interest to reduce the amount of subsequent computation.
[0082] Step S1042: Divide the display image into multiple display sub-images.
[0083] In this embodiment, as an optional implementation, the display image can be divided into multiple display sub-images; specifically, the display image can be divided into 100 equal display sub-images. Alternatively, the display image can be divided based on the Region of Interest (ROI) prone to defects to obtain multiple display sub-images. In this embodiment, the multiple display sub-images can overlap.
[0084] Step S1043: Calculate the sub-grayscale value of each of the display sub-images.
[0085] Step S1044: Record the sub-images of the display whose sub-grayscale values differ by more than a preset difference value as defect areas to obtain the display defect detection result.
[0086] In an optional implementation, step S101, acquiring the captured image of the target display, includes: taking a first captured image of the target display displaying a white image, a second captured image of the target display displaying a black image, a third captured image of the target display displaying a neutral color, and a fourth captured image of the target display displaying a screen-off state, obtained by taking a picture of the target display using a shooting device, as the captured image; wherein the image captured by the shooting device is composed of RGB three-color channel images.
[0087] In this embodiment, white and black images provide high contrast, making screen defects more obvious and improving the detection accuracy for screen defects; neutral colors are generally images with uniform gray levels, which can detect screen brightness uniformity and color balance, improving the detection accuracy for color cast and noise issues; and off-screen images can detect appearance defects such as scratches and cracks.
[0088] This embodiment also provides a display defect detection device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0089] This embodiment provides a display defect detection device, such as... Figure 5 As shown, it includes:
[0090] The acquisition module 501 is used to acquire the image to be detected on the target display.
[0091] The correction scale determination module 502 is used to traverse each pixel in the image to be detected and determine the correction scale parameters for correcting the image to be detected based on the exposure difference feature information between each pixel and other pixels.
[0092] Image correction module 503 is used to correct each pixel based on the correction scale parameter of each pixel to obtain an enhanced image;
[0093] Analysis module 504 is used to perform texture analysis based on the enhanced image and obtain display defect detection results of the target display based on the texture analysis results.
[0094] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0095] The display defect detection device in this embodiment is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0096] This invention also provides a computer device having the above-described features. Figure 5 The device shown is for detecting defects in displays.
[0097] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0098] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.
[0099] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0100] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0101] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0102] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0103] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0104] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for detecting defects in a display, characterized in that, The display defect detection method includes: Acquire the image to be detected on the target display; Traverse each pixel in the image to be detected, and determine the correction scale parameter for correcting the image to be detected based on the exposure difference feature information between each pixel and other pixels; The pixels in the image to be detected are corrected based on the corrected scale parameter to obtain an enhanced image; Texture analysis is performed on the enhanced image, and the display defect detection result of the target display is obtained based on the texture analysis result; The step of determining the correction scale parameters for correcting the image to be detected based on the exposure difference feature information between each pixel and other pixels includes: The heterogeneity coefficient characteristic representing the degree of grayscale difference between the pixel and other pixels is calculated based on the grayscale difference between the pixel and other pixels. Based on the contrast difference between the pixel and other pixels, calculate the gray-level co-occurrence contrast feature matrix that characterizes the degree of contrast difference between the pixel and other pixels; The corrected scale parameter is calculated based on the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix; wherein the corrected scale parameter is inversely proportional to the product of the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix.
2. The display defect detection method according to claim 1, characterized in that, The calculation of the heterogeneity coefficient feature, which characterizes the degree of grayscale difference between the pixel and other pixels, based on the grayscale difference between the pixel and other pixels includes: For each pixel, a search region of a first preset size, a difference region of a second preset size, and a sliding window are constructed centered on the pixel; wherein, the first preset size is larger than the second preset size; The search area is traversed using the sliding window to obtain multiple sliding window results; Calculate the difference skewness characteristics of the difference regions and the sliding skewness characteristics of each sliding window result; The heterogeneity coefficient feature is calculated based on the difference skewness feature and the sliding skewness feature.
3. The display defect detection method according to claim 1, characterized in that, The calculation of the gray-level co-occurrence contrast feature matrix, which characterizes the degree of contrast difference between the pixel and other pixels, based on the contrast difference between the pixel and other pixels, includes: Each pixel is subjected to grayscale quantization based on a preset pixel quantization rule; For each pixel after gray-level quantization, a matrix region of a third preset size is constructed with the pixel as the center, and multiple gray-level co-occurrence matrices of the matrix region are calculated according to multiple different preset angles; Based on the gray-level co-occurrence matrix, the gray-level co-occurrence contrast feature matrix is calculated.
4. The display defect detection method according to claim 1, characterized in that, The step of correcting the pixels in the image to be detected based on the corrected scale parameter to obtain an enhanced image includes: The filter components for de-exposure filtering of the pixel are determined based on the modified scale parameters. The incident components constituting the image to be detected are determined based on the image to be detected and the filtered components; The enhanced image is obtained based on the incident component and the image to be detected.
5. The display defect detection method according to claim 1, characterized in that, The step of performing texture analysis on the enhanced image and obtaining the display defect detection result of the target display based on the texture analysis result includes: From the enhanced image, the display image is extracted; The display image is divided into multiple display sub-images; Calculate the sub-grayscale value of each of the aforementioned display sub-images; The sub-images of the display whose difference in sub-grayscale values is greater than a preset difference value are recorded as defect areas to obtain the display defect detection results.
6. The display defect detection method according to claim 1, characterized in that, The acquisition of the target display image includes: The captured images are obtained by taking pictures of the target display using a shooting device, namely, a first captured image of the target display displaying a white image, a second captured image of the target display displaying a black image, a third captured image of the target display displaying a neutral color, and a fourth captured image of the target display displaying a screen-off state; wherein, the images captured by the shooting device are composed of RGB three-color channel images.
7. A display defect detection device, characterized in that, The display defect detection device includes: The acquisition module is used to acquire the image to be detected on the target display. The correction scale determination module is used to traverse each pixel in the image to be detected and determine the correction scale parameter for correcting the image to be detected based on the exposure difference feature information of each pixel and other pixels. The determination of the correction scale parameter for correcting the image to be detected based on the exposure difference feature information of each pixel and other pixels includes: calculating the heterogeneity coefficient feature representing the degree of gray-level difference between the pixel and other pixels based on the gray-level difference; calculating the gray-level co-occurrence contrast feature matrix representing the degree of contrast difference between the pixel and other pixels based on the contrast difference; and calculating the correction scale parameter based on the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix. The correction scale parameter is inversely proportional to the product of the heterogeneity coefficient feature and the gray-level co-occurrence contrast feature matrix. An image correction module is used to correct each pixel based on the correction scale parameter for each pixel to obtain an enhanced image; The analysis module is used to perform texture analysis based on the enhanced image, and obtain the display defect detection result of the target display based on the texture analysis result.
8. A computer device, characterized in that, include: The device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the display defect detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the display defect detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Panel defect enhancement detection method, system and device and medium
CN115661159A