CN108765416B - PCB surface defect detection method and device based on rapid geometric alignment - Google Patents

PCB surface defect detection method and device based on rapid geometric alignment Download PDF

Info

Publication number
CN108765416B
CN108765416B CN201810617991.6A CN201810617991A CN108765416B CN 108765416 B CN108765416 B CN 108765416B CN 201810617991 A CN201810617991 A CN 201810617991A CN 108765416 B CN108765416 B CN 108765416B
Authority
CN
China
Prior art keywords
image
detected
pcb
iii
block
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.)
Active
Application number
CN201810617991.6A
Other languages
Chinese (zh)
Other versions
CN108765416A (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.)
Fujian University of Technology
Original Assignee
Fujian 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 Fujian University of Technology filed Critical Fujian University of Technology
Priority to CN201810617991.6A priority Critical patent/CN108765416B/en
Publication of CN108765416A publication Critical patent/CN108765416A/en
Application granted granted Critical
Publication of CN108765416B publication Critical patent/CN108765416B/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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • 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]

Abstract

The invention discloses a PCB surface defect detection method based on quick geometric alignment, which adopts machine vision to detect the surface defect of a PCB, an image acquisition system acquires an image to be detected of the PCB to be detected, and defect identification is carried out after the positioning of the PCB image based on the quick geometric alignment method. The invention provides a platform scheme design of a whole welding detection system, which can meet the detection efficiency requirement of a production line of small and medium enterprises, can finish high-quality welding detection at low cost, and is suitable for detection of the small and medium enterprises. And the motion error priori is used as a constraint condition to perform quick geometric positioning of the characteristic points, so that mismatching and multi-region time-sharing detection are reduced, and the welding detection of the large-area PCB element is realized.

Description

PCB surface defect detection method and device based on rapid geometric alignment
Technical Field
The invention relates to the field of PCB welding defect detection, in particular to a PCB surface defect detection method and device based on rapid geometric alignment.
Background
A PCB (printed circuit board) is an information carrier for various electric components as a basic component of an electronic product, and plays an important role in modern electronic equipment. With the transition of the times, the PCB industry at home and abroad is developing in stress, and each link from production and processing to product maintenance becomes an eye point for improving efficiency and quality and reducing cost.
AOI (Automatic Optic Inspection) is known as automated optical inspection, and is a device that detects common defects encountered in welding production based on optical principles. The PCB is automatically scanned by a camera, images are acquired, the tested welding spots are compared with qualified parameters in a database, defects on the PCB are checked through image processing, and the defects are displayed/marked by a display or an automatic mark for repair by maintenance personnel. AOI is a new test technology, but is rapidly developed and gradually becomes a core technology for PCB detection in an automatic production line. But the current high-end AOI equipment is mainly monopolized by foreign companies and is high in price; most small-scale electronic product manufacturers still adopt a traditional and backward manual visual inspection mode to detect the PCB based on cost consideration. On the other hand, the positioning algorithm and the positioning mode in the AOI have limitations that the algorithm has high computational complexity, low speed and low robustness, and the detection feature point matching reliability is poor, for example, the SURF feature point matching algorithm is used for detecting the welding defect of a large-area PCB, and has low speed and low precision.
Disclosure of Invention
The invention aims at developing a PCB surface defect detection method and device based on quick geometric alignment with low cost, high efficiency and high precision for small and medium enterprises.
In order to achieve the above purpose, the technical scheme of the invention is as follows: a PCB surface defect detection method based on rapid geometric alignment adopts machine vision to detect PCB surface defects, comprising the following steps:
step one, a motion platform conveys a PCB5 to be detected to a region to be detected, an image acquisition system acquires an image to be detected of the PCB to be detected, and the image to be detected is transmitted to an upper computer;
step two, the upper computer pre-processes the image to be detected, and the K nearest neighbor mean filtering method is adopted to carry out image smoothing filtering; graying the image by a weighted average method; enhancing image contrast by adopting a histogram equalization method, strengthening image edges, and highlighting image details;
step three, PCB image positioning
Thirdly, extracting standard feature points from the standard image through a SURF algorithm;
thirdly-2, converting the mechanical error of the motion platform into a pixel error through calibration, and determining a pixel error threshold range according to the threshold range of the mechanical error;
thirdly, extracting feature points to be detected from the image to be detected through a SURF algorithm;
thirdly-4, matching the standard characteristic points with the characteristic points to be detected through a SURF algorithm to obtain matched characteristic point pairs;
thirdly, calculating Euclidean distance of the feature point pairs in the third section 4;
thirdly, judging the Euclidean distance of each characteristic point pair in the third 5 through the pixel error in the third 2, wherein the characteristic point pair with the Euclidean distance which does not meet the pixel error threshold range is invalid matching, and the characteristic point pair with the Euclidean distance which meets the pixel error threshold range is valid matching;
three=7, the screened feature point pairs which are effectively matched are used for calculating a transformation matrix H of the image to be detected relative to the standard image by adopting a least square method:
three-8, extracting H of transformation matrix H 2 、h 5 Determining the relative coordinate position relation between the image to be measured and the standard image; positioning of the PCB in the image to be detected is completed;
step four, the upper computer performs defect identification by using a BP neural network algorithm;
and fifthly, outputting the defect identification result to a human-computer interface by the upper computer.
A large-area PCB surface defect detection method based on quick geometric alignment adopts multi-area time-sharing visual detection to complete large-area PCB surface defect detection; the method comprises the following specific steps:
step I, conveying the large-area PCB to a region to be detected by a motion platform, carrying out block shooting on the large-area PCB to be detected by an image acquisition system, acquiring a plurality of block images to be detected, and transmitting all the block images to be detected to an upper computer;
step II, the upper computer pre-processes the block image to be detected, and the image smoothing filtering is carried out by adopting a K nearest neighbor mean filtering method; graying the image by a weighted average method; enhancing image contrast by adopting a histogram equalization method, strengthening image edges, and highlighting image details;
step III, PCB blocking image positioning
Thirdly, extracting standard characteristic points from the standard block image through a SURF algorithm;
thirdly-2, converting the mechanical error of the motion platform into a pixel error through calibration, and determining a pixel error threshold range according to the threshold range of the mechanical error;
thirdly, extracting feature points to be detected from the block images to be detected through a SURF algorithm;
thirdly-4, matching the standard characteristic points with the characteristic points to be detected through a SURF algorithm to obtain matched characteristic point pairs;
thirdly, calculating Euclidean distance of the feature point pairs in the third section 4;
thirdly, judging the Euclidean distance of each characteristic point pair in the third 5 through the pixel error in the third 2, wherein the characteristic point pair with the Euclidean distance which does not meet the pixel error threshold range is invalid matching, and the characteristic point pair with the Euclidean distance which meets the pixel error threshold range is valid matching;
three=7, calculating a transformation matrix H of the block image to be detected relative to the standard image by adopting a least square method through the screened feature point pairs which are effectively matched:
three-8, extracting H of transformation matrix H 2 、h 5 Determining the relative coordinate position relation of the to-be-detected block image and the standard block image; positioning of the PCB in the to-be-detected segmented image is completed;
step IV, the upper computer performs defect identification on each to-be-detected block image by using a BP neural network algorithm;
step V, splicing the segmented images to be detected, selecting partial pixels on two rows with specific values in the overlapping part of a pair of segmented images to be detected by using a ratio matching method, and searching in other segmented images to be detected by taking the ratio of the pixels on the two rows as a template, wherein the segmented images to be detected which are optimally matched are adjacent segmented images;
step VI, fusing the images, namely fusing all the block images to be detected into a complete image to be detected according to the splicing result in the step V;
and step VII, outputting the defect identification result to a human-computer interface by the upper computer.
The PCB surface defect detection device based on the rapid geometric alignment comprises a motion platform, wherein the motion platform comprises a driving device, the driving device is connected with a screw rod module, a carrier platform for placing a PCB to be detected is arranged on the screw rod module, the driving device is controlled by a motion controller, the screw rod module is driven by the driving device to drive the carrier platform to move in a horizontal plane, and a sensor for detecting that the carrier platform reaches a region to be detected is also arranged on the motion platform; the system comprises an image acquisition system, wherein the image acquisition system comprises an industrial camera arranged above a motion platform, and the industrial camera is provided with a C-mouth lens; a light source system is arranged around the image acquisition system, the light source system comprises four groups of LED strip diffuse reflection light sources, the four groups of LED strip diffuse reflection light sources respectively irradiate the front surface of the PCB to be detected from fixed angles around, and the industrial camera acquires clear images; the intelligent image processing system comprises an upper computer, wherein the upper computer is connected with the motion controller, the sensor, the image acquisition system and the light source system, and an image processing module is arranged in the upper computer.
The beneficial effects of the invention are as follows:
(1) The invention provides a platform scheme design of a whole welding detection system, which can meet the detection efficiency requirement of a production line of small and medium enterprises, can finish high-quality welding detection at low cost, and is suitable for detection of the small and medium enterprises.
(2) And the motion error priori is used as a constraint condition to perform quick geometric positioning of the characteristic points, so that mismatching and multi-region time-sharing detection are reduced, and the welding detection of the large-area PCB element is realized.
Drawings
FIG. 1 is a schematic diagram of the overall structure of the present invention;
FIG. 2 is a front view of an image acquisition system, a light source system, and a motion platform structure;
FIG. 3 is a schematic diagram of large area PCB image acquisition;
FIG. 4 is a block image schematic of a large area PCB;
fig. 5 is a schematic diagram of image stitching.
Detailed Description
The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
Embodiment 1, a method for detecting surface defects of a PCB based on rapid geometric alignment, using machine vision to detect surface defects of the PCB, includes the steps of:
step one, the motion platform 4 shown in fig. 1 and 2 conveys the PCB5 to be tested to the area to be tested, the image acquisition system 2 acquires the image to be tested of the PCB5 to be tested, and transmits the image to be tested to the upper computer 4.
Step two, the upper computer 4 carries out preprocessing on the image to be detected, and carries out image smoothing filtering by adopting a K nearest neighbor mean filtering method; graying the image by a weighted average method; and enhancing the image contrast by adopting a histogram equalization method, strengthening the image edge and highlighting the image details.
The conventional SURF feature point matching algorithm is used for judging feature point pairs by calculating whether the ratio among a plurality of matching point pairs meets a specified threshold value or not. Aiming at the matching problem of the characteristic point pairs in the PCB welding defect detection, a SURF (modified SURF, MSURF) positioning algorithm combined with distance screening is provided under the prior condition of the error range caused by the motion of a known mechanical system. After the PCB is welded, the PCB is directly sent to the area to be detected through the moving platform 1, and the PCB basically does not rotate but only moves in a translation mode in the process, so that only mechanical errors of translation exist. The algorithm takes the known mechanical error range of the system motion platform 1 as a priori condition, sets a threshold value for the distance between the characteristic point pairs to remove the wrong matched characteristic point pairs, and accelerates the geometric alignment of the characteristic points.
And thirdly, positioning a PCB image. The PCB positioning process of the invention is as follows:
thirdly, extracting standard feature points from the standard image through a SURF algorithm;
thirdly-2, converting the mechanical error of the motion platform 1 into a pixel error through calibration, and determining a pixel error threshold range according to the threshold range of the mechanical error;
thirdly, extracting feature points to be detected from the image to be detected through a SURF algorithm;
thirdly-4, matching the standard characteristic points with the characteristic points to be detected through a SURF algorithm to obtain matched characteristic point pairs;
thirdly, calculating Euclidean distance of the feature point pairs in the third section 4;
thirdly, judging the Euclidean distance of each characteristic point pair in the third 5 through the pixel error in the third 2, wherein the characteristic point pair with the Euclidean distance which does not meet the pixel error threshold range is invalid matching, and the characteristic point pair with the Euclidean distance which meets the pixel error threshold range is valid matching;
let the characteristic point pair be A (x 1 ,y 1 )、B(x 2 ,y 2 ) The euclidean distance is:
by setting a threshold range of mechanical errors [ D ] min ,D max ]Matching the feature points, and if the Euclidean distance of the feature point pairs meets the range, namely:
D min <d(x,y)<D max
if the matching is within the range, the matching is successful, otherwise, the matching is failed.
Three=7, the screened feature point pairs which are effectively matched are used for calculating a transformation matrix H of the image to be detected relative to the standard image by adopting a least square method:
three-8, extracting H of transformation matrix H 2 、h 5 Determining the relative coordinate position relation between the image to be measured and the standard image; positioning of the PCB in the image to be detected is completed;
step four, the upper computer 4 performs defect identification by using a BP neural network algorithm;
and step five, the upper computer 4 outputs the defect identification result to the human-computer interface.
Embodiment 2, as shown in fig. 3, a method for detecting surface defects of a large-area PCB based on rapid geometric alignment, which adopts multi-area time-sharing detection to complete detection of welding defects of the large-area PCB.
The industrial camera 21 performs block shooting on the large-area PCB to be tested by a proper amount of translation control of the motion platform 1 to acquire each partial image, and then performs time-sharing detection. And then the complete positioned PCB welding defect image is formed through image stitching. And (3) sending out the large-area PCB to be tested and receiving the next PCB until shooting is completed.
The method comprises the following specific steps:
step I, the motion platform shown in FIG. 1 conveys the large-area PCB to the area to be detected, the image acquisition system 2 performs block shooting on the large-area PCB to be detected, and as shown in FIG. 3, acquires a plurality of block images to be detected and transmits all the block images to be detected to the upper computer 4.
Step II, the upper computer 4 pre-processes the block image to be detected, and adopts a K nearest neighbor mean value filtering method to carry out image smoothing filtering; graying the image by a weighted average method; and enhancing the image contrast by adopting a histogram equalization method, strengthening the image edge and highlighting the image details.
Step III, PCB blocking image positioning
Thirdly, extracting standard characteristic points from the standard block image through a SURF algorithm;
thirdly-2, converting the mechanical error of the motion platform into a pixel error through calibration, and determining a pixel error threshold range according to the threshold range of the mechanical error;
thirdly, extracting feature points to be detected from the block images to be detected through a SURF algorithm;
thirdly-4, matching the standard characteristic points with the characteristic points to be detected through a SURF algorithm to obtain matched characteristic point pairs;
thirdly, calculating Euclidean distance of the feature point pairs in the third section 4;
thirdly, judging the Euclidean distance of each characteristic point pair in the third 5 through the pixel error in the third 2, wherein the characteristic point pair with the Euclidean distance which does not meet the pixel error threshold range is invalid matching, and the characteristic point pair with the Euclidean distance which meets the pixel error threshold range is valid matching;
three=7, calculating a transformation matrix H of the block image to be detected relative to the standard image by adopting a least square method through the screened feature point pairs which are effectively matched:
three-8, extracting H of transformation matrix H 2 、h 5 Determining the relative coordinate position relation of the to-be-detected block image and the standard block image; and positioning the PCB in the to-be-detected segmented image.
Step IV, the upper computer 4 performs defect identification on each to-be-detected block image by using a BP neural network algorithm;
and V, splicing the segmented images to be detected, selecting partial pixels on two rows spaced by a specific value in the overlapping part of one pair of segmented images to be detected by using a ratio matching method, and searching in other segmented images to be detected by taking the ratio of the pixels on the two rows as a template, wherein the segmented images to be detected which are optimally matched are adjacent segmented images.
As shown in fig. 4 and 5, the left image Picture1 is an image of (w1×h) pixels, and the right image Picture2 is an image of (w2×h) pixels, and W1 and W2 may be equal or different. Pictures 1 and 2 are in a left-right overlapping relationship, with Pictures 1 to the left of Pictures 2. And selecting two columns of pixels (the j-th column and the j+span column) with the span interval in the overlapping region of the Picture1, and calculating the corresponding pixel ratio, namely the a template.
a(i,j)=
Picture1(i,j)/Picture2(i,(i+span)),
Where i ε (1, H), j is the selected column.
In Picture2, two columns with span intervals are sequentially taken from the first column, and the ratio of the corresponding pixels is calculated to obtain the b template.
b(i,j)=Picture21(i,j)/Picture22(i,j)
Wherein Picture21 (i, j) =picture 2 (i, j), i e (1, h), j e (1, w 2-span); picture22 (i, j) =Picture2 (i, j), i ε (1, H), j ε (span+1, W2).
And calculating the difference value between the template a and the template b to obtain the template c.
c(i,j)=(a(i,j)-b(i,j)) 2
Where i is E (1, H), j is E (1, W2-span).
c is a two-dimensional array, calculates the sum of column vectors corresponding to c, and obtains sum),the size of Sum (j) reflects the difference in column for the selected pixels of the two images, the minimum Sum of Sum (j) min Corresponding column coordinate min The best matching column is the image splicing position.
And step VI, fusing the images, and fusing all the segmented images to be detected into a complete image to be detected according to the splicing result in the step V.
From the above, the position of the best match is determined, and the size of the overlap region between Picture1 and Picture2 can be calculated, so that correct stitching can be completed.
And on the basis of weighing the efficiency and quality of the algorithm, a weighted average method is adopted to eliminate the splice seam, so that the splice area is smooth, the image quality is improved, and the large-area detection is facilitated. The image gray values of the overlapping areas are first recalculated.
P 3 =d×P 1 +(1-d)×P 2
Wherein d is E (0, 1), P 1 P is the gray value of Picture1 2 P is the gray value of Picture1 3 And d is a weight value for the gray value of the fused image.
d can be obtained by calculating the pixel points of the overlapping area of the two images, and the sum of all pixels of the overlapping area of the Picture1 is sum flap1 All pixel sums of Picture2 overlapping region are sum flap2 D is equal to the sum of the Picture1 overlap region pixel sum divided by the sum of the Picture1 overlap region pixel sum and the Picture2 overlap region pixel sum, i.e
d=sum flap1 /(sum flap1 +sum flap2 )。
The result of the weight value d is obtained through the calculationThereby obtaining the gray value P of the new fused image 3 And (3) outputting a new image according to the gray value, and finally obtaining a complete and clear image.
And step VII, outputting the defect identification result to a human-computer interface by the upper computer.
As shown in fig. 1 and 2, a PCB surface defect detection device based on rapid geometric alignment is used to implement the methods of embodiment 1 and embodiment 2.
The device comprises a motion platform 1, the motion platform 1 comprises a driving device 11, the driving device 11 is connected with a screw rod module 12, a carrier table 13 for placing a PCB5 to be tested is arranged on the screw rod module 12, the driving device 11 is controlled by a motion controller (not shown in the figure), the screw rod module 12 is driven by the driving device 11 to drive the carrier table 13 to move in a horizontal plane, and a sensor 14 for detecting whether the carrier table 13 reaches a region to be tested is further arranged on the motion platform 1.
The device also comprises an image acquisition system 2, wherein the image acquisition system 2 comprises an industrial camera 21 arranged above the motion platform 1, and the industrial camera 21 is provided with a C-mouth lens 22. The industrial camera 21 is placed above the PCB5 to be tested, the optical center is perpendicular to the PCB5 to be tested, and its height is adjustable by the size of the PCB and the required accuracy.
The light source system 3 is arranged around the image acquisition system 2, the light source system comprises four groups of LED strip diffuse reflection light sources 31, the four groups of strip diffuse reflection light sources 31 are surrounded around the industrial camera 21 in a square form to form a surrounding diffuse reflection light source, and the surrounding diffuse reflection light source is kept at a certain distance and angle from the PCB5 to be detected for illumination, so that the interference of external light is eliminated, the quality of the image of the PCB5 to be detected, which is acquired by the industrial camera 21 in the system, is improved, and the detection is facilitated.
According to the system requirement, a CMOS industrial camera with the model number of MQ042CG-CM and a C-mouth lens with the model number of HK3514MP5 and the focal length of 35mm aperture 1.45MP are selected. The CMOS (Complementary Metal-Oxide Semiconductor) camera has high imaging quality, low cost, low power consumption and resolution up to 400 ten thousand pixels. The C-mouth lens with the model HK3514MP5 and the focal length of 35mm and the aperture of 1.45MP has a compact structural design, is low-distortion imaging (lower than 1.0%) corresponding to the resolution of a 500-ten-thousand-pixel camera, and is suitable for an MQ042CG-CM camera.
The device also comprises an upper computer 4, wherein the upper computer 4 is connected with the motion controller, the sensor, the image acquisition system 2 and the light source system 3, and an image processing module 41 is arranged in the upper computer 4. The image processing module 41 specifically completes image preprocessing and PCB image positioning, and then the upper computer 4 completes defect identification and feedback.
The image acquisition starts, the upper computer 4 sends a command to the motion controller, the motion controller converts the command into an electric signal to drive the driving module 11 to rotate, and the driving module 11 rotates to drive the screw rod module 12 to rotate so as to enable the objective table 13 to horizontally move, so that the objective table reaches a specified area to be detected. The sensor 14 then obtains a signal and the industrial camera 21 performs image acquisition.
The described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.

Claims (2)

1. A PCB surface defect detection method based on rapid geometric alignment adopts machine vision to detect the surface defect of the PCB, which is characterized by comprising the following steps:
step one, a motion platform conveys a PCB to be detected to a region to be detected, an image acquisition system acquires an image to be detected of the PCB to be detected, and the image to be detected is transmitted to an upper computer;
step two, the upper computer pre-processes the image to be detected, and the K nearest neighbor mean filtering method is adopted to carry out image smoothing filtering; graying the image by a weighted average method; enhancing image contrast by adopting a histogram equalization method, strengthening image edges, and highlighting image details;
step three, positioning a PCB image:
step three-1, extracting standard feature points from a standard image through a SURF algorithm;
step three-2, converting the mechanical error of the motion platform into a pixel error through calibration, and determining a pixel error threshold range according to the threshold range of the mechanical error;
step three-3, extracting feature points to be detected from the preprocessed image to be detected through a SURF algorithm;
step three-4, matching the standard characteristic points with the characteristic points to be detected through a SURF algorithm to obtain matched characteristic point pairs;
step three-5, calculating Euclidean distance of the feature point pairs in the step three-4;
step three-6, judging the Euclidean distance of each characteristic point pair in the step three-5 through the pixel error in the step three-2, wherein the characteristic point pair with the Euclidean distance which does not meet the pixel error threshold range is invalid matching, and the characteristic point pair with the Euclidean distance which meets the pixel error threshold range is valid matching;
step three-7, calculating a transformation matrix H of the preprocessed image to be detected relative to the standard image by adopting a least square method for the screened effective matched characteristic point pairs:
step three-8, extracting H of the transformation matrix H 2 、h 5 Determining the relative coordinate position relation between the preprocessed image to be detected and the standard image; positioning the PCB in the preprocessed image to be detected;
step four, the upper computer carries out defect identification on the image to be detected processed in the step three by using a BP neural network algorithm;
and fifthly, outputting the defect identification result to a human-computer interface by the upper computer.
2. A large-area PCB surface defect detection method based on quick geometric alignment is characterized in that multi-area time-sharing visual detection is adopted to finish large-area PCB surface defect detection; the method comprises the following specific steps:
step I, conveying the large-area PCB to a region to be detected by a motion platform, carrying out block shooting on the large-area PCB to be detected by an image acquisition system, acquiring a plurality of block images to be detected, and transmitting all the block images to be detected to an upper computer;
step II, the upper computer pre-processes the block image to be detected, and the image smoothing filtering is carried out by adopting a K nearest neighbor mean filtering method; graying the image by a weighted average method; enhancing image contrast by adopting a histogram equalization method, strengthening image edges, and highlighting image details;
step III, PCB blocking image positioning:
III-1, extracting standard feature points from the standard block image through a SURF algorithm;
III-2, converting the mechanical error of the motion platform into a pixel error through calibration, and determining a pixel error threshold range according to the threshold range of the mechanical error;
III-3, extracting feature points to be detected from the preprocessed segmented image to be detected through a SURF algorithm;
III-4, matching the standard characteristic points with the characteristic points to be detected through a SURF algorithm to obtain matched characteristic point pairs;
step III-5, calculating Euclidean distance of the feature point pairs in step III-4;
step III-6, judging the Euclidean distance of each characteristic point pair in step III-5 through the pixel error in step III-2, wherein the characteristic point pair with the Euclidean distance not meeting the pixel error threshold range is invalid match, and the characteristic point pair with the Euclidean distance meeting the pixel error threshold range is valid match;
III-7, calculating a transformation matrix H of the preprocessed to-be-detected block image relative to the standard image by using a least square method according to the screened effective matched characteristic point pairs:
step III-8, extracting H of the transformation matrix H 2 、h 5 Determining the relative coordinate position relation between the preprocessed to-be-detected block image and the standard block image; positioning of the PCB in the preprocessed to-be-detected block image is completed;
step IV, the upper computer performs defect identification on each to-be-detected block image processed in the step III by using a BP neural network algorithm;
step V, splicing the to-be-detected segmented images processed in the step IV; selecting an overlapping part of the block images to be detected processed in the step IV by using a ratio matching method, selecting pixels on two rows of the overlapping part with a specific value interval, searching other block images to be detected processed in the step IV by taking the ratio of corresponding pixels on the two rows as a template, and obtaining adjacent blocks by using the other block images to be detected processed in the step IV which are optimally matched;
step VI, fusing the images, namely fusing all the to-be-detected block images processed in the step V into a complete to-be-detected image according to the splicing result in the step V;
and step VII, outputting the defect identification result to a human-computer interface by the upper computer.
CN201810617991.6A 2018-06-15 2018-06-15 PCB surface defect detection method and device based on rapid geometric alignment Active CN108765416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810617991.6A CN108765416B (en) 2018-06-15 2018-06-15 PCB surface defect detection method and device based on rapid geometric alignment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810617991.6A CN108765416B (en) 2018-06-15 2018-06-15 PCB surface defect detection method and device based on rapid geometric alignment

Publications (2)

Publication Number Publication Date
CN108765416A CN108765416A (en) 2018-11-06
CN108765416B true CN108765416B (en) 2023-10-03

Family

ID=64022732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810617991.6A Active CN108765416B (en) 2018-06-15 2018-06-15 PCB surface defect detection method and device based on rapid geometric alignment

Country Status (1)

Country Link
CN (1) CN108765416B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343445A (en) * 2018-12-06 2019-02-15 华域汽车车身零件(武汉)有限公司 A kind of poor counting of robot production line leakproof sequence and synchronous clearing control system
CN109444172A (en) * 2018-12-13 2019-03-08 苏州卓融新能源科技有限公司 A kind of automatic optical detection device and its method suitable for artificial intelligence detection PCB
CN109580646A (en) * 2018-12-21 2019-04-05 苏州绿控传动科技股份有限公司 A method of by camera to PCBA appearance test
CN110346704B (en) * 2019-07-02 2022-05-20 广州视源电子科技股份有限公司 Method, device and equipment for determining test file in board test and storage medium
CN110544238B (en) * 2019-08-12 2023-01-06 华南理工大学 Flexible circuit board line defect identification method based on geometric positioning
CN110487819A (en) * 2019-09-19 2019-11-22 广东正业科技股份有限公司 A kind of online measuring device and measurement method
CN112683790A (en) * 2019-10-17 2021-04-20 神讯电脑(昆山)有限公司 Image detection scanning method and system for possible defects on surface of object
CN112683787A (en) * 2019-10-17 2021-04-20 神讯电脑(昆山)有限公司 Object surface detection system and detection method based on artificial neural network
CN112683921A (en) * 2019-10-17 2021-04-20 神讯电脑(昆山)有限公司 Image scanning method and image scanning system for metal surface
CN111260625B (en) * 2020-01-15 2021-06-18 征图新视(江苏)科技股份有限公司 Automatic extraction method for offset printing large image detection area
CN113808067A (en) * 2020-06-11 2021-12-17 广东美的白色家电技术创新中心有限公司 Circuit board detection method, visual detection equipment and device with storage function
CN112304960B (en) * 2020-12-30 2021-08-10 中国人民解放军国防科技大学 High-resolution image object surface defect detection method based on deep learning
CN112964723B (en) * 2021-02-01 2023-11-03 苏州百迈半导体技术有限公司 Visual detection method and system for double-sided multi-target equidistant array
CN113109350A (en) * 2021-03-23 2021-07-13 深圳中科飞测科技股份有限公司 Detection method, system, device and computer readable storage medium
CN113763322A (en) * 2021-07-30 2021-12-07 深圳顺络电子股份有限公司 Pin Pin coplanarity visual detection method and device
CN114047123B (en) * 2021-10-09 2024-04-09 无锡芯羿达微电子有限公司 Method and system for detecting production defects of integrated board
CN114638824B (en) * 2022-05-11 2022-08-23 成都数联云算科技有限公司 Fusion method, device, equipment and medium for collecting images based on AOI equipment
CN115063613B (en) * 2022-08-09 2023-07-14 海纳云物联科技有限公司 Method and device for verifying commodity label
CN117182379B (en) * 2023-08-28 2024-04-12 惠州欧鹏电子科技有限公司 Bluetooth sound box chip welding quality detection method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103217438A (en) * 2013-04-02 2013-07-24 天津大学 Accurate circuit board element location and detection method based on image feature
CN107389701A (en) * 2017-08-22 2017-11-24 西北工业大学 A kind of PCB visual defects automatic checkout system and method based on image
CN107481273A (en) * 2017-07-12 2017-12-15 南京航空航天大学 A kind of Spacecraft Autonomous Navigation rapid image matching method
CN107918927A (en) * 2017-11-30 2018-04-17 武汉理工大学 A kind of matching strategy fusion and the fast image splicing method of low error
CN208207914U (en) * 2018-06-15 2018-12-07 福建工程学院 PCB surface defect detecting device based on fast geometric alignment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567724B (en) * 2010-12-11 2016-06-22 罗普特(厦门)科技集团有限公司 Image correction system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103217438A (en) * 2013-04-02 2013-07-24 天津大学 Accurate circuit board element location and detection method based on image feature
CN107481273A (en) * 2017-07-12 2017-12-15 南京航空航天大学 A kind of Spacecraft Autonomous Navigation rapid image matching method
CN107389701A (en) * 2017-08-22 2017-11-24 西北工业大学 A kind of PCB visual defects automatic checkout system and method based on image
CN107918927A (en) * 2017-11-30 2018-04-17 武汉理工大学 A kind of matching strategy fusion and the fast image splicing method of low error
CN208207914U (en) * 2018-06-15 2018-12-07 福建工程学院 PCB surface defect detecting device based on fast geometric alignment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄靖 等.基于MSURF算法的PCB图像配准.福建工程学院学报.2018,第16卷(第3期),第275-280页. *

Also Published As

Publication number Publication date
CN108765416A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108765416B (en) PCB surface defect detection method and device based on rapid geometric alignment
CN208207914U (en) PCB surface defect detecting device based on fast geometric alignment
CN108918542B (en) Optical cable surface defect detection device and method
CN109974582A (en) A kind of the conductor diameters non-contact vision detection device and method of automotive wire bundle
CN102901737A (en) Automatic optical detection method
CN111229648A (en) Solar cell panel flaw detection system and detection method based on machine vision
CN109693140B (en) Intelligent flexible production line and working method thereof
CN206223686U (en) A kind of LCD open defects detecting system
CN110966956A (en) Binocular vision-based three-dimensional detection device and method
CN111598771B (en) PCB (printed Circuit Board) defect detection system and method based on CCD (Charge coupled device) camera
CN102879404B (en) System for automatically detecting medical capsule defects in industrial structure scene
CN104483320A (en) Digitized defect detection device and detection method of industrial denitration catalyst
CN114280075A (en) Online visual inspection system and method for surface defects of pipe parts
CN111551559A (en) LCD (liquid Crystal display) liquid crystal screen defect detection method based on multi-view vision system
CN114820439A (en) PCB bare board defect detection system and method based on AOI
CN110097540A (en) The visible detection method and device of polygon workpeace
CN114022436A (en) Detection method, device and detection equipment for printed circuit board
CN103091332B (en) Detection method and detection system of U-shaped powder pipe based on machine vision
CN105699386B (en) A kind of automatic cloth inspection labeling method using contact-type image sensor
CN112033971A (en) Visual flaw detection system and method
CN208752021U (en) A kind of machine vision device detecting household plate surface defect
CN116091506A (en) Machine vision defect quality inspection method based on YOLOV5
CN105738376B (en) A kind of automatic cloth inspecting machine using contact-type image sensor
CN111855681B (en) Online non-stop AOI (automatic optical inspection) detection method
CN115393255A (en) Aviation rod piece automatic assembly detection device and method based on vision and neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant