A method, device, electronic device and storage medium for extracting defects from a display screen
By performing block downsampling and reconstruction of the surface processing on the display screen image, combined with weighting and threshold card control technology, the problem of low defect detection accuracy in the existing technology is solved, and higher detection accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202410612712.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-05-17
AI Technical Summary
The prior art has low accuracy in display screen defect detection, and it is impossible to effectively generalize the size and shape of various defects, resulting in insufficient detection accuracy.
By dividing the display image into small-area image blocks, downsampling is performed and reconstruction surfaces are constructed, weighted processing is performed to generate contrast-enhanced images, and combining threshold card control and defect feature analysis, a collection of defect types of the display screen is generated.
It improves the accuracy and efficiency of image defect detection on display screens, can significantly highlight defects and reduce data volume, and enhance the accuracy of subsequent detection.
Smart Images

Figure CN118212230B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of defect detection, and in particular, to a method, device, electronic device and storage medium for extracting defects from a display screen. Background Art
[0002] With the rapid development of Industry 4.0 and Internet technology, the requirements for industrial product quality are becoming more and more refined and standardized. As far as the display panel industry is concerned, the quality of products directly affects their competitiveness. Among them, the accuracy of product shape, size and specifications is the most basic process indicator of product quality.
[0003] As one of the display components of the device, the display screen is used in various high-end devices, such as mobile phones, TVs, tablets, etc. As people's requirements for screen display continue to increase, the display screen has gradually become a technologically sophisticated product. Secondly, the display panel is an important part of electronic products such as TVs, mobile phones, and computers. During the production process of the production line, the display panel needs to be precisely bonded with other parts and assembled into a terminal product to be delivered to the customer. Due to the fine shape of the product and limited spatial design tolerance, the production tolerance accuracy requirements are all at the micron level.
[0004] In the process of display screen production, due to the complexity of the display screen manufacturing process and the difficulty of achieving very good flatness in the evaporation process, the luminance of each sub-pixel varies greatly under the same external conditions. This is a common defect, which is more serious in display screens than in semiconductor light emitting diodes (LCDs). This requires that after the display screen is manufactured, the sub-pixels of each display screen need to be compensated to meet the display screen display standards.
[0005] At present, there are various methods and means for display screen defect detection, and image processing methods also have their own strengths. There are detection methods based on SEMU values, and there are also detection methods based on surface fitting. However, due to the wide variety of defects, sizes and shapes, this poses a great challenge to the generalization ability and accuracy of defect detection algorithms.
[0006] When the existing defect detection method detects the display screen, the defect observation result of the image has low accuracy, so the defect detection accuracy is low. Summary of the invention
[0007] The present application discloses a method, device, electronic device and storage medium for extracting defects from a display screen, which are used to improve the accuracy of detecting image defects on a display screen.
[0008] The first aspect of the present application discloses a method for extracting defects of a display screen, comprising:
[0009] Divide the display screen image into a plurality of small area image blocks;
[0010] Downsampling the multiple small-area image blocks to generate multiple downsampled block images;
[0011] Constructing the reconstructed surface of the downsampled block image;
[0012] Performing weighted processing on the reconstructed surface and the display screen image to generate a contrast-enhanced image;
[0013] Threshold control is performed on the gray value of the contrast-enhanced image to screen out the target contrast-enhanced image that meets the requirements;
[0014] Perform defect feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image.
[0015] Optionally, construct a reconstructed surface of the downsampled block image, including:
[0016] Determine the pixel coordinate position on the downsampled block image;
[0017] Calculate the grayscale centroid coordinates and position non-center coordinates according to the pixel coordinate point position;
[0018] Calculate the approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction and the zero-order coefficient of the reconstructed surface to be calculated;
[0019] The reconstructed surface is generated according to the approximate parameters, pixel coordinate point positions, grayscale centroid coordinates and position non-center coordinates.
[0020] Optionally, before dividing the display screen image into a plurality of small area image blocks, the defect extraction method further includes:
[0021] Capture and locate the display screen image.
[0022] Optionally, after performing capture and positioning processing on the display screen image and before dividing the display screen image into a plurality of small area image blocks, the defect extraction method further includes:
[0023] The display screen image is processed by mean filtering through the filter kernel.
[0024] Optionally, after weighted processing is performed on the reconstructed curved surface and the display screen image to generate a contrast enhanced image, a threshold is performed on the grayscale value of the contrast enhanced image, and before a satisfactory target contrast enhanced image is screened out, the defect extraction method further includes:
[0025] Perform convolution filtering on the contrast enhanced image.
[0026] Optionally, after thresholding the grayscale value of the contrast-enhanced image to screen out a target contrast-enhanced image that satisfies the requirement, defect feature analysis is performed on the target contrast-enhanced image to generate a defect type set of the display screen image, the defect extraction method further includes:
[0027] Perform morphological processing on the target contrast-enhanced image.
[0028] Optionally, defect feature analysis is performed on the target contrast enhanced image to generate a set of defect types for the display screen image, including:
[0029] Perform Blob feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image.
[0030] The second aspect of the present application discloses a display screen defect extraction device, comprising:
[0031] A division unit, used for dividing the display screen image into a plurality of small area image blocks;
[0032] A first generating unit is used to perform downsampling processing on a plurality of small-area image blocks to generate a plurality of downsampled block images;
[0033] A construction unit, used for constructing a reconstructed surface of the downsampled block image;
[0034] A second generating unit is used to perform weighted processing on the reconstructed curved surface and the display screen image to generate a contrast enhanced image;
[0035] A screening unit, used to perform threshold control on the gray value of the contrast-enhanced image, and screen out a target contrast-enhanced image that meets the requirements;
[0036] The third generating unit is used to perform defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image.
[0037] Optionally, build units including:
[0038] Determine the pixel coordinate position on the downsampled block image;
[0039] Calculate the grayscale centroid coordinates and position non-center coordinates according to the pixel coordinate point position;
[0040] Calculate the approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction and the zero-order coefficient of the reconstructed surface to be calculated;
[0041] The reconstructed surface is generated according to the approximate parameters, pixel coordinate point positions, grayscale centroid coordinates and position non-center coordinates.
[0042] Optionally, before dividing the units, the defect extraction device further includes:
[0043] The grabbing and positioning unit is used to perform grabbing and positioning processing on the display screen image.
[0044] Optionally, after the grabbing and positioning unit and before the dividing unit, the defect extraction device further includes:
[0045] The mean filter unit is used to perform mean filter processing on the display screen image through a filter core.
[0046] Optionally, after the second generating unit and before the screening unit, the defect extraction device further includes:
[0047] The convolution filtering unit is used to perform convolution filtering processing on the contrast enhanced image.
[0048] Optionally, after the screening unit and before the third generating unit, the defect extraction device further includes:
[0049] The interference removal unit is used to perform morphological processing on the target contrast enhanced image.
[0050] Optionally, the third generation unit includes:
[0051] Perform Blob feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image.
[0052] A third aspect of the present application provides an electronic device, characterized in that it includes:
[0053] Processor, memory, input-output unit, and bus;
[0054] The processor is connected to the memory, the input and output unit, and the bus;
[0055] The memory stores a program, and the processor calls the program to execute the first aspect and any optional defect extraction method of the first aspect.
[0056] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional defect extraction method of the first aspect.
[0057] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0058] In the present application, the display screen image is first divided into a plurality of small area image blocks. The plurality of small area image blocks are downsampled to generate a plurality of downsampled block images. A reconstructed surface of the downsampled block images is constructed. The reconstructed surface and the display screen image are weighted to generate a contrast enhanced image. The grayscale value of the contrast enhanced image is thresholded to screen out a target contrast enhanced image that satisfies the requirements. The target contrast enhanced image is subjected to defect feature analysis to generate a defect type set of the display screen image.
[0059] The display screen image is divided into multiple small area image blocks by using block division, and then multiple small area image blocks are downsampled to generate multiple downsampled block images. Then, the image is operated by selecting a polynomial surface reconstruction algorithm. For surface reconstruction, the amount of data can be reduced to speed up the algorithm, and defects can be clearly highlighted, thereby improving the accuracy of subsequent defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0061] Figure 1 A schematic diagram of an embodiment of a method for extracting defects from a display screen in an embodiment of the present application;
[0062] Figure 2 This is a schematic diagram of the first stage of another embodiment of the method for extracting defects from a display screen in an embodiment of the present application;
[0063] Figure 3 This is a schematic diagram of the second stage of another embodiment of the method for extracting defects from a display screen in an embodiment of the present application;
[0064] Figure 4 A schematic diagram of an embodiment of a defect extraction device for a display screen in an embodiment of the present application;
[0065] Figure 5 It is a schematic diagram of another embodiment of the defect extraction device of the display screen in the embodiment of the present application;
[0066] Figure 6 This is a schematic diagram of an embodiment of an electronic device of the present application. DETAILED DESCRIPTION
[0067] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0068] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0069] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0070] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0071] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0072] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0073] In the prior art, as people's requirements for screen display continue to increase, display screens have gradually become sophisticated products. Secondly, display panels are an important part of electronic products such as televisions, mobile phones, and computers. During the production process of the production line, the display panel needs to be precisely fitted with other parts and assembled into terminal products for delivery to customers. Due to the fine shape of the product and limited spatial design tolerance, the tolerance accuracy requirements of production are all at the micron level. In the process of display screen production, due to the complex process of the display screen and the difficulty of the evaporation process to achieve very good flatness, the luminous brightness of each sub-pixel varies greatly under the same external conditions. This is a common defect, which is more serious in the display screen than semiconductor light-emitting diodes. This means that after the display screen is manufactured, the sub-pixels of each display screen need to be compensated to meet the display standard of the display screen. At present, there are various methods and means for display screen defect detection, and image processing methods also have their own strengths. There are detection methods based on SEMU values and detection methods based on surface fitting. However, due to the wide variety of defects, sizes and shapes, this poses a great challenge to the generalization ability and accuracy of defect detection algorithms.
[0074] When the existing defect detection method detects the display screen, the defect observation result of the image has low accuracy, so the defect detection accuracy is low.
[0075] Based on this, the present application discloses a method, device, electronic device and storage medium for extracting defects from a display screen, which are used to improve the accuracy of detecting image defects on a display screen.
[0076] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0077] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.
[0078] See also Figure 1 The present application provides an embodiment of a method for extracting defects of a display screen, comprising:
[0079] 101. Divide the display screen image into a plurality of small area image blocks;
[0080] 102. Downsampling the plurality of small-area image blocks to generate a plurality of downsampled block images;
[0081] In this embodiment, the display screen image is an image obtained by photographing a crimped and lit display screen, and the terminal selects a polynomial surface reconstruction algorithm to calculate the display screen image, which can clearly highlight the defects. The specific implementation method is as follows:
[0082] Considering that there are many pixels in the display screen image, the display screen image is divided into multiple small area image blocks as required. Here, the average can be performed, and then the feature information of the small area image blocks can be calculated separately. The feature information parameters of the small area image blocks are used to replace the parameters of the entire display screen image. The reconstructed surface of the fitting can be refined, and the surface reconstruction algorithm can reduce the amount of data and speed up the algorithm. The following algorithm formula is used for calculation and is shown in the figure:
[0083] Among them, each small area image block is divided into Size, image length and width are , the image is divided Block, where , Next, downsampling is performed, and the formula is as follows:
[0084]
[0085] in: , , Represents the image after downsampling and partitioning (downsampling and partitioning image), is the original image without block division.
[0086] 103. Construct a reconstructed surface of the downsampled block image;
[0087] After the terminal completes the blocking and downsampling processing, it can reconstruct the surface for the downsampled block image. In this embodiment, the surface can be reconstructed based on the boundary, or the coordinate position moment and gray value moment of the reconstructed surface can be used to reconstruct the surface.
[0088] 104. Perform weighted processing on the reconstructed surface and the display screen image to generate a contrast-enhanced image;
[0089] In this embodiment, the terminal obtains the reconstructed curved surface, that is, the reconstructed curved surface image, and performs weighted processing on the reconstructed curved surface and the display screen image to generate a contrast-enhanced image.
[0090] Specifically, the terminal performs arithmetic operations on the reconstructed surface image and the original image (display screen image) and then performs weighted processing to improve the contrast of the image, which can effectively separate suspected defects from non-defects. The grayscale values of the images before and after processing can be calculated using the following formula:
[0091]
[0092]
[0093]
[0094] in, is the original image pixel gray value, is the gray value of the transformed image, and They are the maximum and minimum grayscale values of the original image, Mult is the weight, and Add is the offset.
[0095] 105. Threshold control is performed on the gray value of the contrast enhanced image to screen out a target contrast enhanced image that satisfies the requirement;
[0096] After the terminal completes the weighted processing, the terminal performs threshold control on the grayscale value of the contrast enhanced image to screen out a target contrast enhanced image that meets the requirements.
[0097] After the convolution filtering operation in the previous step, the grayscale value of the contrast-enhanced image is different from that of the original image. For the contrast-enhanced image, the grayscale value is threshold-controlled.
[0098]
[0099] when When the above range is met, images that meet the above expression range are screened, where and are the lower and upper limits of the grayscale value, respectively. is the gray value of the current image pixel.
[0100] 106. Perform defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image.
[0101] The terminal performs defect feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image. Defect recognition can be performed using a convolutional neural network model or by using methods such as Blob feature analysis.
[0102] In this embodiment, the display screen image is first divided into a plurality of small area image blocks. Downsampling processing is performed on the plurality of small area image blocks to generate a plurality of downsampled block images. A reconstructed surface of the downsampled block images is constructed. Weighted processing is performed on the reconstructed surface and the display screen image to generate a contrast enhanced image. Threshold control is performed on the gray value of the contrast enhanced image to screen out a target contrast enhanced image that satisfies the requirements. Defect feature analysis is performed on the target contrast enhanced image to generate a defect type set of the display screen image.
[0103] The display screen image is divided into multiple small area image blocks by using block division, and then multiple small area image blocks are downsampled to generate multiple downsampled block images. Then, the image is operated by selecting a polynomial surface reconstruction algorithm. For surface reconstruction, the amount of data can be reduced to speed up the algorithm, and defects can be clearly highlighted, thereby improving the accuracy of subsequent defect detection.
[0104] See also Figure 2 and Figure 3 The present application provides an embodiment of a method for extracting defects of a display screen, comprising:
[0105] 201. Capture and position the display screen image;
[0106] In this embodiment, the terminal first needs to capture and locate the captured display screen image to reduce the interference of the invalid background part. The display area of the display screen image is captured by the gradient difference of the boundary pixels, and then the display screen image is corrected by the point pair mapping operation. The algorithm formula is as follows:
[0107]
[0108] Simplified to:
[0109]
[0110] Where: M and B are rotation and translation matrices respectively, , , , , , , and They are the mapping point pairs before and after image correction, respectively.
[0111] 202. Perform mean filtering on the display screen image through a filter kernel;
[0112] After the terminal completes the capture and positioning of the display screen image, it is necessary to pre-process the display screen image. The collected display screen image generally has noise, which affects the subsequent detection. After the capture and positioning, the collected display screen image is filtered by a specific mean value to eliminate some noise, and the number of pre-processing times is set according to the situation. The algorithm formula is as follows:
[0113]
[0114] in,: is the original image, is the image after mean filtering, It is a filter kernel of size M*N, with its center point at (x,y).
[0115] 203. Divide the display screen image into a plurality of small area image blocks;
[0116] 204. Downsampling the plurality of small-area image blocks to generate a plurality of downsampled block images;
[0117] Steps 203 to 204 in this embodiment are similar to steps 101 to 102 in the above embodiment, and are not described again here.
[0118] 205. Determine the pixel coordinate point position on the downsampled block image;
[0119] 206. Calculate the grayscale centroid coordinates and the position non-center coordinates according to the pixel coordinate point position;
[0120] 207. Calculate approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction, and the zero-order coefficient of the reconstructed surface to be calculated;
[0121] 208. Generate a reconstructed surface according to the approximate parameters, the pixel coordinate point position, the grayscale centroid coordinates and the position non-center coordinates;
[0122] In this embodiment, the reconstructed surface calculation is performed by reconstructing the coordinate position moment and gray value moment of the surface itself. Specifically, the terminal first needs to determine the pixel coordinate point position of each pixel point on the downsampled block image, and the terminal calculates the grayscale centroid coordinates and the position non-center coordinates according to the pixel coordinate point position. Then, the approximate parameters of the reconstructed surface of the downsampled block image are calculated based on the pixel coordinate point position and the grayscale value information corresponding to the pixel coordinate point position. Among them, the approximate parameters specifically include the second-order coefficients in the vertical direction, the second-order coefficients in the horizontal direction, the mixed second-order coefficients, the first-order coefficients in the vertical direction, the first-order coefficients in the horizontal direction, and the zero-order coefficients of the reconstructed surface to be calculated. Finally, the terminal generates the reconstructed surface based on the approximate parameters, the pixel coordinate point position, the grayscale centroid coordinates and the position non-center coordinates.
[0123] Specifically, for the polynomial reconstruction surface algorithm, this embodiment adopts a second-order polynomial reconstruction fitting method. First, the approximate parameters of the second-order surface are calculated by downsampling the coordinate position moment and the gray value moment of the block image. The reconstructed surface can be expressed by the following method:
[0124]
[0125] represents the image of the reconstructed surface, and They are the pixel coordinate points of the image containing the domain, which can be determined by the pixel coordinate points. and They are the non-central coordinates of the grayscale centroid coordinate position of the image area, which can be obtained by the following calculation formula:
[0126]
[0127] Among them, R is the image area, S is the grayscale image area of the region, and are the first-order moments of the image, r and c represent the row and column coordinates of the center of gravity of the image, Pixel Grayscale area function on .
[0128] They are the second-order coefficients in the vertical direction, the second-order coefficients in the horizontal direction, and the mixed second-order coefficients of the second-order surface to be determined. are the first-order coefficients in the vertical direction and the first-order coefficients in the horizontal direction, respectively. is the zero-order coefficient.
[0129] The simplified model of the reconstructed surface can be written as:
[0130]
[0131] in is the pixel gray value of the surface, are the row and column coordinates of the fitting points respectively.
[0132] The above formula can be expressed by the following matrix equation:
[0133]
[0134] Where: Assume the original image length and width is H*W, then the total number of image bits K=H*W, and is the row and column coordinates of the original image, For the original image The gray value of the position, so the above matrix can be simplified into the following form:
[0135]
[0136]
[0137]
[0138]
[0139] Among them, the X matrix represents the coordinates of each position point of the image, the A matrix is the coefficient matrix to be calculated, and the F matrix is the pixel grayscale value of each position of the image; in the formula, the X matrix and the F matrix are both known information matrices, so the coefficient A matrix can be calculated by the following expression:
[0140]
[0141] in: is the transposed matrix of X, for The inverse matrix of .
[0142] Through the above solution, we can get These are the approximate parameters of the equation of the reconstructed surface to be obtained, and finally the reconstructed surface is obtained through these parameters.
[0143] 209. Perform weighted processing on the reconstructed surface and the display screen image to generate a contrast-enhanced image;
[0144] Step 209 in this embodiment is similar to step 104 in the above embodiment and will not be described again here.
[0145] 210. Perform convolution filtering on the contrast enhanced image;
[0146] The terminal performs convolution filtering on the contrast-enhanced image obtained in the previous step, which can further filter out some interference and further highlight the defect information. Specifically, it is necessary to use a convolution kernel with unconventional symmetry, multiply each pixel in the image area with the corresponding elements of the filter kernel operator (weight matrix), and the sum of all products is used as the grayscale value of the central pixel in the area. The convolution image operation formula is as follows:
[0147]
[0148] in: is the grayscale of the image output after the convolution operation. represents the convolution kernel matrix, is the grayscale of the input image, i and j represent the number of rows and columns.
[0149] 211. Threshold control is performed on the gray value of the contrast enhanced image to screen out a target contrast enhanced image that satisfies the requirement;
[0150] Step 209 in this embodiment is similar to step 105 in the above embodiment and will not be described again here.
[0151] 212. Perform morphological processing on the target contrast enhanced image;
[0152] In this embodiment, the terminal performs morphological processing on the target contrast enhanced image. Because the boundaries of the image areas usually screened out have burrs or noise interference, or the pixels around the actual defect location are not taken into consideration, the image can be subjected to morphological processing such as opening and closing operations.
[0153] 213. Perform Blob feature analysis on the target contrast enhanced image to generate a set of defect types of the display screen image.
[0154] After the terminal completes the aforementioned image operations, it performs Blob feature analysis on the obtained image, and can select feature quantities such as grayscale, area, angle, contrast, etc., to finally obtain the defects on the image to be detected.
[0155] In this embodiment, the display screen image is first captured and positioned. The display screen image is subjected to mean filtering through a filter core. The display screen image is divided into a plurality of small area image blocks. The plurality of small area image blocks are subjected to downsampling processing to generate a plurality of downsampled block images. The pixel coordinate point position on the downsampled block image is determined;
[0156] Calculate the grayscale centroid coordinates and position non-center coordinates according to the pixel coordinate point position;
[0157] Calculate the approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction and the zero-order coefficient of the reconstructed surface to be calculated;
[0158] Generate a reconstructed surface based on approximate parameters, pixel coordinate point positions, grayscale centroid coordinates, and non-center coordinates. Perform weighted processing on the reconstructed surface and display screen image to generate a contrast-enhanced image. Perform convolution filtering on the contrast-enhanced image. Perform threshold control on the grayscale value of the contrast-enhanced image to filter out the target contrast-enhanced image that meets the requirements. Perform morphological processing on the target contrast-enhanced image. Perform Blob feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image.
[0159] The display screen image is divided into multiple small area image blocks by using block division, and then multiple small area image blocks are downsampled to generate multiple downsampled block images. Then, the image is operated by selecting a polynomial surface reconstruction algorithm. For surface reconstruction, the amount of data can be reduced to speed up the algorithm, and defects can be clearly highlighted, thereby improving the accuracy of subsequent defect detection.
[0160] Secondly, the capture and positioning processing can reduce the interference of the background area and improve the detection speed and accuracy.
[0161] Secondly, performing mean filtering on the display screen image through a filter kernel can reduce noise interference, improve accuracy and increase detection efficiency.
[0162] Secondly, convolution filtering of the contrast-enhanced image can further filter out some interference and further highlight the defect information.
[0163] Secondly, by performing morphological processing on the target contrast-enhanced image, the burrs or noise interference at the image area boundary are removed, and the consideration of the pixels around the actual defect position is increased to increase the accuracy of detection.
[0164] See also Figure 4 The present application provides an embodiment of a defect extraction device for a display screen, comprising:
[0165] A division unit 401 is used to divide the display screen image into a plurality of small area image blocks;
[0166] The first generating unit 402 is used to perform downsampling processing on the multiple small-area image blocks to generate multiple downsampled block images;
[0167] A construction unit 403 is used to construct a reconstructed surface of the downsampled block image;
[0168] A second generating unit 404 is used to perform weighted processing on the reconstructed curved surface and the display screen image to generate a contrast enhanced image;
[0169] A screening unit 405 is used to perform threshold control on the gray value of the contrast enhanced image to screen out a target contrast enhanced image that meets the requirements;
[0170] The third generating unit 406 is used to perform defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image.
[0171] See also Figure 5 The present application provides an embodiment of a defect extraction device for a display screen, comprising:
[0172] A capture and positioning unit 501 is used to perform capture and positioning processing on the display screen image;
[0173] A mean filtering unit 502, used for performing mean filtering processing on the display screen image through a filter core;
[0174] A division unit 503, used for dividing the display screen image into a plurality of small area image blocks;
[0175] The first generating unit 504 is used to perform downsampling processing on the multiple small-area image blocks to generate multiple downsampled block images;
[0176] A construction unit 505, used to construct a reconstructed surface of the downsampled block image;
[0177] Optionally, the construction unit 505 includes:
[0178] Determine the pixel coordinate position on the downsampled block image;
[0179] Calculate the grayscale centroid coordinates and position non-center coordinates according to the pixel coordinate point position;
[0180] Calculate the approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction and the zero-order coefficient of the reconstructed surface to be calculated;
[0181] The reconstructed surface is generated according to the approximate parameters, pixel coordinate point positions, grayscale centroid coordinates and position non-center coordinates.
[0182] A second generating unit 506, configured to perform weighted processing on the reconstructed curved surface and the display screen image to generate a contrast enhanced image;
[0183] A convolution filtering unit 507, used for performing convolution filtering processing on the contrast enhanced image;
[0184] A screening unit 508 is used to perform threshold control on the gray value of the contrast enhanced image to screen out a target contrast enhanced image that meets the requirements;
[0185] An interference removal unit 509, configured to perform morphological processing on the target contrast enhanced image;
[0186] The third generating unit 510 is used to perform defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image.
[0187] Optionally, the third generating unit 510 includes:
[0188] Perform Blob feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image.
[0189] See also Figure 6 , an embodiment of the present application provides an electronic device, including:
[0190] Processor 601, memory 602, input and output unit 603, bus 604;
[0191] The processor 601 is connected to the memory 602, the input and output unit 603 and the bus 604;
[0192] The processor 601 specifically performs the following operations:
[0193] Divide the display screen image into a plurality of small area image blocks;
[0194] Downsampling the multiple small-area image blocks to generate multiple downsampled block images;
[0195] Constructing the reconstructed surface of the downsampled block image;
[0196] Performing weighted processing on the reconstructed surface and the display screen image to generate a contrast-enhanced image;
[0197] Threshold control is performed on the gray value of the contrast-enhanced image to screen out the target contrast-enhanced image that meets the requirements;
[0198] Perform defect feature analysis on the target contrast-enhanced image to generate a set of defect types for the display screen image.
[0199] In this embodiment, the function of the processor 601 is the same as that of the aforementioned Figure 1 , Figure 2 and Figure 3 The steps in the illustrated embodiments correspond to each other and are not described in detail here.
[0200] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 2 and Figure 3 Defect extraction method in .
[0201] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0202] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0203] 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.
[0204] 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.
[0205] 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 storage medium. Based on this understanding, the technical solution of the present application is essentially 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. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for extracting defects from a display screen, characterized in that: include: The display screen image is captured and positioned by using the gradient method, and the display screen image is corrected by point pair mapping operation; Divide the display screen image into a plurality of small area image blocks; Downsampling the plurality of small-area image blocks to generate a plurality of downsampled block images, so that the characteristic information parameters of the small-area image blocks replace the parameters of the display screen image; Determine the pixel coordinate point position on the downsampled block image; Calculate the grayscale centroid coordinates and the position non-center coordinates according to the pixel coordinate point position; Calculate the approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction and the zero-order coefficient of the reconstructed surface to be calculated; Generate a reconstructed surface according to the approximate parameters, pixel coordinate point positions, grayscale centroid coordinates and position non-center coordinates; The reconstructed curved surface and the display screen image are weighted to generate a contrast enhanced image. The weighted processing formula is as follows: in, The pixel grayscale value of the intermediate image generated by performing arithmetic operations on the reconstructed surface image and the display screen image. is the gray value of the image after weighted processing, and are the maximum grayscale value and the minimum grayscale value of the intermediate image, Mult is the weight, and Add is the offset; Thresholding the gray value of the contrast-enhanced image to screen out a target contrast-enhanced image that satisfies the requirement; Defect feature analysis is performed on the target contrast-enhanced image to generate a defect type set of the display screen image.
2. The defect extraction method according to claim 1, characterized in that: After the display screen image is captured and positioned, and before the display screen image is divided into a plurality of small area image blocks, the defect extraction method further includes: The display screen image is subjected to mean filtering processing by means of a filter kernel.
3. The defect extraction method according to claim 1, characterized in that: After weighted processing is performed on the reconstructed curved surface and the display screen image to generate a contrast enhanced image, a threshold is performed on the grayscale value of the contrast enhanced image to select a target contrast enhanced image that satisfies the requirement, and before the defect extraction method further includes: A convolution filtering process is performed on the contrast enhanced image.
4. The defect extraction method according to claim 1, characterized in that: After thresholding the grayscale value of the contrast enhanced image to screen out a target contrast enhanced image that satisfies the requirement, and performing defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image, the defect extraction method further includes: Morphological processing is performed on the target contrast-enhanced image.
5. The defect extraction method according to any one of claims 1 to 4, characterized in that: Performing defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image includes: Blob feature analysis is performed on the target contrast-enhanced image to generate a defect type set of the display screen image.
6. A defect extraction device for a display screen, characterized in that: include: A grabbing and positioning unit, used to perform grabbing and positioning processing on the display screen image by using a gradient method, and to correct the display screen image by a point pair mapping operation; A division unit, used for dividing the display screen image into a plurality of small area image blocks; A first generating unit is used to perform downsampling processing on the plurality of small-area image blocks to generate a plurality of downsampled block images, so that the characteristic information parameters of the small-area image blocks replace the parameters of the display screen image; A construction unit, used for constructing a reconstructed surface of the downsampled block image; Building blocks, including: Determine the pixel coordinate position on the downsampled block image; Calculate the grayscale centroid coordinates and position non-center coordinates according to the pixel coordinate point position; Calculate the approximate parameters of the reconstructed surface of the downsampled block image according to the pixel coordinate point position and the gray value information corresponding to the pixel coordinate point position, wherein the approximate parameters include the second-order coefficient in the vertical direction, the second-order coefficient in the horizontal direction, the mixed second-order coefficient, the first-order coefficient in the vertical direction, the first-order coefficient in the horizontal direction and the zero-order coefficient of the reconstructed surface to be calculated; Generate a reconstructed surface according to approximate parameters, pixel coordinate point positions, grayscale centroid coordinates and position non-center coordinates; The second generating unit is used to perform weighted processing on the reconstructed curved surface and the display screen image to generate a contrast enhanced image, and the weighted processing formula is as follows: in, The pixel grayscale value of the intermediate image generated by performing arithmetic operations on the reconstructed surface image and the display screen image. is the gray value of the image after weighted processing, and are the maximum grayscale value and the minimum grayscale value of the intermediate image, Mult is the weight, and Add is the offset; A screening unit, used for performing threshold control on the gray value of the contrast enhanced image to screen out a target contrast enhanced image that meets the requirements; The third generating unit is used to perform defect feature analysis on the target contrast enhanced image to generate a defect type set of the display screen image.
7. A device, characterized in that: It includes a processor, a memory, an input-output unit and a bus, wherein the processor is connected to the memory, the input-output unit and the bus; The memory stores a program, and the processor calls the program to execute the defect extraction method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on a computer, the defect extraction method according to any one of claims 1 to 5 is executed.
