The invention discloses a
casting product appearance defect detection method and
system based on
machine vision, and particularly relates to the technical field of
casting product defect detection. According to the method,
casting materials of a
production line are divided into different categories, the casting materials with abnormal absorptivity are identified, terahertz wave scanning is carried out on the casting materials, scattering images are obtained, and the stability of scattering
point density distribution is evaluated; scanning by using a terahertz time-domain
spectrometer, analyzing an amplitude fluctuation state of a time-domain
signal and evaluating a
waveform distortion degree; after comprehensive analysis, the quality of images captured by the imaging
system is evaluated, the images are divided into different grades, defect detection is directly carried out on high-quality images, the quality images are centered, the accuracy of the images is analyzed, and the transmitting power and the scanning speed of terahertz
imaging equipment are dynamically adjusted, so that the
imaging quality is improved, and the accuracy and the efficiency of detection are remarkably improved; and the quality and safety of casting products are ensured, and the product quality problem and potential equipment faults caused by untimely defect detection are effectively avoided.