Defect detection method, device, equipment and program product

By acquiring and analyzing defect areas in the screen image, calculating pixel indicators and determining defect sizes, the problem of low accuracy in defect recognition in the prior art is solved, and accurate identification and efficient detection of electronic screen defects are achieved.

CN119198734APending Publication Date: 2024-12-27转转一零二四(北京)科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411273364.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The prior art relies on manual observation or automated processing methods in electronic screen defect detection, and the recognition accuracy is low and defect-related information cannot be fully obtained, resulting in low defect recognition efficiency.

Method used

By acquiring screen images, positioning defect areas, calculating pixel indicators, querying defect depths, and using incision circles to determine defect sizes, accurate feature information acquisition of each defect area in the screen can be achieved.

Benefits of technology

It improves the accuracy and efficiency of defect recognition, can fully identify all defect areas on the screen, avoid omissions, and improves the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119198734A_ABST
    Figure CN119198734A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of equipment detection, in particular to a defect detection method and device, equipment and a program product. The method comprises the steps of obtaining a screen image of a to-be-detected screen; positioning at least one defect area in the screen image; based on the area image information of each defect area, defect feature information corresponding to each defect area is obtained. The defect feature information of each defect area in the screen can be accurately obtained, and the screen defect identification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of equipment detection, and in particular to a defect detection method, device, equipment and program product. Background Art

[0002] The appearance defect detection of electronic screens is an important part of the production line. At present, many production lines still rely on manual observation, and the results are unstable and rely on manual experience, and the production cost is high. Alternatively, the screen image is processed by various automated processing methods such as Otsu algorithm, intelligent operator, image sparse representation, etc., so as to identify defects. However, when using the above methods, only a small number of specific types of defects can be identified, and only each defect point can be identified, and no further defect-related information can be obtained, resulting in low accuracy of defect identification. Summary of the invention

[0003] Based on the above-mentioned defects and shortcomings of the prior art, the present application proposes a defect detection method, device, equipment and program product, which can accurately obtain the defect feature information of each defect area in the screen and improve the efficiency of screen defect recognition.

[0004] According to the first aspect of an embodiment of the present application, a defect detection method is provided, comprising: acquiring a screen image of a screen to be detected; locating at least one defect area in the screen image; and acquiring defect feature information corresponding to each defect area based on regional image information of each defect area.

[0005] According to the defect detection method provided in the first aspect of the embodiment of the present application, the defect feature information corresponding to each defect area is obtained based on the regional image information of each defect area, including: calculating the pixel index of each defect area based on the pixel value of the pixel point in each defect area, wherein the pixel index is an index calculated based on the pixel value; based on the pixel index, querying the preset correspondence between the pixel index and the defect depth, and obtaining the defect depth corresponding to each defect area.

[0006] According to the defect detection method provided in the first aspect of the embodiment of the present application, the defect feature information corresponding to each defect area is obtained based on the regional image information of each defect area, including: for each defect area: based on the defect contour of the defect area, the inscribed circle of each contour point on the defect area within the defect area is determined; among each of the inscribed circles, the maximum number of tangent inscribed circles is retained, wherein any two of the tangent inscribed circles do not overlap with each other; based on the number and diameter of the tangent inscribed circles, the defect size of the defect area is determined, wherein the defect size includes the defect length and / or the defect width.

[0007] According to the defect detection method provided in the first aspect of the embodiment of the present application, obtaining the screen image of the screen to be detected includes: obtaining the original image of the screen to be detected; and performing proportional reduction processing, grayscale processing, denoising processing and binarization processing on the original image to obtain the binarized screen image.

[0008] According to the defect detection method provided in the first aspect of the embodiment of the present application, obtaining the screen image of the screen to be detected includes: obtaining the original image of the screen to be detected; inputting the original image into a preset image preprocessing model to obtain the binarized screen image output by the image preprocessing model.

[0009] According to the defect detection method provided in the first aspect of the embodiment of the present application, the locating of at least one defect area in the screen image includes: locating at least one initial defect area in the screen image; determining the area category corresponding to each of the initial defect areas; and screening out the initial defect areas whose area categories belong to a preset interference category to obtain at least one defect area.

[0010] According to the defect detection method provided in the first aspect of the embodiment of the present application, the determining of the area category corresponding to each of the initial defect areas includes: determining the minimum circumscribed rectangle of each of the initial defect areas; cutting based on the minimum circumscribed rectangle to obtain at least one rectangular area; inputting each of the rectangular areas into a preset defect classification model in turn to obtain the area category corresponding to each of the rectangular areas output by the defect classification model.

[0011] According to the second aspect of an embodiment of the present application, a defect detection device is provided, comprising: an image acquisition module for acquiring a screen image of a screen to be detected; a region positioning module for locating at least one defect region in the screen image; and a feature acquisition module for acquiring defect feature information corresponding to each defect region based on the region image information of each defect region.

[0012] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory and a processor; the memory is connected to the processor and is used to store programs; the processor is used to implement the defect detection method as described in the first aspect by running the program in the memory.

[0013] According to a fourth aspect of an embodiment of the present application, a computer program product is provided, comprising computer program instructions; when the computer program instructions are executed by a processor, the processor executes the defect detection method as described in the first aspect.

[0014] In an embodiment of the present application, a screen image of the screen to be detected is obtained; at least one defective area in the screen image is located; based on the regional image information of each defective area, defect feature information corresponding to each defective area is obtained. In the above process, each defective area in the screen image is obtained by locating the image area surrounded by each defect outline. There is no specific requirement for the type of defect, and all defective areas in the screen to be detected can be identified as much as possible to avoid missing defects. At the same time, the defective area de-regional image information is analyzed to obtain defect feature information of each defective area. Therefore, the above process can not only locate each defective area, but also further analyze the defect characteristics and obtain defect feature information, thereby realizing accurate identification of defects in the screen to be detected and improving defect identification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0016] Figure 1 One of the flow charts of a defect detection method provided in an embodiment of the present application;

[0017] Figure 2 An example diagram of a tangent inscribed circle provided in an embodiment of the present application;

[0018] Figure 3 Schematic diagram of a defect detection method provided in the present application

[0019] Figure 4 A schematic diagram of a process of processing an original image using a traditional image processing method provided in an embodiment of the present application;

[0020] Figure 5 A schematic diagram of a process for processing an original image using a deep learning model provided in an embodiment of the present application;

[0021] Figure 6 A schematic diagram of a process for classifying an initial defect area using a model provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of a process for obtaining defect feature information provided in an embodiment of the present application;

[0023] Figure 8 A block diagram of a defect detection device provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] Application Overview

[0027] The appearance defect detection of electronic screens is an important part of the production line. At present, manual observation is still one of the commonly used defect detection methods for many production lines, but the results of manual observation rely on manual experience, and the observation results are inaccurate, which increases production costs. Especially for scratch detection, it is necessary to determine the level of the scratches by obtaining the number, depth, length and width of the scratches. The imaging of scratches will have different presentations in grayscale, contrast, directionality, continuity, width, background brightness uniformity, background noise, and background interference. And because the current quality inspection workshop is not a standard dust-free workshop, there will be a lot of dust. In the process of mobile phone screen appearance inspection, it is usually impossible to judge whether it is dust or defects based on the image.

[0028] In addition, there are some automatic detection methods for screen defects in the prior art, such as the following exemplary methods.

[0029] The first is an online glass defect detection method. The algorithm first selects a lower limit to remove the striped background pattern, and then extracts the defect location by selecting a fixed threshold and the Otsu algorithm (OTSU) image threshold. This method works well in quickly detecting glass defects such as bubbles, stains, and deformations, but the results are poor when detecting subtle optical defects in glass.

[0030] The second is to combine the Canny operator, binary feature histogram and Adaboost algorithm (an iterative algorithm) to propose an algorithm for glass defect detection and classification. However, this algorithm only detects whether the glass contains bubbles, and in industrial production where the detection accuracy requirements are getting higher and higher, the measurement accuracy of this method is low.

[0031] The third method is to detect and identify defects in mobile phone glass based on the principal component analysis algorithm. The algorithm first uses the OTSU image threshold algorithm to locate possible defects in the preprocessing stage, then extracts ten types of features, and finally classifies and identifies the target image. However, when the algorithm finds an unknown problem on the screen, it will also classify it into one of the defects according to the initially set classification.

[0032] The fourth method is to combine the median-based OTSU image threshold algorithm with the contrast adjustment method to propose an automatic detection algorithm for screen surface defects. This algorithm is simple but very effective and can overcome the influence of image brightness and contrast to a certain extent. However, when the sample size is large, the calculation time of the optimal threshold is long, the efficiency is low, and it is easily disturbed by noise points.

[0033] The fifth one is to propose a sparse representation of low-resolution images based on the principal component analysis method, so as to quickly and effectively detect the defects of the mobile phone screen, but it still has the shortcomings of the principal component analysis method.

[0034] The sixth method is to automatically detect defects on mobile phone screens through the fuzzy mean clustering method. During the image preprocessing process, this algorithm distinguishes and aligns the outline of the object, and then extracts the defective area through projection. The resolution accuracy of this algorithm is very high, but the detection time will be relatively long.

[0035] Exemplary Methods

[0036] In order to solve the above technical problems, reduce the missed detection rate and measurement error of screen defect detection, and improve the detection speed, the present application provides a defect detection method, which can accurately identify defects on the appearance of the screen.

[0037] In one embodiment, if Figure 1 As shown, the process steps for implementing the defect detection method are as follows:

[0038] Step 101, obtaining a screen image of a screen to be detected.

[0039] In this embodiment, the screen to be detected is a screen waiting for defect detection. An image of the screen to be detected is collected, and defects of the screen to be detected are detected based on the image. It should be noted that the screen image can be the original image obtained by collecting the screen to be detected, or it can be an image after the original image is processed by denoising, etc., as long as the screen image includes the entire screen to be detected. Image collection of the screen to be detected can be completed by an image collection device such as a camera or a webcam.

[0040] Step 102: locate at least one defective area in the screen image.

[0041] In this embodiment, after obtaining the screen image, each defect in the screen image is identified, the defect area of ​​each defect on the screen to be detected is determined, and each defect area is located, that is, the position information of each defect area based on the screen image is obtained, for example, the contour coordinates of each defect area based on the screen image.

[0042] Step 103: based on the regional image information of each defective region, defect feature information corresponding to each defective region is obtained.

[0043] In this embodiment, since the defect area is obtained based on screen image recognition, the regional image information of each defect area can be obtained based on the screen image. The regional image information refers to the information that can be obtained based on the image of the defect area, such as the pixel value of each pixel point in the defect area, the position coordinates of each point on the outline of the defect area based on the screen image, etc. The defect feature information refers to the information that can reflect the defect features, such as the length, width, depth, area, type, etc. of the defect.

[0044] In this embodiment, for each defective area, the regional image information is analyzed respectively, so that the defect feature information of each defective area can be obtained, and each defective area is deeply analyzed to avoid missing defects and improve the accuracy of defect detection.

[0045] In one embodiment, based on the regional image information of each defect area, defect feature information corresponding to each defect area is obtained as follows: based on the pixel values ​​of the pixels in each defect area, a pixel index of each defect area is calculated, wherein the pixel index is an index calculated based on the pixel value; based on the pixel index, a preset correspondence between the pixel index and the defect depth is queried to obtain the defect depth corresponding to each defect area.

[0046] In this embodiment, the regional image information includes the pixel value of each pixel point in the defective area, and the defect feature information includes the defect depth. When there is a defect on the screen to be detected, the pixel value of the defective area is different from the pixel value of the normal area, and the degree of damage of defects such as scratches is different, and the pixel value is also different. Therefore, the pixel index of each defective area is calculated separately, and the defect depth corresponding to each defective area is determined by the pixel index. Specifically, the pixel index includes the average value, variance, mean square error, maximum value, minimum value and any other index value that can be calculated based on each pixel value of each pixel value in the defective area.

[0047] In this embodiment, the preset corresponding relationship between the pixel index and the defect depth is set in advance according to actual conditions and needs. For example, the average depth threshold value A1>A2>A3 is preset. When the average pixel value of any defect area is greater than A1, the defect depth of the defect area is 1; when the average pixel value of any defect area is less than or equal to A1 and greater than A2, the defect depth of the defect area is 2; when the average pixel value of any defect area is less than or equal to A2 and greater than A3, the defect depth of the defect area is 3; when the average pixel value of any defect area is less than or equal to A3, the defect depth of the defect area is 4. For another example, the average depth threshold A1>A2>A3 is preset, and the maximum depth threshold B1 is preset. When the maximum pixel value of any defective area is greater than B1, the defect depth of the defective area is 1; when the maximum pixel value of any defective area is less than or equal to B1, and the average pixel value is greater than A1, the defect depth of the defective area is 2; when the maximum pixel value of any defective area is less than or equal to B1, and the average pixel value is less than or equal to A1, and greater than A2, the defect depth of the defective area is 3; when the maximum pixel value of any defective area is less than or equal to B1, and the average pixel value is less than or equal to A2, and greater than A3, the defect depth of the defective area is 4; when the maximum pixel value of any defective area is less than or equal to B1, and the average pixel value is less than or equal to A3, the defect depth of the defective area is 5. Of course, the preset corresponding relationship between the above-mentioned pixel indicators and the defect depth is only an example. The preset corresponding relationship between the pixel indicators and the defect depth in the actual implementation process can adjust the specific indicators and depth assessment standards adopted according to the actual operation conditions.

[0048] In one embodiment, based on the regional image information of each defect region, defect feature information corresponding to each defect region is obtained as follows:

[0049] For each defect area: based on the defect contour of the defect area, determine the inscribed circle of each contour point on the defect area within the defect area; among each inscribed circle, retain the maximum number of tangent inscribed circles, wherein any two tangent inscribed circles do not overlap each other; based on the number and diameter of the tangent inscribed circles, determine the defect size of the defect area, wherein the defect size includes the defect length and / or the defect width.

[0050] In this embodiment, the regional image information includes the defect contour of the defect region, and the defect feature information includes the defect length and / or defect width. The defect contour of any defect region can be identified by a recognition function or an intelligent recognition algorithm, for example, the findContours function is used to identify the defect contour, and the position coordinates of each contour point on the defect contour can be obtained, thereby facilitating the subsequent calculation process.

[0051] In this embodiment, the variable diameter circle method can be used to solve the inscribed circle on the defect contour within the defect area, and then among the inscribed circles, the largest number of tangent inscribed circles are retained, for example Figure 2 In the example diagram of tangent inscribed circles shown in the figure, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 represent different tangent inscribed circles, and any two tangent inscribed circles do not overlap with each other. The maximum number of tangent inscribed circles is retained to ensure that the tangent inscribed circles can fill the entire defect area as much as possible. When the variable diameter circle method is used to determine the inscribed circle, the diameter of each inscribed circle can be accurately known, that is, the diameter of each tangent inscribed circle is known. When determining the tangent inscribed circles, the number of tangent inscribed circles can be determined, and the defect length and / or defect width can be determined based on the diameter and number of the tangent inscribed circles. Specifically, the maximum value calculated based on continuous tangent inscribed circles can be used as the defect length of the defect area; the second largest value calculated based on continuous tangent inscribed circles can be used as the defect width of the defect area; or, the minimum value calculated based on continuous tangent inscribed circles can be used as the defect width of the defect area; the specific calculation method is implemented according to actual conditions and needs. For example, Figure 2 As shown, the sum of the diameters of the tangent inscribed circles 1, 2, 3, 4, 5, 6, 7, and 10 can be directly added as the defect length of the defect area, and the sum of the diameters of the tangent inscribed circles 7, 8, and 10 can be directly added as the defect width of the defect area.

[0052] In one embodiment, a screen image of a screen to be detected is obtained as follows: an original image of the screen to be detected is obtained; and a binary screen image is obtained by performing proportional reduction processing, grayscale processing, denoising processing, and binarization processing on the original image.

[0053] In this embodiment, in order to improve the recognition accuracy of the defect contour, the original image of the screen to be detected can be preprocessed. Specifically, the original image of the screen to be detected is first proportionally reduced by 4 times. Proportional reduction is conducive to avoiding image distortion and deformation, and the reduction ratio can be flexibly set according to actual conditions and needs. Then, the reduced original image is grayed out. Through gray processing, the subsequent calculation amount of the image can be reduced, and if OTSU binarization is used, only the grayscale image can be processed. After that, the original image after gray processing is subjected to denoising treatment such as Gaussian and Laplace transform. Finally, the denoised original image is subjected to adaptive binarization operation. Binarization can not only further reduce the subsequent calculation amount of image processing, but also remove background interference, further reflect the defect contour, and improve the accuracy of subsequent identification and positioning of defective areas. It should be noted that the specific factual method adopted by adaptive binarization can adopt any binarization method such as Otsu algorithm, ernsen algorithm, Niblack algorithm, cyclic threshold algorithm, iterative binarization algorithm, etc. according to actual needs.

[0054] In one embodiment, a screen image of a screen to be detected is obtained as follows: an original image of the screen to be detected is obtained; the original image is input into a preset image preprocessing model to obtain a binarized screen image output by the image preprocessing model.

[0055] In this embodiment, the processing of the original image can be achieved through a pre-trained image preprocessing model, which is obtained by training the original constructed deep learning semantic segmentation model through sample images. During training, it is necessary to semantically annotate the sample images, and divide the sample image data set into a training set and a test set, etc. The original model is trained with the training set, and after testing with the test set, the final image preprocessing model is obtained. Input any original image into the image preprocessing model, and the image preprocessing model can output the corresponding binary screen image. Once the image preprocessing model is successfully trained, it can be used repeatedly to improve the reuse rate of the model.

[0056] In the above embodiment, the outline of the binarized screen image area is more prominent, which is more conducive to the subsequent positioning of the defect area.

[0057] In one embodiment, at least one defective area in a screen image is located as follows: at least one initial defective area in the screen image is located; the area category corresponding to each initial defective area is determined; and the initial defective areas whose area categories belong to a preset interference category are screened out to obtain at least one defective area.

[0058] In this embodiment, in order to avoid the error in the identification of defective areas caused by interference factors such as dust and screen borders, the initial defective areas can be categorized. For each initial defective area located in the screen image, the area category is determined respectively, and the initial defective areas whose area categories do not belong to the preset defect categories are screened out to obtain at least one defective area. Specifically, the preset defect categories can be set according to actual conditions and needs. For example, the area categories include scratches, bubbles, pits, etc., and the preset interference categories include dust, screen borders, on-screen cameras, etc. If the area category obtained by identifying an initial defective area is dust, the initial defective area is eliminated. By screening, the misidentification of defects can be avoided and the accuracy of defect detection can be further improved.

[0059] In one embodiment, the area category corresponding to each initial defect area is determined as follows: the minimum circumscribed rectangle of each initial defect area is determined; cutting is performed based on the minimum circumscribed rectangle to obtain at least one rectangular area; each rectangular area is input into a preset defect classification model in turn to obtain the area category corresponding to each rectangular area output by the defect classification model.

[0060] In this embodiment, when locating the initial defect area, the findContours function can be used to find the initial area contour of each initial defect area, or the cany operator of contour detection can be used to complete the contour positioning, and the position coordinates of each contour point on the initial area contour are obtained at the same time. Then the minimum circumscribed rectangle of the initial area contour is determined by the minAreaRect function, and the position coordinates of the four vertices of the minimum circumscribed rectangle are obtained. Based on the position coordinates of the four vertices of the minimum circumscribed rectangle, the minimum circumscribed rectangle of each initial defect area can be easily cut out, and the calculation amount of cutting can be reduced to obtain the rectangular area of ​​each initial defect area. Then, by inputting each rectangular area into the preset defect classification model in turn, the area category corresponding to each rectangular area output by the defect classification model is obtained.

[0061] In this embodiment, the preset defect classification model is obtained by performing intelligent training on the original construction through sample data. During training, the sample data is divided into a training set and a test set, etc. The original model is trained by the training set, and the final defect classification model is obtained after testing with the test set. Input an image of any rectangular area into the defect classification model, and the defect classification model can output the corresponding area category. Once the defect classification model is successfully trained, it can be used repeatedly to improve the reuse rate of the model. At the same time, the defect classification model can also be a learning model that can continuously learn new area types. The area categories corresponding to each rectangular area output by the defect classification model are the area categories corresponding to each initial defect area.

[0062] In a specific embodiment, Figure 3 As shown, the overall implementation process of the defect detection method is as follows:

[0063] Step 301, obtaining the original image of the detection screen;

[0064] Step 302, locating the initial defect areas in the original image, and segmenting the rectangular areas corresponding to the initial defect areas;

[0065] Step 303, classifying each rectangular area, obtaining the area category corresponding to each initial defect area, and then screening the initial defect area to obtain the final defect area;

[0066] Step 304 , determining the defect depth of each defect area based on the pixel value, and measuring the defect length and defect width of each defect area using a variable diameter circle method.

[0067] Further, such as Figure 4 As shown, the process of processing the original image using traditional image processing methods is as follows:

[0068] Step 401, obtaining the original image of the detection screen;

[0069] Step 402, pre-processing the original image by reducing the original image proportion, graying it, removing noise, etc.;

[0070] Step 403, performing adaptive binarization processing on the original image;

[0071] Step 404: locate each initial defect area in the binarized screen image.

[0072] Further, such as Figure 5 As shown in the figure, the process of using the deep learning model to process the original image is as follows:

[0073] Step 501, obtaining the original image of the detection screen;

[0074] Step 502, inputting the original image into an image preprocessing model trained based on semantically labeled sample data;

[0075] Step 503, the image preprocessing model outputs a binarized screen image;

[0076] Step 504: locate each initial defect area in the binarized screen image.

[0077] Further, such as Figure 6 As shown in Figure 1, the process of using the model to classify the initial defect area is as follows:

[0078] Step 601, cutting each initial defect area based on the minimum circumscribed rectangle to obtain a rectangular area;

[0079] Step 602, inputting the rectangular area into a defect classification model obtained by training based on the sample image;

[0080] Step 603, the defect classification model outputs the region type corresponding to each rectangular region, that is, the region type corresponding to each initial defect region is obtained;

[0081] Step 604: Screen out the initial defective regions whose region categories belong to the preset interference category to obtain at least one defective region.

[0082] Further, such as Figure 7 As shown in the figure, the process of obtaining defect feature information is as follows:

[0083] Step 701, calculating the average pixel value of each defect area;

[0084] Step 702, based on the average pixel value, query the preset corresponding relationship between the average pixel value and the defect depth to obtain the defect depth corresponding to each defect area;

[0085] Step 703, determining the inscribed circle of each contour point on the defect area within the defect area;

[0086] Step 704, among the inscribed circles, retain the largest number of tangent inscribed circles;

[0087] Step 705, determining the defect length and defect width of the defect area based on the number and diameter of the tangent inscribed circles.

[0088] In an embodiment of the present application, a screen image of the screen to be detected is obtained; at least one defective area in the screen image is located; based on the regional image information of each defective area, defect feature information corresponding to each defective area is obtained. In the above process, each defective area in the screen image is obtained by locating the image area surrounded by each defect outline. There is no specific requirement for the type of defect, and all defective areas in the screen to be detected can be identified as much as possible to avoid missing defects. At the same time, the defective area de-regional image information is analyzed to obtain defect feature information of each defective area. Therefore, the above process can not only locate each defective area, but also further analyze the defect characteristics and obtain defect feature information, thereby realizing accurate identification of defects in the screen to be detected and improving defect identification efficiency.

[0089] Exemplary Devices

[0090] Accordingly, the present application also provides a defect detection device, such as Figure 8 As shown, the device may include:

[0091] The image acquisition module 801 is used to acquire the screen image of the screen to be detected;

[0092] A region positioning module 802, used to locate at least one defective region in a screen image;

[0093] The feature acquisition module 803 is used to acquire defect feature information corresponding to each defect area based on the regional image information of each defect area.

[0094] In one embodiment, the feature acquisition module 803 is used to calculate the pixel index of each defect area based on the pixel values ​​of the pixel points in each defect area, wherein the pixel index is an index calculated based on the pixel value; based on the pixel index, a preset correspondence between the pixel index and the defect depth is queried to obtain the defect depth corresponding to each defect area.

[0095] In one embodiment, the feature acquisition module 803 is used to: for each defect area, based on the defect contour of the defect area, determine the inscribed circle of each contour point on the defect area within the defect area; among each inscribed circle, retain the maximum number of tangent inscribed circles, wherein any two tangent inscribed circles do not overlap with each other; based on the number and diameter of the tangent inscribed circles, determine the defect size of the defect area, wherein the defect size includes the defect length and / or the defect width.

[0096] In one embodiment, the image acquisition module 801 is used to acquire the original image of the screen to be detected; after performing proportional reduction processing, grayscale processing, denoising processing and binarization processing on the original image, a binarized screen image is obtained.

[0097] In one embodiment, the image acquisition module 801 is used to acquire the original image of the screen to be detected; input the original image into a preset image preprocessing model to obtain a binarized screen image output by the image preprocessing model.

[0098] In one embodiment, the region positioning module 802 is used to locate at least one initial defect region in the screen image; determine the region category corresponding to each initial defect region; and filter out the initial defect regions whose region categories belong to a preset interference category to obtain at least one defect region.

[0099] In one embodiment, the region positioning module 802 is used to determine the minimum circumscribed rectangle of each initial defect area respectively; perform cropping based on the minimum circumscribed rectangle to obtain at least one rectangular area; input each rectangular area into a preset defect classification model in turn to obtain the region category corresponding to each rectangular area output by the defect classification model.

[0100] The defect detection device provided in this embodiment belongs to the same application concept as the defect detection method provided in the above embodiments of this application, and can execute the defect detection method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the specific processing content of the defect detection method provided in the above embodiments of this application, and will not be repeated here.

[0101] Exemplary Electronic Devices

[0102] The present application also provides an electronic device, such as Fig. 9 As shown, the electronic device includes: a memory 900 and a processor 901 .

[0103] The memory 900 is connected to the processor 901 and is used to store programs.

[0104] The processor 901 is used to implement the defect detection method in the above embodiment by running the program stored in the memory 900 .

[0105] Specifically, the electronic device may further include: a communication interface 902 , an input device 903 , an output device 904 and a bus 905 .

[0106] The processor 901, the memory 900, the communication interface 902, the input device 903 and the output device 904 are connected to each other via a bus.

[0107] Bus 905 may include a pathway for transferring information between the various components of the computer system.

[0108] The processor 901 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0109] The processor 901 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0110] The memory 900 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 900 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0111] The input device 903 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0112] Output device 904 may include a device that allows information to be output to a user, such as a display screen, printer, speaker, etc.

[0113] The communication interface 902 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0114] The processor 901 executes the program stored in the memory 900 and calls other devices, which can be used to implement each step of the defect detection method provided in the above embodiment of the present application.

[0115] Exemplary computer program products and storage media

[0116] In addition to the above-mentioned method and device, the embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps in the defect detection method described in the embodiment of the present application.

[0117] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0118] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the defect detection method described in the embodiment of the present application.

[0119] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0120] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0121] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0122] The modules and sub-modules in the devices and terminals provided in the embodiments of the present application can be merged, divided and deleted according to actual needs.

[0123] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0124] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0125] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0126] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0127] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0128] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0129] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A defect detection method, characterized in that: include: Obtaining a screen image of the screen to be detected; locating at least one defective area in the screen image; Based on the regional image information of each of the defective regions, defect feature information corresponding to each of the defective regions is obtained.

2. The defect detection method according to claim 1, characterized in that: The acquiring defect feature information corresponding to each defect area based on the regional image information of each defect area includes: Calculating a pixel index of each defect area based on the pixel value of each pixel point in the defect area, wherein the pixel index is an index calculated based on the pixel value; Based on the pixel index, a preset corresponding relationship between the pixel index and the defect depth is queried to obtain the defect depth corresponding to each defect area.

3. The defect detection method according to claim 1, characterized in that: The acquiring defect feature information corresponding to each defect area based on the regional image information of each defect area includes: For each of the defect areas: based on the defect contour of the defect area, determine the inscribed circle of each contour point on the defect area within the defect area; among the inscribed circles, retain the largest number of tangent inscribed circles, wherein any two tangent inscribed circles do not overlap with each other; based on the number and diameter of the tangent inscribed circles, determine the defect size of the defect area, wherein the defect size includes the defect length and / or the defect width.

4. The defect detection method according to claim 1, characterized in that: The step of acquiring the screen image of the screen to be detected includes: Acquire the original image of the screen to be detected; After the original image is subjected to proportional reduction processing, grayscale processing, denoising processing and binarization processing, the binarized screen image is obtained.

5. The defect detection method according to claim 1, characterized in that: The step of acquiring the screen image of the screen to be detected includes: Acquire the original image of the screen to be detected; The original image is input into a preset image preprocessing model to obtain the binarized screen image output by the image preprocessing model.

6. The defect detection method according to claim 1, characterized in that: The locating at least one defective area in the screen image comprises: locating at least one initial defect area in the screen image; Determine the region category corresponding to each of the initial defect regions; The initial defective regions whose region categories belong to the preset interference category are screened out to obtain at least one defective region.

7. The defect detection method according to claim 6, characterized in that: The determining of the region category corresponding to each of the initial defect regions comprises: Determine the minimum circumscribed rectangle of each of the initial defect areas respectively; Perform cropping based on the minimum circumscribed rectangle to obtain at least one rectangular area; Input each of the rectangular areas into a preset defect classification model in turn to obtain the area category corresponding to each of the rectangular areas output by the defect classification model.

8. A defect detection device, characterized in that: include: An image acquisition module, used to acquire a screen image of the screen to be detected; A region positioning module, used for positioning at least one defective region in the screen image; The feature acquisition module is used to acquire defect feature information corresponding to each defect area based on the regional image information of each defect area.

9. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the defect detection method according to any one of claims 1 to 7 by running the program in the memory.

10. A computer program product, characterized in that includes computer program instructions; When the computer program instructions are executed by a processor, the processor is caused to perform the defect detection method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Nonlinear intelligent evaluation method for screen appearance defects

    CN120635080A