Added function to ignore images with no hash in distance measurements.