A detection method includes: binarizing an input image related to a printed circuit board and having a image border; determining that the input image after the binarization process belongs to at least one contour line of the black and white boundary or the image border, and defining it as the corresponding at least one line segment object; determining whether the number of times that one of the at least one line segment object passes through the image border is equal to 4; determining that the one of the at least one line segment object is a short-circuit object, when the number of times that the one of the at least one line segment object passes through the image border is equal to 4. In this way, the detection method that can detect the line short circuit position of the printed circuit board without the use of standard templates and a large amount of data is realized. |