Magnetic particle testing is one of the most effective non-destructive testing methods for the surface and near surface of carbon steel components.In complex working conditions,there are still low defect recognition rates and false alarms.This study is based on the automation technology of magnetic particle testing,and conducts research on crack defect screening and recognition technology.The Otsu adaptive threshold algorithm is used to segment crack defect images,extract target defect images,analyze noise,pseudo defects,and crack image feature pa-rameters.Through feature selection,real crack information is retained,and crack images are marked and processed to complete the identification of crack quantity and length.