Normalize ImageDistance

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 ?

• maybe DistanceFunction -> NormalizedSquaredEuclideanDistance? – kglr Aug 8 '18 at 8:59
• @kglr This always results in 0.5, whatever pictures I use – james Aug 8 '18 at 9:08

{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.

• Thanks a lot. See the edit... – james Aug 8 '18 at 9:40