Method, device, equipment and storage medium for detecting defects of liquid crystal display screen
By repairing and processing the effective display area image of the liquid crystal display screen, generating a bar image and performing morphological processing, the problem of difficulty in detecting edge compression defects in the corner area in the prior art is solved, and more efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202510163589.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-02-14
AI Technical Summary
The prior art is difficult to effectively detect edge compression defects in the corner area of the liquid crystal display screen, especially when the four-corner contour of the LCD is arc-shaped, the detection effect of using horizontal or vertical filter cores is not ideal.
By acquiring the effective display area image of the display screen, repairing the area of interest mask, removing the inner circle image, expanding and splicing into a bar image, morphological processing and threshold segmentation are performed based on the bar image to detect defects in the edge-pressing area of the display screen.
It improves the detection ability of edge-pressure defects in the corner area of the LCD screen, improves the efficiency and accuracy of defect detection, and can effectively handle the four-corner area of the arc-shaped contour.
Smart Images

Figure CN119624973B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of general defect detection. More specifically, this application relates to a method, apparatus, device, and storage medium for detecting defects in a liquid crystal display screen. Background Technology
[0002] Liquid Crystal Displays (LCDs) may develop edge defects around the screen edges due to improper pressure, material issues, or poor assembly during the manufacturing process. This can severely affect the display quality. To address this, the detection process for LCD edge defects typically involves first acquiring an image of the LCD's active area (AA area). The AA area image is then subjected to lateral and longitudinal morphological processing, followed by blob analysis to detect the edge defects.
[0003] However, the aforementioned detection methods often fail to handle corner areas effectively. This is because while horizontal filtering kernels can detect defects at the top and bottom edges of an LCD, their ability to detect defects at the left and right edges is weak. Conversely, vertical filtering kernels, when used for vertical morphological processing, do not adequately address these issues. Consequently, corner areas of the LCD cannot be fully considered, especially when the LCD's corners are curved. In such cases, the detection results are unsatisfactory regardless of whether horizontal, vertical, or square filtering kernels are used.
[0004] In view of this, there is an urgent need to provide a method for detecting defects in liquid crystal displays in order to improve the detection capability of edge pressing defects in the corner areas of LCDs. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a method, apparatus, device and storage medium for detecting defects in liquid crystal displays in several aspects.
[0006] In a first aspect, this application provides a method for detecting defects in a liquid crystal display screen, comprising: acquiring an effective display area image of the display screen; repairing a region of interest mask of the effective display area image, wherein the region of interest mask determines the effective pixel range of the effective display area image for edge-pressing defect detection; removing the inner circle image of the repaired region of interest mask from the effective display area image to obtain an outer circle image with a preset number of pixel layers; unfolding and stitching the outer circle image into a bar image; and detecting defects in the edge-pressing area of the display screen based on the bar image.
[0007] In some embodiments, repairing the region of interest mask of the effective display area image includes: obtaining the contour points of the region of interest mask; selecting contour points to be repaired from the contour points; and performing polygon fitting based on the contour points to be repaired to repair the region of interest mask.
[0008] In some embodiments, unfolding and stitching the outer ring image into a bar image includes: unfolding the outer ring image into corresponding linear vectors according to pixel layers; filling the beginning and end of the linear vectors according to half the length of a preset bar filter kernel; and stitching the filled linear vectors together to obtain the bar image.
[0009] In some embodiments, the step of splicing the linear vectors after filling the beginning and end to obtain the bar image includes: sorting the linear vectors by length and splicing them together from top to bottom to obtain an initial trapezoidal image; determining the length reference of the initial trapezoidal image; and adjusting the lengths of the linear vectors in each layer of the initial trapezoidal image to be consistent based on the length reference to obtain the bar image.
[0010] In some embodiments, detecting defects in the display screen edge region based on the bar image further includes: constructing a corresponding filter kernel for the bar image and performing morphological processing on the bar image based on the filter kernel to obtain a corresponding target linear vector; performing threshold segmentation on the target linear vector to detect the defects and obtain a final response map of the linear vector and a linear vector result map marked with the defects; restoring the final response map of the linear vector and the linear vector result map to the effective display area image to display the detected defects in the display screen edge region.
[0011] In some embodiments, constructing a corresponding filter kernel for the bar image and performing morphological processing on the bar image based on the filter kernel includes: constructing a bar filter kernel and a vertical filter kernel for the bar image; performing morphological operations on the bar image based on the bar filter kernel to obtain a defect detection response map; and performing a dilation operation on the defect detection response map based on the vertical filter kernel to extract the target linear vector.
[0012] In some embodiments, threshold segmentation of the target linear vector includes: removing the beginning and end padding elements of the target linear vector to obtain the final response map of the linear vector; comparing each element in the final response map of the linear vector with a preset response threshold; if a preset number of consecutive elements are greater than the preset response threshold, then marking the corresponding elements as a defect; after the comparison of each element in the final response map of the linear vector is completed, the linear vector result map marked with the defect is obtained.
[0013] In a second aspect, this application also provides an apparatus for detecting defects in a liquid crystal display screen, comprising: an acquisition module for acquiring an image of the effective display area of the display screen; a repair module for repairing a region of interest mask of the effective display area image, wherein the region of interest mask determines the effective pixel range of the effective display area image for edge defect detection; a removal module for removing the inner circle image of the repaired region of interest mask from the effective display area image to obtain an outer circle image with a preset number of pixel layers; a stitching module for unfolding and stitching the outer circle image into a strip image; and a detection module for detecting defects in the edge region of the display screen based on the strip image.
[0014] In a third aspect, this disclosure also provides an apparatus for detecting defects in a liquid crystal display screen, comprising: a processor; and a memory storing program instructions for detecting defects in a liquid crystal display screen, wherein when the program instructions are executed by the processor, the method described in any of the above descriptions is implemented.
[0015] In a fourth aspect, this disclosure also provides a computer-readable storage medium storing computer program instructions for detecting defects in a liquid crystal display screen, which, when executed by a processor, implement the method described in any of the above embodiments.
[0016] The present application provides a method, apparatus, device, and storage medium for detecting defects in a liquid crystal display (LCD). This method involves repairing a region-of-interest (ROI) mask in the visible area image of the LCD. After removing the inner ring image of the RIO mask from the effective display area image, an outer ring image of a preset pixel layer is obtained. The outer ring image is then unfolded and stitched into a bar image, which is used to detect defects in the edge-pressing area of the LCD. This method integrates the outer ring image into a single bar image, facilitating defect detection in the edge-pressing area and improving the defect detection efficiency of the LCD. Furthermore, in some embodiments, the present application also constructs a bar filter kernel and performs morphological processing on the bar image, which facilitates subsequent morphological operations to ensure accurate output of defect locations. Attached Figure Description
[0017] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0018] Figure 1An exemplary flowchart of a method for detecting defects in a liquid crystal display screen according to some embodiments of this application is shown;
[0019] Figure 2 An exemplary flowchart of a method for detecting defects in a liquid crystal display screen according to other embodiments of this application is shown;
[0020] Figure 3 An exemplary flowchart of a method for detecting defects in a liquid crystal display screen according to some other embodiments of this application is shown;
[0021] Figure 4 An exemplary flowchart of a method for detecting defects in a liquid crystal display screen according to other embodiments of this application is shown;
[0022] Figure 5 A schematic diagram of the effective display area image is shown in an embodiment of this application;
[0023] Figure 6 This paper shows a schematic diagram comparing the region of interest mask before and after repair in an embodiment of this application.
[0024] Figure 7 This illustration shows a magnified view of a local defect in the outer ring image in an embodiment of this application.
[0025] Figure 8 This illustration shows a magnified schematic diagram of a strip image defect in an embodiment of this application.
[0026] Figure 9 This paper illustrates the final response diagram of the linear vector and a schematic diagram of the position restoration of the linear vector result diagram in an embodiment of this application.
[0027] Figure 10 An exemplary structural block diagram of an apparatus for detecting defects in a liquid crystal display screen according to an embodiment of this application is shown;
[0028] Figure 11 An exemplary structural diagram of an apparatus for detecting defects in a liquid crystal display screen, according to an embodiment of this application, is shown. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0030] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0031] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0032] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0033] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0034] Reference Figure 1 This application describes a method 10 for detecting defects in liquid crystal displays. For example... Figure 1 As shown, in step S101, an image of the effective display area of the screen is acquired. In some embodiments, the screen can be a liquid crystal display screen of any electronic device. The effective display area (AA area) of the screen refers to the actual area on the screen that can display content, such as images and text. (Refer to...) Figure 5 The AA area image can clearly show the effective display area of the screen, and it can be acquired by image acquisition devices such as cameras. For easy observation, Figure 5 Red arrows are used to highlight edge-pressing defects in the AA area image. In one embodiment, a high-resolution industrial camera can be used to acquire the AA area image of the display screen, with the camera parallel to the display screen and aimed at the AA area for image acquisition. The high-resolution industrial camera ensures that defects in the edge-pressing area of the display screen are captured, and the acquired AA area image will be used for subsequent edge-pressing defect detection.
[0035] Next, in step S102, the region of interest mask of the effective display area image is repaired. In some embodiments, the region of interest in the region of interest mask (ROImask) refers to the specific region of interest in the effective display area image during edge pressing defect detection. The ROImask determines the effective pixel range in the effective display area image used for edge pressing defect detection, and it can be formed by manual annotation or a specific region detection algorithm, etc. (Refer to...) Figure 6 (A) The effective display area image after masking is a binary image, with the region of interest (ROI) being white (pixel value 1) and other areas being black (pixel value 0). Edge defects in the display screen can cause missing ROI masks (e.g., ...). Figure 6 (A) The area indicated by the red arrow. The purpose of repairing the region of interest mask is to compensate for the missing parts and expand the effective pixel range.
[0036] In one embodiment, a specific algorithm (such as Graham scanning) can be used to repair missing portions of the region of interest (ROI) mask to increase the effective pixel area of the defective region. Alternatively, in other feasible embodiments, interpolation can be used to repair missing portions, or morphological operations can be used to repair discontinuous mask boundaries of the ROI mask.
[0037] Reference Figure 6 , Figure 6 (A) The arc-shaped area pointed to by the red arrow in the lower right corner shows the situation where the mask of the region of interest is missing due to the edge pressing defect. It can be seen that there is a small missing (black) area with irregular boundary at the mask of the region of interest pointed to by the red arrow. Figure 6 (B) shows the repaired situation, where it can be seen that the region of interest mask is no longer missing in the corresponding area, and the arc-shaped region contour has become smooth.
[0038] In the above embodiments, the ROImask obtained after repair has higher accuracy and a larger effective pixel range, which is more conducive to the subsequent positioning of edge pressing defects.
[0039] Further, in step S103, the inner circle image of the repaired region of interest mask is removed from the effective display area image to obtain an outer circle image with a preset number of pixel layers. In some embodiments, the edge pressing defects are mainly distributed at the boundary of the display screen. Therefore, when processing the effective display area image, the inner circle image of the region of interest mask can be removed, and only the outer circle image with a preset number of pixel layers can be retained. This can be simply understood as removing most of the white area inside the region of interest mask and retaining only the white area at the outer edge. To facilitate removal, in one embodiment, the image area contained in the outermost N pixel layers of the image can be predefined as the outer circle image, where the 0th layer outer circle contains pixels at the image boundary and has the largest length; the 1st layer contains pixels one layer away from the outer circle and has a slightly smaller length; the 2nd layer contains pixels away from the 1st layer and has an even smaller length, and so on, up to the Nth layer. Correspondingly, N is used here to represent the preset number of pixel layers, which can be set according to the range in the effective display area image that can completely retain the edge pressing defects. When removing the inner circle image, a mask can be constructed. This involves creating a mask for the inner circle image to erase it from the effective display area image, while retaining the outer circle image (N pixel layers). (See reference...) Figure 7 , Figure 7 The diagram shows a magnified view of the defects in the outer ring image after the inner ring image is removed. The white striped area represents the outer ring image of N pixel layers, and the missing part marked in the red rectangle in the lower right corner is the edge pressing defect. The black area to the left of the white striped area represents the state after the inner ring image is removed.
[0040] In the above embodiments, an outer ring image is obtained by removing unnecessary inner ring images from the effective display area image. This effectively preserves the image information of the display screen edge area, avoids irrelevant inner ring areas from interfering with the defect detection process, and also reduces computational load and improves processing efficiency.
[0041] Furthermore, in step S104, the outer ring image is unfolded and stitched into a strip image. In some embodiments, the outer ring image of N pixel layers is unfolded from the outermost (layer 0) pixels into a linear vector. Then, N-1 (layers 1, 2, 3...N-1) are sequentially unfolded into N-1 linear vectors. It can be understood that the lengths of these N linear vectors decrease sequentially. In some cases, it is possible that there is an edge-pressing defect at the starting position of the unfolded pixel layer. To prevent the edge-pressing defect at the starting position from going undetected, in this step, each of these N linear vectors is also padded at both ends to form a closed loop. The process of padded at both ends can be understood as taking several elements from the end of the linear vector and filling them in front of the starting position of the linear vector, and taking the same number of elements from the beginning of the linear vector and filling them in front of the end. In this way, it can be ensured that even if there is an edge-pressing defect at the starting position of the unfolded linear vector, it can still be completely detected. Then, these N linear vectors, whose lengths decrease sequentially, are concatenated from top to bottom, resulting in an inverted trapezoid. Adjusting the length of the linear vectors in each layer of the inverted trapezoid to a uniform length yields the final concatenated bar image. (Refer to...) Figure 8 , Figure 8 This shows a magnified view of the defect in the bar image; the area marked by the red rectangle is the defect. Figure 7 The edge pressing defects are marked in the figure.
[0042] The bar image obtained through the above processing integrates the outer rings of the effective display area image, and this bar image contains all defects in the edge-pressing region. In subsequent inspection processes, only one inspection of the bar image is needed to detect all defects in the edge-pressing region. Furthermore, to make the inspection results more accurate, mean filtering can be applied to the bar image to eliminate interference factors such as texture.
[0043] Finally, in step S105, defects in the edge region of the display screen are detected based on the bar image. In some embodiments, the bar image contains all defects in the edge region. Based on this bar image, all defects in the edge region can be detected at once. In one embodiment, the process of detecting defects in the edge region of the display screen based on the bar image can first construct a corresponding filter kernel, which includes a bar filter kernel and a vertical filter kernel. The bar filter kernel and the vertical filter focus on defect detection in different directions, respectively. Using the bar filter kernel for morphological operations can effectively detect dark and bright defects, while using the vertical filter kernel to perform dilation operations on the bar filter kernel's operation results and extract the middle row is more conducive to accurately locating the defect position. By using the bar filter kernel and the vertical filter kernel to perform morphological operations on the bar image sequentially, the target linear vector corresponding to the bar image can finally be obtained.
[0044] Next, threshold segmentation is performed on the target linear vector. This process includes removing leading and trailing padding elements to obtain the final response map of the linear vector, and comparing each element of the final response map with a preset response threshold to mark defects. It should be noted that after traversing all elements in the final response map of the linear vector, a linear vector result map marked with defects can be obtained.
[0045] Finally, the final response map and the result map of the linear vector are restored to their corresponding positions in the effective display area image, thus revealing the detected defects in the edge-pressing area. For example, refer to... Figure 9 , Figure 9 (A) shows the final response diagram of the linear vector after position restoration. Figure 9 (B) shows the linear vector result after position restoration. It can be seen that the red rectangle in the lower right corner of the result image marks a pressing defect. It should be noted that, for ease of observation, Figure 9 The result shown in (B) is a cropped portion of the restored effective display area image and does not represent the complete display effect.
[0046] In the above process, by constructing bar-shaped and vertical filter kernels for the bar image and performing morphological processing on the bar image sequentially, the location of defects becomes easier to pinpoint. Furthermore, the constructed filter kernels are adaptable regardless of whether the edge type of the pressed area is rounded, right-angled, or irregular. Simultaneously, the bar image contains defects in all pressed areas; therefore, all defects can be detected with a single inspection of the bar image. In addition, the detected defects are restored to the original image (effective display area image), and their specific locations in the original image can be accurately marked. This is crucial for subsequent quality control and production line inspection processes.
[0047] Reference Figure 2 This application describes a method 20 for detecting defects in a liquid crystal display screen. It should be noted that the method 20 for detecting defects in a liquid crystal display screen is the one described above. Figure 1 This is a specific implementation of step S102, therefore the features described above can be similarly applied here. In step S201, the contour points of the region of interest (ROI) mask are obtained. In some embodiments, the Graham scan method can be used to repair missing parts of the ROImask. In this process, the contour points of the ROImask first need to be calculated. As mentioned above, the ROImask is a binary image; based on this, a contour extraction function can be used to extract the contours of the ROImask and return a set of extracted contour points. The set of contour points can be returned as a list, where the elements are the coordinates of the contour points.
[0048] Further, in step S202, contour points to be repaired are selected from the contour points. In some embodiments, the previously extracted contour points include contour points of the missing ROImask region. Since the missing region is the region to be repaired, it is necessary to select the contour points corresponding to the missing region contours for subsequent repair work. In this process, the contour point coordinates are first sorted. That is, the contour point closest to the origin of the image coordinate system is taken as the reference point, and then the polar angles of all other contour points relative to the reference point are calculated and sorted from smallest to largest. If the polar angles are the same, they are sorted from closest to farthest from the reference point.
[0049] Next, the first two contour points in the polar angle sort (referred to as P0 and P1 for ease of understanding) are taken out and placed on a stack, and the next contour point P2 is set as the current contour point to be judged. Vectors P0P1 and P0P2 are created based on the two contour points at the top of the stack, and then the cross product of vectors P0P1 and P0P2 is calculated. If the cross product >= 0, it means that point P2 is located to the left of vector P0P1 or on the line containing P0P1. At this point, P2 can be determined as the contour point to be repaired, and it is pushed onto the stack. It can be understood that the contour points in the stack at this time include P0, P1, and P2, with P2 at the top. Further, it is determined whether the current contour point to be judged is the last contour point in the polar angle sort. If not, the next contour point is taken as the new current contour point to be judged. Continuing with the selection of the top two contour points P2 and P1 from the stack, two vectors are created with the new contour point to be judged, and their cross products are calculated. Similarly, the logic regarding whether the cross product is greater than or equal to 0 is used to determine if the contour point is a contour point to be repaired. If so, the same operation as the previous contour point is performed. It's understandable that if the cross product of the current contour point to be judged and the top two elements of the stack is less than 0, then the contour point is not a contour point to be repaired, and there's no need to push it onto the stack. Similarly, all contour points in the polar angle sort are judged as contour points to be repaired according to the above logic until the last contour point in the sort is judged.
[0050] Through the above process, the contour points to be repaired can be selected from all contour points, which will facilitate the subsequent repair operation of the ROImask based on these contour points.
[0051] Finally, in step S203, polygon fitting is performed based on the contour points to be repaired to repair the region of interest (ROI) mask. In some embodiments, by performing polygon fitting on the contour points to be repaired, an approximate polygon can be obtained. A new mask is created based on this polygon and filled into the defect area of the ROImask, thus completing the repair work on the ROImask. (Refer to...) Figure 6(B) It can be seen that after repair, the missing area of ROImask in the lower right corner has been completely repaired.
[0052] In the above embodiments, by repairing the part of the ROImask missing due to the edge pressing defect, the effective pixel area of the defect area can be expanded, thereby improving the detection efficiency of the edge pressing defect.
[0053] Reference Figure 3 This application will now introduce a method 30 for detecting defects in a liquid crystal display screen. It should also be noted that the method 30 for detecting defects in a liquid crystal display screen is the one described above. Figure 1 This is a specific implementation of step S104, therefore the features described above can be similarly applied here. In step S301, the outer ring image is expanded into corresponding linear vectors according to pixel layers. In some embodiments, after erasing the inner ring image, an outer ring image with N pixel layers can be obtained. This outer ring image is expanded into linear vectors starting from the outermost layer, i.e., layer 0 pixels. Then, the N-1 inner layers (layers 1, 2, 3…N-1) are sequentially expanded into N-1 linear vectors, resulting in N linear vectors with progressively decreasing lengths.
[0054] Further, in step S302, the linear vectors are padded at both ends according to half the length of a preset bar filter kernel. In some embodiments, padded ends need to be applied to N linear vectors to prevent edge compression defects at the unfolded area from going undetected. The padded ends are calculated based on half the length of the preset bar filter kernel. This facilitates morphological processing of the bar image composed of linear vectors by the bar filter kernel in subsequent processes.
[0055] In one embodiment, half the length of the bar filter kernel is represented as half. The filling process for a linear vector layer is as follows: the last half elements of the linear vector are filled before the beginning of the vector, and simultaneously, the first half elements of the beginning of the vector are filled after the end of the vector. This beginning and end filling is to form a closed loop, ensuring that defects at the starting position of the unfolded layer can be completely detected.
[0056] Finally, in step S303, the linear vectors with padded beginnings and ends are concatenated to obtain a bar image. In some embodiments, after the above operations, N linear vectors with padded beginnings and ends and decreasing lengths are obtained. Then, based on the length order of these N linear vectors, they are concatenated from longest to shortest from top to bottom, resulting in an image that appears as an inverted trapezoid. For ease of distinction, this is referred to as the initial trapezoidal image. Subsequently, using the length W of the middle layer linear vectors as a reference, the linear vectors of other layers are adjusted to a uniform length reference W using bilinear interpolation. This will result in a bar image with a height of N and a width of W. (Refer to...) Figure 8 Schematic diagram of defect magnification in the shown bar image. It can be seen that the bar image contains a hemming defect (the area marked by the red rectangle).
[0057] In the above embodiment, by taking the length W of the intermediate layer linear vector as a reference to adjust the lengths of the linear vectors of other layers, the pixel information loss of the bar image can be minimized as much as possible.
[0058] Figure 4 The flowchart of method 40 for detecting defects in a liquid crystal display screen according to the present application is shown. It can be understood that method 40 for detecting defects in a liquid crystal display screen can be a specific implementation manner in step S105 described above, so the features described above can be similarly applied herein. Figure 1 In step S401, a corresponding filter kernel is constructed for the bar image and morphological processing is performed on the bar image based on the filter kernel to obtain a corresponding target linear vector. In some embodiments, the filter kernels to be constructed include a bar filter kernel and a vertical filter kernel. The bar filter kernel can be understood as a filter that focuses on a specific direction during image processing, which can be horizontal, vertical, diagonal, etc. The width and height of the constructed bar filter kernel are [w, h], where w and h respectively represent the weight ranges in the width and height directions. By adjusting [w, h], hemming defects of different sizes or shapes can be detected. For example, when w≈h, point-like defects can be detected; when w>>h, horizontal defects can be detected; when w<<h, vertical defects can be detected. The vertical filter kernel is a filter that processes in the vertical direction. The vertical filter kernel pays more attention to the features in the vertical direction of the image. During the subsequent processing of the defect response map, it can concentrate the response extreme values of each column of the defect response map in the middle row of the bar image to extract the elements of the middle row and construct a linear vector with a width of W and a height of 1.
[0060] In a feasible embodiment, the constructed bar filter kernel and vertical filter kernel are two different matrices respectively. The width and height of the matrix of the bar filter kernel are [w, h], which are preset according to the specific form of the hemming defect. The width and height of the matrix of the vertical filter kernel are [1, N], where N is the height of the bar image, that is, the number of rows.
[0061] Next, morphological operations are performed on the bar image using a bar filter kernel. Specifically, if dark defects are detected, a closing operation is performed on the bar image kernel using a bar filter. This closing operation fills in small black dots or shadows (such as small holes or cracks) in the bar image. The difference between the closed bar image and the original bar image is then taken to obtain the dark defect response map. If bright defects are detected, an opening operation is performed on the bar image using a bar filter kernel to remove small noise or bright spots. The difference between the original bar image and the opened image is then taken to obtain the bright defect response map. For ease of explanation below, both the dark and bright defect response maps will be collectively referred to as defect response maps.
[0062] Subsequently, a vertical filter kernel is used to dilate the defect response image to expand the bright or dark areas, making the vertical features more prominent. After dilation, the extreme values of the bright or dark points in the defect response image will be concentrated in the middle row of the image. The elements of the middle row are then extracted to construct a target linear vector with a width of W and a height of 1. It should be noted that only the elements of the middle row are extracted to construct the target linear vector because the elements in the middle row are not subjected to bilinear interpolation to adjust their length. Each element has a one-to-one corresponding position in the original image (the effective display area), ensuring accurate defect location output.
[0063] In the above embodiments, by using a filter kernel to perform morphological operations on the bar image, the defect features are enhanced, making it easier to detect edge pressing defects in subsequent processes.
[0064] Further, in step S402, threshold segmentation is performed on the target linear vector to detect defects and obtain the final response map of the linear vector and the result map of the linear vector marked with defects. In some embodiments, the target linear vector obtained after the above processing needs to be thresholded to complete the detection of edge pressing defects. In this process, the beginning and end padding elements in the target linear vector are first removed. This operation is to ensure that the output image maintains its original size and avoid the introduction of invalid data in the padding area from affecting the detection results. After removing the beginning and end padding elements, the final response map of the linear vector is obtained.
[0065] The next step is to compare each element of the final response map of the linear vector with a preset response threshold to mark defects. The preset response threshold can be understood as a defect judgment criterion; it can be used to determine which regions in the final response map of the linear vector can be considered true defects. Optionally, in one feasible implementation, the preset response threshold can be set empirically. In another feasible implementation, the preset response threshold can be set using an adaptive thresholding method based on local statistics, that is, adjusting the preset response threshold according to the local brightness and contrast of the final response map of the linear vector, so that the threshold can adapt to different image conditions.
[0066] When comparing each element of the final response graph of the linear vector with a preset response threshold, if a preset target number of elements are all greater than the preset response threshold, then the elements corresponding to these preset target numbers can be marked as a defect. In a feasible embodiment, the preset target number can be a preset defect length threshold lenThd. If lenThd consecutive elements are greater than the preset response threshold, then it is determined to be a defect. That is, the persistence of the defect is confirmed by the "length", thereby ensuring that what is detected is a large and persistent defect, rather than an accidental, local fluctuation or noise. After traversing every element in the final response graph of the linear vector, a linear vector result graph can be obtained. It can be understood that this linear vector result graph contains all the marked defects.
[0067] In the above embodiments, by comparing a continuous preset target number of elements with the response threshold, some occasional noise or single irrelevant anomalies can be effectively filtered out, effectively avoiding the situation of misjudging noise as defects and improving the accuracy of defect detection.
[0068] Finally, in step S403, the final response map and the result map of the linear vector are restored to the effective display area image to display the detected defects in the display screen edge area. In some embodiments, the result map of the linear vector and the final response map of the linear vector can be mapped to the effective display area image according to the pixel position index, so as to achieve the purpose of restoring the final response map of the linear vector and the result map of the linear vector to the effective display area image. The pixel position index refers to the position of each pixel in the image in the two-dimensional coordinate system of the effective display area image. After restoration, the original effective display area image can display the detected defects. (Refer to...) Figure 9 , Figure 9 (A) is the final response diagram of the linear vector after position restoration. Figure 9 (B) is a diagram showing the linear vector result after position restoration, where, Figure 9 (B) The edge pressing defects detected are marked with a red rectangle.
[0069] The above operations can visually display the location and shape of defects in the actual image. This can help quality control personnel or operators of the inspection system to more easily understand the inspection results and quickly determine whether further processing is needed.
[0070] Reference Figure 10 This application also provides an apparatus 100 for detecting defects in a liquid crystal display screen, comprising: an acquisition module 1001 for acquiring an image of the effective display area of the display screen; a repair module 1002 for repairing a region of interest mask of the effective display area image, wherein the region of interest mask determines the effective pixel range of the effective display area image for edge defect detection; a removal module 1003 for removing the inner circle image of the repaired region of interest mask from the effective display area image to obtain an outer circle image with a preset number of pixel layers; a stitching module 1004 for unfolding and stitching the outer circle image into a strip image; and a detection module 1005 for detecting defects in the edge region of the display screen based on the strip image.
[0071] Figure 11 This is a schematic diagram illustrating a system for detecting defects in a liquid crystal display screen according to an embodiment of this application. Figure 11 As shown, system 110 may include a device 1101 for detecting defects in a liquid crystal display screen according to embodiments of this application, as well as its peripheral devices and an external network, to achieve the aforementioned combination. Figure 1 - Figure 4 The method for detecting defects in a liquid crystal display screen according to embodiments of this application is described herein.
[0072] like Figure 11 As shown, the device 1101 for detecting defects in a liquid crystal display screen may include a CPU 1111, which may be a general-purpose CPU, a dedicated CPU, or other information processing and program execution unit. Furthermore, the device 1101 for detecting defects in a liquid crystal display screen may also include a large-capacity memory 1112 and a read-only memory (ROM) 1113, wherein the large-capacity memory 1112 can be configured to store various types of data. In this embodiment, it may include an effective display area image, a bar image, etc. Additionally, the ROM 1113 can be configured to store the initialization of each functional module of the device 1101 for detecting defects in a liquid crystal display screen, the drivers for the system's basic input / output, and the data required to boot the operating system.
[0073] Furthermore, system 110 may also include other hardware platforms or components, such as the tensor processing unit (TPU) 1114, image processing unit (GPU) 1115, field-programmable gate array (FPGA) 1116, and machine learning unit (MLU) 1117 shown. It is understood that although various hardware platforms or components are shown in system 110, they are merely exemplary and not limiting, and those skilled in the art can add or remove appropriate hardware as needed.
[0074] The device 1101 for detecting defects in a liquid crystal display (LCD) screen also includes a communication interface 1118, through which it can connect to a local area network (LAN) / wireless LAN / WLAN 1105, and further connect to a local server 1106 or the Internet 1105 via the LAN / WLAN. Alternatively or additionally, the device 1101 for detecting defects in an LCD screen according to this embodiment can also directly connect to the Internet or a cellular network via the communication interface 1118 based on wireless communication technology, such as third-generation ("3G"), fourth-generation ("4G"), or fifth-generation ("5G") wireless communication technology. In some application scenarios, the device 1101 for detecting defects in an LCD screen can also access a server 1108 on an external network and a possible database 1109 as needed to obtain various known data, such as effective display area images, bar images, etc.
[0075] Peripherals of the device 1101 for detecting defects in a liquid crystal display screen may include a display device 1102, an input device 1103, and a data transmission interface 1104. In one embodiment, the display device 1102 may include, for example, one or more speakers and / or one or more visual displays, configured to provide voice prompts and / or display images and videos of the computational process or final results of the device 1101 for detecting defects in a liquid crystal display screen. The input device 1103 may include, for example, a keyboard, a capture camera, or other input buttons or controls. The data transmission interface 1104 may include, for example, a serial interface, a parallel interface, or a Universal Serial Bus interface (“USB”), a Small Computer System Interface (“SCSI”), a Serial ATA, FireWire, PCI Express, and a High Definition Multimedia Interface (“HDMI”), configured for data transmission and interaction with other devices or systems. According to the scheme of this application, the data transmission interface 1104 can transmit coordinate data, etc. The CPU 1111, mass storage 1112, read-only memory ROM 1113, TPU 1114, GPU 1115, FPGA 1116, MLU 1117, and communication interface 1118 of the device 1101 for detecting defects in a liquid crystal display screen of this application can be interconnected via bus 1119, and can interact with peripheral devices through this bus. In one embodiment, through this bus 1119, the CPU 1111 can control other hardware components in the device 1101 for detecting defects in a liquid crystal display screen and its peripheral devices.
[0076] It should also be understood that any module, unit, component, server, computer, terminal, or device of the executable instructions in this application 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 discs, or magnetic 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.
[0077] This application also discloses a computer-readable storage medium storing program instructions adapted for loading and execution by a processor: acquiring an effective display area image of a display screen; repairing a region of interest mask of the effective display area image, wherein the region of interest mask determines the effective pixel range of the effective display area image for edge-pressing defect detection; removing the inner circle image of the repaired region of interest mask from the effective display area image to obtain an outer circle image with a preset number of pixel layers; unfolding and stitching the outer circle image into a bar image; and detecting defects in the edge-pressing area of the display screen based on the bar image. Therefore, when the solution of this application is embodied in the form of a software product (computer-readable storage medium), the software product can be stored in a memory, which may include several instructions to cause a computer device (e.g., a personal computer, a server, etc.) to execute some or all of the steps of the method described in the embodiments of this application. The aforementioned memory may include, but is not limited to, various media capable of storing program code, such as USB flash drives, flash drives, read-only memory (ROM), random access memory ("Random Access Memory", abbreviated as RAM), portable hard drives, magnetic disks, or optical disks.
[0078] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for detecting defects in a liquid crystal display screen, characterized in that: include: Acquire the effective display area image of the display screen; Repairing the region of interest mask of the effective display area image, wherein the region of interest mask determines the effective pixel range of the effective display area image for edge pressing defect detection; Removing the repaired inner circle image of the interest region mask from the effective display area image to obtain an outer circle image with a preset number of pixel layers; Expanding the outer circle image and splicing it into a strip image; Based on the strip image, detecting defects in the edge pressing area of the display screen; Wherein, detecting defects in the edge pressing area of the display screen based on the strip image includes: Constructing a corresponding filter kernel for the strip image and performing morphological processing on the strip image based on the filter kernel to obtain a corresponding target linear vector; Performing threshold segmentation on the target linear vector to detect the defect and obtain a linear vector final response map and a linear vector result map marked with the defect; The linear vector final response map and the linear vector result map are restored to the effective display area image to display the detected defects in the edge pressing area of the display screen.
2. The method according to claim 1, characterized in that The repairing of the interest region mask of the effective display area image comprises: Obtaining contour points of the region of interest mask; Selecting contour points to be repaired from the contour points; Polygon fitting is performed based on the contour points to be repaired to repair the region of interest mask.
3. The method according to claim 1, characterized in that The step of expanding the outer circle image and splicing the outer circle image into a strip image comprises: Expand the outer circle image into corresponding linear vectors according to pixel layers; Filling the linear vector at the beginning and the end according to half the length of the preset strip filter kernel; The linear vectors after being filled at the head and tail are spliced to obtain the strip image.
4. The method according to claim 3, characterized in that The step of splicing the linear vectors after filling the head and tail to obtain the strip image comprises: Based on the length sorting of the linear vectors, the linear vectors are sequentially spliced together from top to bottom to obtain an initial trapezoidal image; Determining a length reference of the initial trapezoidal image; Based on the length reference, the lengths of the linear vectors of each layer of the initial trapezoidal image are adjusted to be consistent to obtain the strip image.
5. The method according to claim 1, characterized in that The step of constructing a corresponding filter kernel for the strip image and performing morphological processing on the strip image based on the filter kernel comprises: Constructing a strip filter kernel and a vertical filter kernel for the strip image; Based on the strip filter kernel, performing morphological operation on the strip image to obtain a defect detection response map; Based on the vertical filter kernel, a dilation operation is performed on the defect detection response map to extract the target linear vector.
6. The method according to claim 1, characterized in that The threshold segmentation of the target linear vector comprises: Removing the elements filled at the beginning and the end of the target linear vector to obtain a final response graph of the linear vector; Comparing each element in the linear vector final response map with a preset response threshold; If there are a preset target number of elements that are all greater than the preset response threshold, the corresponding element is marked as a defect; After the comparison of each element in the linear vector final response diagram is completed, the linear vector result diagram marked with the defect is obtained.
7. A device for detecting defects in a liquid crystal display screen, characterized in that: include: An acquisition module, used to acquire an image of an effective display area of a display screen; A repair module, used for repairing the interest region mask of the effective display area image, wherein the interest region mask determines the effective pixel range of the effective display area image for edge pressing defect detection; A removal module, used for removing the repaired inner circle image of the interest region mask from the effective display area image to obtain an outer circle image with a preset number of pixel layers; A splicing module, used for expanding the outer circle image and splicing it into a strip image; A detection module, used for detecting defects in the edge pressing area of the display screen based on the strip image; Wherein, detecting defects in the edge pressing area of the display screen based on the strip image includes: Constructing a corresponding filter kernel for the strip image and performing morphological processing on the strip image based on the filter kernel to obtain a corresponding target linear vector; Performing threshold segmentation on the target linear vector to detect the defect and obtain a linear vector final response map and a linear vector result map marked with the defect; The linear vector final response map and the linear vector result map are restored to the effective display area image to display the detected defects in the edge pressing area of the display screen.
8. A device for detecting defects in a liquid crystal display screen, characterized in that: include: processor; A memory storing program instructions for detecting defects of a liquid crystal display screen, wherein when the program instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions for detecting defects of a liquid crystal display screen. When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Display screen edge defect detection method and device
CN112184744A
Screen detection method, screen detection device and storage medium
CN115475770A