This device is applied to detect defects before and after panel attaching on the RTP production line, such as angle breakage, cracks and glass slag before attaching, as well as Pol bulgs, bumps and Pol residual glue after attaching. After testing, the output of OK/NG results is provided by the PLC, and defect information is transmitted to the visual inspection station.