Added preprocessing before comparison, which includes converting to greyscale and normalizing the image