A Pixel Dissimilarity Measure That Is Insensitive to Image Sampling