1. A computer implemented method of detecting a defect in a printed image, the method comprising the steps of: receiving a target image comprising digital image data representing a scan of the printed image; receiving a reference image comprising digital image data representing a reference of the printed image; calculating a structural dissimilarity measure, D, associated with a target pixel located in the target image and a reference pixel located in the reference image; and, determining on the basis of the structural dissimilarity measure whether a defect is present at the target pixel, wherein the structural dissimilarity measure is calculated using a structural measure, s, and a contrast measure, c; the structural measure calculated using a spatial cross-correlation associated with a target region, {right arrow over (x)}, containing the target pixel and a reference region, {right arrow over (y)}, containing the reference pixel, and the contrast measure calculated using a standard deviation associated with the target region, and a standard deviation associated with the reference region.