Say I have calculated the euclidean distance between two images using colour as a feature and also calculated the distance between the two images using edge. I want to test to see if combining these two distance values will give a better representation of how similar the images are. To combine these two distance measures is it as simple as colourDistance + edgeDistance / 2. Or is there a more sophisticated way of combing distance values? Thanks.
Best How To :
I am not an expert on your application so this is a general answer - hope it helps.
Any function of coulourDistance and edgeDistance could work. You could think of what you described as testing three possible functions:
f1(colourDistance, edgeDistance) = colourDistance
f2(colourDistance, edgeDistance) = edgeDistance
f3(colourDistance, edgeDistance) = (colourDistance + edgeDistance) / 2
You could, in theory, test any other function. One thing that comes immediately to mind is linear combinations:
g(colourDistance, edgeDistance) = w1 * colourDistance + w2 * edgeDistance
For various values of w1, w2. This will allow you to experiment with the visual importance of the two features. Your f3 is one case of this function, with
You might found out that the weight of the features isn't linear, for example, a 1-point difference for very small values is much more (or less) significant than a 1-point difference for large values. You could try functions like:
h(colourDistance, edgeDistance) = w1 * log(colourDistance) + w2 * log(edgeDistance)
Final advice, it's not clear to me if the distances you have are on the same scale. If one distance metric goes from 0-10 and the other from 0-1000, you probably need to either normalize the values, or compensate by the choice of w1 and w2.