The invention discloses a mixing-method-based method and a mixing-method-based
system applied to defect detection of a
printed circuit board. The method comprises the following steps: collecting an image of a to-be-detected
printed circuit board in the field; carrying out binaryzation on the image of the to-be-detected
printed circuit board; searching communication domains of the binaryzated image and counting information of
mass center and area of each communication area; comparing each communication area with communication domains in a
circuit diagram template by taking the information of
mass center and area of each communication area as a matching standard, determining that the communication domains are matched with one another if the error of the information of
mass center and area is in a predetermined range, or determining that the communication domains are unmatched with one another;
cutting the unmatched communication domains, enabling part of secondary communication domains after
cutting to be matched with the communication domains in the
circuit diagram template, and further diminishing the range of the unmatched secondary communication domains; and further detecting each communication domain in detail. By virtue of the method and the
system, the defect
misinformation caused by rotating, horizontally moving, extending and retracting, inclining and the like can be well avoided; the reasonable deformation and defects can be well distinguished.