Abstract
The invention provides a detection method. The detection method comprises the following steps: carrying out binarization processing on an input image related to a printed circuit board; judging a plurality of contour lines belonging to the black-and-white boundary or the image frame in the input image, and defining the contour lines as a plurality of line segment objects; screening each line segment object according to a perimeter threshold value and the number of times of passing through an image frame to obtain a plurality of candidate broken line objects; according to the midpoint coordinate of the broken line end of each candidate broken line object and a first set line distance, whether the candidate broken line object is classified into a first group belonging to the broken line or not is judged; therefore, the detection method capable of detecting the broken line position of the circuit of the printed circuit board without using a standard template and a large amount of data is realized.