For comparing two binary vectors, I could use something simple like the Jaccard similarity (intersection over union).
But say I want to compare 2 octrees, assuming for now that they both have the same number of levels. One approach would be to just flatten each octree into a vector so that all levels can be treated together, then use the intersection over union as before to compare the 2 flattened octrees. In this case, since level N+1 has 8 times as many elements as level N, it basically gets weighted 8 times more in the similarity measure.
Now actually in general, this might not be a problem because if 2 octrees are very similar at higher N levels (when the cells are smaller) then this should usually mean they are also similar at the lower N levels. So in this case it would be ok. But there could maybe be problem cases due to variance in cells at the highest N levels that are near the boundaries of the previous higher level. If they are moved around even slightly then maybe there could be larger changes at lower N octree levels (larger scale) which would mess up the similarity measure.
So does anyone know of any standard metric comparing the difference between octrees / quadtrees etc., or have suggestions?