1. An analysis system for classifying possible defects identified within an inspection image of an inspected object, the system comprising: a storage device; and a processor, coupled to the storage device, to: match a template and a portion of the inspection image, thus giving rise to a matching portion of the inspection image, wherein the inspection image is captured by an inspection tool; determine, using a mask corresponding to the template and defining one or more segments within the matching portion of the inspection image, a location of a potential defect with respect to the one or more segments, thus giving rise to a matching segment of the inspection image, the matching segment corresponding to the location of the potential defect; and classify the potential defect based on the matching segment, thereby considering the location of the potential defect with regard to the respective segment defined within the inspection image, wherein the processor is further to define the mask based on a reference image of an inspected-object reference area, to downsample a part of the reference image, and to generate the template based on a result of the downsampling, the reference image and the mask are characterized by a resolution exceeding a resolution of the inspection image.