Screen defect detection method, electronic device and storage medium

By performing block processing and linear filter kernel filtering on the LCD screen image, the defect weight range is dynamically adjusted, which solves the problem of low Mura detection accuracy in the existing technology and achieves higher defect detection accuracy.

CN118397009BActive Publication Date: 2024-09-24GOVION TECHNOLOGY (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410859144.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-24
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In the existing technology, in Mura detection of LCD screens, the defect weight is limited to local areas, which fails to fully utilize the image information, resulting in a reduction in detection accuracy.

Method used

By obtaining the screen image to be tested for preprocessing and block processing, it is expanded into a row vector, and neighborhood pixels are filled based on the filter kernel length of the preset linear filter kernel, and the defect weight range is dynamically adjusted to introduce a wider range of neighborhood pixels. Calculate defect response values.

Benefits of technology

The defect detection accuracy is improved, the weight range of defect detection is expanded to a wider image area, and the detection accuracy of Mura defects is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397009B
    Figure CN118397009B
Patent Text Reader

Abstract

The present application discloses a screen defect detection method, electronic device and storage medium. The method includes: obtaining a screen image to be tested, and preprocessing the screen image to be tested to obtain a target detection image; performing block processing on the target detection image to obtain multiple sub-image blocks; respectively expanding each sub-image block into a row vector to obtain multiple initial row vectors; filling each initial row vector with neighboring pixels based on the filter kernel length of a preset linear filter kernel to obtain multiple extended row vectors; determining an initial response map based on each extended row vector and the initial row vector corresponding to each extended row vector; performing closing operations and dust filtering operations on the initial response map to obtain a target response map; performing defect segmentation based on the target response map to obtain the defect area position. Utilizing the technical solution of the present application, it is possible to dynamically adjust the defect weight range, introduce a wider range of neighboring pixels to calculate the defect response value, and improve the detection accuracy of defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of image processing technology. More specifically, the present application relates to a screen defect detection method, an electronic device and a storage medium. Background Art

[0002] As liquid crystal displays (LCDs) are widely used in televisions, computer monitors, mobile phones and other devices, the quality of LCDs has become increasingly important under mass production. Mura refers to the phenomenon that various traces are produced on LCDs due to uneven brightness. The cause may be display defects caused by the color filter attached to the LCD, or the driver chip or the liquid crystal itself may also be the cause of Mura. The severity of Mura is an important reference for judging the quality of the display, so Mura detection of the display is indispensable.

[0003] In the prior art, an image can be divided into several parts according to the entire row or column, and then the grayscale difference between adjacent sub-parts is compared using mean filtering to determine whether a Mura defect exists. For the calculation of the Mura response, the influencing weight is limited to the local area of ​​the Mura, and the image information is not fully utilized, which easily leads to a reduction in the detection accuracy of the Mura defect.

[0004] In view of this, there is an urgent need to provide a screen defect detection method that can dynamically adjust the defect weight range, introduce a wider range of neighborhood pixels to calculate the defect response value, and improve the defect detection accuracy. Summary of the invention

[0005] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a screen defect detection method, an electronic device and a storage medium in multiple aspects. The screen defect detection method can dynamically adjust the defect weight range, introduce a wider range of neighborhood pixels to calculate the defect response value, and improve the detection accuracy of defects.

[0006] In the first aspect, the present application provides a screen defect detection method, including: acquiring a screen image to be tested, and preprocessing the screen image to be tested to obtain a target detection image; performing block processing on the target detection image to obtain multiple sub-image blocks; respectively expanding each sub-image block into a row vector to obtain multiple initial row vectors; filling each initial row vector with neighborhood pixels based on a filter kernel length of a preset linear filter kernel to obtain multiple extended row vectors; determining an initial response map based on each extended row vector and the initial row vector corresponding to each extended row vector; performing closing operations and dust filtering operations on the initial response map to obtain a target response map; performing defect segmentation based on the target response map to obtain the position of the defective area.

[0007] In some embodiments, performing block processing on the target detection image includes: performing processing on the target detection image based on a preset number of pixel rows and a preset number of pixel columns of the sub-image blocks.

[0008] In some embodiments, processing the target detection image division based on a preset number of pixel rows and a preset number of pixel columns of the sub-image blocks includes: determining the number of sub-image blocks, the pixel row remainder R, and the pixel column remainder C according to the number of image pixel rows and the number of image pixel columns of the target detection image and the preset number of pixel rows and the preset number of pixel columns; evenly distributing the remaining row pixel points corresponding to the pixel row remainder R into the sub-image rows of the first R sub-image blocks; and evenly distributing the remaining column pixel points corresponding to the pixel column remainder C into the sub-image columns of the first C sub-image blocks.

[0009] In some embodiments, expanding each sub-image block into a row vector includes: if a horizontal defect is detected, each sub-image block is expanded in an S-shaped direction by row; if a vertical defect is detected, each sub-image block is expanded in an S-shaped direction by column; if an oblique defect is detected, each sub-image block is rotated 45° and / or 135° and then expanded in an S-shaped direction by row or in an S-shaped direction by column.

[0010] In some embodiments, filling the neighborhood pixel points of each initial row vector based on the filter kernel length of a preset linear filter kernel includes: constructing a preset linear filter kernel based on a preset filter kernel size range; and filling the neighborhood pixel points of each initial row vector based on half the filter kernel length of the preset linear filter kernel.

[0011] In some embodiments, determining an initial response map based on each extended row vector and the initial row vector corresponding to each extended row vector includes: performing mean filtering on each extended row vector using a preset linear filter kernel to obtain multiple target row vectors; subtracting each target row vector from the initial row vector corresponding to each target row vector to obtain multiple response row vectors; converting each response row vector into a response image block corresponding to each sub-image block according to an image block position index of each sub-image block and a sub-image block corresponding to each response row vector; and forming an initial response map based on the response image block corresponding to each sub-image block.

[0012] In some embodiments, preprocessing the screen image to be tested includes: determining the screen area to be tested based on the screen image to be tested; performing perspective transformation on the screen area to be tested to obtain a corrected screen area image; performing Gaussian pyramid downsampling on the corrected screen area image, and taking the scale map with the highest image information entropy value as the target detection image.

[0013] In some embodiments, performing closing operations and dust filtering operations on the initial response image includes: performing closing operations on the initial response image by connecting kernels in parallel directions and connecting kernels in orthogonal directions, respectively; and obtaining a screen surface lighting image of the display screen to be detected; performing threshold segmentation on the screen surface lighting image to obtain a non-target defect area mask image; and setting the grayscale values ​​of pixels at non-target defect positions corresponding to the non-target defect area mask image in the initial response image to zero.

[0014] In a second aspect, the present application provides an electronic device, comprising: a processor; and a memory, on which a program code for screen defect detection is stored, and when the program code is executed by the processor, the electronic device implements the method as described above.

[0015] In a third aspect, the present application provides a non-transitory machine-readable storage medium having stored thereon a program code for screen defect detection, and when the program code is executed by a processor, the method described above can be implemented.

[0016] The technical solution provided by this application may have the following beneficial effects:

[0017] The screen defect detection method, electronic device and storage medium provided in the present application obtain a target detection image by acquiring a screen image to be tested and preprocessing the screen image to be tested, and then divide the target detection image into blocks to obtain multiple sub-image blocks, thereby improving the consistency between the defect detection length and the actual defect length.

[0018] Furthermore, the present application can expand each sub-image block into a row vector to obtain multiple initial row vectors, and then fill each initial row vector with neighboring pixels based on the filter kernel length of the preset linear filter kernel to obtain multiple extended row vectors, so that the defect weight range can be dynamically adjusted by setting the filter kernel length of the linear filter kernel, so that a wider range of neighborhood pixels can be introduced to calculate the defect response value, and the weight affecting the defect detection can be expanded to a wider image area, thereby improving the detection accuracy of defects. Then, based on each extended row vector and the initial row vector corresponding to each extended row vector, an initial response map is determined, and then a closing operation and a dust filtering operation are performed on the initial response map to obtain a target response map, so that defect segmentation is performed based on the target response map to obtain the position of the defect area.

[0019] In general, this application can dynamically adjust the defect weight range, introduce a wider range of neighborhood pixels to calculate the defect response value, and improve the defect detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0021] Figure 1 An exemplary flow chart showing a screen defect detection method according to some embodiments of the present application is shown;

[0022] Figure 2 An exemplary flow chart showing a screen defect detection method according to other embodiments of the present application;

[0023] Figure 3 An exemplary flow chart showing a screen defect detection method according to some further embodiments of the present application is shown;

[0024] Figure 4 An example diagram of a screen image to be tested in an embodiment of the present application is shown;

[0025] Figure 5 An example diagram of a target detection image after the screen image to be tested is preprocessed in an embodiment of the present application is shown;

[0026] Figure 6 An example diagram of a target response diagram in an embodiment of the present application is shown;

[0027] Figure 7 An example diagram showing the defect area location obtained by defect segmentation based on the target response map in an embodiment of the present application is shown;

[0028] Figure 8 A schematic diagram of the structure of an electronic device shown in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] 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 embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. For the simplicity and clarity of the description, the figure marks may be repeated in the drawings to indicate corresponding or similar elements when deemed appropriate. In addition, the present application sets forth many specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, processes, and components are not described in detail to avoid blurring the embodiments described herein. Moreover, the description should not be regarded as limiting the scope of the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0030] It should be understood that the possible terms "first" or "second" etc. in the claims, specifications and drawings disclosed in this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of this application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0031] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0032] As used in this specification and claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0033] Mura refers to the phenomenon that various traces are produced due to uneven brightness of the liquid crystal display. The reasons may be display defects caused by attaching color filters to the LCD, or the driver chip and liquid crystal itself may also be the cause of Mura. The severity of Mura is an important reference for judging the quality of the display, so Mura detection of the display is indispensable. In the prior art, the image can be divided into several parts according to the entire row or column, and then the mean filter is used to compare the grayscale differences between adjacent sub-parts to determine whether there is a Mura defect. For the calculation of Mura response, the influencing weight is limited to the local area of ​​Mura, and the image information is not fully utilized, which easily leads to a reduction in the detection accuracy of Mura defects.

[0034] In view of this, there is an urgent need to provide a screen defect detection method that can dynamically adjust the defect weight range, introduce a wider range of neighborhood pixels to calculate the defect response value, and improve the defect detection accuracy.

[0035] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.

[0036] Figure 1 An exemplary flow chart of a screen defect detection method according to some embodiments of the present application is shown. Figure 4 An example diagram of the screen image to be tested in the embodiment of the present application is shown in FIG. Figure 1 and Figure 4 , the screen defect detection method shown in the embodiment of the present application may include:

[0037] In step S101, the screen image to be tested is acquired and preprocessed to obtain a target detection image. Figure 4 As shown, the aforementioned screen image to be tested may be an image obtained by photographing the display screen to be tested through an imaging device such as an industrial camera, which contains defects (in the black circle), which may be Mura defects or other defects. It is understandable that the method for obtaining the image of the display screen to be tested may be various. In practical applications, the method for obtaining the image of the display screen to be tested needs to be determined according to the actual application situation, and this application does not impose any restrictions in this regard.

[0038] In addition, in the embodiment of the present application, the method of preprocessing the screen image to be tested may include but is not limited to region of interest segmentation, viewing angle correction and downsampling. It is understandable that in actual applications, the preprocessing method needs to be determined according to the actual application situation, and the present application does not impose any restrictions in this regard.

[0039] In step S102, the target detection image is divided into blocks to obtain a plurality of sub-image blocks. In an embodiment of the present application, the target detection image can be divided into M×N non-overlapping sub-image blocks by rows and columns (where M is the number of sub-image block rows of an array composed of a plurality of non-overlapping sub-image blocks, and N is the number of sub-image block columns of an array composed of a plurality of non-overlapping sub-image blocks, and both M and N are greater than zero). In this case, the defect position can be covered by one or some of the sub-image blocks, thereby avoiding the problem of introducing more invalid areas by dividing the image into several parts by the entire row or column and then using mean filtering to compare the grayscale differences between adjacent sub-parts to determine whether there is a defect, thereby preventing interference caused by the introduction of more invalid areas, and achieving the improvement of the conformity between the defect detection length and the actual defect length.

[0040] In step S103, each sub-image block is expanded into a row vector to obtain a plurality of initial row vectors. In the embodiment of the present application, each sub-image block can be expanded into a row vector with a height of 1 and a length of m×n in an S-type, wherein m is the preset number of pixel rows of the sub-image block, and n is the preset number of pixel columns of the sub-image block, and both m and n are greater than zero. Among them, the S-type expansion refers to rearranging or expanding the data according to an S-shaped path. In the embodiment of the present application, specifically, the pixel points of the sub-image block are scanned according to the S-shaped path, and then the pixel points are reorganized into row vectors.

[0041] In step S104, each initial row vector is filled with neighboring pixels based on the filter kernel length of the preset linear filter kernel to obtain multiple extended row vectors. In an embodiment of the present application, the height of the aforementioned preset linear filter kernel is also 1, and the size range of its filter kernel length can be [1, m×n]. The larger the filter kernel length of the preset linear filter kernel, the larger the range of defect weight calculation. Therefore, the defect weight range can be dynamically adjusted by setting the filter kernel length of the linear filter kernel, so that a wider range of neighborhood pixels can be introduced to calculate defect response values, and the weights affecting defect detection can be expanded to a wider image area, thereby improving the detection accuracy of defects.

[0042] In the embodiment of the present application, in order to ensure that all pixels in the initial row vector can be processed, it is necessary to fill the first and last positions of the initial row vector with neighboring pixels. For the first position of the initial row vector, the grayscale value of the filled pixel can be extended by taking the first pixel of the row vector as the symmetric point and copying the pixels in the initial row vector according to the number of filled pixels, or by taking the first pixel of the row vector as the starting point and copying the first pixel of the row vector with the same number of filled pixels. For the tail position of the initial row vector, the grayscale value of the filled pixel can be extended by taking the last pixel of the row vector as the symmetric point and copying the pixels in the initial row vector according to the number of filled pixels, or by taking the last pixel of the row vector as the starting point and copying the last pixel of the row vector with the same number of filled pixels.

[0043] It is understandable that there are various ways to fill the neighborhood pixels of each initial row vector. In practical applications, a suitable method needs to be selected according to the actual application situation. This application does not impose any restrictions in this regard.

[0044] In step S105, an initial response map is determined based on each extended row vector and the initial row vector corresponding to each extended row vector. In the embodiment of the present application, the extended row vector can be firstly subjected to mean filtering. Under the processing effect of the mean filtering, the grayscale value of the pixel point at the defective position can be affected by the grayscale value of the pixel point at the adjacent position, while the grayscale value of the pixel point at the remaining position is basically unaffected. Then, the initial row vector corresponding to each extended row vector is processed to highlight the defective position, thereby determining the initial response map.

[0045] In step S106, the initial response map is closed and dust filtered to obtain a target response map. In an embodiment of the present application, the aforementioned closing operation refers to an operation for removing small objects, filling small holes and breaks, and connecting adjacent objects, which combines dilation and erosion. Among them, firstly, an erosion operation is performed on the image, which reduces the size of the object, removes small protrusions or entire small objects, and increases the distance between objects; then a dilation operation is performed on the result after the erosion, which increases the size of the object, fills small holes and breaks, and reduces the distance between objects. In addition, the above-mentioned dust filtering operation refers to an operation of detecting the dust position by acquiring the surface lighting map of the screen, and thereby removing the non-target defect position of the initial response map.

[0046] In step S107, defect segmentation is performed based on the target response map to obtain the defect area position. In the embodiment of the present application, the target response map can be subjected to binarization threshold segmentation to obtain a binary result map, and then the contours and areas of each area in the binary result map are found, and then the circumscribed rectangle of each contour and the minimum rotated circumscribed rectangle are calculated to obtain the width and height values ​​of the circumscribed rectangle of the contour, and finally the defect area position is screened out according to preset defect length, area, aspect ratio, grayscale mean and other parameters. In the embodiment of the present application, the defect in the defect area position may be a Mura defect.

[0047] The present application obtains the target detection image by acquiring the screen image to be tested and preprocessing the screen image to be tested, and then divides the target detection image into blocks to obtain multiple sub-image blocks, so as to improve the consistency between the defect detection length and the actual defect length. Furthermore, the present application can expand each sub-image block into a row vector respectively to obtain multiple initial row vectors, and then fill each initial row vector with neighboring pixels based on the filter kernel length of the preset linear filter kernel to obtain multiple extended row vectors, so that the defect weight range can be dynamically adjusted by setting the filter kernel length of the linear filter kernel, so that the defect response value can be calculated by introducing a wider neighborhood pixel, and the weight affecting the defect detection is expanded to a wider image area, thereby improving the detection accuracy of the defect. Then, based on each extended row vector and the initial row vector corresponding to each extended row vector, the initial response map is determined, and then the initial response map is closed and dust filtered to obtain the target response map, so as to perform defect segmentation based on the target response map and obtain the defect area position.

[0048] In general, this application can dynamically adjust the defect weight range, introduce a wider range of neighborhood pixels to calculate the defect response value, and improve the defect detection accuracy.

[0049] In some embodiments, the expansion method of the sub-image block can be determined for different types of defects. Figure 2 and Figure 5 The steps for determining the extended row vector are described in detail. Figure 2 An exemplary flow chart showing a screen defect detection method according to some other embodiments of the present application is shown. Figure 5 An example diagram showing a target detection image after the screen image to be tested is preprocessed in an embodiment of the present application, see Figure 2 and Figure 5 , the screen defect detection method shown in the embodiment of the present application may include:

[0050] In step S201, the screen image to be tested is acquired and preprocessed to obtain a target detection image. In an embodiment of the present application, the preprocessing of the screen image to be tested may be specifically as follows: first, the screen area to be tested may be determined based on the screen image to be tested. Exemplarily, the screen area to be tested may be located by threshold segmentation and straight line fitting. Then, the screen area to be tested may be perspective transformed to obtain a corrected screen area image. Exemplarily, the oblique view may be transformed into a front view. Next, the corrected screen area image may be downsampled by a Gaussian pyramid. The scale of the Gaussian pyramid downsampling may be selected by an adaptive method. Then, the image information entropy may be calculated for the images obtained by downsampling at different scales, such as Figure 5 As shown in Figure 1, the scale image with the highest image information entropy value is used as the target detection image.

[0051] It is understandable that there may be various ways to preprocess the screen image to be tested. In practical applications, a suitable preprocessing method needs to be selected according to the actual application situation. This application does not impose any restrictions in this regard.

[0052] In step S202, the target detection image is divided and processed based on the preset number of pixel rows and the preset number of pixel columns of the sub-image blocks to obtain a plurality of sub-image blocks. In an embodiment of the present application, the number of sub-image blocks, the pixel row remainder R, and the pixel column remainder C can be first determined according to the number of image pixel rows and the number of image pixel columns of the target detection image and the preset number of pixel rows and the preset number of pixel columns. Exemplarily, the number of sub-image block rows M and the pixel row remainder R of the array composed of a plurality of non-overlapping sub-image blocks can be determined by dividing the number of image pixel rows by the preset number of pixel rows, and the number of sub-image block columns N and the pixel column remainder C of the array composed of a plurality of non-overlapping sub-image blocks can be determined by dividing the number of image pixel columns by the preset number of pixel columns, thereby obtaining the number of sub-image blocks by M×N.

[0053] Furthermore, in order to solve the problem that the length and width of the target detection image cannot divide the length and width of the sub-image block, the remaining row of pixels corresponding to the pixel row remainder R can be evenly distributed to the sub-image rows of the first R sub-image blocks, so that the sub-image block row height of the first R sub-image blocks increases by 1. In addition, the remaining column of pixels corresponding to the pixel column remainder C can be evenly distributed to the sub-image columns of the first C sub-image blocks, so that the sub-image block column width of the first C sub-image blocks increases by 1.

[0054] In step S203, each sub-image block is expanded into a row vector to obtain a plurality of initial row vectors. In the embodiment of the present application, if a horizontal defect is detected, each sub-image block is expanded in an S-shaped direction by row, that is, it can be scanned from the pixel point in the upper left corner to the right until it reaches the last pixel point and then moves down one pixel point, then moves to the left to scan, until it reaches the last pixel point and then moves down one pixel point, then moves to the right to scan, and so on and so forth, until the pixel points of the sub-image block are scanned. If a vertical defect is detected, each sub-image block is expanded in an S-shaped direction by column, that is, it can be scanned from the pixel point in the upper left corner to the right after it reaches the last pixel point, then moves upward to scan, until it reaches the last pixel point and then moves to the right one pixel point, then moves downward to scan, and so on and so forth, until the pixel points of the sub-image block are scanned. If an oblique defect is detected, each sub-image block can be rotated 45° and / or 135° and then expanded in an S-shaped direction by row or in an S-shaped direction by column. It is understandable that in practical applications, since the inclination angle of the oblique defect is not fixed, it is necessary to adjust the above-mentioned rotation angle according to the actual application situation in order to adapt to the detection of oblique defects in various directions. The present application does not impose any restrictions in this regard.

[0055] In step S204, a preset linear filter kernel is constructed based on a preset filter kernel size range. In an embodiment of the present application, the height of the aforementioned preset linear filter kernel is also 1, and the size range of its filter kernel length can be [1, m×n]. The larger the filter kernel length of the preset linear filter kernel, the larger the range of calculating the defect weight. Therefore, the defect weight range can be dynamically adjusted by setting the filter kernel length of the linear filter kernel, so that a wider range of neighborhood pixels can be introduced to calculate the defect response value, and the weight affecting the defect detection can be expanded to a wider image area, thereby improving the detection accuracy of defects.

[0056] In step S205, neighboring pixel points are filled for each initial row vector based on half the filter kernel length of the preset linear filter kernel. In the embodiment of the present application, in order to ensure that all pixel points in the initial row vector can be processed, it is necessary to fill the neighboring pixel points at the beginning and end of the initial row vector. Exemplarily, assuming that half the filter kernel length of the preset linear filter kernel is 4, for the first position of the initial row vector, the grayscale value of the filled pixel point can be symmetrically extended on the edge of the first pixel point of the row vector by taking the first pixel point of the row vector as the symmetric point and copying the 2nd, 3rd, 4th, and 5th pixel points in the initial row vector, or it can be extended on the edge of the first pixel point of the row vector by copying 4 first pixel points of the row vector with the first pixel point of the row vector as the starting point. For the tail of the initial row vector, the grayscale value of the filled pixel can be symmetrically extended along the edge of the first pixel of the row vector by copying the second, third, fourth, and fifth pixels from the end of the initial row vector with the tail pixel of the row vector as the symmetrical point, or by copying the four tail pixels of the row vector with the tail pixel of the row vector as the starting point to extend along the edge of the tail pixel of the row vector.

[0057] It is understandable that there are various ways to fill the neighborhood pixels of each initial row vector. In practical applications, a suitable method needs to be selected according to the actual application situation. This application does not impose any restrictions in this regard.

[0058] In some embodiments, the extended row vectors may be firstly mean filtered, and then the initial response graph may be determined based on the filtering result and the initial row vectors corresponding to each extended row vector. Figure 3 , Figure 6 and Figure 7 The steps for detecting the defect area location are described in detail. Figure 3 An exemplary flow chart showing a screen defect detection method according to some other embodiments of the present application is shown in FIG. Figure 3 , the screen defect detection method shown in the embodiment of the present application may include:

[0059] In step S301, each extended row vector is subjected to mean filtering by a preset linear filter kernel to obtain multiple target row vectors. Taking the Mura defect as an example, the Mura defect exists in the form of dark lines in the screen image to be tested. Under the mean filtering effect of the preset linear filter kernel, the grayscale value of the pixel corresponding to the Mura defect can be affected by the grayscale value of the pixel at the adjacent position and improved, while the grayscale value of the pixel at the remaining position is basically unaffected.

[0060] In step S302, each target row vector is subtracted from the initial row vector corresponding to each target row vector to obtain multiple response row vectors. In an embodiment of the present application, the pixels filled in each target row vector need to be removed before subtraction. Then, each target row vector is subtracted from the initial row vector corresponding to each target row vector, and the above-mentioned Mura defect example is continued to be explained. Since the grayscale value of the pixel point corresponding to the Mura defect is improved, and the grayscale value of the pixel point at the remaining position is basically unaffected, the grayscale value of the pixel point at the remaining position is basically close to zero after subtraction, and the grayscale value of the pixel point corresponding to the Mura defect is a positive number, so that the Mura defect position can be highlighted.

[0061] In step S303, each response row vector is converted into a response image block corresponding to each sub-image block according to the image block position index of each sub-image block and the sub-image block corresponding to each response row vector. In the embodiment of the present application, each response row vector can be subjected to the inverse processing of S-type expansion according to the image block position index of each sub-image block and the sub-image block corresponding to each response row vector, so as to convert each response row vector into a response image block corresponding to each sub-image block, and place the response image block corresponding to each sub-image block at the image block position corresponding to each sub-image block.

[0062] In step S304, an initial response map is formed based on the response image blocks corresponding to each sub-image block. The response image blocks corresponding to each sub-image block are spliced ​​to obtain the initial response map.

[0063] In step S305, the initial response graph is closed and dust filtered to obtain a target response graph. In an embodiment of the present application, on the one hand, the initial response graph can be closed by a parallel direction connection kernel and an orthogonal direction connection kernel, respectively. The parallel direction connection kernel is usually used to perform a closing operation along the rows (horizontal direction) of the image. When the defect is broken in the horizontal direction, the parallel direction connection kernel is used to connect the broken parts so that the defect is a whole in the horizontal direction. The orthogonal direction connection kernel is used to perform a closing operation along the columns (vertical direction) of the image. When the defect is broken in the vertical direction, the orthogonal direction connection kernel is used to connect the vertical direction.

[0064] On the other hand, when performing dust filtering operations, the screen surface lighting image of the display screen to be tested can be obtained first. In the screen surface lighting image, non-target defects such as dust or scratches will be highlighted. Then, the screen surface lighting image can be threshold segmented to obtain a mask image of the non-target defect area. Figure 6 As shown, the grayscale values ​​of pixels at non-target defect positions corresponding to the mask image of the non-target defect area can be set to zero in the initial response image, so as to obtain a target response image.

[0065] In step S306, defect segmentation is performed based on the target response map to obtain the defect area location. Figure 7 As shown, the target response map can be subjected to a binary threshold segmentation to obtain a binary result map, and then the contours and areas of each region in the binary result map are found, and then the circumscribed rectangle of each contour and the minimum rotated circumscribed rectangle are calculated to obtain the width and height values ​​of the circumscribed rectangle of the contour, and finally the defect area position is screened out according to preset defect length, area, aspect ratio, grayscale mean and other parameters. In the embodiment of the present application, the defect in the defect area position may be a Mura defect.

[0066] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides an electronic device for executing a screen defect detection method and a corresponding embodiment.

[0067] Figure 8 FIG. 4 is a block diagram showing a hardware configuration of an electronic device 400 that can implement the screen defect detection method of an embodiment of the present application. Figure 8 As shown, the electronic device 400 may include a processor 410 and a memory 420. Figure 8 In the electronic device 400, only the components related to this embodiment are shown. Therefore, it is obvious to those skilled in the art that the electronic device 400 may also include components related to this embodiment. Figure 8 The components shown in the figure are different from the common components. For example: fixed-point arithmetic units.

[0068] The electronic device 400 may correspond to a computing device having various processing functions, for example, a function for generating a neural network, training or learning a neural network, quantizing a floating-point neural network to a fixed-point neural network, or retraining a neural network. For example, the electronic device 400 may be implemented as various types of devices, such as a personal computer (PC), a server device, a mobile device, etc.

[0069] The processor 410 controls all functions of the electronic device 400. For example, the processor 410 controls all functions of the electronic device 400 by executing a program stored in the memory 420 on the electronic device 400. The processor 410 may be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device 400. However, the present application is not limited thereto.

[0070] In some embodiments, the processor 410 may include an input / output (I / O) unit 411 and a computing unit 412. The I / O unit 411 may be used to receive various data, such as a screen image to be tested. Exemplarily, the computing unit 412 may be used to pre-process the screen image to be tested received via the I / O unit 411 to obtain a target detection image; then, the target detection image is processed into blocks to obtain a plurality of sub-image blocks; each sub-image block is expanded into a row vector to obtain a plurality of initial row vectors; each initial row vector is filled with neighboring pixels based on the filter kernel length of a preset linear filter kernel to obtain a plurality of extended row vectors; an initial response map is determined based on each extended row vector and the initial row vector corresponding to each extended row vector; a closing operation and a dust filtering operation are performed on the initial response map to obtain a target response map; defect segmentation is performed based on the target response map to obtain a defect area position. This defect area position may be output, for example, by the I / O unit 411. The output data may be provided to the memory 420 for reading and use by other devices (not shown), or may be directly provided to other devices for use.

[0071] The memory 420 is hardware for storing various data processed in the electronic device 400. For example, the memory 420 can store processed data and data to be processed in the electronic device 400. The memory 420 can store data sets involved in the screen defect detection method process that has been processed or to be processed by the processor 410, such as a screen image to be tested, etc. In addition, the memory 420 can store applications, drivers, etc. to be driven by the electronic device 400. For example: the memory 420 can store various programs related to the screen defect detection method to be executed by the processor 410. The memory 420 can be a DRAM, but the present application is not limited thereto. The memory 420 can include at least one of a volatile memory or a non-volatile memory. The non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a phase change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), a ferroelectric RAM (FRAM), etc. The volatile memory may include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory 420 may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.

[0072] In summary, the specific functions implemented by the memory 420 and the processor 410 of the electronic device 400 provided in the implementation mode of this specification can be explained in comparison with the aforementioned implementation modes in this specification, and can achieve the technical effects of the aforementioned implementation modes, and will not be repeated here.

[0073] In this embodiment, the processor 410 may be implemented in any suitable manner. For example, the processor 410 may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc.

[0074] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions exemplified herein may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.

[0075] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A screen defect detection method, characterized in that: include: Acquire a screen image to be tested, and preprocess the screen image to be tested to obtain a target detection image; Performing block processing on the target detection image to obtain a plurality of sub-image blocks; Expand each sub-image block into a row vector respectively to obtain a plurality of initial row vectors; The step of expanding each sub-image block into a row vector comprises: If a lateral defect is to be detected, each sub-image block is expanded row by row in an S-shaped direction; If vertical defects are detected, each sub-image block is expanded in an S-shaped direction by column; If an oblique defect is detected, each sub-image block is rotated 45° or 135° and then expanded in an S-shaped direction by row or by column; Filling each initial row vector with neighboring pixels based on the filter kernel length of the preset linear filter kernel to obtain multiple extended row vectors; Determine an initial response graph based on each extended row vector and the initial row vectors respectively corresponding to each extended row vector; The step of determining the initial response graph based on each extended row vector and the initial row vector corresponding to each extended row vector comprises: Perform mean filtering on each extended row vector using the preset linear filter kernel to obtain multiple target row vectors; Subtract each target row vector from the initial row vector corresponding to each target row vector to obtain multiple response row vectors. Before subtracting, the pixel points filled in each target row vector need to be removed. According to the image block position index of each sub-image block and the sub-image block corresponding to each response row vector, each response row vector is respectively subjected to the inverse processing of the S-type expansion, so as to convert each response row vector into a response image block corresponding to each sub-image block, and the response image block corresponding to each sub-image block is placed at the image block position corresponding to each sub-image block; The response image blocks corresponding to each sub-image block are spliced ​​to obtain an initial response map; Performing a closing operation and a dust filtering operation on the initial response graph to obtain a target response graph; Defect segmentation is performed based on the target response map to obtain the position of the defect area.

2. The screen defect detection method according to claim 1, characterized in that: The block processing of the target detection image comprises: The target detection image is divided and processed based on a preset number of pixel rows and a preset number of pixel columns of the sub-image blocks.

3. The screen defect detection method according to claim 2, characterized in that: The dividing process of the target detection image based on the preset number of pixel rows and the preset number of pixel columns of the sub-image blocks includes: Determine the number of sub-image blocks, the pixel row remainder R, and the pixel column remainder C according to the number of image pixel rows and the number of image pixel columns of the target detection image and the preset number of pixel rows and the preset number of pixel columns; Evenly distribute the remaining rows of pixel points corresponding to the pixel row remainder R to the sub-image rows of the first R sub-image blocks; The remaining columns of pixels corresponding to the pixel column remainder C are evenly distributed to the sub-image columns of the first C sub-image blocks.

4. The screen defect detection method according to claim 1, characterized in that: The filling of neighboring pixel points of each initial row vector based on the filter kernel length of the preset linear filter kernel includes: Constructing the preset linear filter kernel based on a preset filter kernel size range; Each initial row vector is filled with neighboring pixels based on half the filter kernel length of the preset linear filter kernel.

5. The screen defect detection method according to claim 1, characterized in that: The preprocessing of the screen image to be tested comprises: Determine the screen area to be tested based on the screen image to be tested; Performing perspective transformation on the screen area to be measured to obtain a corrected screen area image; The corrected screen area image is subjected to Gaussian pyramid downsampling, and a scale map with the highest image information entropy value is used as the target detection image.

6. The screen defect detection method according to claim 1, characterized in that: The performing of closing operation and dust filtering operation on the initial response graph comprises: Performing a closing operation on the initial response graph by respectively connecting the kernel in a parallel direction and the kernel in an orthogonal direction; and Obtaining a screen surface lighting image of the display screen to be detected; Performing threshold segmentation on the screen surface lighting image to obtain a mask image of a non-target defect area; In the initial response image, the grayscale values ​​of the pixels at the non-target defect positions corresponding to the non-target defect area mask image are set to zero.

7. An electronic device, characterized in that: include: processor; as well as A memory having program codes for screen defect detection stored therein, wherein when the program codes are executed by the processor, the electronic device implements the method as claimed in any one of claims 1 to 6.

8. A non-transitory machine-readable storage medium, characterized in that: A program code for screen defect detection is stored thereon, and when the program code is executed by a processor, the method according to any one of claims 1 to 6 is implemented.