1. A system comprising: a memory; and a processor device, operatively coupled with the memory, to: receive inspection image data of an inspection image of an inspection object, the inspection image data comprising information of an analyzed pixel of the inspected image and of a plurality of reference pixels of the inspected image; obtain an inspected value representative of the analyzed pixel of the inspected image, and a reference value for each of the plurality of reference pixels of the inspected image; for each reference pixel, calculate a difference between the reference value of a respective reference pixel and the inspected value of the analyzed pixel; compute a representative difference value based on the differences between the reference values for each of the respective reference pixels and the inspected value of the analyzed pixel; and determine a presence of a defect in the analyzed pixel based on the representative difference value.