CN104867144A - IC element solder joint defect detection method based on Gaussian mixture model - Google Patents

IC element solder joint defect detection method based on Gaussian mixture model Download PDF

Info

Publication number
CN104867144A
CN104867144A CN201510250915.2A CN201510250915A CN104867144A CN 104867144 A CN104867144 A CN 104867144A CN 201510250915 A CN201510250915 A CN 201510250915A CN 104867144 A CN104867144 A CN 104867144A
Authority
CN
China
Prior art keywords
gauss model
pixel
picture
training
solder joint
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
CN201510250915.2A
Other languages
Chinese (zh)
Other versions
CN104867144B (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201510250915.2A priority Critical patent/CN104867144B/en
Publication of CN104867144A publication Critical patent/CN104867144A/en
Application granted granted Critical
Publication of CN104867144B publication Critical patent/CN104867144B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an IC element solder joint defect detection method based on a Gaussian mixture model. The method comprises following steps: initializing template quantities, weights, the mean value and the variance of the Gaussian mixture model, and establishing a frequency distribution graph according to the height and width of a training picture; acquiring an IC solder joint training picture from a training sample, and updating the Gaussian mixture model and the frequency distribution graph; determining whether the training sample finishes training, and calculating a defect degree threshold of the training sample if the training sample finishes training; collecting a picture of an IC element solder joint to be detected, then calculating the defect degree of the picture with the cooperation of the trained Gaussian mixture model and the frequency distribution graph; and comparing the defect degree of the picture and the defect degree threshold of the training sample so as to obtain a detection result of the IC element solder joint. The method is less in calculation amount, rapid in detection speed and high in accuracy, can effectively detect insufficient solder defects of the IC element solder joint, and can be widely applied to the field of IC element solder joint defect detection.

Description

Based on the IC element welding point defect detection method of mixed Gauss model
Technical field
The present invention relates to Digital Image Processing application, particularly based on the IC element welding point defect detection method of mixed Gauss model.
Background technology
Printing board PCB (Printed Circuit Board) defects detection is the focus direction that automatic optics inspection (automaticoptical inspection, AOI) is applied, and is more and more paid close attention in recent years.The main mode adopted detects the laggard row relax of image of PCB element by CCD thus realizes defects detection at present.In actual use, the situation that printed circuit board runs into is very complicated, often there is change in various degree and irregular phenomenon in the PCB part drawing picture that CCD collects, such as: intensity of illumination is uneven, lighting angle changes, and the image of CCD camera collection has the deflection of certain angle, and component size is more and more less, in pcb board, component density is increasing etc., and these problems make PCB welding point defect detect and become quite difficulty.And the size of IC element solder joint is much smaller than the size of general CHIP element solder joint, rosin joint and normal solder joint closely similar on image, this make the rosin joint of IC element solder joint detect be the difficult problem being difficult in defects detection capture always.
The existing comparatively ripe great majority of the detection method to IC element welding point defect are the method for feature based.Defects detection is divided into two steps by this method: extract characteristic sum classification.At extraction feature stage, select color gradient, region area, girth, hydraulic radius etc. characteristic feature; At sorting phase, select comparatively ripe sorter, such as neural network, AdaBoost, SVM etc., the feature extracted is classified.These methods achieve good effect at CHIP element solder joint.But because IC element welding spot size is little, solder joint closeness is large, and rosin joint solder joint sample is difficult to collect, and makes the current method based on sorter be difficult to obtain good classifying quality in IC element solder joint rosin joint detects.In addition, online test method is strict to time requirement, and these comparatively ripe classifier calculated amounts of neural network are large, are difficult to meet on-line monitoring requirement in time.Simultaneously, although also someone proposes the IC element solder joint detection method of the pixel modeling based on single Gauss model, and the detection speed of this method is fast, and accuracy rate is low, cannot apply in actual production.Generally speaking, current detection method cannot detect the welding point defect of IC element effectively, accurately and rapidly.
Summary of the invention
In order to solve above-mentioned technical matters, the object of this invention is to provide the IC element welding point defect detection method based on mixed Gauss model.
The technical solution adopted for the present invention to solve the technical problems is:
Based on the IC element welding point defect detection method of mixed Gauss model, comprising:
The template number of S1, initialization mixed Gauss model, weight, average and variance, set up histogram according to the height of training picture and width simultaneously;
S2, obtain from training sample IC solder joint training picture, mixed Gauss model and histogram are upgraded;
It is complete whether S3, training of judgement sample have trained, if the degree of imperfection threshold value of then calculation training sample, otherwise returns and perform step S2;
S4, gather IC element solder joint to be detected picture after, the mixed Gauss model that combined training is good and histogram calculate the degree of imperfection of this picture;
S5, the degree of imperfection threshold value of the degree of imperfection of this picture and training sample is compared after obtain the testing result of IC element solder joint.
Further, described step S1, comprising:
S11, the template number of mixed Gauss model is initialized as M, wherein M is natural number and 3≤M≤5;
S12, the weight of M template is all initialized as 1/M, and the variance of M template, as the average of M template, is initialized as particular value V by Stochastic choice numeral simultaneously from [0,255] interval 0, wherein 3≤V 0≤ 10;
S13, set up matrix that a size is H*W and after all elements value of this matrix is initialized as 1, using this matrix as histogram, wherein H represents the height of training picture, and W represents the width of training picture.
Further, described step S2, comprising:
S21, obtain from training sample IC solder joint training picture, for each pixel of this training picture, it is carried out matching treatment with M Gauss model respectively, and obtains Gauss's matching value of this pixel and each Gauss model;
S22, recurrence renewal is carried out to mixed Gauss model;
S23, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model is sorted;
S24, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( Σ i = 1 b w i > Th )
In above formula, Th is default background threshold and 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S25, binaryzation assignment is carried out to this pixel, and renewal frequency distribution plan;
S26, travel through all pixels after obtain the binary image of this training picture.
Further, described step S21, it is specially:
IC solder joint training picture is obtained from training sample, for each pixel of this training picture, it is carried out matching treatment with a corresponding M Gauss model respectively, judge whether to meet following condition, if so, then judge that this pixel mates with corresponding Gauss model, both Gauss's matching values are 1, otherwise both do not mate, Gauss's matching value is 0:
|X ki|<2.5σ i
In above formula, X krepresent the pixel value of this pixel, μ irepresent the average of i-th Gauss model, σ irepresent the variance of i-th Gauss model.
Further, described step S22, comprising:
S221, according to following formula, recurrence renewal is carried out to the weight of mixed Gauss model:
w i,k=(1-α)*w i,k-1+α*H i,k
S222, to Gauss model unmatched with this pixel, directly perform step S223, to the Gauss model mated with this pixel, after its average and standard deviation being upgraded according to following formula, terminate upgrade:
&mu; i , k = ( 1 - &alpha; ) * &mu; i , k - 1 + &alpha; * H i , k &sigma; i , k 2 = ( 1 - &alpha; ) * &sigma; i , k - 1 2 + &alpha; * H i , k
S223, judge that M the Gauss model whether this pixel is corresponding with it does not all mate, if so, then replace the minimum Gauss model of weighted value according to the following formula, otherwise terminate to upgrade:
w sl , k = 1 / M &mu; sl , k = X k &sigma; sl , k = V 0
Wherein, w i,k, μ i,kwith represent the weight of i-th Gauss model of this pixel, average and variance respectively, w i, k-1, μ i, k-1with represent the weight of i-th Gauss model of the pixel of a training picture and this pixel correspondence position, average and variance respectively, H i,krepresent Gauss's matching value of this pixel and i-th Gauss model, α represents default learning efficiency value, w sl, k, μ sl, kand σ sl, krepresent the weight of the Gauss model that weighted value is minimum, average and standard deviation respectively.
Further, described step S25, it is specially:
If this pixel is background dot, is then 0 by its assignment, otherwise its assignment is 255 and the value of the histogram of this pixel correspondence position is added 1.
Further, the degree of imperfection threshold value of calculation training sample described in described step S3, it is specially:
According to following formula respectively each training picture of calculation training sample degree of imperfection and obtain the degree of imperfection threshold value of maximal value as training sample:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of training picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of training picture.
Further, described step S4, comprising:
S41, gather IC element solder joint to be detected picture after, for each pixel of this picture, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model sorted;
S42, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S43, binaryzation assignment is carried out to this pixel;
S44, travel through all pixels after obtain the binary image of this picture;
S45, calculate the degree of imperfection of this picture according to following formula:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of this picture.
Further, described step S5, it is specially:
Judge whether this degree of imperfection is greater than the degree of imperfection threshold value of training sample, if so, then judge that this IC element solder joint is rosin joint solder joint, otherwise, judge that this IC element solder joint is normal solder joint.
The invention has the beneficial effects as follows: the IC element welding point defect detection method that the present invention is based on mixed Gauss model, comprise: the template number of initialization mixed Gauss model, weight, average and variance, set up histogram according to the height of training picture and width simultaneously; From training sample, obtain IC solder joint training picture, mixed Gauss model and histogram are upgraded; It is complete whether training of judgement sample has trained, if the degree of imperfection threshold value of then calculation training sample; After gathering the picture of IC element solder joint to be detected, the mixed Gauss model that combined training is good and histogram calculate the degree of imperfection of this picture; The testing result of IC element solder joint is obtained after the degree of imperfection threshold value of the degree of imperfection of this picture and training sample being compared.Compared to existing technology, computation amount, detection speed is fast, and accuracy rate is high, effectively can detect the rosin joint defect of IC element solder joint for this method.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described.
Fig. 1 is the process flow diagram of the IC element welding point defect detection method based on mixed Gauss model of the present invention.
Embodiment
With reference to Fig. 1, the invention provides a kind of IC element welding point defect detection method based on mixed Gauss model, comprising:
The template number of S1, initialization mixed Gauss model, weight, average and variance, set up histogram according to the height of training picture and width simultaneously;
S2, obtain from training sample IC solder joint training picture, mixed Gauss model and histogram are upgraded;
It is complete whether S3, training of judgement sample have trained, if the degree of imperfection threshold value of then calculation training sample, otherwise returns and perform step S2;
S4, gather IC element solder joint to be detected picture after, the mixed Gauss model that combined training is good and histogram calculate the degree of imperfection of this picture;
S5, the degree of imperfection threshold value of the degree of imperfection of this picture and training sample is compared after obtain the testing result of IC element solder joint.
Be further used as preferred embodiment, described step S1, comprising:
S11, the template number of mixed Gauss model is initialized as M, wherein M is natural number and 3≤M≤5;
S12, the weight of M template is all initialized as 1/M, and the variance of M template, as the average of M template, is initialized as particular value V by Stochastic choice numeral simultaneously from [0,255] interval 0, wherein 3≤V 0≤ 10;
S13, set up matrix that a size is H*W and after all elements value of this matrix is initialized as 1, using this matrix as histogram, wherein H represents the height of training picture, and W represents the width of training picture.
Be further used as preferred embodiment, described step S2, comprising:
S21, obtain from training sample IC solder joint training picture, for each pixel of this training picture, it is carried out matching treatment with M Gauss model respectively, and obtains Gauss's matching value of this pixel and each Gauss model;
S22, recurrence renewal is carried out to mixed Gauss model;
S23, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model is sorted;
S24, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold and 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S25, binaryzation assignment is carried out to this pixel, and renewal frequency distribution plan;
S26, travel through all pixels after obtain the binary image of this training picture.
Be further used as preferred embodiment, described step S21, it is specially:
IC solder joint training picture is obtained from training sample, for each pixel of this training picture, it is carried out matching treatment with a corresponding M Gauss model respectively, judge whether to meet following condition, if so, then judge that this pixel mates with corresponding Gauss model, both Gauss's matching values are 1, otherwise both do not mate, Gauss's matching value is 0:
|X ki|<2.5σ i
In above formula, X krepresent the pixel value of this pixel, μ irepresent the average of i-th Gauss model, σ irepresent the variance of i-th Gauss model.
Be further used as preferred embodiment, described step S22, comprising:
S221, according to following formula, recurrence renewal is carried out to the weight of mixed Gauss model:
w i,k=(1-α)*w i,k-1+α*H i,k
S222, to Gauss model unmatched with this pixel, directly perform step S223, to the Gauss model mated with this pixel, after its average and standard deviation being upgraded according to following formula, terminate upgrade:
&mu; i , k = ( 1 - &alpha; ) * &mu; i , k - 1 + &alpha; * H i , k &sigma; i , k 2 = ( 1 - &alpha; ) * &sigma; i , k - 1 2 + &alpha; * H i , k
S223, judge that M the Gauss model whether this pixel is corresponding with it does not all mate, if so, then replace the minimum Gauss model of weighted value according to the following formula, otherwise terminate to upgrade:
w sl , k = 1 / M &mu; sl , k = X k &sigma; sl , k = V 0
Wherein, w i,k, μ i,kwith represent the weight of i-th Gauss model of this pixel, average and variance respectively, w i, k-1, μ i, k-1with represent the weight of i-th Gauss model of the pixel of a training picture and this pixel correspondence position, average and variance respectively, H i,krepresent Gauss's matching value of this pixel and i-th Gauss model, α represents default learning efficiency value, w sl, k, μ sl, kand σ sl, krepresent the weight of the Gauss model that weighted value is minimum, average and standard deviation respectively.
Be further used as preferred embodiment, described step S25, it is specially:
If this pixel is background dot, is then 0 by its assignment, otherwise its assignment is 255 and the value of the histogram of this pixel correspondence position is added 1.
Be further used as preferred embodiment, the degree of imperfection threshold value of calculation training sample described in described step S3, it is specially:
According to following formula respectively each training picture of calculation training sample degree of imperfection and obtain the degree of imperfection threshold value of maximal value as training sample:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of training picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of training picture.
Be further used as preferred embodiment, described step S4, comprising:
S41, gather IC element solder joint to be detected picture after, for each pixel of this picture, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model sorted;
S42, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S43, binaryzation assignment is carried out to this pixel;
S44, travel through all pixels after obtain the binary image of this picture;
S45, calculate the degree of imperfection of this picture according to following formula:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of this picture.
Be further used as preferred embodiment, described step S5, it is specially:
Judge whether this degree of imperfection is greater than the degree of imperfection threshold value of training sample, if so, then judge that this IC element solder joint is rosin joint solder joint, otherwise, judge that this IC element solder joint is normal solder joint.
Below in conjunction with a specific embodiment, the invention will be further described.
With reference to Fig. 1, a kind of IC element welding point defect detection method based on mixed Gauss model, comprising:
The template number of S1, initialization mixed Gauss model, weight, average and variance, set up histogram according to the height of training picture and width simultaneously; This step specifically comprises step S11 ~ S13:
S11, the template number of mixed Gauss model is initialized as M, wherein M is natural number and 3≤M≤5; Therefore in the present embodiment, mixed Gauss model has M Gauss model;
S12, the weight of M template is all initialized as 1/M, and the variance of M template, as the average of M template, is initialized as particular value V by Stochastic choice numeral simultaneously from [0,255] interval 0, wherein 3≤V 0≤ 10;
S13, set up matrix that a size is H*W and after all elements value of this matrix is initialized as 1, using this matrix as histogram, wherein H represents the height of training picture, and W represents the width of training picture.
S2, obtain from training sample IC solder joint training picture, mixed Gauss model and histogram are upgraded; Concrete renewal process comprises step S21 ~ S26:
S21, obtain from training sample IC solder joint training picture, for each pixel of this training picture, it is carried out matching treatment with M Gauss model respectively, and obtains Gauss's matching value of this pixel and each Gauss model, it is specially:
IC solder joint training picture is obtained from training sample, for each pixel of this training picture, it is carried out matching treatment with a corresponding M Gauss model respectively, judge whether to meet following condition, if so, then judge that this pixel mates with corresponding Gauss model, both Gauss's matching values are 1, otherwise both do not mate, Gauss's matching value is 0:
|X ki|<2.5σ i
In above formula, X krepresent the pixel value of this pixel, μ irepresent the average of i-th Gauss model, σ irepresent the variance of i-th Gauss model.
S22, recurrence renewal is carried out to mixed Gauss model, comprises step S221 ~ S223:
S221, according to following formula, recurrence renewal is carried out to the weight of mixed Gauss model:
w i,k=(1-α)*w i,k-1+α*H i,k
S222, to Gauss model unmatched with this pixel, directly perform step S223, to the Gauss model mated with this pixel, after its average and standard deviation being upgraded according to following formula, terminate upgrade:
&mu; i , k = ( 1 - &alpha; ) * &mu; i , k - 1 + &alpha; * H i , k &sigma; i , k 2 = ( 1 - &alpha; ) * &sigma; i , k - 1 2 + &alpha; * H i , k
S223, judge that M the Gauss model whether this pixel is corresponding with it does not all mate, if so, then replace the minimum Gauss model of weighted value according to the following formula, otherwise terminate to upgrade:
w sl , k = 1 / M &mu; sl , k = X k &sigma; sl , k = V 0
Wherein, w i,k, μ i,kwith represent the weight of i-th Gauss model of this pixel, average and variance respectively, w i, k-1, μ i, k-1with represent the weight of i-th Gauss model of the pixel of a training picture and this pixel correspondence position, average and variance respectively, H i,krepresent Gauss's matching value of this pixel and i-th Gauss model, α represents default learning efficiency value and is steady state value, and in the present invention, α is 3/trm, and trm is the number of samples of mixed Gauss model, w sl, k, μ sl, kand σ sl, krepresent the weight of the Gauss model that weighted value is minimum, average and standard deviation respectively.
As can be seen here, when this step upgrades mixed Gauss model, the weight of M Gauss model is all upgraded, then determine whether to upgrade the average of this Gauss model and variance according to the match condition of each Gauss model and pixel, if Gauss model mates with pixel, then its average and variance are upgraded, otherwise do not upgrade.Finally, if all Gauss models all do not mate with pixel, then replace the minimum Gauss model of weighted value.
S23, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model is sorted;
S24, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold and 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S25, binaryzation assignment is carried out to this pixel, and renewal frequency distribution plan, it is specially:
If this pixel is background dot, is then 0 by its assignment, otherwise its assignment is 255 and the value of the histogram of this pixel correspondence position is added 1.
S26, travel through all pixels after obtain the binary image of this training picture.
It is complete whether S3, training of judgement sample have trained, if then according to following formula respectively each training picture of calculation training sample degree of imperfection and obtain the degree of imperfection threshold value of maximal value as training sample, otherwise return perform step S2:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of training picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of training picture.
S4, gather IC element solder joint to be detected picture after, the mixed Gauss model that combined training is good and histogram calculate the degree of imperfection of this picture, in this step, the degree of imperfection of calculating chart sheet is same computing formula with what adopt in step S3, specifically comprises step S41 ~ S45:
S41, gather IC element solder joint to be detected picture after, for each pixel of this picture, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model sorted;
S42, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S43, binaryzation assignment is carried out to this pixel;
S44, travel through all pixels after obtain the binary image of this picture;
S45, calculate the degree of imperfection of this picture according to following formula:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of this picture.
S5, the degree of imperfection threshold value of the degree of imperfection of this picture and training sample is compared after obtain the testing result of IC element solder joint, it is specially:
Judge whether this degree of imperfection is greater than the degree of imperfection threshold value of training sample, if so, then judge that this IC element solder joint is rosin joint solder joint, otherwise, judge that this IC element solder joint is normal solder joint.
After tested, after mixed Gauss model being trained by adopting the training sample containing 400 training pictures, this method is adopted to carry out rosin joint defects detection, be 0% to the false drop rate of the rosin joint defect of IC element solder joint, loss is 0.90%, can effectively ensure higher accuracy rate, by the accuracy rate adopting this method greatly can improve the detection of IC element solder joint rosin joint, and detection speed is fast, can as the method solving an IC element solder joint detection difficult problem.
More than that better enforcement of the present invention is illustrated, but the invention is not limited to described embodiment, those of ordinary skill in the art also can make all equivalent variations or replacement under the prerequisite without prejudice to spirit of the present invention, and these equivalent modification or replacement are all included in the application's claim limited range.

Claims (9)

1., based on the IC element welding point defect detection method of mixed Gauss model, it is characterized in that, comprising:
The template number of S1, initialization mixed Gauss model, weight, average and variance, set up histogram according to the height of training picture and width simultaneously;
S2, obtain from training sample IC solder joint training picture, mixed Gauss model and histogram are upgraded;
It is complete whether S3, training of judgement sample have trained, if the degree of imperfection threshold value of then calculation training sample, otherwise returns and perform step S2;
S4, gather IC element solder joint to be detected picture after, the mixed Gauss model that combined training is good and histogram calculate the degree of imperfection of this picture;
S5, the degree of imperfection threshold value of the degree of imperfection of this picture and training sample is compared after obtain the testing result of IC element solder joint.
2. the IC element welding point defect detection method based on mixed Gauss model according to claim 1, it is characterized in that, described step S1, comprising:
S11, the template number of mixed Gauss model is initialized as M, wherein M is natural number and 3≤M≤5;
S12, the weight of M template is all initialized as 1/M, and the variance of M template, as the average of M template, is initialized as particular value V by Stochastic choice numeral simultaneously from [0,255] interval 0, wherein 3≤V 0≤ 10;
S13, set up matrix that a size is H*W and after all elements value of this matrix is initialized as 1, using this matrix as histogram, wherein H represents the height of training picture, and W represents the width of training picture.
3. the IC element welding point defect detection method based on mixed Gauss model according to claim 2, it is characterized in that, described step S2, comprising:
S21, obtain from training sample IC solder joint training picture, for each pixel of this training picture, it is carried out matching treatment with M Gauss model respectively, and obtains Gauss's matching value of this pixel and each Gauss model;
S22, recurrence renewal is carried out to mixed Gauss model;
S23, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model is sorted;
S24, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold and 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S25, binaryzation assignment is carried out to this pixel, and renewal frequency distribution plan;
S26, travel through all pixels after obtain the binary image of this training picture.
4. the IC element welding point defect detection method based on mixed Gauss model according to claim 3, it is characterized in that, described step S21, it is specially:
IC solder joint training picture is obtained from training sample, for each pixel of this training picture, it is carried out matching treatment with a corresponding M Gauss model respectively, judge whether to meet following condition, if so, then judge that this pixel mates with corresponding Gauss model, both Gauss's matching values are 1, otherwise both do not mate, Gauss's matching value is 0:
|X ki|<2.5σ i
In above formula, X krepresent the pixel value of this pixel, μ irepresent the average of i-th Gauss model, σ irepresent the variance of i-th Gauss model.
5. the IC element welding point defect detection method based on mixed Gauss model according to claim 4, it is characterized in that, described step S22, comprising:
S221, according to following formula, recurrence renewal is carried out to the weight of mixed Gauss model:
w i,k=(1-α)*w i,k-1+α*H i,k
S222, to Gauss model unmatched with this pixel, directly perform step S223, to the Gauss model mated with this pixel, after its average and standard deviation being upgraded according to following formula, terminate upgrade:
&mu; i , k = ( 1 - &alpha; ) * &mu; i , k - 1 + &alpha; * H i , k &sigma; i , k 2 = ( 1 - &alpha; ) * &sigma; i , k - 1 * + &alpha; * H i , k
S223, judge that M the Gauss model whether this pixel is corresponding with it does not all mate, if so, then replace the minimum Gauss model of weighted value according to the following formula, otherwise terminate to upgrade:
w sl , k = 1 / M &mu; sl , k = X k &sigma; sl , k = V 0
Wherein, w i,k, μ i,kwith represent the weight of i-th Gauss model of this pixel, average and variance respectively, w i, k-1, μ i, k-1with represent the weight of i-th Gauss model of the pixel of a training picture and this pixel correspondence position, average and variance respectively, H i,krepresent Gauss's matching value of this pixel and i-th Gauss model, α represents default learning efficiency value, w sl, k, μ sl, kand σ sl, krepresent the weight of the Gauss model that weighted value is minimum, average and standard deviation respectively.
6. the IC element welding point defect detection method based on mixed Gauss model according to claim 3, it is characterized in that, described step S25, it is specially:
If this pixel is background dot, is then 0 by its assignment, otherwise its assignment is 255 and the value of the histogram of this pixel correspondence position is added 1.
7. the IC element welding point defect detection method based on mixed Gauss model according to claim 3, it is characterized in that, the degree of imperfection threshold value of calculation training sample described in described step S3, it is specially:
According to following formula respectively each training picture of calculation training sample degree of imperfection and obtain the degree of imperfection threshold value of maximal value as training sample:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of training picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of training picture.
8. the IC element welding point defect detection method based on mixed Gauss model according to claim 2, it is characterized in that, described step S4, comprising:
S41, gather IC element solder joint to be detected picture after, for each pixel of this picture, calculate the weight of M corresponding to this pixel Gauss model and the ratio of standard deviation respectively, and according to ratio, M Gauss model sorted;
S42, select according to following formula before B Gauss model point as a setting, and then judge whether this pixel mates with a front B Gauss model, if so, judge that this pixel is background dot, otherwise judge that this pixel is foreground point:
B = arg min b ( &Sigma; i = 1 b w i > Th )
In above formula, Th is default background threshold and 0.75≤Th≤0.90, and i represents sequence number, w irepresent the weight of i-th Gauss model;
S43, binaryzation assignment is carried out to this pixel;
S44, travel through all pixels after obtain the binary image of this picture;
S45, calculate the degree of imperfection of this picture according to following formula:
E m = 1 &Sigma; i = 1 H &Sigma; j = 1 W m 2 f ( x , y ) 2 &CenterDot; &Sigma; i = 1 H &Sigma; j = 1 W m 2 f 2 ( x , y ) &CenterDot; b ( x , y )
In above formula, E mrepresent the degree of imperfection of picture, m represents the training picture number of training sample, and f (x, y) represents histogram, and b (x, y) represents the binary image of this picture.
9. the IC element welding point defect detection method based on mixed Gauss model according to claim 1, it is characterized in that, described step S5, it is specially:
Judge whether this degree of imperfection is greater than the degree of imperfection threshold value of training sample, if so, then judge that this IC element solder joint is rosin joint solder joint, otherwise, judge that this IC element solder joint is normal solder joint.
CN201510250915.2A 2015-05-15 2015-05-15 IC element welding point defect detection methods based on mixed Gauss model Active CN104867144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510250915.2A CN104867144B (en) 2015-05-15 2015-05-15 IC element welding point defect detection methods based on mixed Gauss model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510250915.2A CN104867144B (en) 2015-05-15 2015-05-15 IC element welding point defect detection methods based on mixed Gauss model

Publications (2)

Publication Number Publication Date
CN104867144A true CN104867144A (en) 2015-08-26
CN104867144B CN104867144B (en) 2018-05-01

Family

ID=53912959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510250915.2A Active CN104867144B (en) 2015-05-15 2015-05-15 IC element welding point defect detection methods based on mixed Gauss model

Country Status (1)

Country Link
CN (1) CN104867144B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992898A (en) * 2017-12-14 2018-05-04 哈尔滨工业大学(威海) A kind of electronic component welding point defect detection method
CN108257121A (en) * 2018-01-09 2018-07-06 北京百度网讯科技有限公司 The newer method, apparatus of product defects detection model, storage medium and terminal device
CN108537823A (en) * 2017-03-03 2018-09-14 防城港市港口区思达电子科技有限公司 Moving target detecting method based on mixed Gauss model
CN109064440A (en) * 2018-06-19 2018-12-21 广东工业大学 A kind of speaker voice coil bonding wire recognition methods based on machine vision
CN110263608A (en) * 2019-01-25 2019-09-20 天津职业技术师范大学(中国职业培训指导教师进修中心) Electronic component automatic identifying method based on image feature space variable threshold value metric
CN110455822A (en) * 2019-07-10 2019-11-15 苏州卓融新能源科技有限公司 A kind of detection method of pcb board defect
CN111598771A (en) * 2020-01-15 2020-08-28 电子科技大学 PCB (printed Circuit Board) defect detection system and method based on CCD (Charge coupled device) camera
US10769774B2 (en) 2018-01-09 2020-09-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and device for detecting a defect in a steel plate, as well as apparatus and server therefor
CN112802014A (en) * 2021-03-26 2021-05-14 惠州高视科技有限公司 Detection method, device and equipment for LED (light emitting diode) missing welding defects and storage medium
CN113689390A (en) * 2021-08-06 2021-11-23 广东工业大学 Abnormity detection method for non-defective sample learning
TWI770817B (en) * 2021-02-09 2022-07-11 鴻海精密工業股份有限公司 Defect detecting method, electronic device, and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
谢宏威: "印刷电路板焊点智能检测算法的研究", 《中国博士学位论文全文数据库 信息科技辑》 *
陈世文 等: "一种基于高斯混合模型的运动目标检测改进算法", 《现代电子技术》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537823A (en) * 2017-03-03 2018-09-14 防城港市港口区思达电子科技有限公司 Moving target detecting method based on mixed Gauss model
CN107992898A (en) * 2017-12-14 2018-05-04 哈尔滨工业大学(威海) A kind of electronic component welding point defect detection method
CN107992898B (en) * 2017-12-14 2019-07-23 哈尔滨工业大学(威海) A kind of electronic component welding point defect detection method
US10769774B2 (en) 2018-01-09 2020-09-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and device for detecting a defect in a steel plate, as well as apparatus and server therefor
CN108257121A (en) * 2018-01-09 2018-07-06 北京百度网讯科技有限公司 The newer method, apparatus of product defects detection model, storage medium and terminal device
CN108257121B (en) * 2018-01-09 2019-01-25 北京百度网讯科技有限公司 Method, apparatus, storage medium and the terminal device that product defects detection model updates
CN109064440A (en) * 2018-06-19 2018-12-21 广东工业大学 A kind of speaker voice coil bonding wire recognition methods based on machine vision
CN110263608A (en) * 2019-01-25 2019-09-20 天津职业技术师范大学(中国职业培训指导教师进修中心) Electronic component automatic identifying method based on image feature space variable threshold value metric
CN110455822A (en) * 2019-07-10 2019-11-15 苏州卓融新能源科技有限公司 A kind of detection method of pcb board defect
CN111598771A (en) * 2020-01-15 2020-08-28 电子科技大学 PCB (printed Circuit Board) defect detection system and method based on CCD (Charge coupled device) camera
TWI770817B (en) * 2021-02-09 2022-07-11 鴻海精密工業股份有限公司 Defect detecting method, electronic device, and storage medium
CN112802014A (en) * 2021-03-26 2021-05-14 惠州高视科技有限公司 Detection method, device and equipment for LED (light emitting diode) missing welding defects and storage medium
CN113689390A (en) * 2021-08-06 2021-11-23 广东工业大学 Abnormity detection method for non-defective sample learning
CN113689390B (en) * 2021-08-06 2023-10-24 广东工业大学 Abnormality detection method for non-defective sample learning

Also Published As

Publication number Publication date
CN104867144B (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN104867144A (en) IC element solder joint defect detection method based on Gaussian mixture model
CN104867145A (en) IC element solder joint defect detection method based on VIBE model
CN111145175B (en) SMT welding spot defect detection method based on iForest model verification
CN108021938A (en) A kind of Cold-strip Steel Surface defect online detection method and detecting system
CN104899871B (en) A kind of IC elements solder joint missing solder detection method
CN110349126A (en) A kind of Surface Defects in Steel Plate detection method based on convolutional neural networks tape label
CN104851085B (en) The automatic method and system for obtaining detection zone in image
CN109683360A (en) Liquid crystal display panel defect inspection method and device
CN108615046A (en) A kind of stored-grain pests detection recognition methods and device
CN101661004B (en) Visible detection method of welding quality of circuit board based on support vector machine
CN107886131A (en) One kind is based on convolutional neural networks detection circuit board element polarity method and apparatus
CN105427275B (en) Crop field environment wheat head method of counting and device
CN109615609A (en) A kind of solder joint flaw detection method based on deep learning
CN101915769A (en) Automatic optical inspection method for printed circuit board comprising resistance element
CN105044122A (en) Copper part surface defect visual inspection system and inspection method based on semi-supervised learning model
CN110363781A (en) Molten bath profile testing method based on deep neural network
CN104408707A (en) Rapid digital imaging fuzzy identification and restored image quality assessment method
CN102184404B (en) Method and device for acquiring palm region in palm image
CN109946304A (en) Surface defects of parts on-line detecting system and detection method based on characteristic matching
CN104103033A (en) Image real-time processing method
CN109142368A (en) Lithium battery pole slice is crumpled detection method and tab welding detection system
CN109146873A (en) A kind of display screen defect intelligent detecting method and device based on study
CN109509188A (en) A kind of transmission line of electricity typical defect recognition methods based on HOG feature
CN110175614A (en) A kind of detection method of printed circuit board via hole inner wall quality
CN114494103A (en) Defect detection method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant