A method for inspecting a wafer including a multiplicity of dies, the method including dividing an image of at least a portion of the wafer into a plurality of sub-images each representing a sub-portion of the wafer and selecting at least one defect candidate within each sub-image by comparing each sub-image to a corresponding sub-image of a reference including a representation, which is assumed to be faultless, of the portion of the wafer.