CN110298825A - Light guide plate black spot defect detection method - Google Patents
Light guide plate black spot defect detection method Download PDFInfo
- Publication number
- CN110298825A CN110298825A CN201910521469.2A CN201910521469A CN110298825A CN 110298825 A CN110298825 A CN 110298825A CN 201910521469 A CN201910521469 A CN 201910521469A CN 110298825 A CN110298825 A CN 110298825A
- Authority
- CN
- China
- Prior art keywords
- image
- region
- execute step
- light guide
- guide plate
- 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
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration by the use of local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- 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
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/95—Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
- G01N2021/9511—Optical elements other than lenses, e.g. mirrors
-
- 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/20024—Filtering details
- G06T2207/20032—Median filtering
Abstract
The present invention provides a kind of light guide plate black spot defect detection method, to light guide plate carry out gray scale closed operation, convolution, expansion of gradation, ask minimum rectangle, mean filter and Local standard deviation filtering etc., light guide plate self-adapting detecting method complexity proposed by the present invention is relatively low, can be realized to the automatic Detection and Extraction of light guide plate stain.The experimental results showed that the detection accuracy and detection efficiency of the algorithm are higher, stability and robustness are stronger, can be measured in real time to black dull point, and detection accuracy meets enterprise requirements, is able to carry out practical engineering application.
Description
Technical field
The present invention relates to production detection technique field and computer vision fields, and in particular to a kind of light guide plate black spot defect
Detection method.
Background technique
Light guide plate (LightGuide Plate, LGP), main material are optics acrylic board, and chemical name is methyl
Methacrylate, is the acryl plates using optical grade, and then using has high reflectivity and the not hitech materials of extinction,
It stamps light guiding points in the acryl plates bottom surface laser engraving, type cross grid engraving, screen printing technology of optical grade and forms.
The distinguishing features such as light guide plate has ultra-thin, superbright, guide-lighting uniform, energy-saving and environmental protection, durable, installation and maintenance are simple and fast, therefore quilt
It is widely used in the occasions such as liquid crystal display, advertising lamp, light, flat lamp illumination.In the silk-screen production of light guide plate, chemical etching, swash
During the manufacturings such as processing are processed and hit to light, since material composition, equipment service condition, processing technology and worker grasp
The influence of the factors such as work, inevitably bright spot, leak source, stain, wire side ink, line scratch, mirror point is hurt on surface,
The manufacturing deficiencies such as shadow.The presence of guide-lighting board defect will affect the use of relevant device, lead to the service efficiency of equipment, luminous
Uniformity and service life etc. can all be affected, in addition, the export trade of defective light guide plate can seriously damage the prestige of enterprise, to enterprise
The long term growth of industry causes great negative effect, therefore, carries out quality testing to the light guide plate of production, rejects inferior goods especially
It is important.
Currently, domestic light guide plate defects detection relies primarily on manual operation completion, but artificial detection limitation is obvious, disadvantage
It is numerous.Artificial detection has the disadvantage in that 1, causing to detect matter there are due to subjective judgement and long-time asthenopia
It measures unstable;2, high labor cost;3, large labor intensity;4, labor efficiency is low etc..For this purpose, it is directed to black spot defect therein,
It is proposed a kind of detection method.
Since the small difficulty of guide-lighting board defect is looked for, therefore in order to detect that the defects of light guide plate is needed by high-precision as far as possible
The area array cameras of degree carries out taking figure.Curvelet is converted at present, the methods of contourlet transformation and shearlet transformation quilt
It applies to the detection of light guide plate common deficiency to come up, but these algorithms are in detection accuracy and the related mark in detection duration apart from enterprise
Standard still has a certain distance.
Consequently, it is desirable to be improved to the prior art.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of efficient light guide plate black spot defect detection methods.
In order to solve the above technical problems, the present invention provides a kind of light guide plate black spot defect detection method: the following steps are included:
Step S1, light guide plate image A is read in;Execute step S2;
Step S2, image A does gray scale closed operation, obtains gray scale closed operation image B;Execute step S3;
Step S3, convolution is done to image B with the Gaussian derivative in the direction x, the direction y respectively, obtains convolved image C1, C2;It holds
Row step S4;
Step S4, image C1 and C2 is taken to do expansion of gradation with two tonal ranges, obtain four image D1A, D1B,
D2A, D2B;Execute step S5;
Step S5, straight line on image D1A, D1b, D2A, D2B is found using the partial derivative of Gaussian smoothing core as leading
The boundary of tabula rasa, is denoted as Left1, Right1, Bottom1, Top1 respectively;Execute step S6;
Step S6, Left1, Right1, Bottom1, Top1 are carried out respectively combining close outline of straight line, after obtaining processing
Boundary, be denoted as Left2, Right2, Bottom2, Top2 respectively;Execute step S7;
Step S7, the boundary after processing is screened using profile length feature, the boundary after being screened is denoted as
Left3, Right3,Bottom3,Top3;Execute step S8;
Step S8, then Left3, Right3, Bottom3, Top3 are merged, obtained from area type is converted to
Joint boundary region a;Execute step S9;
Step S9, the minimum rectangle for seeking joint boundary region a is denoted as ROI region b;Execute step S10;
Step S10, it after image A carries out mean filter, then is covered respectively with the standard deviation of the standard deviation mask of 11*3 and 3*11
Mould does Local standard deviation filtering, obtains standard difference image E1 and E2;Execute step S11;
Step S11, the gray value of the respective pixel point of standard of comparison difference image E1 and E2 takes the maximum value of the two, obtains
Maximum value image F;Execute step S12;
Step S12, image F does mean filter, obtains mean value image G;Execute step S13;
Step S13, image F and image G are divided by, and obtain the image H that is divided by;Execute step S14;
Step S14, image H does median filtering, obtains median image I;Execute step S15;
Step S15, gray scale closed operation is done to image I using octagonal structural element, obtains gray scale closed operation image J;It holds
Row step S16;
Step S16, image K corresponding to ROI region b is cut out in image J;Execute step S17;
Step S17, image K is carried out Threshold segmentation and is connected to processing to obtain doubtful stain region c;Execute step S18;
Step S18, expansion process is carried out to doubtful stain region c using circular configuration element, obtains expansion area d;It holds
Row step S19;
Step S19, it is poor to make expansion area d and doubtful stain region c, obtains making poor region e;Execute step S20;
Step S20, the gray average Mean of doubtful stain region c corresponding position in image A is calculated;Execute step S21;
Step S21, the gray average Surrounding_Mean for making poor region e corresponding position in image A is calculated;Execute step
Rapid S22;
Step S22, Surrounding_Mean and Mean is carried out after making difference with artificial defined gray scale difference value Mean_Diff
Compare, remain larger than the doubtful stain region of gray scale difference value Mean_Diff, is denoted as screening stain region f for the first time;Execute step
S23;
Step S23, expansion of gradation is carried out to image A, be expanded image L;Execute step S24;
Step S24, Threshold segmentation is carried out to expanded images L, and takes intersection with ROI region b, then do connection processing, obtained
New doubtful stain region g;Execute step S25;
Step S25, new doubtful stain region g is screened using two features of area and eccentricity, obtains second
Secondary screening stain region h;Execute step S26;
Step S26, screening stain region f and programmed screening region h is merged for the first time, obtains total doubtful stain
Region i;Execute step S27;
Step S27, co-occurrence matrix is sought to region i corresponding position in image A;Execute step S28;
Step S28, the consistency Energy in co-occurrence matrix is compared with defined Energy_Threshold, is retained
Energy parameter is less than the region of Energy_Threshold, i.e. determining stain region j;Execute step S29;
Screen formula: sgn (Energy-Energy_Threshold)
Energy_Threshold is consistency threshold value;
Step S29, the minimum rectangular area of stain region j is sought, and carries out expansive working with rectangular configuration element, obtains square
Shape region k;Execute step S30;
Step S30, it is poor to make rectangular area k and stain region j, obtains stain peripheral region l;Execute step S31;
Step S31, stain region j and stain peripheral region l are shown in image A, obtain final image.
As the improvement to light guide plate black spot defect detection method of the present invention:
The gray scale closed operation of step 2 and step S15 are as follows:
Gray scale closed operation formula:
In formula, A is input picture, and B is rectangular configuration element, and AB indicates to carry out closed operation to A using B,
It indicates to carry out dilation operation to A using using B,It indicates to carry out corrosion fortune to A using using B
It calculates, closed operation is actually that A is first expanded by B, the result then corroded again by B.
As the further improvement to light guide plate black spot defect detection method of the present invention:
Two tonal ranges respectively (- 4,0) and (0,4) in step S4,
Expansion of gradation formula: f*(x, y)=f (x, y) * Mult+Add
Wherein
G in formulamaxAnd GminIt is gray value coboundary and lower boundary respectively;Mult indicates tonal range Adaptation factor, Add table
Show tonal range adaptive value.
As the further improvement to light guide plate black spot defect detection method of the present invention:
If the upper no straight line of image D1A, D1b, D2A, D2B in step S5, using image border as the side of light guide plate
Boundary.
As the further improvement to light guide plate black spot defect detection method of the present invention:
Being divided by for step S13 operates formula: g '=g1/g2*Mult2+Add2
Wherein, g1 indicates to be removed the gray value of image, and g2 indicates to remove the gray value of image, and Mult2 indicates that tonal range is suitable
The factor is answered, Add2 indicates tonal range adaptive value;G ' indicates the gray value of image H of being divided by.
As the further improvement to light guide plate black spot defect detection method of the present invention:
The Threshold segmentation of step S17 and step S24 are to be separated by maximum kind differences method: maximum kind differences method formula:
T=Max [θi1(t)×(ρi1(t)-ρ)2+θi2(t)×(ρi2(t)-ρ)2]
θ in formulai1It (t) is background parts ratio, θi2It (t) is foreground part ratio, ρi1It (t) is background parts mean value, ρi2
It (t) is foreground part mean value, ρ is light guide plate real image mean value, and t is the threshold value divided.
As the further improvement to light guide plate black spot defect detection method of the present invention:
The expansion of gradation of step S23 are as follows: expand to the tonal range of image A from (2*Mean/3,3*Mean/4) (0,
255)。
As the further improvement to light guide plate black spot defect detection method of the present invention:
Step S27, co-occurrence matrix is sought to region i corresponding position in image A;Execute step S28;
Co-occurrence matrix parameter:
The public affairs of consistency Energy, correlation Correlation, homogeney Homogeneity and contrast C ontrast
Formula is as follows:
Image with K gray level, corresponding gray level co-occurrence matrixes size are K*K
In formula: pij=gij/ n, n are to meet the pixel of Q to sum;I represents the line index of gray level co-occurrence matrixes;J represents ash
Spend the column index of co-occurrence matrix;gijRepresent the value of the position of the i-th row of gray level co-occurrence matrixes, jth column;pijRepresent gray scale symbiosis square
The probability value of the position of the i-th row of battle array, jth column, that is, the value of the position of the i-th row of gray level co-occurrence matrixes, jth column after normalizing;
mr、mc、σr、σcFormula it is as follows:
In formula: mrRepresent the mean value that the gray level co-occurrence matrixes row after normalization calculates;mcRepresent the gray scale after normalization
The mean value of co-occurrence matrix column count;σrRepresent the standard deviation that the gray level co-occurrence matrixes row after normalization calculates;σcIt represents along normalizing
The standard deviation of gray level co-occurrence matrixes column count after change.
The technical advantage of light guide plate black spot defect detection method of the present invention are as follows:
Other opposite detection methods, light guide plate self-adapting detecting method complexity proposed by the present invention is relatively low, can
It realizes to the automatic Detection and Extraction of light guide plate stain.The experimental results showed that the detection accuracy and detection efficiency of the algorithm are higher, stablize
Property and robustness are stronger, can be measured in real time, and detection accuracy meets enterprise requirements to black dull point, be able to carry out reality
Engineer application.
Specific advantage:
1, the present invention need to only carry out suitable parameter regulation in practical application, remaining is able to achieve full-automatic detection;
2, the present invention is adaptable to illumination variation and light guide plate Change of types;
3, the stability and robustness of inventive algorithm are stronger, system it is easy to maintain;
4, stain region is differently repeatedly monitored and screened, erroneous detection and missing inspection, algorithm high reliablity are avoided.
Detailed description of the invention
Specific embodiments of the present invention will be described in further detail with reference to the accompanying drawing.
Fig. 1 is the flow chart of light guide plate black spot defect detection method of the present invention;
Fig. 2 is final result figure in step S31;
Fig. 3 is the figure without light guide plate up-and-down boundary;
Fig. 4 is the figure containing only light guide plate coboundary;
Fig. 5 is the figure containing only light guide plate lower boundary;
Fig. 6 is the light guide plate original image A read in step S1;
Fig. 7 is gray scale closed operation result figure B in step S2;
Fig. 8 is convolution results figure C1 in step S3;
Fig. 9 is convolution results figure C2 in step S3;
Figure 10 is expansion of gradation result figure D1A in step S4 --- contain left margin;
Figure 11 is expansion of gradation result figure D1B in step S4 --- contain right margin;
Figure 12 is expansion of gradation result figure D2A in step S4 --- be free of lower boundary;
Figure 13 is expansion of gradation result figure D2B in step S4 --- be free of coboundary;
Figure 14 is left margin Left1 profile results figure in step S5;
Figure 15 is right margin Right1 profile results figure in step S5;
Figure 16 is left margin Left2 profile results figure in step S6;
Figure 17 is right margin Right2 profile results figure in step S6;
Figure 18 is left margin Left3 profile results figure in step S7;
Figure 19 is right margin Right3 profile results figure in step S7;
Figure 20 is joint boundary region a result figure in step S8;
Figure 21 is ROI region b result figure in step S9;
Figure 22 is step S10 Plays difference result figure E1;
Figure 23 is step S10 Plays difference result figure E2;
Figure 24 is maximum value result figure F in step S11;
Figure 25 is mean-max result figure G in step S12;
Figure 26 is division result figure H in step S13;
Figure 27 is median result figure I in step S14;
Figure 28 is gray scale closed operation result figure J in step S15;
Figure 29 is ROI result figure K in step S16;
Figure 30 is doubtful stain region c result figure in step S17 (on ROI image K);
Figure 31 is doubtful stain region c partial enlarged view in step S17;
Figure 32 is expansion area d result figure in step S18 (on ROI image K);
Figure 33 is expansion area d partial enlarged view in step S18;
Figure 34 is to make poor region e result figure in step S19 (on ROI image K);
Figure 35 is to make poor region e partial enlarged view in step S19;
Figure 36 is to screen stain region f result figure for the first time in step S22;
Figure 37 is spreading result figure L in step S23;
Figure 38 is doubtful stain region g result figure (display area) new in step S24;
Figure 39 is programmed screening stain region h result figure (display area) in step S25;
Figure 40 is doubtful stain region i result figure (display area) total in step S26;
Figure 41 is doubtful stain region i partial enlarged view total in step S26;
Figure 42 is the stain region j result figure determined in step S28;
Figure 43 is rectangular area k result figure (display area) in step S29;
Figure 44 is rectangular area k partial enlarged view in step S29.
Specific embodiment
The present invention is described further combined with specific embodiments below, but protection scope of the present invention is not limited in
This.
Embodiment 1, light guide plate black spot defect detection method, picture 1-4 shown in 4, comprising the following steps:
Step S1, light guide plate image A is read in;Execute step S2;
Step S2, image A does gray scale closed operation, obtains gray scale closed operation image B;Execute step S3;
Gray scale closed operation effect: it is smaller to details bright in image and background relative effect, but weaken dark feature.Image
Middle stain region just belongs to dark feature;
Gray scale closed operation formula:
In formula, A is input picture, and B is rectangular configuration element, and AB indicates to carry out closed operation to A using B,
It indicates to carry out dilation operation to A using using B,It indicates to carry out corrosion fortune to A using using B
It calculates, closed operation is actually that A is first expanded by B, the result then corroded again by B;
Step S3, convolution is done to image B with the Gaussian derivative in the direction x, the direction y respectively, obtains convolved image C1, C2;It holds
Row step S4;
The effect of Gaussian derivative convolution: the Gaussian derivative convolution in the direction x can embody lateral image gradient variation, the direction y
Gaussian derivative convolution can embody longitudinal image gradient variation.In image left margin and right margin be transverse gradients variation compared with
General goal, x directional image is first from bright dimmed, so concealed wire is presented in left margin, then from secretly brightening, so bright line, figure is presented in right margin
Lower boundary and coboundary are longitudinal change of gradient larger parts as in, and bright line is presented in lower boundary, and concealed wire is presented in coboundary;
The Gaussian derivative formula in the direction x:
The Gaussian derivative formula in the direction y:
Wherein g (x, y) is Gaussian function;
Step S4, the tonal range for taking image C1 and C2 different does expansion of gradation, obtain four different image D1A,
D1B, D2A,D2B;Execute step S5;
Expansion of gradation effect: the contrast of bright dark-part in enhancing image.Two ashes are selected respectively herein for image C1
Degree range is extended, and respectively obtains D1A and D1B, the concealed wire of left margin is highlighted in D1A, and the bright line of right margin is dashed forward in D1B
Out, D2A and D2B is also similarly, to highlight boundary;
Image concealed wire part gray value after convolution in -6~-4 ranges, bright line part gray value in 4~6 ranges,
Rest part gray value in -1~1 range, so, choose that (- 4,0) range, which is expanded to (0,255), so that concealed wire is become
Darker, the other parts for removing concealed wire become brighter, enhance concealed wire and remove the contrast of the other parts of concealed wire;It chooses
(0,4) range, which is expanded to (0,255), can make bright line become brighter, and the other parts for removing bright line become darker, enhance
The contrast of the other parts of bright line and removing bright line.
Expansion of gradation formula: f*(x, y)=f (x, y) * Mult+Add
Wherein
G in formulamaxAnd GminIt is gray value coboundary and lower boundary respectively;Mult indicates tonal range Adaptation factor, Add table
Show tonal range adaptive value;
Step S5, the straight line on image D1A, D1b, D2A, D2B, image are found using the partial derivative of Gaussian smoothing core
It is the left margin of light guide plate on D1A, is the right margin of light guide plate on image D1B, is lower boundary (this of light guide plate on image D2A
There is no straight line in the light guide plate image A of secondary embodiment, directly using the lower edge of image D2A as the lower boundary of light guide plate), image
D2B is that the coboundary of light guide plate (is not had straight line this time, directly made with the top edge of image D2B in the light guide plate image A of embodiment
For the coboundary of light guide plate), the straight line of extraction is XLD type, is denoted as Left1, Right1, Bottom1, Top1 respectively;It holds
Row step S6;
Step S6, the operation for combining close outline of straight line is carried out respectively to each group boundary, the boundary that obtains that treated, respectively
It is denoted as Left2, Right2, Bottom2, Top2;Execute step S7;
Combine close outline of straight line effect: coupling is some from the line obtained closely, or some broken strings is made to be connected;
Step S7, the boundary after processing is screened using profile length feature, removes especially short profile, obtains
Boundary after screening, is denoted as Left3, Right3, Bottom3, Top3;Execute step S8;
Step S8, the boundary after the screening of above-mentioned each group is converted into area type from XLD type, then merges, obtains
To joint boundary region a;Execute step S9;
XLD type, which is converted to area type, can be used the progress of the image processing softwares such as OpenCV or Halcon.
Step S9, the minimum rectangle for seeking joint boundary region a obtains light guide plate region, is denoted as ROI region b;It executes
Step S10;
Step S10, it after image A carries out mean filter, then is covered respectively with the standard deviation of the standard deviation mask of 11*3 and 3*11
Mould does Local standard deviation filtering, obtains standard difference image E1 and E2;Execute step S11;
Local standard deviation filter action: retain image edge information while suppressing noise;
Local standard deviation filters mechanism: moving a fixed mask in the picture, calculates each pixel in mask
Local standard deviation is allowed to the output as filter then by determining the corresponding pixel of minimum local standard deviation;
Step S11, the gray value of the respective pixel point of movement images E1 and E2 takes the maximum value of the two, obtains maximum value
Image F;Execute step S12;
It is maximized operation effect: more protruding bright part;
Step S12, image F does mean filter, obtains mean value image G;Execute step S13;
Mean filter effect: smoothed image eliminates noise;
Mean filter mechanism: moving a fixed mask in the picture, calculates the mean value of each pixel in mask, is allowed to
Output as filter;
Step S13, image F and image G are divided by, and obtain the image H that is divided by;Execute step S14;
Operation of being divided by effect: more projecting edge;
It is divided by and operates formula: g '=g1/g2*Mult2+Add2
Wherein, g1 indicates to be removed the gray value of image F, and g2 indicates to remove the gray value of image G, and Mult2 indicates tonal range
Adaptation factor, Add2 indicate tonal range adaptive value;G ' indicates the gray value of image H of being divided by.
Step S14, image H does median filtering, obtains median image I;Execute step S15;
Median filtering effect: smoothed image removes noise, Protect edge information information;
Median filtering mechanism: moving a fixed mask in the picture, calculates the median of each pixel in mask, makes
The output as filter;
Step S15, gray scale closed operation is done to image I using octagonal structural element (octagon), obtains gray scale and closes fortune
Nomogram is as J;Execute step S16;
The method of gray scale closed operation is identical as step S2;
Step S16, image K corresponding to ROI region b is cut out in image J;Execute step S17;
Step S17, image K is carried out Threshold segmentation and is connected to processing by maximum kind differences method to obtain doubtful stain region
c;Execute step S18;
Maximum kind differences method effect: so that the probability of Threshold segmentation mistake point substantially reduces;
Maximum kind differences method formula: t=Max [θi1(t)×(ρi1(t)-ρ)2+θi2(t)×(ρi2(t)-ρ)2]
θ in formulai1It (t) is background parts ratio, θi2It (t) is foreground part ratio, ρi1It (t) is background parts mean value, ρi2
It (t) is foreground part mean value, ρ is light guide plate real image mean value, and t is the threshold value divided.
Step S18, expansion process is carried out to doubtful stain region c using circular configuration element, obtains expansion area d;It holds
Row step S19;
Step S19, it is poor to make expansion area d and doubtful stain region c, obtains making poor region e;Execute step S20;
Step S20, the gray average Mean of doubtful stain region c corresponding position in image A is calculated;Execute step S21;
Step S21, the gray average Surrounding_Mean for making poor region e corresponding position in image A is calculated;Execute step
Rapid S22;
Step S22, Surrounding_Mean and Mean is compared after making difference with defined Mean_Diff, is retained big
In the doubtful stain region of Mean_Diff, it is denoted as screening stain region f for the first time;Execute step S23;
Screen formula: sgn ((Surrounding_Mean-Mean)-Mean_Diff)
Mean_Diff is artificial defined gray scale difference value;
Screening effect: stain region and peripheral region have larger difference in gray scale, confirm gray scale difference with this formula
Different big region, retention are equal to 1 region;
Step S23, the tonal range of image A is (2*Mean/3,3*Mean/4), carries out expansion of gradation to image A, will be grey
It spends range and expands to (0,255) from (2*Mean/3,3*Mean/4), be expanded image L;Execute step S24;
Expansion of gradation effect: the contrast of bright dark-part in enhancing image.Stain region is made to become darker herein, and its
His region becomes brighter;
Step S24, Threshold segmentation (identical as step S17) is carried out to expanded images L, and takes intersection with ROI region b, then
Connection processing is done, new doubtful stain region g is obtained;Execute step S25;
Step S25, new doubtful stain region g is carried out using two features of area (referring to pixel number) and eccentricity
Screening, obtains programmed screening stain region h;Execute step S26;
Eccentricity formula:
Wherein, RaRepresent oval major semiaxis, RbRepresent oval semi-minor axis;AsFor eccentricity.
Step S26, screening stain region f and programmed screening region h is merged for the first time, obtains total doubtful stain
Region i;Execute step S27;
Step S27, co-occurrence matrix is sought to region i corresponding position in image A;Execute step S28;
Co-occurrence matrix effect: reflect texture with conditional probability, be the performance of the Gray Correlation of adjacent pixel;
Co-occurrence matrix parameter:
1, consistency (also referred to as energy) Energy: codomain is the consistency metric of [0,1].For constant image, unanimously
Property is 1;
2, Correlation: one pixel of correlation measurement with its neighbours' degree of correlation on the entire image.Codomain is
[1, -1] is positively correlated and perfect negative correlation corresponding to perfect.If an arbitrary standard deviation is 0, the measurement is without fixed
Justice;
3, homogeney Homogeneity: the measurement for the space tightness that element diagonal line is distributed in co-occurrence matrix G.Codomain
For [0,1], when G is diagonal matrix, value is maximum;
4, ontrast: one pixel of contrast C measurement with its backfence intensity contrast on the entire image.Codomain
(K-1) ^2 is arrived for 0, K represents the gray level of image herein, and K often takes 256;
Formula is as follows: such as one image with K gray level, and corresponding gray level co-occurrence matrixes size is K*K
In formula: pij=gij/ n, n are to meet the pixel of Q to sum;I represents the line index of gray level co-occurrence matrixes;J represents ash
Spend the column index of co-occurrence matrix;gijRepresent the value of the position of the i-th row of gray level co-occurrence matrixes, jth column;pijRepresent gray scale symbiosis square
The probability value of the position of the i-th row of battle array, jth column, that is, the value of the position of the i-th row of gray level co-occurrence matrixes, jth column after normalizing;
mr、mc、σr、σcFormula it is as follows:
In formula: mrRepresent the mean value that the gray level co-occurrence matrixes row after normalization calculates;mcRepresent the gray scale after normalization
The mean value of co-occurrence matrix column count;σrRepresent the standard deviation that the gray level co-occurrence matrixes row after normalization calculates;σcIt represents along normalizing
The standard deviation of gray level co-occurrence matrixes column count after change.
Step S28, the Energy parameter in co-occurrence matrix is compared with defined Energy_Threshold, is retained
Energy parameter is less than the region of Energy_Threshold, i.e. determining stain region j;Execute step S29;
Screen formula: sgn (Energy-Energy_Threshold)
Energy_Threshold is an artificial defined consistency threshold value;
Screening effect: the consistency in stain region is smaller, and stain region is determined using this formula, and retention is equal to -1
Region;
Step S29, the minimum rectangular area of stain region j is sought, and carries out expansive working with rectangular configuration element, obtains square
Shape region k;Execute step S30;
Step S30, it is poor to make rectangular area k and stain region j, obtains stain peripheral region l;Execute step S31;
Step S31, stain region j and stain peripheral region l are shown in image A, obtain final image.
The above list is only a few specific embodiments of the present invention for finally, it should also be noted that.Obviously, this hair
Bright to be not limited to above embodiments, acceptable there are many deformations.Those skilled in the art can be from present disclosure
All deformations for directly exporting or associating, are considered as protection scope of the present invention.
Claims (8)
1. light guide plate black spot defect detection method, it is characterised in that: the following steps are included:
Step S1, light guide plate image A is read in;Execute step S2;
Step S2, image A does gray scale closed operation, obtains gray scale closed operation image B;Execute step S3;
Step S3, convolution is done to image B with the Gaussian derivative in the direction x, the direction y respectively, obtains convolved image C1, C2;Execute step
Rapid S4;
Step S4, image C1 and C2 is taken to do expansion of gradation with two tonal ranges, obtain four image D1A, D1B, D2A,
D2B;Execute step S5;
Step S5, the straight line on image D1A, D1b, D2A, D2B is found using the partial derivative of Gaussian smoothing core as light guide plate
Boundary, be denoted as Left1, Right1, Bottom1, Top1 respectively;Execute step S6;
Step S6, Left1, Right1, Bottom1, Top1 are carried out respectively combining close outline of straight line, the side that obtains that treated
Boundary is denoted as Left2, Right2, Bottom2, Top2 respectively;Execute step S7;
Step S7, the boundary after processing is screened using profile length feature, the boundary after being screened is denoted as
Left3,Right3,Bottom3,Top3;Execute step S8;
Step S8, then Left3, Right3, Bottom3, Top3 are merged, combined from area type is converted to
Borderline region a;Execute step S9;
Step S9, the minimum rectangle for seeking joint boundary region a is denoted as ROI region b;Execute step S10;
Step S10, it after image A carries out mean filter, then is made respectively of the standard deviation mask of the standard deviation mask of 11*3 and 3*11
Local standard deviation filtering, obtains standard difference image E1 and E2;Execute step S11;
Step S11, the gray value of the respective pixel point of standard of comparison difference image E1 and E2 takes the maximum value of the two, obtains maximum
It is worth image F;Execute step S12;
Step S12, image F does mean filter, obtains mean value image G;Execute step S13;
Step S13, image F and image G are divided by, and obtain the image H that is divided by;Execute step S14;
Step S14, image H does median filtering, obtains median image I;Execute step S15;
Step S15, gray scale closed operation is done to image I using octagonal structural element, obtains gray scale closed operation image J;Execute step
Rapid S16;
Step S16, image K corresponding to ROI region b is cut out in image J;Execute step S17;
Step S17, image K is carried out Threshold segmentation and is connected to processing to obtain doubtful stain region c;Execute step S18;
Step S18, expansion process is carried out to doubtful stain region c using circular configuration element, obtains expansion area d;Execute step
Rapid S19;
Step S19, it is poor to make expansion area d and doubtful stain region c, obtains making poor region e;Execute step S20;
Step S20, the gray average Mean of doubtful stain region c corresponding position in image A is calculated;Execute step S21;
Step S21, the gray average Surrounding_Mean for making poor region e corresponding position in image A is calculated;Execute step
S22;
Step S22, Surrounding_Mean and Mean is compared after making difference with artificial defined gray scale difference value Mean_Diff
Compared with, remain larger than the doubtful stain region of gray scale difference value Mean_Diff, be denoted as the first time screening stain region f;Execute step
S23;
Step S23, expansion of gradation is carried out to image A, be expanded image L;Execute step S24;
Step S24, Threshold segmentation is carried out to expanded images L, and takes intersection with ROI region b, then do connection processing, obtained new
Doubtful stain region g;Execute step S25;
Step S25, new doubtful stain region g is screened using two features of area and eccentricity, obtains second of sieve
Select stain region h;Execute step S26;
Step S26, screening stain region f and programmed screening region h is merged for the first time, obtains total doubtful stain region
i;Execute step S27;
Step S27, co-occurrence matrix is sought to region i corresponding position in image A;Execute step S28;
Step S28, the consistency Energy in co-occurrence matrix is compared with defined Energy_Threshold, is retained
Energy parameter is less than the region of Energy_Threshold, i.e. determining stain region j;Execute step S29;
Screen formula: sgn (Energy-Energy_Threshold)
Energy_Threshold is consistency threshold value;
Step S29, the minimum rectangular area of stain region j is sought, and carries out expansive working with rectangular configuration element, obtains rectangle region
Domain k;Execute step S30;
Step S30, it is poor to make rectangular area k and stain region j, obtains stain peripheral region I;Execute step S31;
Step S31, stain region j and stain peripheral region I are shown in image A, obtain final image.
2. light guide plate black spot defect detection method according to claim 1, it is characterised in that:
The gray scale closed operation of step 2 and step S15 are as follows:
Gray scale closed operation formula:
In formula, A is input picture, and B is rectangular configuration element, and AB indicates to carry out closed operation to A using B,
It indicates to carry out dilation operation to A using using B,It indicates to carry out erosion operation to A using using B, closes fortune
Calculating is actually that A is first expanded by B, the result then corroded again by B.
3. light guide plate black spot defect detection method according to claim 2, it is characterised in that:
Two tonal ranges respectively (- 4,0) and (0,4) in step S4,
Expansion of gradation formula: f*(x, y)=f (x, y) * Mult+Add
Wherein
G in formulamaxAnd GminIt is gray value coboundary and lower boundary respectively;Mult indicates that tonal range Adaptation factor, Add indicate ash
Spend range adaptive value.
4. light guide plate black spot defect detection method according to claim 3, it is characterised in that:
If the upper no straight line of image D1A, D1b, D2A, D2B in step S5, using image border as the boundary of light guide plate.
5. light guide plate black spot defect detection method according to claim 4, it is characterised in that:
Being divided by for step S13 operates formula: g '=g1/g2*Mult2+Add2
Wherein, g1 indicate by remove image gray value, g2 indicate remove image gray value, Mult2 indicate tonal range adapt to because
Son, Add2 indicate tonal range adaptive value;G ' expression is divided by the gray value of image H.
6. light guide plate black spot defect detection method according to claim 5, it is characterised in that:
The Threshold segmentation of step S17 and step S24 are to be separated by maximum kind differences method: maximum kind differences method formula:
T=Max [θi1(t)×(ρi1(t)-ρ)2+θi2(t)×(ρi2(t)-ρ)2]
θ in formulai1It (t) is background parts ratio, θi2It (t) is foreground part ratio, ρi1It (t) is background parts mean value, ρi2(t) it is
Foreground part mean value, ρ are light guide plate real image mean value, and t is the threshold value divided.
7. light guide plate black spot defect detection method according to claim 6, it is characterised in that:
The expansion of gradation of step S23 are as follows: the tonal range of image A is expanded into (0,255) from (2*Mean/3,3*Mean/4).
8. light guide plate black spot defect detection method according to claim 7, it is characterised in that:
Step S27, co-occurrence matrix is sought to region i corresponding position in image A;Execute step S28;
Co-occurrence matrix parameter:
Consistency Energy, correlation Correlation, homogeney Homogeneity and contrast C ontrast formula such as
Under:
Image with K gray level, corresponding gray level co-occurrence matrixes size are K*K
In formula: pij=gij/ n, n are to meet the pixel of Q to sum;I represents the line index of gray level co-occurrence matrixes;It is total that j represents gray scale
Raw matrix column index;gijRepresent the value of the position of the i-th row of gray level co-occurrence matrixes, jth column;pijRepresent gray level co-occurrence matrixes i-th
The probability value of the position of row, jth column, that is, the value of the position of the i-th row of gray level co-occurrence matrixes, jth column after normalizing;
mr、mc、σr、σcFormula it is as follows:
In formula: mrRepresent the mean value that the gray level co-occurrence matrixes row after normalization calculates;mcRepresent the gray scale symbiosis after normalization
The mean value of matrix column count;σrRepresent the standard deviation that the gray level co-occurrence matrixes row after normalization calculates;σcIt represents after normalization
Gray level co-occurrence matrixes column count standard deviation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910521469.2A CN110298825B (en) | 2019-06-17 | 2019-06-17 | Method for detecting black spot defect of light guide plate |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910521469.2A CN110298825B (en) | 2019-06-17 | 2019-06-17 | Method for detecting black spot defect of light guide plate |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110298825A true CN110298825A (en) | 2019-10-01 |
CN110298825B CN110298825B (en) | 2021-07-02 |
Family
ID=68028121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910521469.2A Active CN110298825B (en) | 2019-06-17 | 2019-06-17 | Method for detecting black spot defect of light guide plate |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110298825B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766675A (en) * | 2019-10-22 | 2020-02-07 | 孟帅帅 | Solar cell panel defect detection method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080315890A1 (en) * | 2007-06-20 | 2008-12-25 | Naruhiko Kasai | Image Display Device |
US8743215B1 (en) * | 2012-12-13 | 2014-06-03 | Lg Display Co., Ltd. | Mura detection apparatus and method of display device |
CN104931233A (en) * | 2015-07-03 | 2015-09-23 | 东莞市彤光电子科技有限公司 | Light guide plate detection apparatus |
CN108107491A (en) * | 2017-11-29 | 2018-06-01 | 宁波激智科技股份有限公司 | A kind of optical film of anti-moisture absorption |
CN108303429A (en) * | 2018-01-12 | 2018-07-20 | 嵊州市东浩电子科技有限公司 | It is a kind of leaded light board defect automatically detection and sorting device |
CN108346141A (en) * | 2018-01-11 | 2018-07-31 | 浙江理工大学 | Unilateral side incidence type light guide plate defect extracting method |
CN108876768A (en) * | 2018-05-30 | 2018-11-23 | 杭州舜浩科技有限公司 | Light guide plate shadow defect inspection method |
CN109064439A (en) * | 2018-06-15 | 2018-12-21 | 杭州舜浩科技有限公司 | Single-sided illumination formula light guide plate shadow defect extracting method based on subregion |
-
2019
- 2019-06-17 CN CN201910521469.2A patent/CN110298825B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080315890A1 (en) * | 2007-06-20 | 2008-12-25 | Naruhiko Kasai | Image Display Device |
US8743215B1 (en) * | 2012-12-13 | 2014-06-03 | Lg Display Co., Ltd. | Mura detection apparatus and method of display device |
CN104931233A (en) * | 2015-07-03 | 2015-09-23 | 东莞市彤光电子科技有限公司 | Light guide plate detection apparatus |
CN108107491A (en) * | 2017-11-29 | 2018-06-01 | 宁波激智科技股份有限公司 | A kind of optical film of anti-moisture absorption |
CN108346141A (en) * | 2018-01-11 | 2018-07-31 | 浙江理工大学 | Unilateral side incidence type light guide plate defect extracting method |
CN108303429A (en) * | 2018-01-12 | 2018-07-20 | 嵊州市东浩电子科技有限公司 | It is a kind of leaded light board defect automatically detection and sorting device |
CN108876768A (en) * | 2018-05-30 | 2018-11-23 | 杭州舜浩科技有限公司 | Light guide plate shadow defect inspection method |
CN109064439A (en) * | 2018-06-15 | 2018-12-21 | 杭州舜浩科技有限公司 | Single-sided illumination formula light guide plate shadow defect extracting method based on subregion |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766675A (en) * | 2019-10-22 | 2020-02-07 | 孟帅帅 | Solar cell panel defect detection method |
CN110766675B (en) * | 2019-10-22 | 2020-07-10 | 科士恩科技(上海)有限公司 | Solar cell panel defect detection method |
Also Published As
Publication number | Publication date |
---|---|
CN110298825B (en) | 2021-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104749184B (en) | Automatic optical detection method and system | |
CN105894036B (en) | A kind of characteristics of image template matching method applied to mobile phone screen defects detection | |
CN110018167B (en) | Method and system for rapidly detecting appearance defects of curved screen | |
Rahaman et al. | Automatic defect detection and classification technique from image: a special case using ceramic tiles | |
CN109118482A (en) | A kind of panel defect analysis method, device and storage medium | |
CN108876768B (en) | Shadow defect detection method for light guide plate | |
CN111311542A (en) | Product quality detection method and device | |
CN113646801B (en) | Defect detection method, device and computer readable storage medium for defect image | |
US9239281B2 (en) | Method and device for dividing area of image of particle in urine | |
CN111474177A (en) | Liquid crystal screen backlight foreign matter defect detection method based on computer vision | |
CN109242853A (en) | A kind of PCB defect intelligent detecting method based on image procossing | |
CN109886960A (en) | The method of glass edge defects detection based on machine vision | |
CN115100221A (en) | Glass defect segmentation method | |
CN102074031B (en) | Standard establishment method for observational check machine of printed circuit board | |
CN109064439B (en) | Partition-based single-side light-entering type light guide plate shadow defect extraction method | |
CN109102497A (en) | High-resolution light guide plate image defect detection method | |
CN116091421A (en) | Method for automatically dividing and calculating area of blastomere image of in-vitro fertilized embryo | |
CN111681213A (en) | Light guide plate line scratch defect detection method based on deep learning | |
CN111062961A (en) | Contact lens edge defect detection method based on deep learning | |
CN110007493A (en) | Broken bright spot detection method in liquid crystal display | |
KR101813223B1 (en) | Method and apparatus for detecting and classifying surface defect of image | |
Chen et al. | An efficient detection algorithm based on anisotropic diffusion for low-contrast defect | |
CN110298825A (en) | Light guide plate black spot defect detection method | |
CN111415330A (en) | Copper foil appearance defect detection method based on deep learning | |
CN103177426B (en) | Morphology-based strong-interference laser edge image restoration method |
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 |