The invention discloses a method based on polychromatic light DIP board preprocessing and defect classification, which comprises the following steps: S1, determining an expected
performance index, evaluating the current situation of a current manual detection method and a defect detection method based on
computer vision, analyzing the main problems of the methods, listing the technical problems needing to be solved of a project, and determining the
performance index of the project; evaluating the feasibility of the technical scheme, and considering the cost, the technical difficulty and the required time, for example, improving the
image quality, enhancing the
contrast ratio of a defect area, improving the detection precision and the like; and S2, designing an overall architecture of the
system, determining main modules including an
image acquisition module, a
color normalization module, an image preprocessing module, a
feature extraction module and a defect classification module, defining specific functions and input and output of each module in detail, selecting suitable hardware, and selecting or developing
adaptive software tools. The method is easy to implement and expand, can meet the detection requirements of DIP
chip boards of different specifications and types, and has good universality and flexibility.