Screen defect detection method, detection device, and computer-readable storage medium
By combining neural network transformation models and traditional algorithms, and employing binarization processing and template image matching degree judgment, the accuracy problem of detecting screen edge defects in VR and AR devices has been solved, achieving higher detection accuracy.
Patent Information
- Application Number
- CN202210663380.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-06-13
AI Technical Summary
Existing technologies struggle to accurately detect defects at the edges of VR and AR device screens, resulting in low detection accuracy.
A method combining neural network transformation model and traditional algorithm is adopted. The outline of the display area of the screen detection image is obtained through binarization processing to determine the area to be processed. Suspected defect areas are screened by gray-scale mean and area, and the screen defect is determined by template image matching degree.
It improves the accuracy of screen detection, effectively identifies defects in the screen edge area, and enhances detection precision.
Smart Images

Figure CN115018797B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of screen inspection technology, and in particular to a method, inspection equipment, and computer-readable storage medium for detecting screen defects. Background Technology
[0002] For VR (Virtual Reality) and AR (Augmented Reality) devices, the screen is a crucial channel for product-user interaction, making screen quality paramount.
[0003] To ensure screen quality, devices must be inspected for defects before leaving the factory. In relevant screen inspection technologies, non-transparent defects in the central area of the screen can be effectively identified using traditional algorithms.
[0004] However, defects closer to the edge area appear as ghosting structures after the camera captures the image. These defects have lower contrast and are more dispersed, often blending into the background, making them difficult to distinguish. Therefore, traditional screen detection technology cannot identify defects near the edge area, resulting in low detection accuracy.
[0005] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main objective of this invention is to provide a method for detecting screen defects, aiming to solve the problem of how to detect defects at the edges of a screen.
[0007] To achieve the above objectives, the present invention provides a method for detecting screen defects, the method comprising:
[0008] Acquire a screen detection image, and determine the outline of the display area of the screen to be detected based on the binarized screen detection image;
[0009] The processing area corresponding to the screen to be detected is determined based on the outline of the display area.
[0010] The regions to be processed that meet the preset conditions in terms of average gray level and area are identified as suspected defect regions.
[0011] Based on the matching degree between the local image corresponding to the suspected defect area and the template image, it is determined whether the screen to be detected has a defect, wherein the template image is a binary image.
[0012] Optionally, after the step of determining whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and the template image, the method further includes:
[0013] When a target template image exists that has a matching degree greater than the matching degree threshold with the local image, it is determined that the screen to be detected has a defect;
[0014] Otherwise, the screen to be tested is determined to be without defects.
[0015] Optionally, after the step of determining that the screen to be detected has a defect when there is a target template image with a matching degree greater than the matching degree threshold with the local image, the method includes:
[0016] Determine the minimum bounding rectangle of the local image;
[0017] Obtain the comparison coefficient associated with the minimum bounding rectangle, where the comparison coefficient is the aspect ratio of the minimum bounding rectangle;
[0018] The defect type of the screen to be inspected is determined based on the contrast coefficient.
[0019] Optionally, the defect type includes screen structural defects, and the step of determining the defect type associated with the template image based on the contrast coefficient includes:
[0020] Obtain a preset first comparison threshold and a preset second comparison threshold, wherein the second comparison threshold is greater than the first comparison threshold;
[0021] When the comparison coefficient is less than the first comparison threshold and greater than the second comparison threshold, the defect type is determined to be a structural screen defect.
[0022] Optionally, the step of determining the processing area corresponding to the screen to be detected based on the outline of the display area includes:
[0023] Based on a neural network transformation model, suspected defect points in the outline of the display area are identified;
[0024] Obtain the cutoff range associated with the suspected defect point;
[0025] Based on the interception range, the preprocessing area corresponding to the suspected defect point is determined.
[0026] Optionally, before the step of determining whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and the template image, the method includes:
[0027] Remove the texture portion from the suspected defect area and obtain the binary image corresponding to the suspected defect area through an adaptive binarization algorithm;
[0028] Obtain the center position of the binary image;
[0029] The portion of the binary image located at the center position is taken as the local image.
[0030] Optionally, determining the display area contour of the screen to be detected based on the binarized screen detection image includes:
[0031] Obtain the local contrast of each region in the screen detection image;
[0032] Determine the outline of at least one display region in the detected image based on the local contrast.
[0033] The display area contour with the largest contour area in the screen detection image is taken as the display area contour of the screen to be detected.
[0034] Optionally, after determining whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and the template image, the process includes:
[0035] Based on the defect type associated with the template image, the defect type corresponding to the screen to be detected is determined.
[0036] In addition, the present invention also provides a detection device, the detection device comprising: a memory, a processor, and a screen defect detection program stored in the memory and executable on the processor, wherein the screen defect detection program, when executed by the processor, implements the various steps of the screen defect detection method as described in any of the preceding claims.
[0037] In addition, the present invention provides a computer-readable storage medium storing a screen defect detection program, which, when executed by a processor, implements the various steps of the screen defect detection method described in the above embodiments.
[0038] This invention provides a method, device, and computer-readable storage medium for detecting screen defects. The method includes: acquiring a screen detection image and determining the outline of the display area of the screen to be detected based on the binarized screen detection image; determining the processing area corresponding to the screen to be detected based on the display area outline; identifying the processing area whose grayscale mean and area satisfy preset conditions as a suspected defect area; and determining whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and a template image, wherein the template image is a binary image. By determining the display area outline as the screen edge after binarizing the screen detection image, and then judging screen defects based on the display area outline, the accuracy of screen detection is improved based on existing automatic screen defect detection schemes, solving the problem of how to detect screen edge defects. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the hardware architecture of the detection device involved in an embodiment of the present invention;
[0040] Figure 2 This is a flowchart illustrating the first embodiment of the screen defect detection method of the present invention;
[0041] Figure 3 This is a schematic diagram of the original screen detection image captured by the camera in one specific implementation.
[0042] Figure 4 In one specific implementation method Figure 3 A schematic diagram of the detection image binarized based on the above.
[0043] Figure 5 This is a schematic diagram of the outline of the display area of the screen to be tested in a specific embodiment;
[0044] Figure 6 This is a schematic diagram of the area to be processed in a specific implementation method;
[0045] Figure 7 This is a schematic diagram of a suspected defect area in a specific implementation method;
[0046] Figure 8 This is a schematic diagram of a partial image of a suspected defect area in a specific implementation method;
[0047] Figure 9 This is a flowchart illustrating a second embodiment of the screen defect detection method of the present invention;
[0048] Figure 10 A schematic diagram of the process for determining suspected defect points based on the ALEXNET model in a specific implementation.
[0049] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0050] Currently, for assembled VR all-in-one devices, employees use their eyes through lenses to inspect the screen for defects. Specifically, the VR screen is illuminated with different colored cards, and the human eye examines the screen through the lens for defects, including but not limited to dark spots on green screens, bright spots on green screens, bright spots on red screens, dark spots on red screens, bright spots on black screens, dark spots on white screens, scratches, black lines at the edges, and transparent defects. For non-transparent defects in the central area, current algorithms can distinguish them relatively well. However, defects closer to the edges appear as ghosting structures after the camera captures the image. Due to the low contrast, ghosting, and dispersed nature of these defects, they often blend into the background, making them difficult to distinguish.
[0051] To address this issue, this invention proposes a method combining neural network training algorithms and traditional algorithms for identifying suspected defect regions. Suspected defect points are identified using traditional algorithms, then the improved neural network training algorithm is used to determine the defect region, and finally, the defect type is identified using a combination of area and contrast analysis.
[0052] It should be understood that exemplary embodiments of the invention are shown in the accompanying drawings, and the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.
[0053] As one implementation method, the testing equipment can be as follows: Figure 1 As shown.
[0054] The present invention relates to a detection device, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to enable communication between these components.
[0055] Memory 102 can be high-speed RAM or stable memory (non-volatile memory), such as disk storage. Figure 1 As shown, the memory 102, which is a computer-readable storage medium, may include a screen defect detection program; and the processor 101 may be used to call the screen defect detection program stored in the memory 102 and perform the following operations:
[0056] Acquire a screen detection image, and determine the outline of the display area of the screen to be detected based on the binarized screen detection image;
[0057] The processing area corresponding to the screen to be detected is determined based on the outline of the display area.
[0058] The regions to be processed that meet the preset conditions in terms of average gray level and area are identified as suspected defect regions.
[0059] Based on the matching degree between the local image corresponding to the suspected defect area and the template image, it is determined whether the screen to be detected has a defect, wherein the template image is a binary image.
[0060] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0061] When a template image exists that has a matching degree greater than the matching degree threshold with the local image, it is determined that the screen to be detected has a defect;
[0062] Otherwise, the screen to be tested is determined to be without defects.
[0063] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0064] Determine the minimum bounding rectangle of the local image;
[0065] Obtain the comparison coefficient associated with the minimum bounding rectangle, where the comparison coefficient is the aspect ratio of the minimum bounding rectangle;
[0066] The defect type of the screen to be inspected is determined based on the contrast coefficient.
[0067] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0068] Obtain a preset first comparison threshold and a preset second comparison threshold, wherein the second comparison threshold is greater than the first comparison threshold;
[0069] When the comparison coefficient is less than the first comparison threshold and greater than the second comparison threshold, the defect type is determined to be a structural screen defect.
[0070] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0071] Based on a neural network transformation model, suspected defect points in the outline of the display area are identified;
[0072] Obtain the cutoff range associated with the suspected defect point;
[0073] Based on the interception range, the preprocessing area corresponding to the suspected defect point is determined.
[0074] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0075] Remove the texture portion from the suspected defect area and obtain the binary image corresponding to the suspected defect area through an adaptive binarization algorithm;
[0076] Obtain the center position of the binary image;
[0077] The portion of the binary image located at the center position is taken as the local image.
[0078] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0079] Obtain the local contrast of each region in the screen detection image;
[0080] Determine the outline of at least one display region in the detected image based on the local contrast.
[0081] The display area contour with the largest contour area in the screen detection image is taken as the display area contour of the screen to be detected.
[0082] In one embodiment, the processor 101 can be used to invoke a screen defect detection program stored in the memory 102 and perform the following operations:
[0083] Based on the defect type associated with the template image, the defect type corresponding to the screen to be detected is determined.
[0084] Based on the hardware architecture of the detection equipment based on the screen defect detection technology described above, an embodiment of the screen defect detection method of the present invention is proposed.
[0085] Reference Figure 2 In the first embodiment, the screen defect detection method includes the following steps:
[0086] Step S10: Obtain the screen detection image and determine the outline of the display area of the screen to be detected based on the binarized screen detection image.
[0087] In this embodiment, the acquired detection image for screen defect detection is binarized, and the target display area contour, representing the screen to be detected, is extracted from the binarized detection image. It should be noted that, for ease of subsequent grayscale value calculation and statistics, the initial detection image is typically a grayscale image, such as... Figure 3 As shown, Figure 3 This is a grayscale image of the original screen detection image captured by the camera in one specific embodiment. However, because the grayscale values of the screen edges and the background in the original detection image are quite similar, the detection device has difficulty distinguishing screen defects located at the screen edges. Therefore, in this embodiment, the detection image is binarized, as shown below. Figure 4 As shown, Figure 4 In one specific implementation method Figure 3 Based on the binarized detection image, after binarization, since the binarized image only contains regions with a gray value of 0 and / or a gray value of 255, these regions can be easily identified and distinguished by the detection device, and the outline of the target display area of the image to be detected can be extracted well.
[0088] It should be noted that, Figure 4 For a binarized detection image captured under ideal conditions, some interference factors may exist, such as stains on the camera lens, dirt or wear on the background outside the screen, etc. Detection images captured under these interference factors will have multiple display area contours after binarization. Therefore, it is necessary to determine the target display area contour of the image to be detected from these multiple contours. Optionally, the target display contour area can be determined by the contour area. Since the area of the display area contours that are interference parts is usually not larger than the area of the screen's display area contour, the display area contour with the largest contour area in the detection image can be used as the target display area contour, thus filtering out other display area contours that are interference contours in the binarized detection image. Optionally, the contour area can be determined by counting the number of pixels (sum).
[0089] Step S20: Determine the processing area corresponding to the screen to be detected based on the outline of the display area;
[0090] After determining the outline of the target display area of the screen to be inspected, a preprocessing area of the screen to be inspected is determined based on the display area outline. For example, as... Figure 5 As shown, Figure 5This is a schematic diagram of the outline of the display area in a specific embodiment. The area formed by the white pixels in the image is the preprocessing area. These pixels are all distributed on the outline of the target display area, which represents the edge area of the screen to be detected. These edge areas are the areas to be processed.
[0091] Optionally, a neural network transformation model algorithm can be used to determine pixels representing potential screen defects at a given location from the outline of the display area. These pixels are then identified as suspected defect points. A truncated area associated with each suspected defect point is obtained, and the corresponding area to be processed is determined based on this truncated area. For example, as shown... Figure 6 As shown, Figure 6 In one specific embodiment, based on Figure 5 A schematic diagram of the area to be processed extracted from the outline of the display area.
[0092] Step S30: The areas to be processed that meet the preset conditions in terms of grayscale mean and area are designated as suspected defect areas;
[0093] Furthermore, since there are numerous suspected defect points in the area to be processed determined based on the display area contour, it is necessary to extract the suspected defect areas as the core area from the area to be processed before determining screen defects, thereby reducing the computational load during the detection process. In this embodiment, the suspected defect areas are extracted from the area to be processed using the grayscale mean and the area area as extraction conditions. The grayscale mean is the ratio of the sum of the grayscale values of all pixels in the area to the total number of pixels. The grayscale mean can be used to identify areas in the preprocessed area that match the preset conditions. For example, assuming the preprocessed area is a 120*120 pixel area, the grayscale mean gray_global_mean = gray_sum / (120*120). In actual testing, some areas of the screen may not emit light due to dead pixels, resulting in grayscale values in the acquired image that are lower than the preset grayscale average threshold. However, dead pixels are generally not considered a screen defect. Since the area corresponding to a dead pixel in the image is very small, scattered, small-area dead pixel areas are removed from the processing area, leaving larger areas for further defect assessment. The area can be determined based on the area of the smallest bounding rectangle of the suspected defect point. For example, as... Figure 7 As shown, Figure 7 For based on Figure 6 The diagram shows the suspected defect area extracted after processing the area to be processed.
[0094] It should be noted that, from Figure 6As can be clearly seen, there are some wavy lines in the image to be processed. Therefore, these wavy lines need to be filtered out when extracting suspected defect areas. Optionally, a 5x5 filter can be used for filtering.
[0095] Step S40: Determine whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and the template image.
[0096] After identifying suspected defect areas, the matching degree between local images within the suspected defect areas and template images is used to determine whether the screen to be detected has defects. Since the extracted suspected defect areas may contain multiple suspected defect points, and some suspected defect points may appear repeatedly in other suspected defect areas (e.g., ... Figure 7 As shown in the image, it is necessary to filter out local images containing only the target suspected defect points from the suspected defect area for further screen defect judgment. The local image and the template image are matched, and the detection result of the screen to be detected is determined based on the matching degree between the two. It should be noted that traditional methods use grayscale images for template matching because the local image corresponding to the suspected defect area is a binary image; therefore, the template image used as the reference matching image is also a binary image.
[0097] Optionally, the center position of the suspected defect area can be obtained, and the suspected defect point located at the center position can be used as the target suspected defect point. Since the suspected defect area is determined by using the suspected defect point as a reference, a local image of the suspected defect area is retrieved from a preset cropping range. For example, such as... Figure 8 As shown, Figure 8 In one specific implementation, based on Figure 7 A schematic diagram of a local image extracted from a suspected defect area.
[0098] Optionally, the defect type of the screen to be detected can be determined based on the defect type associated with the template image. For example, if the defect type of the template image with the highest matching degree with the local image is a transparent defect type, then the defect type of the screen to be detected is a transparent defect type.
[0099] In the technical solution provided in this embodiment, by acquiring a screen detection image and determining the display area outline of the screen to be detected based on the binarized screen detection image, the processing area corresponding to the screen to be detected is determined based on the display area outline, and the processing area that meets the preset conditions for grayscale mean and area area is taken as the suspected defect area. Then, based on the matching degree between the local image corresponding to the suspected defect area and the template image, it is determined whether the screen to be detected has defects. This method can detect whether there are defects in the area located at the edge of the screen, thereby improving the accuracy of screen detection.
[0100] Reference Figure 9 In the second embodiment, based on the first embodiment, after step S40, the following is included:
[0101] Step S50: Determine the minimum bounding rectangle of the local image;
[0102] Step S60: Obtain the comparison coefficient associated with the minimum bounding rectangle, wherein the comparison coefficient is the aspect ratio of the minimum bounding rectangle;
[0103] Step S70: Determine the defect type of the screen to be detected based on the comparison coefficient.
[0104] Optionally, this embodiment provides a method for determining the type of screen defect. When a template image exists with a matching degree greater than a matching degree threshold with the local image, the detection result is determined to be that the screen to be detected has a defect; otherwise, it is determined that there is no defect. The template image can be a 50*50 pixel image. The matching degree of the matching image can be obtained through the find_shape_model() function provided by the OpenCV development software. When the matching degree is greater than a preset matching degree threshold, it indicates that the match is successful, and it is determined that the local image matches the template image representing the defect image. Therefore, it is determined that the screen to be detected corresponding to the local image has a defect.
[0105] Optionally, for pancake lens modules, using pancake lens modules in the screen of a VR all-in-one device can reduce the thickness and weight of the VR headset. However, due to the low contrast, dispersed detection area, and screen-background adhesion characteristics of this type of lens during inspection, traditional screen inspection methods struggle to detect defects in this type of lens screen. Therefore, this type of defect is categorized to determine whether it belongs to the pancake defect category. When training the template image as a reference sample, the minimum bounding rectangle of the template image is determined, and the contrast coefficient of the aspect ratio of the minimum bounding rectangle associated with the minimum bounding rectangle is obtained. Based on the contrast coefficient, the defect type associated with the template image is determined, and the defect type of the template image is the corresponding defect type of the screen to be inspected.
[0106] For example, in some implementations, the minimum bounding rectangle rect of the two contours is first obtained, and then the contrast coefficient associated with rect is obtained: Contrast_rect = rect.height / rect.width. When Contrast_rect < 0.5 or Contrast_rect > 2, the defect is determined to be a pancake-type defect.
[0107] In the technical solution provided in this embodiment, by determining the minimum bounding rectangle of the local image, the defect type of the screen to be detected is determined based on the contrast coefficient of the minimum bounding rectangle, thereby determining the possible defect types applicable to the Pancake lens module, and improving the accuracy of screen defect detection.
[0108] In addition, refer to Figure 10 , Figure 10 This is a flowchart illustrating the process of identifying potential defect points based on the ALEXNET model in a specific implementation. The following demonstrates the steps for identifying potential defect points based on this model:
[0109] First, a 120*120 pixel area is selected as the cropping range for determination, which is divided into 8 stages. The execution flow of each stage is as follows:
[0110] (1) In the Conv1 stage:
[0111] Input data: 120×120×3
[0112] Convolution kernel: 11×11×3; stride: 2; number of outputs: 96
[0113] Post-convolution data: 55×55×96 (Original image N×N, convolution kernel size n×n, convolution stride greater than 1 is k, output dimension is (Nn) / k+1)
[0114] Data after relu1: 55×55×96
[0115] Max pool1 kernel: 3×3, step size: 2
[0116] Data after Max pooling: 27×27×96
[0117] norm1: local_size = 5 (LRN (Local Response Normalization))
[0118] Final output: 27×27×96.
[0119] (2) In the Conv2 stage:
[0120] Input data: 27×27×96
[0121] Convolution kernel: 5×5; stride: 1; number of outputs: 256
[0122] Post-convolution data: 27×27×256 (Same padding was applied to keep the image size unchanged after convolution.)
[0123] Data after relu2: 27×27×256
[0124] Max pool2 kernel: 3×3, step size: 2
[0125] Data after Max pool2: 13×13×256((27-3) / 2+1=13)
[0126] norm2: local_size = 5 (LRN (Local Response Normalization))
[0127] Final output: 13×13×256.
[0128] (3) In the Conv3 stage:
[0129] Input data: 13×13×128
[0130] Convolution kernel: 3×3; stride: 1; number of outputs: 256
[0131] Post-convolution data: 13×13×256 (Same padding was applied to keep the image size unchanged after convolution.)
[0132] Data after relu3: 13×13×256
[0133] Final output: 13×13×256
[0134] Conv3 layers do not have Max pool layers or normal layers.
[0135] (4) In the Conv4 stage:
[0136] Input data: 13×13×256
[0137] Convolution kernel: 3×3; stride: 1; number of outputs: 256
[0138] Post-convolution data: 13×13×256 (Same padding was applied to keep the image size unchanged after convolution.)
[0139] The Conv2 data and the data after this convolutional layer are summed according to the channel dimension and then subjected to ReLU4: 13×13×256
[0140] Final output: 13×13×256
[0141] Conv4 does not have a Max pool layer or a normal layer.
[0142] (5) In the Conv5 stage:
[0143] Input data: 13×13×256
[0144] Convolution kernel: 3×3; stride: 1; number of outputs: 256
[0145] Post-convolution data: 13×13×256 (Same padding was applied to keep the image size unchanged after convolution.)
[0146] Data after relu5: 13×13×256
[0147] Max pool5 kernel: 3×3, step size: 2
[0148] The data after Max pool2 is: 6×6×256((13-3) / 2+1=6)
[0149] Final output: 6×6×256
[0150] The conv5 layer has a max pool, but no normal layer.
[0151] (6) In the Fc1 stage:
[0152] Input data: 6×6×256
[0153] Fully connected output: 4096×1
[0154] Data after relu6: 4096 × 1
[0155] Data after dropout6: 4096×1
[0156] Final output: 4096×1
[0157] (7) In the Fc2 stage:
[0158] Input data: 4096×1
[0159] Fully connected output: 4096×1
[0160] Data after relu7: 4096×1
[0161] Data after dropout7: 4096×1
[0162] Final output: 4096×1
[0163] (8) In the Fc3 stage:
[0164] Input data: 4096×1
[0165] Fully connected output: 2 (i.e., Fc3 outputs the probability of two categories)
[0166] It should be noted that in this embodiment, based on the original ALXENET model, the data of the Conv2 layer and the Conv4 layer are convolved and processed based on the channel dimension to better preserve the information exchange between channels, thereby improving the training accuracy of the classification model. According to the developers' tests, the accuracy of the suspected defect points identified before the improvement was increased by 3 percentage points.
[0167] Furthermore, the present invention also provides a detection device, the detection device comprising: a memory, a processor, and a screen defect detection program stored in the memory and executable on the processor, wherein the screen defect detection program, when executed by the processor, implements the various steps of the screen defect detection method as described in any of the preceding claims.
[0168] In addition, the present invention provides a computer-readable storage medium storing a screen defect detection program, which, when executed by a processor, implements the various steps of the screen defect detection method described in the above embodiments.
[0169] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0171] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for detecting screen defects, characterized in that, The method for detecting screen defects includes: Acquire a screen detection image, and determine the outline of the display area of the screen to be detected based on the binarized screen detection image; Determining the processing area corresponding to the screen to be detected based on the display area contour includes determining suspected defect points in the display area contour based on a neural network transformation model; obtaining the truncated range associated with the suspected defect points; and determining the processing area corresponding to the suspected defect points based on the truncated range. The regions to be processed that meet the preset conditions in terms of grayscale mean and area are designated as suspected defect regions. The grayscale mean is used to identify regions in the regions to be processed that match the preset conditions, and the area is used to eliminate scattered bad pixel regions in the regions to be processed. Get the template image; The local image corresponding to the suspected defect area is matched with the template image. When there is a target template image with a matching degree greater than the matching degree threshold, it is determined that the screen to be detected has a defect. The template image is a binary image. Otherwise, the screen to be tested is determined to be free of defects; Determine the minimum bounding rectangle of the local image; Obtain the comparison coefficient associated with the minimum bounding rectangle, where the comparison coefficient is the aspect ratio of the minimum bounding rectangle; Obtain a preset first comparison threshold and a preset second comparison threshold, wherein the second comparison threshold is greater than the first comparison threshold; When the comparison coefficient is less than the first comparison threshold and greater than the second comparison threshold, the defect type is determined to be a structural screen defect, and the structural screen defect is a Pancake-type defect.
2. The screen defect detection method as described in claim 1, characterized in that, Before the step of determining whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and the template image, the following steps are included: Remove the texture portion from the suspected defect area and obtain the binary image corresponding to the suspected defect area through an adaptive binarization algorithm; Obtain the center position of the binary image; The portion of the binary image located at the center position is taken as the local image.
3. The screen defect detection method as described in claim 1, characterized in that, Determining the display area contour of the screen to be detected based on the binarized screen detection image includes: Obtain the local contrast of each region in the screen detection image; Determine the outline of at least one display region in the detected image based on the local contrast. The display area contour with the largest contour area in the screen detection image is taken as the display area contour of the screen to be detected.
4. The method for detecting screen defects as described in claim 1, characterized in that, After determining whether the screen to be detected has a defect based on the matching degree between the local image corresponding to the suspected defect area and the template image, the process includes: Based on the defect type associated with the template image, the defect type corresponding to the screen to be detected is determined.
5. A testing device, characterized in that, The detection device includes: a memory, a processor, and a screen defect detection program stored in the memory and executable on the processor. When the screen defect detection program is executed by the processor, it implements the steps of the screen defect detection method as described in any one of claims 1-4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a screen defect detection program, which, when executed by a processor, implements the steps of the screen defect detection method as described in any one of claims 1-4.
Citation Information
Patent Citations
Screen detection method and device and head-mounted display equipment
CN111627009A
Defect detection method and defect detection system
CN113609897A
Display module defect detection method and system and computer readable storage medium
CN114170168A