Optical inspection & automatic cleaning