I. Introduction
Flexible printed circuit board (FPCB) is essentially a board made of polyimide or polyester, which is capable to connect electronic components. Owing to its advantages of flexibility, it has become more and more widely used in the manufacture of mobile electronics products, such as laptop, smart phone, digital camara, etc. Inspection of FPCB guarantees the product’s quality. It is a crucial process but also the largest cost in the manufacture industry [1]. In recent years, automated optical inspection (AOI) has become a popular domain of research because of its high accuracy and low cost compared to human inspection, which is currently the most common detection method[2]. For AOI, edge detection and extraction of the region of interest (ROI) has always been an important step. An effective segmentation method helps to reduce the influence of the irrelevant factors and to enhance the performance of the classifier in the following steps. Therefore, a good segmentation will largely augment the accuracy of the AOI system. Besides, for classifiers that use neural networks, images with smaller size decrease the difficulty and the cost of training a model.