Abstract
A method for detecting an undesired connection forming a short circuit on a printed circuit board (PCB) based on an original image of the PCB includes steps of: performing binarization on the original image to generate a binary image that has an external boundary; determining, on the binary image, a trace area that corresponds to a trace of the PCB; determining whether the trace area contacts the external boundary of the binary image at four places; and determining that the trace that corresponds to the trace area has an undesired connection forming a short circuit when it is determined that the trace area contacts the external boundary of the binary image at four places.