CN118037628A - IC pin defect detection method based on image processing - Google Patents
IC pin defect detection method based on image processing Download PDFInfo
- Publication number
- CN118037628A CN118037628A CN202311794480.9A CN202311794480A CN118037628A CN 118037628 A CN118037628 A CN 118037628A CN 202311794480 A CN202311794480 A CN 202311794480A CN 118037628 A CN118037628 A CN 118037628A
- Authority
- CN
- China
- Prior art keywords
- pin
- image
- area
- tin
- value
- 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.)
- Pending
Links
- 230000007547 defect Effects 0.000 title claims abstract description 24
- 238000012545 processing Methods 0.000 title claims abstract description 24
- 238000001514 detection method Methods 0.000 title claims abstract description 23
- 230000011218 segmentation Effects 0.000 claims abstract description 39
- ATJFFYVFTNAWJD-UHFFFAOYSA-N Tin Chemical compound [Sn] ATJFFYVFTNAWJD-UHFFFAOYSA-N 0.000 claims abstract description 33
- 238000001914 filtration Methods 0.000 claims abstract description 19
- 238000000034 method Methods 0.000 claims description 18
- 230000000877 morphologic effect Effects 0.000 claims description 10
- 229910000679 solder Inorganic materials 0.000 claims description 10
- 230000009194 climbing Effects 0.000 claims description 6
- 238000002372 labelling Methods 0.000 claims description 5
- 125000000205 L-threonino group Chemical group [H]OC(=O)[C@@]([H])(N([H])[*])[C@](C([H])([H])[H])([H])O[H] 0.000 claims description 4
- 230000002950 deficient Effects 0.000 claims description 3
- 238000009499 grossing Methods 0.000 claims description 3
- 238000004519 manufacturing process Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 230000007797 corrosion Effects 0.000 description 3
- 238000005260 corrosion Methods 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003466 welding Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000005476 soldering Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/771—Feature selection, e.g. selecting representative features from a multi-dimensional feature space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30141—Printed circuit board [PCB]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention provides an IC pin defect detection method based on image processing, which comprises the following steps: s1, acquiring an IC pin color image; s2, automatically positioning and dividing the pin area; s3, mean filtering denoising; s4, performing binary processing on each filtered pin area image based on a local dynamic range threshold algorithm II; step S5, establishing a tin-less feature selection model and a pin-warping feature selection model: step S6, automatic positioning and segmentation of the non-pin area: s7, mean filtering denoising; s8, performing binary processing on each filtered pin area image based on a local dynamic range threshold algorithm II; s9, establishing a tin connection feature selection model; and S10, judging the defects of the IC pins. The invention can avoid the defects of the traditional algorithm detection and improve the accuracy of the detection of the connecting tin, the less tin and the tilted pins of the IC pins.
Description
Technical Field
The invention belongs to the field of PCB production and solder defect detection, and particularly relates to an IC pin defect detection method based on image processing.
Background
In the production process of the PCB, defects such as pin connection tin, less tin, pin tilting and the like can occur after welding due to soldering tin materials, the process or the IC chip. The IC chip with the connecting tin, less tin and tilted pins belongs to an unqualified PCB product. In order to prevent unqualified PCB products from flowing into the market, and also to improve and optimize the production quality of control PCB board and the production process of PCB board, the IC chips with tin, less tin and tilted pins are required to be detected in the production process.
The production of the PCB is taken as a high and new industry, has high requirements on production speed and production quality, is limited by the influences of raw material quality, a surface mounting technology and a welding technology, and cannot be widely applied to the detection of the IC pins because the adaptability and misjudgment problems caused by too many types and large size differences of the IC chips cannot be solved by the detection algorithm of the traditional IC pins.
Currently, IC pin detection mainly depends on the conventional algorithm detection modes, such as: a connected domain division pin method, a deep learning judgment method, a manual threshold adjustment method and the like, wherein the detection of the traditional algorithm has a plurality of problems:
1. the deep learning judgment method needs to train each IC chip independently and cannot be compatible.
2. The size difference of the IC chips is too large, and the connected domain division pin method has the condition that the division conditions are not universal, so that the detection cannot be performed.
3. The manual threshold adjustment method is too many and complicated in parameters, requires operators to have basic knowledge of optical processing, and increases the difficulty of the operator.
At present, an IC pin defect detection method capable of replacing traditional algorithm detection is urgent to appear, and the method is suitable for detecting chips of various types and sizes, and has high robustness and high accuracy.
Disclosure of Invention
The invention aims to provide an IC pin defect detection method based on image processing, which can avoid the defects of traditional algorithm detection and improve the accuracy of IC pin tin connection, tin reduction and pin warping detection. In order to achieve the above purpose, the technical scheme adopted is as follows:
an IC pin defect detection method based on image processing comprises the following steps:
s1, acquiring an IC pin color image;
Step S2, automatic positioning and segmentation of the pin area, which specifically comprises the following steps:
s2.1, mean filtering denoising;
Step S2.2, obtaining all pixel gray values AllValue:
Wherein R NCM represents the gray value possessed by the pixel of the Mth row of the Nth column;
step S2.3, calculating a transverse gray level average value:
Calculating the average gray value of a certain line in the image by using the data in the array in the step S2.2:
Step S2.4, calculating a vertical gray average value: calculating the average gray value of a certain column in the image by utilizing the data in the array in the step S2.2;
S2.5, marking a connected domain mark of a pin area based on a local dynamic threshold algorithm I, wherein the method specifically comprises the following steps:
step S2.51, calculating the gray level range, specifically comprising:
Step S2.51A, creating a one-dimensional discrete function, namely smoothing f (x) by using a Gaussian filter model exp (x), wherein the gray level range f (x) is the gray level range f (x);
Wherein, the gray level range f (x) is:
f(x)=HorProjections(N);x=1~M;
f(x)=VertProjections(M);x=1~N;
Wherein, gaussian filter model exp (x) is respectively:
Step S2.51B, obtaining a first derivative of f (x), and taking the maximum value of the derivative, namely, taking max [ g (x) ];
At this time, the argument corresponding to max [ g (x) ] is x=x0;
g(x)=f'(x);
Step S2.52, binary segmentation:
if f (x) is not less than f (x 0), the pixel point corresponding to f (x) is the foreground, and the pixel value is set to be 1, otherwise, the pixel point is set to be 0;
wherein, the pixel value after the local dynamic range threshold algorithm is applied is Thres (m,n);
A threshold P (m,n) for the current pixel point (m, n) within the current filter window;
Step S2.53, connected domain labeling: carrying out connected domain marking on the region with the pixel point value of 1 in each gray value binary image, and carrying out morphological processing to obtain a processed connected region I;
Step S2.6, automatic positioning and segmentation of the pin area: the first connected domain obtained in the step S2.5 is an automatically separated pin area;
s2.7, taking a minimum circumscribed rectangle for all the obtained pin areas, wherein the rectangle is a set of all the pin areas and non-pin areas, namely the pin areas of the IC chip;
S3, mean filtering denoising;
S4, based on a local dynamic range threshold algorithm II, dividing each filtered pin area image on H, S, V three channels, dividing the pin area image into three images, performing binary segmentation, setting a pixel point with the gray range not lower than a set threshold to be 1, otherwise setting the pixel point to be 0, and thus obtaining a gray range binary image;
step S5, establishing a tin-less feature selection model and a pin-warping feature selection model:
step S6, automatic positioning and segmentation of the non-pin area:
Step S6.1, removing the pin area obtained in the step S2.6 from the pin area of the IC chip in the step S2.7;
s6.2, labeling a connected domain;
S7, mean filtering denoising;
S8, based on a second local dynamic range threshold algorithm, dividing each filtered pin area image into three channels H, S, V, dividing the three images into two binary images, setting a pixel point with the gray range not lower than a set threshold to be 1, otherwise setting the pixel point to be 0, and thus obtaining a gray range binary image;
s9, establishing a tin connection feature selection model;
Step S10, IC pin defect judgment: judging whether the IC pin to be tested is a defective IC pin according to the tin-less feature selection model, the pin-raising feature selection model and the tin-connecting feature selection model.
Preferably, step S4 comprises the steps of:
Step S4.1, calculating the gray level range:
Creating a sliding window to slide on the filtered current pin area image, counting the maximum value and the minimum value of all pixels in the current sliding window, and taking the average value of the maximum value and the minimum value as the gray level range of the current pin area image;
Step S4.2, binary segmentation:
And comparing the gray level difference of the current pin area image with a set threshold T, if the gray level difference is not lower than the set threshold T, setting a pixel point corresponding to the gray level difference as a foreground, and setting the value of the pixel point as 1, otherwise setting the value as 0.
Step S4.3, communicating domain marking:
And (3) marking the connected domain in the region with the pixel point of 1 in each gray level range binary image, and performing morphological processing to obtain a processed connected region II.
Preferably, the low tin feature selection model is: respectively selecting a tin-less characteristic of each second connected region in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin-less characteristic; wherein, the characteristic of less tin satisfies two characteristics simultaneously: in the channel B, the area of the climbing area between the pin and the bonding pad is smaller than a set value; in the R channel, the area of the bonding pad position is larger than a set value;
The foot-raising characteristic selection model is as follows: respectively selecting a tin-less characteristic of each second connected region in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin-less characteristic; wherein, stick up the foot characteristic and satisfy four characteristics below simultaneously: the area of the blue color of the climbing area in the channel B is 0; the area of the central line position of the bonding pad in the R channel is larger than a set value; in the B channel or the G channel, the positions on two sides of the center line of the bonding pad exist; the area of the tail end of the pin in the R channel is smaller than a set value.
Preferably, the tin-connected feature selection model is:
And respectively selecting tin connection features of each connected region III in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin connection.
Wherein, the tin connection characteristic simultaneously satisfies the following three characteristics: the ratio of the solder width to the width of the non-pin area is too large; the ratio of the solder position to the area of the non-pin area is too large; the individual non-lead areas are separated by solder.
Compared with the prior art, the invention has the advantages that:
1. According to the invention, the automatic positioning and segmentation of the pin area are realized by calculating the horizontal gray average value and the longitudinal gray average value and then based on the local dynamic threshold algorithm I; by using the mixed processing of the multi-channel images, each channel image is used as an information source for judging the defects, so that the reliability and the accuracy of defect detection are increased.
2. The invention uses the vertical and horizontal gray average values as the conditions for dividing the pins, eliminates the influence of gray and area total quantity on division caused by different sizes of the pins, is suitable for detecting chips with various types and sizes, and has strong universality.
3. The invention uses the local dynamic numerical algorithm to divide the connected domain of the image instead of using the manual fixed numerical value, so the invention has little influence on the environment.
Drawings
FIG. 1 is a flow chart of a method for detecting defects of IC pins based on image processing;
FIG. 2 is a one-dimensional discrete function diagram;
FIG. 3 is a pin artwork;
FIG. 4 is an automated split pin field;
fig. 5 is a collection of pin, non-pin regions.
Detailed Description
The method for detecting defects of IC pins based on image processing according to the present invention will be described in more detail with reference to the drawings, wherein preferred embodiments of the present invention are shown, and it should be understood that the present invention described herein can be modified by those skilled in the art, while still achieving the advantageous effects of the present invention. Accordingly, the following description is to be construed as broadly known to those skilled in the art and not as limiting the invention.
As shown in fig. 1, an IC pin defect detection method based on image processing includes the following steps:
step S1, obtain the color image of IC pin, as shown in figure 1.
Using an image acquisition device comprising: the color camera, telecentric lens and AOI four-color light source obtain all pin images of the IC chip body on the PCB, up, down, left, right (if present).
The telecentric lens is arranged on the color camera, the AOI light source and the lens are coaxially arranged below the lens, the axes of the light source, the lens and the camera are perpendicular to the plane of the IC chip, and the IC chip and the pins are positioned within the depth of field of the camera lens so as to ensure that the acquired images are clear and usable.
Step S2, automatic positioning and segmentation of the pin area, which specifically comprises the following steps:
step S2.1, mean filtering denoising:
And (3) based on a selective median filtering algorithm, replacing the value of the midpoint of the point region in each IC chip region image obtained in the step (S1) by using the average number of all pixel point values of up, down, left, right, left up, left down, right up and right down, and removing the background noise point and the pin edge noise point, thereby obtaining an enhanced image. And obtaining a filtered IC chip area image.
Step S2.2, acquiring all pixel gray values:
and (2) carrying out image graying treatment on the enhanced images obtained in the step (S2.1), and representing the pixel colors by using pixel gray values.
The graying method is preferably to obtain the gray value of the image by weighting and adding components of three channels R (red), G (green) and B (blue) of the color three-channel image according to a color formula, and convert the gray value into a single-channel gray image. Of course, other graying methods in the prior art may alternatively be employed.
And selecting a certain single-channel image according to actual conditions, and preferably selecting a color channel which does not exist in the PCB base plate.
The gray value of each pixel of the single channel image is saved in a two-dimensional array in the following format, wherein R NCM represents the gray value possessed by the pixel of the nth column and the mth row:
step S2.3, calculating a transverse gray level average value:
Calculating the average gray value of a certain line in the image by using the data in the array in the step S2.2:
step S2.4, calculating a vertical gray average value: calculating the average gray value of a certain column in the image by using the data in the array in the step S2.2:
S2.5, marking a connected domain mark of a pin area based on a local dynamic threshold algorithm I, wherein the method specifically comprises the following steps:
step S2.51, calculating the gray level range, specifically comprising:
In step S2.51A, a one-dimensional discrete function is created, and the gray level difference f (x), as shown in fig. 2, is that a peak in the one-dimensional function represents a pin. Smoothing f (x) by using a Gaussian filter model exp (x);
Wherein, the gray level range f (x) is:
f(x)=HorProjections(N);x=1~M;
f(x)=VertProjections(M);x=1~N;
Wherein, gaussian filter model exp (x) is respectively:
Step S2.51B, obtaining a first derivative of f (x), and taking the maximum value of the derivative, namely, taking max [ g (x) ];
At this time, the argument corresponding to max [ g (x) ] is x=x0;
g(x)=f'(x);
Step S2.52, binary segmentation:
if f (x) is not less than f (x 0), the pixel point corresponding to f (x) is the foreground, and the pixel value is set to be 1, otherwise, the pixel point is set to be 0;
wherein, the pixel value after the local dynamic range threshold algorithm is applied is Thres (m,n);
A threshold P (m,n) for the current pixel point (m, n) within the current filter window;
Step S2.53, connected domain labeling: and (3) marking the connected domain in the region with the pixel point value of 1 in each gray value binary image, and performing morphological processing to obtain a processed connected region I.
Wherein, morphological treatment is prior art, preferably: carrying out gray scale on operation on the first communication region to obtain a communication region after on operation; the open operation includes sequentially performing a corrosion operation and an expansion operation on the connected region using the structural element.
The first connected region refers to a region formed by pixels having the same pixel value and adjacent positions in the image.
Step S2.6, automatic positioning and segmentation of the pin area: the first connected domain obtained in the step S2.5 is an automatically separated pin area; as shown in fig. 4.
S2.7, taking a minimum circumscribed rectangle for all the obtained pin areas, wherein the rectangle is a set of all the pin areas and non-pin areas, namely the pin areas of the IC chip; as shown in fig. 5.
And S3, mean filtering denoising.
And (3) based on a selective mean filtering algorithm, carrying out selective mean filtering and denoising on each pin area image obtained in the step (S2.6) to obtain a filtered pin area image.
The average filtering uses convolution kernels with the size of 3x3, and if the pixel value before the current pixel (M, n) in the current filtering window applies the average filtering algorithm is a (m,n) and the pixel value after the current pixel is applied with the average filtering algorithm is M (m,n), then:
And S4, based on a local dynamic range threshold algorithm II, dividing each filtered pin area image into three channels H, S, V, dividing the three images into two binary segments, setting the pixel point with the gray range not lower than the set threshold as 1, otherwise setting the pixel point as 0, and obtaining a gray range binary image, namely a threshold segmentation image.
The method for binary segmentation of the pin area image by adopting the local dynamic range threshold algorithm specifically comprises the following steps:
Step S4.1, calculating the gray level range:
Creating a sliding window to slide on the filtered current pin area image, counting the maximum value and the minimum value of all pixels in the current sliding window, and averaging the maximum value and the minimum value The gray scale as the current pin field image is extremely poor. Such as: sliding along the current image, the sliding window moves 3 positions, and there are 3 maxima and 3 minima for the current image.
Step S4.2, binary segmentation:
And comparing the gray level difference of the current pin area image with a set threshold T, if the gray level difference is not lower than the set threshold T, setting a pixel point corresponding to the gray level difference as a foreground, and setting the value of the pixel point as 1, otherwise setting the value as 0.
Step S4.3, communicating domain marking:
And (3) marking the connected domain in the region with the pixel point of 1 in each gray level range binary image, and performing morphological processing to obtain a processed connected region II.
Wherein, morphological treatment is prior art, preferably: carrying out gray scale on operation on the second communication region to obtain a communication region after on operation; the open operation comprises the use of structural elements to sequentially adopt corrosion operation and expansion operation for the second communicated region.
The connected domain II refers to a region formed by pixels with the same pixel value and adjacent positions in the image.
Step S5, establishing a tin-less feature selection model and a pin-warping feature selection model:
Wherein, few tin feature selection model: respectively selecting a tin-less characteristic of each second connected region in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin-less characteristic; wherein, the characteristic of less tin satisfies two characteristics simultaneously: a) In the channel B, the area of the climbing area between the pin and the bonding pad is smaller than a set value; b) In the R channel, the area of the bonding pad position is larger than a set value;
And (3) a foot-tilting feature selection model: respectively selecting a tin-less characteristic of each second connected region in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin-less characteristic; wherein, stick up the foot characteristic and satisfy four characteristics below simultaneously: a) In the channel B, the area of the blue color of the climbing area is 0; b) In the R channel, the area of the center line position of the bonding pad is larger than a set value; c) In the B channel or the G channel, the positions on two sides of the center line of the bonding pad exist; d) In the R channel, the area of the tail end of the pin is smaller than a set value;
step S6, automatic positioning and segmentation of the non-pin area:
Step S6.1, the pin area obtained in step S2.6 is removed from the IC chip pin area in step S2.7.
Let the pixel value of the current pixel (a, b) in the IC chip lead area and the pixel value of the removed lead area be Thres (a,b) and the pixel value of the lead area be ThresY (a,b), then:
Step S6.2, communicating domain marking:
And (3) marking the connected domain in the region with the pixel point of 1 in each gray value binary image, and performing morphological processing to obtain a processed connected region III, wherein the processed connected region III is the divided non-pin region.
Wherein, morphological treatment is prior art, preferably: carrying out gray scale on operation on the first communication region to obtain a communication region after on operation; the open operation includes sequentially performing a corrosion operation and an expansion operation on the connected region using the structural element.
Step S7, mean filtering denoising:
and carrying out median filtering on each non-pin image, and removing background noise points and pin edge noise points to obtain an enhanced image.
And S8, based on a second local dynamic range threshold algorithm, dividing each filtered pin area image into three channels H, S, V, dividing the three images into two binary images, setting the pixel point with the gray range not lower than the set threshold as 1, otherwise setting the pixel point as 0, and thus obtaining the gray range binary image.
Step S9, establishing a tin connection feature selection model:
And respectively selecting a tin connection characteristic (between two pins) for each communication area III in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin connection.
Wherein, the tin connection characteristic simultaneously satisfies the following three characteristics: a) The ratio of the solder width to the width of the non-pin area is too large; b) The ratio of the solder position to the area of the non-pin area is too large; c) The individual non-lead areas are separated by solder.
Step S10, IC pin defect judgment: when the IC pin to be tested has any one of A, B and C, the IC pin to be tested is judged to be a defective IC pin.
A. in the low-tin feature selection model, 2 conditions are met simultaneously to be low tin;
B. in the foot-raising feature selection model, 4 conditions are met.
C. in the continuous tin feature selection model, 3 conditions are satisfied.
The foregoing is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any person skilled in the art will make any equivalent substitution or modification to the technical solution and technical content disclosed in the invention without departing from the scope of the technical solution of the invention, and the technical solution of the invention is not departing from the scope of the invention.
Claims (4)
1. The IC pin defect detection method based on image processing is characterized by comprising the following steps:
s1, acquiring an IC pin color image;
Step S2, automatic positioning and segmentation of the pin area, which specifically comprises the following steps:
s2.1, mean filtering denoising;
Step S2.2, obtaining all pixel gray values AllValue:
Wherein R NCM represents the gray value possessed by the pixel of the Mth row of the Nth column;
step S2.3, calculating a transverse gray level average value:
Calculating the average gray value of a certain line in the image by using the data in the array in the step S2.2:
Step S2.4, calculating a vertical gray average value: calculating the average gray value of a certain column in the image by utilizing the data in the array in the step S2.2;
S2.5, marking a connected domain mark of a pin area based on a local dynamic threshold algorithm I, wherein the method specifically comprises the following steps:
step S2.51, calculating the gray level range, specifically comprising:
Step S2.51A, creating a one-dimensional discrete function, namely smoothing f (x) by using a Gaussian filter model exp (x), wherein the gray level range f (x) is the gray level range f (x);
Wherein, the gray level range f (x) is:
f(x)=HorProjections(N);x=1~M;
f(x)=VertProjections(M);x=1~N;
Wherein, gaussian filter model exp (x) is respectively:
Step S2.51B, obtaining a first derivative of f (x), and taking the maximum value of the derivative, namely, taking max [ g (x) ];
At this time, the argument corresponding to max [ g (x) ] is x=x0;
g(x)=f'(x);
Step S2.52, binary segmentation:
if f (x) is not less than f (x 0), the pixel point corresponding to f (x) is the foreground, and the pixel value is set to be 1, otherwise, the pixel point is set to be 0;
wherein, the pixel value after the local dynamic range threshold algorithm is applied is Thres (m,n);
A threshold P (m,n for the current pixel point (m, n) within the current filter window;
Step S2.53, connected domain labeling: carrying out connected domain marking on the region with the pixel point value of 1 in each gray value binary image, and carrying out morphological processing to obtain a processed connected region I;
Step S2.6, automatic positioning and segmentation of the pin area: the first connected domain obtained in the step S2.5 is an automatically separated pin area;
s2.7, taking a minimum circumscribed rectangle for all the obtained pin areas, wherein the rectangle is a set of all the pin areas and non-pin areas, namely the pin areas of the IC chip;
S3, mean filtering denoising;
S4, based on a local dynamic range threshold algorithm II, dividing each filtered pin area image on H, S, V three channels, dividing the pin area image into three images, performing binary segmentation, setting a pixel point with the gray range not lower than a set threshold to be 1, otherwise setting the pixel point to be 0, and thus obtaining a gray range binary image;
step S5, establishing a tin-less feature selection model and a pin-warping feature selection model:
step S6, automatic positioning and segmentation of the non-pin area:
Step S6.1, removing the pin area obtained in the step S2.6 from the pin area of the IC chip in the step S2.7;
s6.2, labeling a connected domain;
S7, mean filtering denoising;
S8, based on a second local dynamic range threshold algorithm, dividing each filtered pin area image into three channels H, S, V, dividing the three images into two binary images, setting a pixel point with the gray range not lower than a set threshold to be 1, otherwise setting the pixel point to be 0, and thus obtaining a gray range binary image;
s9, establishing a tin connection feature selection model;
Step S10, IC pin defect judgment: judging whether the IC pin to be tested is a defective IC pin according to the tin-less feature selection model, the pin-raising feature selection model and the tin-connecting feature selection model.
2. The image processing-based IC pin defect detection method according to claim 1, wherein step S4 includes the steps of:
Step S4.1, calculating the gray level range:
Creating a sliding window to slide on the filtered current pin area image, counting the maximum value and the minimum value of all pixels in the current sliding window, and taking the average value of the maximum value and the minimum value as the gray level range of the current pin area image;
Step S4.2, binary segmentation:
And comparing the gray level difference of the current pin area image with a set threshold T, if the gray level difference is not lower than the set threshold T, setting a pixel point corresponding to the gray level difference as a foreground, and setting the value of the pixel point as 1, otherwise setting the value as 0.
Step S4.3, communicating domain marking:
And (3) marking the connected domain in the region with the pixel point of 1 in each gray level range binary image, and performing morphological processing to obtain a processed connected region II.
3. The method for detecting defects of an IC pin based on image processing according to claim 1, wherein the low tin feature selection model is: respectively selecting a tin-less characteristic of each second connected region in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin-less characteristic; wherein, the characteristic of less tin satisfies two characteristics simultaneously: in the channel B, the area of the climbing area between the pin and the bonding pad is smaller than a set value; in the R channel, the area of the bonding pad position is larger than a set value;
The foot-raising characteristic selection model is as follows: respectively selecting a tin-less characteristic of each second connected region in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin-less characteristic; wherein, stick up the foot characteristic and satisfy four characteristics below simultaneously: the area of the blue color of the climbing area in the channel B is 0; the area of the central line position of the bonding pad in the R channel is larger than a set value; in the B channel or the G channel, the positions on two sides of the center line of the bonding pad exist; the area of the tail end of the pin in the R channel is smaller than a set value.
4. The method for detecting defects of an IC pin based on image processing according to claim 1, wherein the tin connection feature selection model is:
And respectively selecting tin connection features of each connected region III in each threshold segmentation image, so as to detect whether the threshold segmentation image has tin connection.
Wherein, the tin connection characteristic simultaneously satisfies the following three characteristics: the ratio of the solder width to the width of the non-pin area is too large; the ratio of the solder position to the area of the non-pin area is too large; the individual non-lead areas are separated by solder.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311794480.9A CN118037628A (en) | 2023-12-25 | 2023-12-25 | IC pin defect detection method based on image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311794480.9A CN118037628A (en) | 2023-12-25 | 2023-12-25 | IC pin defect detection method based on image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118037628A true CN118037628A (en) | 2024-05-14 |
Family
ID=90986660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311794480.9A Pending CN118037628A (en) | 2023-12-25 | 2023-12-25 | IC pin defect detection method based on image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118037628A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2241878A2 (en) * | 2009-04-15 | 2010-10-20 | Göpel electronic GmbH | Method for inspecting soldering points of electric and electronic components |
CN109785316A (en) * | 2019-01-22 | 2019-05-21 | 湖南大学 | A kind of apparent defect inspection method of chip |
CN111192246A (en) * | 2019-12-27 | 2020-05-22 | 苏州班奈特电子有限公司 | Automatic detection method of welding spot |
CN114549441A (en) * | 2022-02-14 | 2022-05-27 | 中船重工鹏力(南京)智能装备系统有限公司 | Sucker defect detection method based on image processing |
CN115294114A (en) * | 2022-09-30 | 2022-11-04 | 南通艾美瑞智能制造有限公司 | Quality detection method based on ECU circuit welding |
-
2023
- 2023-12-25 CN CN202311794480.9A patent/CN118037628A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2241878A2 (en) * | 2009-04-15 | 2010-10-20 | Göpel electronic GmbH | Method for inspecting soldering points of electric and electronic components |
CN109785316A (en) * | 2019-01-22 | 2019-05-21 | 湖南大学 | A kind of apparent defect inspection method of chip |
CN111192246A (en) * | 2019-12-27 | 2020-05-22 | 苏州班奈特电子有限公司 | Automatic detection method of welding spot |
CN114549441A (en) * | 2022-02-14 | 2022-05-27 | 中船重工鹏力(南京)智能装备系统有限公司 | Sucker defect detection method based on image processing |
CN115294114A (en) * | 2022-09-30 | 2022-11-04 | 南通艾美瑞智能制造有限公司 | Quality detection method based on ECU circuit welding |
Non-Patent Citations (2)
Title |
---|
BIZYS, N等: "Image wavelet transform for PCB Soldering\'s quality evaluation", 《 MECHATRONIC SYSTEMS AND MATERIALS》, vol. 113, 1 January 2006 (2006-01-01), pages 85 - 90 * |
苏珊等: "基于机器视觉的SMT元件引脚连锡自动检测", 《组合机床与自动化加工技术》, vol. 2018, no. 12, 20 December 2018 (2018-12-20), pages 63 - 65 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109785316B (en) | Method for detecting apparent defects of chip | |
CN107945184B (en) | Surface-mounted component detection method based on color image segmentation and gradient projection positioning | |
EP1703465B1 (en) | Color-based inspection of printed circuit boards | |
CN104899871B (en) | A kind of IC elements solder joint missing solder detection method | |
CN201434842Y (en) | Automatic chip appearance defect detection system | |
CN112730460A (en) | Welding defect and intensive rosin joint detection technology for communication IC chip | |
US20040057629A1 (en) | Print inspection method and print inspection apparatus | |
CN110930390B (en) | Chip pin missing detection method based on semi-supervised deep learning | |
CN115239727B (en) | PCB surface defect detection method | |
CN113034488B (en) | Visual inspection method for ink-jet printed matter | |
CN113706525B (en) | Intelligent printed circuit board patch defect identification method based on image processing | |
CN111724375B (en) | Screen detection method and system | |
CN115561247A (en) | Automatic visual inspection system for appearance of electronic component | |
CN107301634A (en) | A kind of robot automatic sorting method and system | |
CN108537772A (en) | The visible detection method of Chip-R positive conductor printing defects | |
CN112669272B (en) | AOI rapid detection method and rapid detection system | |
CN112184689A (en) | Semiconductor device detection method and device, intelligent terminal and storage medium | |
CN114972230A (en) | Method and system for detecting defects of circuit board on production line | |
JP2006194607A (en) | Substrate inspection device, its parameter setting method and parameter setting device | |
CN112288782A (en) | PCB defect detection method based on boundary segment number value | |
CN115165925A (en) | PCB detection device with marking function, marking method, equipment and medium | |
CN114720473A (en) | Defect detection method of vehicle-mounted screen backboard based on machine vision | |
CN114037682A (en) | Two-dimensional automatic detection method for optical element surface defects | |
CN118037628A (en) | IC pin defect detection method based on image processing | |
CN112634259A (en) | Automatic modeling and positioning method for keyboard keycaps |
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 |