a pattern selecting unit for selecting at least one of pattern sections of each inspection image obtained by the image acquisition unit, while discarding other pattern sections, based on a recipe which is stored in advance, the recipe including information for determining which pattern sections to be selected and other pattern sections to be discarded, wherein the at least one of pattern sections