1. An analysis system for detection of defects within an inspection image of an inspected object, the inspection image comprising a plurality of pixels, the system comprising: a computerized anchor processing module configured to obtain multiple anchor locations with respect to the inspection image; a computerized segmentation module operatively coupled to the computerized anchor processing module, configured to segmentize the inspection image based on the multiple anchor locations and on a mask which defines multiple mask-segments, by assigning each part out of multiple parts of the inspection image to a respective image-segment selected out of a multiple image segments, wherein the multiple image segments correspond to at least one mask-segment of said multiple mask-segments; and a defect detection processor operatively coupled to the computerized segmentation module, configured to determine a presence of a defect in the inspection image based on the segmentation at least by assessing each pixel out of a plurality of pixels of the inspection image based on: (a) a result of a comparison of the pixel to correlative data of a reference image, and (b) a decision rule which depends on the image-segment selected for the pixel.