Detection of defective printed circuit boards using image processing