tweaked image distance for better clustering