A FPC Defect Detection Algorithm Based on Template Matching
Aiming at the low efficiency and high error rate of manual inspection of Flexible Printed Circuit(FPC)on the production line,an FPC defect detection algorithm based on template matching is proposed.The algorithm first separates the FPC picture to be tested and the template picture from the RGB space of their respective R channel pictures for template matching,performs image registration on the test image to obtain the area where the gold finger is located,and uses this area to perform binarization,open operations,Contour ex-traction and screening,extract the top and bottom points of the gold finger contour map to fit a straight line on the contour map to form a closed contour,and determine the contour area,contour length,and contour aspect ratio of the closed contour to achieve The location of the defect area.Experimental results show that the algorithm has a good detection effect,high positioning accuracy,and can achieve accu-rate positioning of FPC surface defects.
FPCtemplate matchingContour extractionStraight line fitting