Font Size: a A A

Method For Color-ring Resistor Recognition And Measurement In PCB Based On Convolutional Neuaral Network

Posted on:2021-06-27Degree:MasterType:Thesis
Country:ChinaCandidate:Z M LiFull Text:PDF
GTID:2518306122467994Subject:Control Science and Engineering
Abstract/Summary:PDF Full Text Request
Printed Circuit Board(PCB)is the basic component of electronic products,which consists of various electronic components to achieve specific functions.Color-ring resistors are the most common type in PCB.They are distingushed by sequential color rings and may be wrongly assembed in PCB due to similar visual appearance.However,manual inspection of color-ring resistors has low efficiency and high false detection rate.Traditional image-based methods have limitations in solving the locating problem of corlor-ring resistors and color rings in PCB images under various illuminations,imaging distances and views,resulting in difficulies to detect and measure the corlor-ring resistors.To solve this problem,an automatic detection and measuring method for PCB color-ring resistors is proposed based on convolution neural network.The color PCB images in different complex scenes are used to verify the propsoed method.The research topic has high theoretical value and practical importance.The main contributions of this paper include:(1)The dataset contains PCB images with varying illuminations,imaging distances and views.The component layouts of these PCB images are quite different,especially in the number and types of color-ring resistors.Accordingly,the dataset is relatively complete,which is helpful for the subsequent algorithm research and experiment.(2)According to features of PCB images,an automatic detection and segmentation method for color-ring resistors in PCB images is proposed based on the encoder-decoder convolution neural network.To reduce the influence of training data imbalance,the cross-entropy loss function with weights is used to train the network.Then,the optimal model is established by comparing the segmentation accuracy in different parameters.This method is compared with other color-ring resistors detection and segmentation methods that are based on morphology and template matching.The result shows that our method has better robustness and higher segmentation accuracy for PCB images under various illuminations,imaging distance,views and the layout of components.In addition,the processing time for each PCB image is about 0.0875 seconds,which can meet the requirement of practical applications.(3)After obtaining the segmented image by CNN,the minimum external rectangle algorithm is used to locate the resistor.Firstly,the position of each resistor is adjusted to vertical direction using affine transformation.Then,Gauss template matching is proposed to locate color rings of resistors.Finally,the proposed method is tested and verified by 309 color rings.Compared with the traditional method based on Ostu,the location accuracy rate of our method is higher(about 97.7%),which indicates the effectiveness of the proposed location methods for color-ring resistors and color rings.(4)Due to different illuminations of PCB images,the colors of color rings in PCB images are different from standard colors,so it is difficult to determine the colors using HSV range of each standard color.Therefore,a KNN classifier is applied in the present work to distinguish the colors,with Euclidean distance of the gray value of RGB channel of the color ring as KNN distance.Then,the resistance value of the color-ring resistor is obtained according to a formula proposed in the work,and the recognition and measurement of color-ring resistors in PCB are thus realized.The propsed method is tested and verified by 106 color-ring resistors(including 472 color rings).The accuracy of color discrimination is 96.6%,and the accuracy of resistor measurement is 87.7%,which demonstrates the effectiveness of the proposed method.
Keywords/Search Tags:Printed circuit board, Color-ring resistor, Convolutional Neural Network, Image segmentation and Localization, KNN classifier
PDF Full Text Request
Related items