The invention provides a
mobile phone screen backlight
foreign matter defect diagnosis method based on
machine vision, and the method comprises the following steps: lightening a screen through a PLC (
Programmable Logic Controller) to enable the
mobile phone screen to be in a white ground color, collecting an image through a CCD (
Charge Coupled Device) industrial camera, extracting an area of the
mobile phone screen in the image, and obtaining a mobile phone screen image P; turning off the screen of the mobile phone, starting a dust
sidelight device, and acquiring an image through a CCD industrial camera to obtain a
sidelight image Q; carrying out preprocessing and threshold segmentation on the mobile phone screen image P to obtain a backlight
foreign matter candidate region; positioning dust in combination with the
sidelight graph Q, and eliminating dust interference in the candidate area; extracting a local sub-graph of a backlight
foreign matter candidate region without dust interference, and eliminating the interference of scratches and dirty spots through secondary threshold segmentation; and finally, positioning the backlight foreign matter area of the mobile phone screen. Inthe aspect of interference removal of dust factors, the dust sidelight device is designed, dust interference is accurately eliminated, and the detection accuracy is improved.