progress with a distance measure based on pixel difference