Simulation of a machine vision system for reflective surface defect inspection based on ray tracing

Appl Opt. 2020 Mar 10;59(8):2656-2666. doi: 10.1364/AO.385486.

Abstract

A complete simulation of a machine vision system aimed at defect inspection on a reflective surface is proposed by ray tracing. The simulated scene is composed of the camera model, surface reflectance property, and light intensity distribution along with their corresponding object geometries. A virtual reflective plane geometry with scratches of various directions and pits of various sizes is built as the sample. Its realistic image is obtained by Monte Carlo ray tracing. Compared to the pinhole camera model, the camera model with a finite aperture emits more rays to deliver physical imaging. The bidirectional reflectance distribution function is applied to describe the surface reflectance property. The illustrated machine vision system captures a number of images while translating the light tubes. Then the image sequence obtained by experiment or simulation is fused to generate a well-contrasted synthetic image for defect detection. A flexible fusion method based on differential images is introduced to enhance the defect contrast on a uniform flawless background. To improve detection efficiency, defect contrast of synthetic images obtained by various fusion methods is evaluated. Influence of total image number, light tube width, and fusion interval is further discussed to optimize the inspection process. Experiments on car painted surfaces have shown that the simulated parameters can instruct the setup of the optical system and detect surface defects efficiently. The proposed simulation is capable of saving great effort in carrying out experimental trials and making improvements on reflective surface defect inspection.