im writing a program to compare two images against each other based on color and im using the Euclidean distance algorithm however when i run it and pass in two images i get one distance and then when i pass in the same images but the other way round i get a completely different set of results.
is this normal or should the answers be the same?
The statement I'm using to compute the Euclidean distance is:
distance = (int) Math.sqrt( (rgb1.getR()-rgb2.getR())^2
+ (rgb1.getG()-rgb2.getG())^2
+ (rgb1.getB()-rgb2.getB())^2
);