Automated visual inspection for the quality control of pad printing