CN113838053A - Screen defect detection method, device, equipment and storage medium - Google Patents
Screen defect detection method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113838053A CN113838053A CN202111416565.4A CN202111416565A CN113838053A CN 113838053 A CN113838053 A CN 113838053A CN 202111416565 A CN202111416565 A CN 202111416565A CN 113838053 A CN113838053 A CN 113838053A
- Authority
- CN
- China
- Prior art keywords
- image
- matrix
- analysis
- defect
- positioning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30121—CRT, LCD or plasma display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the field of screen detection, and discloses a method, a device, equipment and a storage medium for detecting screen defects. The method comprises the following steps: shooting a positioning analysis image of a screen to be detected, and carrying out defect positioning analysis processing on the positioning analysis image to obtain defect positioning information; acquiring an accurate analysis image of a screen to be detected based on the defect positioning information; reading the image size set by the preset analysis algorithm to obtain A0*B0Pixel data, and readingTaking the image size of the accurate analysis image to obtain A1*B1Pixel data; dividing the accurate analysis image into (A) by horizontal average1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing; based on the horizontal average division of the accurate analysis image and the vertical average division of the accurate analysis image, the image is cut to obtain (A)1/A0)*(B1/B0) Analyzing the image; according to the analysis algorithm, pair (A)1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
Description
Technical Field
The present invention relates to the field of screen inspection, and in particular, to a method, an apparatus, a device, and a storage medium for inspecting a screen defect.
Background
With the rapid development of electronic products, they play an irreplaceable role in people's daily life. However, the quality of the screen as an important component of the electronic product directly affects the use of the product, and the defects on the screen can seriously reduce the use value of the product. Therefore, defective defect detection of the screen is very important. Aiming at the background that the updating frequency of the current electronic products is higher and the production and manufacturing requirements are large, the speed and the accuracy of the traditional manual addition measurement can not meet the detection and measurement requirements.
Deep learning has achieved a very good effect on feature extraction and localization, and more scholars and engineers are beginning to introduce deep learning algorithms into the field of defect detection. Due to the fact that defects are various, complete modeling and migration of defect features are difficult to achieve through a traditional machine vision algorithm, reusability is not large, working conditions are required to be distinguished, and a large amount of labor cost can be wasted. Therefore, there is a need for a screen inspection technique that can fully model and migrate screen defects.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the screen defect cannot be completely modeled and migrated by the screen detection technology.
The invention provides a method for detecting screen defects in a first aspect, which comprises the following steps:
shooting a positioning analysis image of a screen to be detected, and carrying out defect positioning analysis processing on the positioning analysis image to obtain defect positioning information;
acquiring an accurate analysis image of the screen to be detected based on the defect positioning information;
reading the image size set by the preset analysis algorithm to obtain A0*B0Pixel data, and reading the accurate minuteAnalyzing the image size of the image to obtain A1*B1Pixel data of A0Analyzing the lateral pixel values of the image for an algorithm, A1For accurate analysis of the lateral pixel values of the image, B0Longitudinal pixel values, B, of an image for algorithmic analysis1For accurate analysis of longitudinal pixel values of an image, A1、B1、A0、B0Is a positive integer;
dividing the exact analysis image into (A) by horizontal averaging1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing;
(A) is obtained by cutting based on the horizontal average division of the accurate analysis image and the vertical average division of the accurate analysis image1/A0)*(B1/B0) Analyzing the image;
according to said analysis algorithm, for said (A)1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
Optionally, in a first implementation manner of the first aspect of the present invention, the (a) is subjected to the analysis algorithm1/A0)*(B1/B0) Analyzing the analysis image to obtain defect information, wherein the defect information comprises:
extracting pixel values of the analysis image to obtain an initial analysis matrix;
performing convolution processing on the initial analysis matrix to obtain a convolution matrix T1;
The convolution matrix T1As an initial iteration matrix of the iterative convolution, for the convolution matrix TSPerforming convolution processing to obtain a convolution matrix TS+1And iterating the convolution for L times to obtain a convolution matrix T2Convolution matrix T3… convolution matrix TL+1Wherein S =1, 2, ·, L is a positive integer constant;
determining the initial analysis matrix as a convolution matrix T0Will convolve the matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DL+1;
Will combine the matrix DL+1Convolution matrix T0Convolution matrix T1… convolution matrix TR1Performing combination conversion processing to generate a combination matrix DR1Wherein R1=1, 2, …, L being a positive integer constant;
will combine the matrix DR2Reduction to A0*B0Probability matrix P of pixelsR2To the probability matrix PR2Performing convolution activation processing to obtain an output matrix FR2Wherein R2=1, 2, …, L +1, L being a positive integer constant;
for output matrix FR2Fusing the conversion processing to obtain a loss judgment matrix F0;
According to the preset loss function, judging a loss matrix F0And performing loss judgment processing to obtain a binary image corresponding to the defect information.
Optionally, in a second implementation manner of the first aspect of the present invention, the determining matrix F for loss is based on a preset loss function0Performing loss judgment processing to obtain a binary image corresponding to the defect information, wherein the step of obtaining the binary image comprises the following steps:
judging the loss matrix F0Substituting any element value into a preset loss function to obtain a loss value corresponding to the element value;
judging whether the loss value is larger than a preset loss threshold value or not;
if the loss value is larger than the loss threshold value, determining the element corresponding to the element value as a defect;
and if the loss value is smaller than the loss threshold value, determining the element corresponding to the element value as qualified.
Optionally, in a third implementation manner of the first aspect of the present invention, the loss function includes:
wherein A is0Is analyzing the lateral pixel values of the image, B0Is analyzing an imageLongitudinal pixel value of, AxIs a loss judgment matrix F0Abscissa of the element(s), ByIs a loss judgment matrix F0Element ordinate of (1), PG(Ax,By)Is represented by (A)x,By) Value of element(s), Ps(Ax,By)Indicates the predicted value, and E is the loss value.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the loss threshold includes: 0.09.
optionally, in a fifth implementation manner of the first aspect of the present invention, a positioning analysis image of a screen to be detected is captured;
dividing the positioning analysis image into (M + 1) × (N + 1) positioning sub-images according to a preset region division frame, wherein M is the number of longitudinal division lines, and N is the number of transverse division lines;
performing primary judgment processing on (M + 1) × (N + 1) positioning subimages, and screening out H positioning subimages with defects, wherein H is a positive integer not greater than (M + 1) × (N + 1);
and extracting the position data of the H positioning sub-images in the area division frame to obtain defect positioning information.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the obtaining, based on the defect positioning information, an accurate analysis image of the screen to be detected includes:
reading the size of the positioning sub-image to obtain X X Y pixel data, wherein X is a transverse pixel value of the positioning sub-image, Y is a longitudinal pixel value of the positioning sub-image, and X, Y is a positive integer;
reading values of transverse pixels from left to right in an order of [ X/2] -I to [ X/2] + I from the positioning sub-image, reading values of transverse pixels from top to bottom in an order of [ Y/2] -J to [ Y/2] + J from the positioning sub-image, and generating an accurate analysis image, wherein I is a preset transverse acquisition value of a central pixel, J is a preset longitudinal acquisition value of the central pixel, [. gtoreq ] is a maximum integer not greater than, and I, J is a positive integer.
A second aspect of the present invention provides a screen defect detecting apparatus, including:
the shooting module is used for shooting a positioning analysis image of the screen to be detected and carrying out defect positioning analysis processing on the positioning analysis image to obtain defect positioning information;
the acquisition module is used for acquiring an accurate analysis image of the screen to be detected based on the defect positioning information;
a reading module for reading the image size set by the preset analysis algorithm to obtain A0*B0Pixel data, and reading the image size of the accurate analysis image to obtain A1*B1Pixel data of A0Analyzing the lateral pixel values of the image for an algorithm, A1For accurate analysis of the lateral pixel values of the image, B0Longitudinal pixel values, B, of an image for algorithmic analysis1For accurate analysis of longitudinal pixel values of an image, A1、B1、A0、B0Is a positive integer;
a dividing module for dividing the precise analysis image into (A) in a horizontal average manner1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing;
a cropping module for cropping (A) based on the average horizontal segmentation and the average vertical segmentation of the exact image1/A0)*(B1/B0) Analyzing the image;
an analysis module for analyzing (A) according to the analysis algorithm1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
A third aspect of the present invention provides a screen defect detection apparatus, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor calls the instructions in the memory to enable the screen defect detection device to execute the screen defect detection method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-described method for detecting a screen defect.
In the embodiment of the invention, the range of the defect is locked by shooting the positioning analysis chart with a larger range, a more detailed accurate analysis image is shot in the position range based on the defect, the content of the screen defect can be accurately and effectively judged to output a binary image based on the accurate analysis image, and the problem that the screen defect cannot be completely modeled and transferred by a screen detection technology is solved.
Drawings
FIG. 1 is a diagram of an embodiment of a method for detecting a screen defect according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a matrix transformation relationship of a method for detecting a screen defect according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of an apparatus for detecting a screen defect according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an embodiment of a device for detecting a screen defect in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for detecting screen defects.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, a detailed flow of an embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a method for detecting a screen defect in an embodiment of the present invention includes:
101. shooting a positioning analysis image of a screen to be detected, and carrying out defect positioning analysis processing on the positioning analysis image to obtain defect positioning information;
in this embodiment, the fine shooting camera is guided to operate in the area according to the defect positioning information of the main camera, the main camera has already performed preliminary positioning and size measurement on the defects, and the defects that can enter the fine shooting camera are all defects whose sizes meet the range of the previously set threshold value. Therefore, the general defect is located at the opposite center position of the fine photographing camera, and the fine photographing camera performs image acquisition on the area.
In step 101, the following steps may also be performed:
1011. shooting a positioning analysis image of a screen to be detected;
1012. dividing the positioning analysis image into (M + 1) × (N + 1) positioning sub-images according to a preset region division frame, wherein M is the number of longitudinal division lines, and N is the number of transverse division lines;
1013. performing primary judgment processing on (M + 1) × (N + 1) positioning subimages, and screening out H positioning subimages with defects, wherein H is a positive integer not greater than (M + 1) × (N + 1);
1014. and extracting the position data of the H positioning sub-images in the area division frame to obtain defect positioning information.
In the 1011-1014 step, the image captured by the main camera is 20000 × 20000 positioning analysis map, but the positioning analysis map is too large, and the cutting analysis is required first. In the cutting, 9 dividing lines exist in the horizontal direction and the vertical direction respectively, the original image is divided averagely, the dividing mode is stored in the form of an area dividing frame, and the first dividing mode is a (1, 1) dividing mode, and the (8, 9) dividing mode is represented as a horizontal 8 th vertical 9 th sub-image. The image shot by the main camera is 20000 × 20000 positioning analysis graphs which are divided into 2000 × 2000 positioning sub-images in total of 100, whether defects exist in the 100 positioning sub-images is analyzed in sequence, and H positioning sub-images are screened out to have defects. And taking the positioning mark thought by the defect positioning subgraph as defect positioning information.
102. Acquiring an accurate analysis image of the screen to be detected based on the defect positioning information;
in this embodiment, clipping of the relatively central region of the positioning sub-image may be acquired, the fine shooting camera acquires 1000 × 1000 images, and 1 1000 × 1000 images are deducted according to the relatively central region of the positioning sub-image. The fine capture camera may also acquire a 2000 x 2000 pixel size image of the positioning sub-image region based on a 2000 x 2000 pixel size of the positioning sub-image.
In step 102, the following operations may be performed:
1021. reading the size of the positioning sub-image to obtain X X Y pixel data, wherein X is a transverse pixel value of the positioning sub-image, Y is a longitudinal pixel value of the positioning sub-image, and X, Y is a positive integer;
1022. reading values of transverse pixels from left to right in an order of [ X/2] -I to [ X/2] + I from the positioning sub-image, reading values of transverse pixels from top to bottom in an order of [ Y/2] -J to [ Y/2] + J from the positioning sub-image, and generating an accurate analysis image, wherein I is a preset transverse acquisition value of a central pixel, J is a preset longitudinal acquisition value of the central pixel, [. gtoreq ] is a maximum integer not greater than, and I, J is a positive integer.
In step 1021-. After the range is thus constrained, a fine shot image can be extracted that locates 1000 x 1000 of the central range of the sub-image.
103. Reading the image size set by the preset analysis algorithm to obtain A0*B0Pixel data, and reading the image size of the accurate analysis image to obtain A1*B1Pixel data of A0Analyzing the lateral pixel values of the image for an algorithm, A1For accurate analysis of the lateral pixel values of the image, B0Longitudinal pixel values, B, of an image for algorithmic analysis1For accurate analysis of longitudinal pixel values of an image, A1、B1、A0、B0Is a positive integer;
104. dividing the exact analysis image into (A) by horizontal averaging1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing;
105. (A) is obtained by cutting based on the horizontal average division of the accurate analysis image and the vertical average division of the accurate analysis image1/A0)*(B1/B0) Analyzing the image;
in step 103-105, the image size set by the analysis algorithm is 200 × 200 pixels, and the image size of the accurate analysis image is 1000 × 1000 pixels, the horizontal and vertical directions are divided into 5 parts on average, so as to generate 25 parts of images that can be analyzed by the training model, so as to ensure that each image can be accurately identified and judged in the information processing process.
106. According to said analysis algorithm, for said (A)1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
In this embodiment, (A)1/A0)*(B1/B0) The analysis images are sequentially input into an analysis algorithm for identification, and key information such as the size, the category, the size and the like of the defect information is identified, or a technician can check the specific error in which link occurs in the production link based on the defect information.
Further in step 106, the following steps may be performed:
1061. extracting pixel values of the analysis image to obtain an initial analysis matrix;
1062. performing convolution processing on the initial analysis matrix to obtain a convolution matrix T1;
1063. The convolution matrix T1AsInitial iteration matrix of iterative convolution, for convolution matrix TSPerforming convolution processing to obtain a convolution matrix TS+1And iterating the convolution for L times to obtain a convolution matrix T2Convolution matrix T3… convolution matrix TL+1Wherein S =1, 2, ·, L is a positive integer constant;
1064. determining the initial analysis matrix as a convolution matrix T0Will convolve the matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DL+1;
1065. Will combine the matrix D R1+1Convolution matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DR1Wherein, R1 takes 1, 2, … and L, and L is a positive integer constant;
1066. will combine the matrix DR2Reduction to A0*B0Probability matrix P of pixelsR2Will convolve the matrix TL+1Reduction to A0*B0Probability matrix P of pixelsL+2To the probability matrix PR2Probability matrix PL+2Performing convolution activation processing to obtain an output matrix FR2+1Wherein, R2 takes 1, 2, … and L +1, and L is a positive integer constant;
1067. for output matrix FR2+1Fusing the conversion processing to obtain a loss judgment matrix F0;
1068. According to the preset loss function, judging a loss matrix F0And performing loss judgment processing to obtain a binary image corresponding to the defect information.
In the 1061-1068 step, as shown in fig. 2, the analysis image is subjected to pixel value extraction processing to obtain an initial analysis matrix, and the initial analysis matrix is determined as a convolution matrix T0. For convolution matrix T0Convolution processing is carried out to obtain a convolution matrix T1Of a convolution matrix TSPerforming convolution processing to obtain a convolution matrix TS+1And if L is 4, circularly generating a convolution matrix T2Convolution matrix T3Convolution matrix T4Convolution matrix T5. Further, the convolution matrix T0Convolution matrix T1Convolution matrix T2Convolution matrix T3Convolution matrix T4Convolution matrix T5The combination results in a combination matrix D5. Combination matrix D5, convolution matrix T0Convolution matrix T1Convolution matrix T2Convolution matrix T3Convolution matrix T4Convolution matrix T5Combining to generate a combined matrix D4, a combined matrix D4 and a convolution matrix T0Convolution matrix T1Convolution matrix T2Convolution matrix T3Convolution matrix T4Convolution matrix T5Combining to generate a combined matrix D3, a combined matrix D3 and a convolution matrix T0Convolution matrix T1Convolution matrix T2Convolution matrix T3Convolution matrix T4Convolution matrix T5Generating a combination matrix D2, a combination matrix D2, a convolution matrix T0Convolution matrix T1Convolution matrix T2Convolution matrix T3Convolution matrix T4Convolution matrix T5A combining matrix D1 is generated. In this case, R1 is 1, 2, 3, and 4 in this order. Reducing the combination matrix D1, the combination matrix D2, the combination matrix D3, the combination matrix D4 and the combination matrix D5 into A0*B0Probability matrix P of pixels1Probability matrix P2Probability matrix P3Probability matrix P4Probability matrix P5And the convolution matrix T is5Reduced to a probability matrix P6Then the probability matrix P is applied1Probability matrix P2Probability matrix P3Probability matrix P4Probability matrix P5Probability matrix P6Convolution activation processing to obtain an output matrix F1Output matrix F2Output matrix F3Output matrix F4Output matrix F5Output matrix F6Wherein, R2 is 1, 2, 3, 4 and 5 in sequence. Then output matrix F1Output matrix F2Output matrix F3Output matrix F4Output matrix F5Output matrix F6Combined treatment to give F0And finallyBased on the loss function, F0The loss value of (2) is obtained, and a binary image corresponding to the defect information is obtained based on all the loss values.
Further, in step 1068, the following steps may be further performed:
10681. loss judgment matrix F0Substituting any element value into a preset loss function to obtain a loss value corresponding to the element value;
10682. judging whether the loss value is larger than a preset loss threshold value or not;
10683. if the loss value is larger than the loss threshold value, determining the element corresponding to the element value as a defect;
10684. and if the loss value is smaller than the loss threshold value, determining the element corresponding to the element value as qualified.
In the 10681-10684 steps, the loss judgment matrix F is read sequentially0And substituting the element value into the loss function value to calculate a loss value, wherein when the loss value is greater than 0.09, the pixel corresponding to the element is considered to be a defective pixel, and when the loss value is less than 0.09, the pixel corresponding to the element is considered to be a qualified pixel.
Specifically, the loss function includes:
wherein A is0Is analyzing the lateral pixel values of the image, B0Is analyzing the longitudinal pixel value of the image, AxIs a loss judgment matrix F0Abscissa of the element(s), ByIs a loss judgment matrix F0Element ordinate of (1), PG(Ax,By)Is represented by (A)x,By) Value of element(s), Ps(Ax,By)Indicates the predicted value, and E is the loss value.
In the embodiment of the invention, the range of the defect is locked by shooting the positioning analysis chart with a larger range, a more detailed accurate analysis image is shot in the position range based on the defect, the content of the screen defect can be accurately and effectively judged to output a binary image based on the accurate analysis image, and the problem that the screen defect cannot be completely modeled and transferred by a screen detection technology is solved.
The above description of the method for detecting a screen defect in the embodiment of the present invention, and the following description of the apparatus for detecting a screen defect in the embodiment of the present invention refer to fig. 3, where an embodiment of the apparatus for detecting a screen defect in the embodiment of the present invention includes:
the shooting module 301 is configured to shoot a positioning analysis image of a screen to be detected, and perform defect positioning analysis processing on the positioning analysis image to obtain defect positioning information;
an obtaining module 302, configured to obtain an accurate analysis image of the screen to be detected based on the defect positioning information;
a reading module 303, configured to read an image size set by a preset analysis algorithm to obtain a0*B0Pixel data, and reading the image size of the accurate analysis image to obtain A1*B1Pixel data of A0Analyzing the lateral pixel values of the image for an algorithm, A1For accurate analysis of the lateral pixel values of the image, B0Longitudinal pixel values, B, of an image for algorithmic analysis1For accurate analysis of longitudinal pixel values of an image, A1、B1、A0、B0Is a positive integer;
a dividing module 304 for dividing the precise analysis image into (A) in a horizontal average manner1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing;
a cropping module 305 for cropping (A) based on the horizontal average segmentation of the exact analysis image and the vertical average segmentation of the exact analysis image1/A0)*(B1/B0) Analyzing the image;
an analysis module 306 for analyzing (A) according to the analysis algorithm1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
The shooting module 301 is specifically configured to:
shooting a positioning analysis image of a screen to be detected;
dividing the positioning analysis image into (M + 1) × (N + 1) positioning sub-images according to a preset region division frame, wherein M is the number of longitudinal division lines, and N is the number of transverse division lines;
performing primary judgment processing on (M + 1) × (N + 1) positioning subimages, and screening out H positioning subimages with defects, wherein H is a positive integer not greater than (M + 1) × (N + 1);
and extracting the position data of the H positioning sub-images in the area division frame to obtain defect positioning information.
The obtaining module 302 is specifically configured to:
reading the size of the positioning sub-image to obtain X X Y pixel data, wherein X is a transverse pixel value of the positioning sub-image, Y is a longitudinal pixel value of the positioning sub-image, and X, Y is a positive integer;
reading values of transverse pixels from left to right in an order of [ X/2] -I to [ X/2] + I from the positioning sub-image, reading values of transverse pixels from top to bottom in an order of [ Y/2] -J to [ Y/2] + J from the positioning sub-image, and generating an accurate analysis image, wherein I is a preset transverse acquisition value of a central pixel, J is a preset longitudinal acquisition value of the central pixel, [. gtoreq ] is a maximum integer not greater than, and I, J is a positive integer.
Wherein the analysis module 306 is specifically configured to:
extracting pixel values of the analysis image to obtain an initial analysis matrix;
performing convolution processing on the initial analysis matrix to obtain a convolution matrix T1;
The convolution matrix T1As an initial iteration matrix of the iterative convolution, for the convolution matrix TSPerforming convolution processing to obtain a convolution matrix TS+1And iterating the convolution for L times to obtain a convolution matrix T2Convolution matrix T3… convolution matrix TL+1Wherein S =1, 2, ·, L is a positive integer constant;
determining the initial analysis matrix as a convolution matrix T0Will convolve the matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DL+1;
Will combine the matrix D R1+1Convolution matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DR1Wherein, R1 takes 1, 2, … and L, and L is a positive integer constant;
will combine the matrix DR2Reduction to A0*B0Probability matrix P of pixelsR2Will convolve the matrix TL+1Reduction to A0*B0Probability matrix P of pixelsL+2To the probability matrix PR2Probability matrix PL+2Performing convolution activation processing to obtain an output matrix FR2+1Wherein, R2 takes 1, 2, … and L +1, and L is a positive integer constant;
for output matrix FR2+1Fusing the conversion processing to obtain a loss judgment matrix F0;
According to the preset loss function, judging a loss matrix F0And performing loss judgment processing to obtain a binary image corresponding to the defect information.
Wherein, the analysis module 306 may be further specifically configured to:
judging the loss matrix F0Substituting any element value into a preset loss function to obtain a loss value corresponding to the element value;
judging whether the loss value is larger than a preset loss threshold value or not;
if the loss value is larger than the loss threshold value, determining the element corresponding to the element value as a defect;
and if the loss value is smaller than the loss threshold value, determining the element corresponding to the element value as qualified.
Wherein the loss function comprises:
wherein A is0Is analyzing the lateral pixel values of the image, B0Is analyzing an imageLongitudinal pixel value of, AxIs a loss judgment matrix F0Abscissa of the element(s), ByIs a loss judgment matrix F0Element ordinate of (1), PG(Ax,By)Is represented by (A)x,By) Value of element(s), Ps(Ax,By)Indicates the predicted value, and E is the loss value.
Wherein the loss threshold comprises: 0.09.
in the embodiment of the invention, the range of the defect is locked by shooting the positioning analysis chart with a larger range, a more detailed accurate analysis image is shot in the position range based on the defect, the content of the screen defect can be accurately and effectively judged to output a binary image based on the accurate analysis image, and the problem that the screen defect cannot be completely modeled and transferred by a screen detection technology is solved.
Fig. 3 describes the apparatus for detecting a screen defect in the embodiment of the present invention in detail from the perspective of a modular functional entity, and the apparatus for detecting a screen defect in the embodiment of the present invention in detail from the perspective of hardware processing.
Fig. 4 is a schematic structural diagram of a device for detecting a screen defect 400 according to an embodiment of the present invention, where the device for detecting a screen defect 400 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 410 (e.g., one or more processors) and a memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) storing an application 433 or data 432. Memory 420 and storage medium 430 may be, among other things, transient or persistent storage. The program stored in the storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in the apparatus 400 for detecting a screen defect. Further, the processor 410 may be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the screen defect detecting apparatus 400.
The screen defect based detection apparatus 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input-output interfaces 460, and/or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that the configuration of the screen defect detecting apparatus shown in fig. 4 does not constitute a limitation of the screen defect-based detecting apparatus, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the method for detecting a screen defect.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for detecting screen defects is characterized by comprising the following steps:
shooting a positioning analysis image of a screen to be detected, and carrying out defect positioning analysis processing on the positioning analysis image to obtain defect positioning information;
acquiring an accurate analysis image of the screen to be detected based on the defect positioning information;
reading the image size set by the preset analysis algorithm to obtain A0*B0Pixel data, and reading the image size of the accurate analysis image to obtain A1*B1Pixel data of A0Analyzing the lateral pixel values of the image for an algorithm, A1For accurate analysis of the lateral pixel values of the image, B0Longitudinal pixel values, B, of an image for algorithmic analysis1For accurate analysis of longitudinal pixel values of an image, A1、B1、A0、B0Is a positive integer;
dividing the exact analysis image into (A) by horizontal averaging1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing;
(A) is obtained by cutting based on the horizontal average division of the accurate analysis image and the vertical average division of the accurate analysis image1/A0)*(B1/B0) Analyzing the image;
according to said analysis algorithm, for said (A)1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
2. The method for detecting screen defects according to claim 1, wherein said (A) is performed according to said analysis algorithm1/A0)*(B1/B0) Analyzing the analysis image to obtain defect information, wherein the defect information comprises:
extracting pixel values of the analysis image to obtain an initial analysis matrix;
performing convolution processing on the initial analysis matrix to obtain a convolution matrix T1;
The convolution matrix T1As an initial iteration matrix of the iterative convolution, for the convolution matrix TSPerforming convolution processing to obtain a convolution matrix TS+1And iterating the convolution for L times to obtain a convolution matrix T2Convolution matrix T3… convolution matrix TL+1Wherein S =1, 2, ·, L is a positive integer constant;
determining the initial analysis matrix as a convolution matrix T0Will convolve the matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DL+1;
Will combine the matrix D R1+1Convolution matrix T0Convolution matrix T1… convolution matrix TL+1Performing combination conversion processing to generate a combination matrix DR1Wherein, R1 takes 1, 2, … and L, and L is a positive integer constant;
will combine the matrix DR2Reduction to A0*B0Probability matrix P of pixelsR2Will convolve the matrix TL+1Reduction to A0*B0Probability matrix P of pixelsL+2To the probability matrix PR2Probability matrix PL+2Performing convolution activation processing to obtain an output matrix FR2+1Wherein, R2 takes 1, 2, … and L +1, and L is a positive integer constant;
for output matrix FR2+1Fusing the conversion processing to obtain a loss judgment matrix F0;
According to preset lossesFunction, to loss judgment matrix F0And performing loss judgment processing to obtain a binary image corresponding to the defect information.
3. The method for detecting screen defects according to claim 2, wherein the loss judgment matrix F is determined according to a preset loss function0Performing loss judgment processing to obtain a binary image corresponding to the defect information, wherein the step of obtaining the binary image comprises the following steps:
judging the loss matrix F0Substituting any element value into a preset loss function to obtain a loss value corresponding to the element value;
judging whether the loss value is larger than a preset loss threshold value or not;
if the loss value is larger than the loss threshold value, determining the element corresponding to the element value as a defect;
and if the loss value is smaller than the loss threshold value, determining the element corresponding to the element value as qualified.
4. The method of claim 2, wherein the loss function comprises:
wherein A is0Is analyzing the lateral pixel values of the image, B0Is analyzing the longitudinal pixel value of the image, AxIs a loss judgment matrix F0Abscissa of the element(s), ByIs a loss judgment matrix F0Element ordinate of (1), PG(Ax,By)Is represented by (A)x,By) Value of element(s), Ps(Ax,By)Is represented by (A)x,By) E is a loss value.
5. The method of claim 3, wherein the loss threshold comprises: 0.09.
6. the method for detecting the screen defect according to claim 1, wherein the step of shooting the positioning analysis image of the screen to be detected and performing defect positioning analysis processing on the positioning analysis image to obtain the defect positioning information comprises the steps of:
shooting a positioning analysis image of a screen to be detected;
dividing the positioning analysis image into (M + 1) × (N + 1) positioning sub-images according to a preset region division frame, wherein M is the number of longitudinal division lines, and N is the number of transverse division lines;
performing primary judgment processing on (M + 1) × (N + 1) positioning subimages, and screening out H positioning subimages with defects, wherein H is a positive integer not greater than (M + 1) × (N + 1);
and extracting the position data of the H positioning sub-images in the area division frame to obtain defect positioning information.
7. The method for detecting the screen defect according to claim 6, wherein the obtaining the accurate analysis image of the screen to be detected based on the defect positioning information comprises:
reading the size of the positioning sub-image to obtain X X Y pixel data, wherein X is a transverse pixel value of the positioning sub-image, Y is a longitudinal pixel value of the positioning sub-image, and X, Y is a positive integer;
reading values of transverse pixels from left to right in an order of [ X/2] -I to [ X/2] + I from the positioning sub-image, reading values of transverse pixels from top to bottom in an order of [ Y/2] -J to [ Y/2] + J from the positioning sub-image, and generating an accurate analysis image, wherein I is a preset transverse acquisition value of a central pixel, J is a preset longitudinal acquisition value of the central pixel, [. gtoreq ] is a maximum integer not greater than, and I, J is a positive integer.
8. A device for detecting a screen defect, comprising:
the shooting module is used for shooting a positioning analysis image of the screen to be detected and carrying out defect positioning analysis processing on the positioning analysis image to obtain defect positioning information;
the acquisition module is used for acquiring an accurate analysis image of the screen to be detected based on the defect positioning information;
a reading module for reading the image size set by the preset analysis algorithm to obtain A0*B0Pixel data, and reading the image size of the accurate analysis image to obtain A1*B1Pixel data of A0Analyzing the lateral pixel values of the image for an algorithm, A1For accurate analysis of the lateral pixel values of the image, B0Longitudinal pixel values, B, of an image for algorithmic analysis1For accurate analysis of longitudinal pixel values of an image, A1、B1、A0、B0Is a positive integer;
a dividing module for dividing the precise analysis image into (A) in a horizontal average manner1/A0) Dividing the accurate analysis image into (B) by longitudinal average1/B0) Preparing;
a cropping module for cropping (A) based on the average horizontal segmentation and the average vertical segmentation of the exact image1/A0)*(B1/B0) Analyzing the image;
an analysis module for analyzing (A) according to the analysis algorithm1/A0)*(B1/B0) And analyzing the analysis image to obtain defect information.
9. A screen defect detecting apparatus, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the screen defect detection device to perform the screen defect detection method of any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for detecting a screen defect of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111416565.4A CN113838053B (en) | 2021-11-26 | 2021-11-26 | Screen defect detection method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111416565.4A CN113838053B (en) | 2021-11-26 | 2021-11-26 | Screen defect detection method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113838053A true CN113838053A (en) | 2021-12-24 |
CN113838053B CN113838053B (en) | 2022-03-15 |
Family
ID=78971398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111416565.4A Active CN113838053B (en) | 2021-11-26 | 2021-11-26 | Screen defect detection method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113838053B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090136121A1 (en) * | 2007-11-14 | 2009-05-28 | Ryo Nakagaki | Defect review method and apparatus |
CN108460757A (en) * | 2018-02-11 | 2018-08-28 | 深圳市鑫信腾科技有限公司 | A kind of mobile phone TFT-LCD screens Mura defects online automatic detection method |
CN111340752A (en) * | 2019-12-04 | 2020-06-26 | 京东方科技集团股份有限公司 | Screen detection method and device, electronic equipment and computer readable storage medium |
-
2021
- 2021-11-26 CN CN202111416565.4A patent/CN113838053B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090136121A1 (en) * | 2007-11-14 | 2009-05-28 | Ryo Nakagaki | Defect review method and apparatus |
CN108460757A (en) * | 2018-02-11 | 2018-08-28 | 深圳市鑫信腾科技有限公司 | A kind of mobile phone TFT-LCD screens Mura defects online automatic detection method |
CN111340752A (en) * | 2019-12-04 | 2020-06-26 | 京东方科技集团股份有限公司 | Screen detection method and device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113838053B (en) | 2022-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110570435B (en) | Method and device for carrying out damage segmentation on vehicle damage image | |
US11189019B2 (en) | Method for detecting defects, electronic device, and computer readable medium | |
CN112967341B (en) | Indoor visual positioning method, system, equipment and storage medium based on live-action image | |
CN111445459A (en) | Image defect detection method and system based on depth twin network | |
CN113205511B (en) | Electronic component batch information detection method and system based on deep neural network | |
CN111582093A (en) | Automatic small target detection method in high-resolution image based on computer vision and deep learning | |
CN114998314B (en) | PCB defect detection method based on computer vision | |
CN112669275A (en) | PCB surface defect detection method and device based on YOLOv3 algorithm | |
CN106156777A (en) | Textual image detection method and device | |
CN113706472B (en) | Highway pavement disease detection method, device, equipment and storage medium | |
CN110599453A (en) | Panel defect detection method and device based on image fusion and equipment terminal | |
CN114049499A (en) | Target object detection method, apparatus and storage medium for continuous contour | |
CN110827312A (en) | Learning method based on cooperative visual attention neural network | |
CN108664970A (en) | A kind of fast target detection method, electronic equipment, storage medium and system | |
CN109685030A (en) | A kind of mug rim of a cup defects detection classification method based on convolutional neural networks | |
CN112785572A (en) | Image quality evaluation method, device and computer readable storage medium | |
CN111612681A (en) | Data acquisition method, watermark identification method, watermark removal method and device | |
CN113962917A (en) | Data enhancement method based on mask | |
CN113838053B (en) | Screen defect detection method, device, equipment and storage medium | |
CN117218633A (en) | Article detection method, device, equipment and storage medium | |
CN116433550A (en) | Similar image de-duplication method in pipeline, computer device and storage medium | |
CN116433978A (en) | Automatic generation and automatic labeling method and device for high-quality flaw image | |
CN109035306A (en) | Moving-target automatic testing method and device | |
CN113409375B (en) | Image processing method, image processing apparatus, and non-volatile storage medium | |
CN113139496A (en) | Pedestrian re-identification method and system based on time sequence multi-scale fusion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |