CN108876768A - Light guide plate shadow defect inspection method - Google Patents

Light guide plate shadow defect inspection method Download PDF

Info

Publication number
CN108876768A
CN108876768A CN201810541338.6A CN201810541338A CN108876768A CN 108876768 A CN108876768 A CN 108876768A CN 201810541338 A CN201810541338 A CN 201810541338A CN 108876768 A CN108876768 A CN 108876768A
Authority
CN
China
Prior art keywords
image
light guide
guide plate
noise
formula
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
Application number
CN201810541338.6A
Other languages
Chinese (zh)
Other versions
CN108876768B (en
Inventor
李俊峰
卢彭飞
楼小栋
胡浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinmingshan Photoelectric Wujiang Co ltd
Original Assignee
Hangzhou Shun Hao Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Shun Hao Technology Co Ltd filed Critical Hangzhou Shun Hao Technology Co Ltd
Priority to CN201810541338.6A priority Critical patent/CN108876768B/en
Publication of CN108876768A publication Critical patent/CN108876768A/en
Application granted granted Critical
Publication of CN108876768B publication Critical patent/CN108876768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]

Abstract

The present invention provides a kind of light guide plate shadow defect inspection method, enhance contrast, inhibit salt-pepper noise, filters, twice convolution, after gray value normalization, mean filter twice, Threshold segmentation processing, extracts the connected domain of foreground image, shadow defect is obtained after handling connected component, and the shadow defect extracted is shown.Light guide plate self-adapting detecting method complexity proposed by the present invention is relatively low, can be realized and detects automatically to light guide plate shadow, extracts.The experimental results showed that the detection accuracy and detection efficiency of the algorithm are higher, stability is stronger, can be measured in real time to shadow.

Description

Light guide plate shadow defect inspection method
Technical field
The present invention relates to a kind of defect inspection method, specially a kind of light guide plate shadow defects detection.
Background technique
Light guide plate (Light Guide Plate, LGP) is acrylic/PC plate material using optical grade, then with pole The hitech materials of high reflectance and not extinction are carved in acryl plates bottom surface laser engraving, the V-type cross grid of optical grade It carves, UV screen printing technology stamps light guiding points.LGP is frivolous with its, brightness is high, light conductivity is uniform, environmentally friendly, energy saving, easy to maintenance The advantages that, it has obtained extremely being widely applied in occasions such as liquid crystal display, advertising lamp, X-ray, flat lamp illuminations.It is raw in light guide plate During production, the defects of surface inevitably will appear scuffing, scratch, stain, shadow;Compared to more other several defects, Difficult point and key of the features such as shadow is higher with its detection difficulty, and detection program is complex as light guide plate defects detection.Such as Fruit in the upper use such as liquid crystal display, X-ray viewer with clouded light guide plate, then the uniformly light-emitting of equipment, using effect Rate etc. can be all severely impacted, in addition, guide-lighting panel products inferior equally can cause a degree of damage to the eyesight of human eye Evil, prestige and the market competitiveness for enterprise equally will cause fatal damage, therefore, to meet social high quality and height The requirement of reliability, it is necessary to the guide-lighting panel products before factory be detected, will be screened away with the clouded product of inferior quality.
Currently, domestic relevant enterprise mainly carries out defects detection, but artificial inspection by the manually-operated mode of professional Survey problem is numerous, and limitation is more obvious:(1) working environment is poor, and the manual operation of long-term can not only make employee's eyesight At damage, and employee can be made to suffer from occupational disease;(2) detection difficulty is higher, and program is complex, and employee is difficult to grasp related skill Energy;(3) since artificial detection is easy to be affected by the external environment, the precision and efficiency of detection hardly result in guarantee;(4) employee is main The identification and judgement of defect are carried out by naked eyes, the calculating instrument of auxiliary is not easy to form the quality standard that can quantify.
Light guide plate generates shadow, and mainly there are two reasons:(1) more gas is mixed in the melt inside cartridge heater (screw rod) Body is not discharged, and more gas is difficult to be completely exhausted out in the case where high speed mold filling, is produced from certain part in mold cavity Product is burnt dark space that is black and being formed by raw violent calcination;(2) wire drawing is too long in order to prevent, and screw rod pine is often moved back distance setting It is excessive thoroughly to be disconnected with product material head, and one section of space is just formed between, screw rod is in metering, due to revolving speed, Melt can be countercurrently a little easily cooled to gap, in high speed mold filling, if the melt that this part is cooled is filling at a high speed It is brought into mold cavity in the case where mould, is difficult to merge completely with the melt entered below, that is to say, that this part is cooling to melt Material is by one piece of dark space etc. that melt below encases and is formed.Shadow detection at present is mainly by being accomplished manually, in detecting tool Under light, testing staff estimates light guide plate somewhere or whether many places are presented dark space, illustrates that the light guide plate exists if there is dark space Shadow defect.Precision, efficiency, the stability etc. of artificial shadow detection are difficult to adapt to the requirement of enterprise.Since light guide plate shadow lacks Sunken particularity needs to be observed from whole angle, it is therefore desirable to be imaged using high-resolution face frame camera.By In light guide plate image size nearly 20MB, and the detection speed of every piece of light guide plate of enterprise will control within 5 seconds, this examines shadow It surveys efficiency and proposes very high requirement.
Therefore, it is necessary to further improve to the relevant technologies.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of efficient light guide plate shadow defect inspection methods.
In order to solve the above technical problems, the present invention provides a kind of light guide plate shadow defect inspection method, include the following steps:
(1) light guide plate image F is obtained, step 2 is executed;
(2) size for obtaining light guide plate image F, is respectively highly M and N with width;Execute step 3;
(3) contrast for enhancing light guide plate image F, obtains the enhanced image of contrast, executes step 4;
(4) inhibit the salt-pepper noise of the enhanced image of contrast, the image after the salt-pepper noise that is inhibited;Execute step 5;
(5) image after inhibition salt-pepper noise is filtered, the image after the noise that is eliminated;Execute step 6;
(6) convolution twice that the second order local derviation in the direction y single order local derviation and the direction xy is carried out to the image after elimination noise, obtains Image F after to convolution1And F2;Execute step 7;
(7) figure F1Subtract F2, obtain subtracting each other rear image;Execute step 8;
(8) gray value for subtracting each other rear image is adjusted between 0-255, the image after obtaining gray value normalization;It executes Step 9;
(9) type conversion is carried out to the image after gray value normalization, obtains byte image, execute step 10;
(10) byte image carries out obtaining the image from after adding from adding;Execute step 11;
(11) mean filter twice is carried out continuously to the image from after adding, obtains filtered image for the first time and second Filtered image;Execute step 12;
(12) filtered image subtracts second of filtered image for the first time, obtains result images;Execute step 13;
(13) Threshold segmentation processing is carried out to result images, obtains background parts and foreground part;Execute step 14;
(14) connected domain analysis is mainly the component part for calculating foreground image herein, extracts the connected domain of foreground image, The region unit for being not attached to together is treated as into the zonule that feature is different one by one;Execute step 15;
(15) feature extraction is carried out to the connected domain that step 14 obtains, obtains shadow defect;Execute step 16;
(16) the shadow defect extracted in step 15 is shown.
As the improvement to light guide plate shadow defect inspection method of the present invention, step 4 includes the following steps:
The point that gray value in light guide plate image F is 0 or 255 is labeled as noise spot, then increased by window upper limit threshold value T Big window filtering is found the corresponding filtering of the filtering size progress of the minimum window including non-noise point with this and is calculated;
The minimum filter window including non-noise point can not be found when window filtering size reaches window upper limit threshold value T still When, it is the 0 pixel number N that in the window of T, statistics gray value is in the size centered on noise spot0And gray scale The pixel number N that value is 255255, using following formula:
Minimum filter window has been found before window filtering size reaches window upper limit threshold value T, then has filtered out minimum filter Noise spot obtains non-noise point set TG in wave window, and carrying out linear weighted function using grey scale pixel value point in set TG can obtain Recovery value at noise spot (x, y):
(x ', y ') represents any one point in non-noise point set TG in above formula;It can be obtained according to non-noise point (x ', y ') To (x, y),For the Euclidean distance of the noise spot at (x, y) of the pixel in TG at (x ', y '), W ωkNormalized value;
As the further improvement to light guide plate shadow defect inspection method of the present invention, step 5 includes the following steps:
5.1) image after inhibiting salt-pepper noise is transformed by frequency domain from time domain by two-dimensional discrete Fourier direct transform In, two-dimensional discrete Fourier direct transform formula is as follows:
H (n in formula1,n2) it is in 0≤n1≤L1- 1,0≤n2≤L2Complex function on -1, H (l1,l2) it is h (n1,n2) warp Complex function after crossing Fourier transformation;l1And l2Respectively indicate the width and height of sampling rectangular mesh, L1And L2Respectively indicate hits The boundary head of the row of group and wide boundary head;
5.2) according to the element in window size and window at a distance from central point, realize that coefficient is weighed by Gaussian function The selection of value distributes, and specific formula is as follows:
In formula, Vx,yIndicate the neighborhood of element at center (x, y), size is M × M;ωdRepresentation space is apart from phase Like degree weight factor;F (i, j) is H (l1,l2);
5.3) convolution in frequency domain is carried out to filtered image;
5.4) image after convolution is transformed into time domain from frequency domain by two-dimensional discrete Fourier inverse transformation, two dimension from It is as follows to dissipate inverse Fourier transform formula:
As the further improvement to light guide plate shadow defect inspection method of the present invention, step 8 includes:
f*(x, y)=f (x, y) × Mult+Add
G in formulamaxAnd GminIt is the maximum gradation value and minimum gradation value of image-region respectively, before f (x, y) is normalization Pixel value of the image at (x, y).
As the further improvement to light guide plate shadow defect inspection method of the present invention, step 11 includes:
The method of filtering is:
In formulaWherein m and n be respectively filter window size, m and n according to Experiment obtains,For weighting function, fλ(x+r, y+s) is the noise image before filtering,For filtered smooth figure Picture.
Image f from after adding12+(x, y) obtains filtered image and second for the first time by mean filter twice in succession Secondary filtered image.
As the further improvement to light guide plate shadow defect inspection method of the present invention, step 13 includes:
It is as follows that OSTU method carries out Threshold segmentation formula:
T=Max [ω1(t)×(u1(t)-u)22(t)×(u2(t)-u)2]
ω in formula1(t) and ω2(t) it is respectively ratio that background parts and foreground part account for result images in step 12, and u1(t) and u2(t) be respectively then background parts and foreground part mean value, u be light guide plate image F mean value, t is segmentation threshold.
As the further improvement to light guide plate shadow defect inspection method of the present invention, step 15 includes the following steps:
One, bonded area extracts;
The area of single pixel is determined according to field range size and Cai Tu camera resolution, then zoning is occupied Number of pixels, number of pixels are region area multiplied by single pixel area;
Two, it is extracted in conjunction with the profile length of connected domain;
The profile length of shadow area can be obtained multiplied by the side length of single pixel for the number of shadow area edge pixel;
Three, it is extracted in conjunction with eccentricity;
Eccentricity formula is as follows:
In formula:RaAnd RbThe respectively major semiaxis length and semi-minor axis length of shadow curve, As is eccentricity.
The advantage of light guide plate shadow detection method of the present invention is:
Other opposite detection methods, light guide plate self-adapting detecting method complexity proposed by the present invention is relatively low, can Realization detects light guide plate shadow automatically, extracts.The experimental results showed that the detection accuracy and detection efficiency of the algorithm are higher, surely It is qualitative relatively strong, shadow can be measured in real time.
Specific advantage:
1, the present invention need to only carry out suitable parameter regulation in practical application, remaining can be realized full-automatic detection;
2, the stability of inventive algorithm is stronger, system it is easy to maintain.
3, according to domestic and international patent and these retrieval situation, so far without light guide plate shadow defective vision detection at Fruit.Existing light guide plate is all using artificial detection, and the invention patent provides stable shadow defective vision detection method for the first time.
4, this patent progress shadow defect on the basis ofs carrying out gaussian filtering, mean filter etc. to light guide plate image mentions It takes, can effectively overcome the influence to defects detection such as even, illumination variation of uneven illumination, greatly improve the stability of detection algorithm And robustness;
5, this patent by calculating shadow area, shadow profile length and eccentricity determine shadow defect, can be to avoid External interference caused by imaging process effectively increases the accuracy of shadow defect;And it can be by the way that shadow face be arranged The different shadow defect of the filtering such as product, shadow profile length and eccentricity meets the quality inspection of different manufacturers, different brackets product It surveys and requires, improve the adaptability of algorithm.
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 shadow detection method of the present invention;
Fig. 2 is the light guide plate image F that step 1 obtains;
Fig. 3 be step 3 obtain by the enhanced image of PECE method;
Fig. 4 is the image inhibited after salt-pepper noise that step 4 obtains;
Fig. 5 is the image after the gaussian filtering that step 5 obtains;
Fig. 6 is the image after the direction the Gaussian derivative ' xy ' convolution that step 6 obtains;
Fig. 7 is the image after the direction the Gaussian derivative ' y ' convolution that step 6 obtains;
Fig. 8 is the image difference alienation analysis chart that step 7 obtains;
Fig. 9 is that the gray value that step 8 obtains normalizes result figure;
Figure 10 is the image type transformation result figure that step 9 obtains;
Figure 11 is that the image that step 10 obtains adds figure certainly;
Figure 12 is the first time that step 11 obtains to carry out mean filter result figure;
Figure 13 is second of progress mean filter result figure that step 11 obtains;
Figure 14 is that the mean filter twice that step 12 obtains subtracts each other result figure;
Figure 15 is the OSTU method Threshold segmentation figure that step 13 obtains;
Figure 16 is the connected domain analysis figure that step 14 obtains;
Figure 17 is the light guide plate shadow figure that the feature extraction that step 15 obtains goes out.
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 shadow defect inspection method include the following steps as shown in Fig. 1-17:
(1) the face frame camera for using Hikvision company, obtains light guide plate image F, executes step 2;
By observation, light guiding points density is different, not of uniform size, enables to light guiding points to shine uniform.Light guide plate production essence Spend more demanding, shadow defect belongs to planar defect, needs through whole observation, and do not need gem-pure image, generally Image needed for being obtained by area array cameras.
(2) size of light guide plate image F is obtained, wherein height and width are respectively M and N;Execute step 3;
(3) pass through PECE (practical and effieient contrast enhancement method) method It realizes picture superposition, obtains the enhanced image of contrast, execute step 4;
Since shooting environmental is not ideal enough in real process, the contrast that may cause captured light guide plate image is insufficient, So that the overall performance of image is tired out, the present invention enhances image degree of comparing using PECE method.
PECE method is as follows:
Wherein P (k) is the probability density function of light guide plate image, is obtained by histogram Multilayer networks, PPECE(k) it is Treated probability density function, PbasOn the basis of be worth (mean value of maxima and minima sum in P (k)), PhFor PbasThe two of value Times, α (k) is constraint function, XmFor average brightness, γ controls the real number of bright dark areas between [- 1,1].L is a constant, It is adjusted in real process according to light guide plate image F.
(4) by the enhanced image procossing of PECE method obtained to step 3, inhibit salt-pepper noise, make the smooth of image More preferable, the image after the salt-pepper noise that is inhibited of property;Execute step 5;
For salt-pepper noise present in light guide plate image F, the present invention inhibits salt-pepper noise using self-adaptive routing.
Firstly, the point that gray value in light guide plate image F is 0 or 255 is labeled as noise spot, then increase window filtering The filtering size of the minimum window including non-noise point, which is found, with this carries out corresponding filtering calculating.Since filter window size cannot nothing Limit is big, therefore a window upper limit threshold value T is arranged in the present invention, and window upper limit threshold value T be used to identify gray scale in light guide plate image F The pixel that value is 0 or 255, value are the joint of 0 or 255 pixels and noise density according to gray value in light guide plate image F Distribution determines.
The filter window including non-noise point still can not be found when window filtering size reaches upper limit value T, it can recognized 0 or 255 extremal regions are in for noisy coordinate in light guide plate image F or judge noise spot by accident;It is being with noise spot at this time The size at center is the 0 pixel number N that statistics gray value is in the window of T0The pixel for being 255 with gray value Number N255.Noise spot restores to use principle on the high side, because from the point of view of visually, if N in certain region0Or N255One side accounts for mostly Number, then it is believed that the gray value is the true gray value in the region, specific formula is as follows:
Minimum filtering size window has been found before window filtering size reaches window upper limit threshold value T, then filters out window Non-noise point set TG can be obtained in noise spot in mouthful, and carrying out linear weighted function using grey scale pixel value point in set TG can obtain Recovery value at noise spot (x, y):
(x ', y ') represents any one point in non-noise point set TG in above formula;In non-noise point set TG directly Extraction can be obtained (x ', y ');(x ', y ') be used to repair noise spot at (x, y), i.e., by non-in set TG Noise spot (x ', y '), which carries out linear weighted function, can be obtained the recovery value at (x, y),It is arrived for the pixel in TG at (x ', y ') The Euclidean distance of noise spot at (x, y), i.e.,:
And W is ωkNormalized value, specific formula is as follows
(5) since noise in image not only includes salt-pepper noise, Gaussian noise, therefore the suppression that step 4 obtains be might have Image needs after salt-pepper noise processed are further filtered, and improve its flatness, the image after the noise that is eliminated;It holds Row step 6;
Firstly, the image after inhibiting salt-pepper noise is transformed into frequency domain from time domain by two-dimensional discrete Fourier direct transform In, two-dimensional discrete Fourier direct transform formula is as follows:
H (n in formula1,n2) it is in 0≤n1≤L1- 1,0≤n2≤L2Complex function on -1 (is similar to equidistant square Shape grid samples resulting array to a two-dimentional continuous function), H (l1,l2) it is h (n1,n2) answering after Fourier transformation Function;l1And l2Respectively indicate the width and height of sampling rectangular mesh, L1And L2Respectively indicate sampling array row boundary head with it is wide Boundary head, i are the imaginary numbers in plural field, are conventional signs;And l1And l2Then the sizing grid according to used in actual samples is voluntarily determined It is fixed, L1And L2It is determined by the size of sampled images.
It is filtered secondly, generating Gaussian filter, its linear smoothing is made to get a promotion.Substantially gaussian filtering Operation exactly is weighted and averaged to the image after Fourier transformation, in image each pixel value all according to the pixel itself and Other pixels are weighted and averaged to obtain in its neighborhood.The present invention herein according in window size and window element and central point away from From realizing the selection distribution of coefficient weight by Gaussian function, specific formula is as follows:
In formula, Vx,yIndicate the neighborhood of element at center (x, y), size is M × M (self-setting);ωdIt indicates Space length similarity weight factor;F (i, j) is H (l1,l2);
Again, the convolution (prior art) in frequency domain is carried out to filtered image;
Finally, the image after convolution is transformed into time domain from frequency domain by two-dimensional discrete Fourier inverse transformation, two dimension Inverse discrete Fourier transform formula is as follows:
Variable is explained identical as Fourier's direct transform in formula.h(n1,n2) it is the image eliminated after noise, H used herein (l1,l2) it is to obtain after convolution.
(6) convolution, the image F after obtaining convolution are carried out by the image after Gaussian derivative and elimination noise1And F2;It executes Step 7;
In view of the actual conditions of light guide plate image, the present invention step is broadly divided into the direction y single order local derviation and the direction xy Second order local derviation, specific formula is as follows:
(7) image difference analysis is mainly by the image F in difference local derviation direction obtained in step (6)1And F2Carry out phase Subtract, schemes F1Subtract F2, obtain be a width shadow defect it is more obvious subtract each other rear image;Execute step 8;
(8) gray value normalization mainly by the gray value for subtracting each other rear image obtained in step (7) be adjusted to 0-255 it Between, the image after obtaining gray value normalization;Execute step 9;
Gray value normalization is broadly divided into two steps:The first step is pixel by gray value in image less than 0 by its turn It is changed to nonnegative number;Second is that gray value of image size is adjusted between 0-255.Gray value normalization operation mainly around with Lower formula carries out:
f*(x, y)=f (x, y) × Mult+Add
G in formulamaxAnd GminIt is the maximum gradation value and minimum gradation value of image-region respectively, before f (x, y) is normalization Pixel value of the image at (x, y), f*(x, y) is actual pixel value of the image at (x, y) after normalization operation;
(9) type conversion is carried out to the image after gray value normalization, obtains byte image;Execute step 10;
For the image after gray value normalization in step 8 is changed into byte image herein convenient for subsequent processing;
(10) step is exactly to carry out the byte image in step (9) to add certainly;Execute step 11;
The grey scale pixel value of institute's input picture is exactly followed into the operation that certain rule is handled from adding;Figure herein As adding grey scale pixel value processing mainly to follow following rule certainly:
f12+(x, y)=(f1(x,y)+f2(x,y))×Factor+Value
F in formula1(x, y) and f2(x, y) is respectively gray value of the two width byte images at (x, y), two width bytes here For image understands only for formula, f1(x, y) and f2Gray value of the image at (x, y) is directly extracted in the selection of (x, y) It can.Factor is gray value adaptive factor, and Value is gray value adaptive range value, f12+(x, y) is image after being added Gray value;
(11) the image f from after adding that step (10) is obtained12+(x, y) carries out mean filter twice;Execute step 12;
Image inevitably introduces noise during storing and transmitting etc., and picture noise is dealt with relationship The identification of the important informations such as detail textures in image;Mean filter is denoised as a kind of common denoising method in image filtering Process field application is extremely extensive.Noise remove is carried out using mean filter in the present invention, specific steps mainly utilize space Domain convolution operation regards gray average operation processing as and acts on noise image fλLow-pass filter on (x, y), it is specific public Formula is as follows:
In formulaWherein m and n be respectively filter window size, m and n according to Experiment obtains,For weighting function, fλ(x+r, y+s) is the noise image before filtering,For filtered smooth figure Picture;
Image f from after adding12+(x, y) obtains filtered image and second for the first time by mean filter twice in succession Secondary filtered image;
(12) filtering image is subtracted each other herein, i.e., by filtered image subtracts second of filtering for the first time in step (11) Image afterwards;Execute step 13;
It is consistent with image addition principle in step 10, two images subtract each other equally be by grey scale pixel value by it is certain rule into Row processing;Dependency rule is as follows:
f12-(x, y)=(f1(x,y)-f2(x,y))×C1+C2
F in formula1(x, y) and f2The representative first time filtered image of (x, y) and second of filtered image, C1With C2It is the correction factor and corrected value during image subtraction, f respectively12-(x, y) is the gray value for subtracting each other rear image;
(13) Threshold segmentation processing is carried out using OSTU (maximum kind differences method) to result images in step 12, by Background Picture and light guiding points region distinguish;Execute step 14;
According to the gamma characteristic of image itself, image is distinguished into background image and foreground image two parts.If background Method is bigger between class between image and foreground image, then this two-part difference is also bigger;Due to appointing between this two parts The side that anticipates, which is divided into another party by mistake, all can promote the difference between this two parts to become smaller, therefore OSTU method is applied to segmentation and will make The probability of mistake point is preferably minimized.It is as follows that OSTU method carries out Threshold segmentation formula:
T=Max [ω1(t)×(u1(t)-u)22(t)×(u2(t)-u)2]
ω in formula1(t) and ω2(t) it is respectively ratio that background parts and foreground part account for result images in step 12, and u1(t) and u2(t) be respectively then background parts and foreground part mean value, u be light guide plate image F mean value, t is segmentation threshold.
(14) connected domain analysis is mainly the component part for calculating foreground image herein, extracts the connected domain of foreground image, The region unit for being not attached to together is treated as into the zonule that feature is different one by one;Execute step 15;
(15) feature extraction is carried out to the connected domain that step 14 obtains;Execute step 16;
There is certain complexity since light guide plate shadow extracts, in order to avoid erroneous detection, the present invention is herein according to three spies Sign is to extract guide-lighting version shadow defect:
One, bonded area extracts;Due to one of shadow and light guide plate defect, equally occupied in light guide plate image Certain range, therefore bonded area selects to identify that shadow defect is that one kind is correct;
The area for determining single pixel according to field range size and Cai Tu camera resolution first, such as field range (phase The image range that can be taken immediately below machine camera lens) size is 200mm, camera resolution is 16k (1k=1024B), that institute Shooting image single pixel area is 200/16384 (16 × 1024)=0.0122;Then the pixel that zoning is occupied Number, number of pixels is region area multiplied by single pixel area.
Two, it is extracted in conjunction with the profile length of connected domain;In brief, shadow is exactly certain spy in light guide plate image in fact Different profile, therefore also can be carried out effective identification in conjunction with profile length;
Pixel has area, equally has side length, and according to the number of pixels for including in fixed range width, that you can get it is single The side length of a pixel, as having 2000 pixels in 10mm width, then the side length of single pixel is exactly 10/2000=0.005, The profile length of shadow area can be obtained multiplied by the side length of single pixel for the number of shadow area edge pixel.
Three, it is extracted in conjunction with eccentricity;It, can also be with since shadow curve and oval arc length have similar characteristic It is extracted by eccentricity, eccentricity formula is as follows:
In formula:RaAnd RbRespectively elliptical major semiaxis length and semi-minor axis length, as shadow curve is justified as ellipse It is sliding, so regarding shadow curve approximation as elliptical one section " arc length " herein, R can be obtainedaAnd Rb, As is eccentricity;
Identification judgement is carried out in conjunction with three above feature, erroneous judgement can be maximally reduced, successfully extracts shadow defect. The range for setting area, such as the minimum value and maximum value of area;The range of profile length and the range of eccentricity are set, when dark The area of shadow defect, profile length, all in the range of setting index, system can automatically will extract shadow eccentricity Out.
(16) the shadow defect extracted in step 15 is shown.
Experiment one:
1, image shown in Fig. 2 is obtained using face frame camera, converts images into grayscale image;
2, image enhancement is carried out according to formula in step 3 to gray level image, obtains enhancing image shown in Fig. 3;
3, enhance image progress salt-pepper noise according to step 4 pair to dispel, filter window is sized to 7 × 7 sizes herein (experiment obtains);
4, gaussian filtering is carried out to the image after removing salt-pepper noise;
5, first image is transformed in frequency domain according to following Fourier transform formula first,
6, Gaussian noise elimination is then carried out, formula is as follows
Finally, filtered image is returned in time domain by following Fourier inversion formula;
7, the convolution of different directions is carried out to gaussian filtering image by Gaussian derivative;
The direction y local derviation,
The direction xy local derviation,
8, different Gauss local derviation directional images are subtracted each other;
9, gray value normalization is carried out by following formula
f*(x, y)=f (x, y) × Mult+Add
Image after normalization is switched into bytewise;
10, image is carried out as follows to add certainly
f12+(x, y)=(f1(x,y)+f2(x,y))×Factor+Value
Mean filter twice is carried out to the image from after adding according to formula in step 11, filter ruler when filtering for the first time Very little is 35 × 30, and filter size when filtering for the second time is 70 × 70 (experiment obtains).
11, it is poor make to the image after mean filter twice as follows;
f12-(x, y)=(f1(x,y)-f2(x,y))×C1+C2
C herein1Selection 35, C2Select 0 (experiment obtains);
12, to difference image progress Threshold segmentation is made after mean filter, formula is as follows
T=Max [ω1(t)×(u1(t)-u)22(t)×(u2(t)-u)2]
13, the image after connected domain analysis threshold value;
14, according to feature extraction shadow
Bonded area, profile length and eccentricity extract shadow, herein areal extent selection 2000-10000 it Between, profile length range is between 2000-90000, eccentricity (experiment obtains) between 7-21.
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 (7)

1. light guide plate shadow defect inspection method, which is characterized in that include the following steps:
(1) light guide plate image F is obtained, step 2 is executed;
(2) size for obtaining light guide plate image F, is respectively highly M and N with width;Execute step 3;
(3) contrast for enhancing light guide plate image F, obtains the enhanced image of contrast, executes step 4;
(4) inhibit the salt-pepper noise of the enhanced image of contrast, the image after the salt-pepper noise that is inhibited;Execute step 5;
(5) image after inhibition salt-pepper noise is filtered, the image after the noise that is eliminated;Execute step 6;
(6) convolution twice that the second order local derviation in the direction y single order local derviation and the direction xy is carried out to the image after elimination noise, is rolled up Image F after product1And F2;Execute step 7;
(7) figure F1Subtract F2, obtain subtracting each other rear image;Execute step 8;
(8) gray value for subtracting each other rear image is adjusted between 0-255, the image after obtaining gray value normalization;Execute step 9;
(9) type conversion is carried out to the image after gray value normalization, obtains byte image, execute step 10;
(10) byte image carries out obtaining the image from after adding from adding;Execute step 11;
(11) mean filter twice is carried out continuously to the image from after adding, obtains filtered image for the first time and second filters Image afterwards;Execute step 12;
(12) filtered image subtracts second of filtered image for the first time, obtains result images;Execute step 13;
(13) Threshold segmentation processing is carried out to result images, obtains background parts and foreground part;Execute step 14;
(14) connected domain analysis is mainly the component part for calculating foreground image herein, extracts the connected domain of foreground image, will not have There is the region unit to link together to treat as the zonule that feature is different one by one;Execute step 15;
(15) feature extraction is carried out to the connected domain that step 14 obtains, obtains shadow defect;Execute step 16;
(16) the shadow defect extracted in step 15 is shown.
2. light guide plate shadow defect inspection method according to claim 1, which is characterized in that step 4 includes the following steps:
The point that gray value in light guide plate image F is 0 or 255 is labeled as noise spot, then increases window by window upper limit threshold value T Mouth filtering is found corresponding filter of the filtering size progress of the minimum window including non-noise point with this and is calculated;
When window filtering size, which reaches window upper limit threshold value T still, can not find the minimum filter window including non-noise point It waits, is the 0 pixel number N that in the window of T, statistics gray value is in the size centered on noise spot0And gray value For 255 pixel number N255, using following formula:
Minimum filter window has been found before window filtering size reaches window upper limit threshold value T, then has filtered out minimum spectral window Noise spot obtains non-noise point set TG in mouthful, can be obtained and makes an uproar using grey scale pixel value point progress linear weighted function in set TG Recovery value at sound point (x, y):
(x ', y ') represents any one point in non-noise point set TG in above formula;It is available according to non-noise point (x ', y ') (x, y),For the Euclidean distance of the noise spot at (x, y) of the pixel in TG at (x ', y '), W ωkNormalized value;
3. light guide plate shadow defect inspection method according to claim 2, which is characterized in that step 5 includes the following steps:
5.1) image after inhibiting salt-pepper noise is transformed into frequency domain from time domain by two-dimensional discrete Fourier direct transform, two It is as follows to tie up discrete fourier direct transform formula:
H (n in formula1,n2) it is in 0≤n1≤L1- 1,0≤n2≤L2Complex function on -1, H (l1,l2) it is h (n1,n2) pass through Fu In complex function after leaf transformation;l1And l2Respectively indicate the width and height of sampling rectangular mesh, L1And L2Respectively indicate sampling array Capable boundary head and wide boundary head;
5.2) according to the element in window size and window at a distance from central point, coefficient weight is realized by Gaussian function Selection distribution, specific formula are as follows:
In formula, Vx,yIndicate the neighborhood of element at center (x, y), size is M × M;ωdRepresentation space Distance conformability degree power Repeated factor;F (i, j) is H (l1,l2);
5.3) convolution in frequency domain is carried out to filtered image;
5.4) image after convolution is transformed into time domain from frequency domain by two-dimensional discrete Fourier inverse transformation, two-dimensional discrete Fu In leaf inverse transformation formula it is as follows:
4. light guide plate shadow defect inspection method according to claim 3, which is characterized in that step 8 includes:
f*(x, y)=f (x, y) × Mult+Add
G in formulamaxAnd GminIt is the maximum gradation value and minimum gradation value of image-region, image before f (x, y) is normalization respectively Pixel value at (x, y).
5. light guide plate shadow defect inspection method according to claim 4, which is characterized in that step 11 includes:
The method of filtering is:
In formulaWherein m and n is respectively filter window size, and m and n are according to experiment It obtains,For weighting function, fλ(x+r, y+s) is the noise image before filtering,For filtered smoothed image;
Image f from after adding12+(x, y) obtains filtered image for the first time and second is filtered by mean filter twice in succession Image after wave.
6. light guide plate shadow defect inspection method according to claim 5, which is characterized in that step 13 includes:
It is as follows that OSTU method carries out Threshold segmentation formula:
T=Max [ω1(t)×(u1(t)-u)22(t)×(u2(t)-u)2]
ω in formula1(t) and ω2(t) it is respectively ratio that background parts and foreground part account for result images in step 12, and u1(t) And u2(t) be respectively then background parts and foreground part mean value, u be light guide plate image F mean value, t is segmentation threshold.
7. light guide plate shadow defect inspection method according to claim 6, which is characterized in that step 15 includes following step Suddenly:
One, bonded area extracts;
The area of single pixel, the pixel that then zoning is occupied are determined according to field range size and Cai Tu camera resolution Number, number of pixels are region area multiplied by single pixel area;
Two, it is extracted in conjunction with the profile length of connected domain;
The profile length of shadow area can be obtained multiplied by the side length of single pixel for the number of shadow area edge pixel;
Three, it is extracted in conjunction with eccentricity;
Eccentricity formula is as follows:
In formula:RaAnd RbThe respectively major semiaxis length and semi-minor axis length of shadow curve, As is eccentricity.
CN201810541338.6A 2018-05-30 2018-05-30 Shadow defect detection method for light guide plate Active CN108876768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810541338.6A CN108876768B (en) 2018-05-30 2018-05-30 Shadow defect detection method for light guide plate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810541338.6A CN108876768B (en) 2018-05-30 2018-05-30 Shadow defect detection method for light guide plate

Publications (2)

Publication Number Publication Date
CN108876768A true CN108876768A (en) 2018-11-23
CN108876768B CN108876768B (en) 2022-05-06

Family

ID=64335615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810541338.6A Active CN108876768B (en) 2018-05-30 2018-05-30 Shadow defect detection method for light guide plate

Country Status (1)

Country Link
CN (1) CN108876768B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109785290A (en) * 2018-12-19 2019-05-21 刘咏晨 Normalized steel plate defect detection method is shone based on local light
CN110084768A (en) * 2019-05-10 2019-08-02 江南大学 The defect inspection method of LCD light guide plate based on background filtering
CN110298825A (en) * 2019-06-17 2019-10-01 杭州舜浩科技有限公司 Light guide plate black spot defect detection method
CN110361400A (en) * 2019-07-01 2019-10-22 创新奇智(合肥)科技有限公司 A kind of bubble detecting method and electronic equipment of cast iron part
CN110530883A (en) * 2019-09-30 2019-12-03 凌云光技术集团有限责任公司 A kind of defect inspection method
CN111598847A (en) * 2020-04-28 2020-08-28 浙江华睿科技有限公司 Glass surface defect detection method, device and computer readable storage medium
CN112070095A (en) * 2020-09-14 2020-12-11 衢州学院 Grapefruit disease and insect pest monitoring method based on Internet of things technology
CN112710632A (en) * 2021-03-23 2021-04-27 四川京炜交通工程技术有限公司 Method and system for detecting high and low refractive indexes of glass beads
CN113262495A (en) * 2021-05-27 2021-08-17 南京比夫网络科技有限公司 AI electricity contest operation robot based on artificial intelligence
CN113804693A (en) * 2021-09-10 2021-12-17 杭州衡眺科技有限公司 Visual detection device for defects of light guide plate of mobile phone

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205229061U (en) * 2015-11-23 2016-05-11 苏州鼎纳自动化技术有限公司 LCD light guide plate defect detecting system based on line sweep camera
CN106353324A (en) * 2016-08-10 2017-01-25 浙江理工大学 Magnet ring surface defect extraction method
CN107103811A (en) * 2017-05-23 2017-08-29 常州工学院 A kind of virtual detection teaching platform and its application method with industrial ultra-thin materials production detection device
CN108072701A (en) * 2018-01-16 2018-05-25 滁州佳宏光电有限公司 A kind of light guide plate characterization processes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205229061U (en) * 2015-11-23 2016-05-11 苏州鼎纳自动化技术有限公司 LCD light guide plate defect detecting system based on line sweep camera
CN106353324A (en) * 2016-08-10 2017-01-25 浙江理工大学 Magnet ring surface defect extraction method
CN107103811A (en) * 2017-05-23 2017-08-29 常州工学院 A kind of virtual detection teaching platform and its application method with industrial ultra-thin materials production detection device
CN108072701A (en) * 2018-01-16 2018-05-25 滁州佳宏光电有限公司 A kind of light guide plate characterization processes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MING‐SHYAN HUANG 等: "Surface defect inspection of light guided plates with the computer‐vision assisted detection method", 《JOURNAL OF THE CHINESE INSTITUTE OF ENGINEERS》 *
史艳琼 等: "液晶显示屏背光源模组表面缺陷自动光学检测系统设计", 《传感技术学报》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109785290A (en) * 2018-12-19 2019-05-21 刘咏晨 Normalized steel plate defect detection method is shone based on local light
CN109785290B (en) * 2018-12-19 2020-01-24 湖南长达检测股份有限公司 Steel plate defect detection method based on local illumination normalization
CN110084768A (en) * 2019-05-10 2019-08-02 江南大学 The defect inspection method of LCD light guide plate based on background filtering
CN110084768B (en) * 2019-05-10 2023-06-20 江南大学 Defect detection method of LCD light guide plate based on background filtering
CN110298825B (en) * 2019-06-17 2021-07-02 杭州舜浩科技有限公司 Method for detecting black spot defect of light guide plate
CN110298825A (en) * 2019-06-17 2019-10-01 杭州舜浩科技有限公司 Light guide plate black spot defect detection method
CN110361400A (en) * 2019-07-01 2019-10-22 创新奇智(合肥)科技有限公司 A kind of bubble detecting method and electronic equipment of cast iron part
CN110530883A (en) * 2019-09-30 2019-12-03 凌云光技术集团有限责任公司 A kind of defect inspection method
CN111598847A (en) * 2020-04-28 2020-08-28 浙江华睿科技有限公司 Glass surface defect detection method, device and computer readable storage medium
CN112070095A (en) * 2020-09-14 2020-12-11 衢州学院 Grapefruit disease and insect pest monitoring method based on Internet of things technology
CN112710632A (en) * 2021-03-23 2021-04-27 四川京炜交通工程技术有限公司 Method and system for detecting high and low refractive indexes of glass beads
CN113262495A (en) * 2021-05-27 2021-08-17 南京比夫网络科技有限公司 AI electricity contest operation robot based on artificial intelligence
CN113804693A (en) * 2021-09-10 2021-12-17 杭州衡眺科技有限公司 Visual detection device for defects of light guide plate of mobile phone

Also Published As

Publication number Publication date
CN108876768B (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN108876768A (en) Light guide plate shadow defect inspection method
CN111563889B (en) Liquid crystal screen Mura defect detection method based on computer vision
CN108460757B (en) Mobile phone TFT-LCD screen Mura defect online automatic detection method
CN108760767B (en) Large-size liquid crystal display defect detection method based on machine vision
CN108416766B (en) Double-side light-entering type light guide plate defect visual detection method
CN111474177A (en) Liquid crystal screen backlight foreign matter defect detection method based on computer vision
CN109102497B (en) High-resolution light guide plate image defect detection method
CN109064439B (en) Partition-based single-side light-entering type light guide plate shadow defect extraction method
CN112583999B (en) Method for detecting lens dirt of camera module
JP2009175041A (en) Method for estimating glare of displayed image
CN113686869A (en) Micro-defect recognition device for insulating blanket
CN113706461A (en) Micro-defect identification system of insulating blanket based on image identification
CN113034474A (en) Test method for wafer map of OLED display
CN111739012A (en) Camera module white spot detecting system based on turntable
CN104749801B (en) High Precision Automatic optical detecting method and system
CN109272525A (en) A kind of light guide plate white-spot defects detection method
CN106846271A (en) A kind of method of reticulate pattern in removal identity card picture
CN115272256A (en) Sub-pixel level sensing optical fiber path Gaussian extraction method and system
KR100271261B1 (en) Image data processing method and image data processing apparatus
CN111798423B (en) Concrete crack picture splicing and detecting method
CN110530894B (en) Light guide plate bright spot defect detection method
Han et al. Automatic illumination and color compensation using mean shift and sigma filter
CN108989608B (en) Road surface image gray level correction method based on linear array camera
JP2005164565A (en) Defect detection method for flat panel light- related plate element in low and high resolution images
TWI783288B (en) Image processing 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211118

Address after: No. 568, Jiangxing East Road, Wujiang Economic and Technological Development Zone, Suzhou, Jiangsu 215217

Applicant after: Jinmingshan photoelectric (Wujiang) Co.,Ltd.

Address before: Room c-703-2, 198 Qidi Road, Xiaoshan Economic and Technological Development Zone, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant before: HANGZHOU SHUNHAO TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant