An image of an article to be inspected is divided into image portions, and
a search engine makes a comparison with the image portion and a library
of reference images. The reference images have predetermined labels that
indicate whether each indicates a defect or no defect. The one of the
reference images that most closely matches the image portion is
determined, and the label associated with the reference image is taken as
indicating whether the image portion corresponds to a location with a
defect or no defect. Locations indicated as being defective are
considered candidate defects and may subsequently be inspected in more
detail.