How Does Automated Optical Inspection Work?