Font Size: a A A

Foreground Extraction And Image Stitching Of Online PCB Inspection

Posted on:2019-08-28Degree:MasterType:Thesis
Country:ChinaCandidate:T Y ZhuFull Text:PDF
GTID:2428330542994175Subject:Precision instruments and machinery
Abstract/Summary:PDF Full Text Request
Printed circuit boards(PCBs)have a wide range of applications in all aspects of the modern industry and are the most basic and important component of electronic de-vices,responsible for electrical connection and insulation.The quality of PCB directly affects the quality of electronic equipment.Therefore,the quality inspection in the PCB production process is particularly important.With the improvement of PCB production accuracy,the line width of PCB is be-coming thinner and thinner.PCB inspection technology has gradually changed from tra-ditional manual inspection to electrical contact testing,functional testing,X-ray inspec-tion,laser inspection,optical inspection and many more automatic detection methods.One of the most widely used and highly automated detection methods is optical detec-tion.Optical inspection combines machine vision,image processing and other methods to detect and identify PCB defects.This paper proposed a method of foreground ex-traction and image stitching based on OpenCV image processing for the online image inspection of PCB.The PCB images for foreground extraction are collected on the production line.Firstly,the collected PCB image is preprocessed to grayscale,which is obtained by using a weighted average of the three R,G,B channels.Then,the grayscale image is stretched by the enhancement processing to increase the contrast of the grayscale image,so that the image has a better segmentation effect in the threshold segmentation.Threshold segmentation is performed on the grayscale image with increased contrast using the largest inter-class variance method.Finally,the foreground portion of the PCB is determined by edge detection with rotating,cutting,and removing black edges of the extracted PCB image.Due to the camera's accuracy and visual field can't be taken into account at the same time,in order to ensure the accuracy of the collected image,the acquired image may only include part of the foreground of the PCB.Therefore the PCB foreground image acquired by the camera needs to be stitched to obtain a complete PCB image.Because there are a lot of repeat units in the PCB image to be stitched,it is impossible to obtain the correct stitching result by directly using feature point detection and match-ing.In this paper,the combination of template matching and feature matching is used to complete the stitching of highly repeated images.The procedure is as follows:In the PCB production,there are reference marks for positioning.Firstly,the average of multiple mark points in the collected multiple PCB images is superimposed to obtain a reference point template for matching,and then the template matching will be used.All the mark points in the PCB image to be stitched are marked,and then the marked image is searched for and matched to the feature points.A transformation matrix for image stitching is obtained,and finally,the fused image is faded out to obtain a complete PCB image.
Keywords/Search Tags:PCB, Image Processing, Foreground Extraction, Image Stitching, OpenCV
PDF Full Text Request
Related items