In this Letter, we propose an on-line inspection method based on a plenoptic camera to detect and locate flaws of optics. Specifically, due to the extended depth of field of the plenoptic camera, a series of optics can be inspected efficiently and si