3

I have two images: im1,im2. When I compute their distance, using ImageDistance[im1, im2] I get a value. However, I would like to normalize this value... So do you know what the maximum image distance can be?

EDIT:

This is so strange: I have two images...

{i1, i2} = {im1, im2}
ImageDistance[i1, i2, DistanceFunction ->NormalizedSquaredEuclideanDistance]

I always get close to 0.5, but the variations when not using the nomalized euclidean distance are much wider. Therefore, is it possible to know the maximum euclidean distance ?

james
  • 3,043
  • 13
  • 29

1 Answers1

1
{i1, i2, i3, i4} = ExampleData[{"TestImage", #}] & /@
   {"Lena", "Mandrill",  "JellyBeans", "JellyBeans2" };
ImageDistance[##, DistanceFunction -> NormalizedSquaredEuclideanDistance] & @@@ 
 Subsets[{i1, i2, i3, i4}, {2}]

{0.462035, 0.456534, 0.450411, 0.518159, 0.544553, 0.205007}

i5 = RandomImage[1, {100, 100}];
i6 = Image[1 - ImageData[i5]];  
ImageDistance[i5, i6, DistanceFunction -> NormalizedSquaredEuclideanDistance] 

1.

kglr
  • 394,356
  • 18
  • 477
  • 896