views:

425

answers:

3

Looking for any information/algorithms relating to comparing vector graphics. E.g. say there two point collections or vector files with two almost identical figures. I want to determine that a first figure is about 90% similar to the second one.

+2  A: 

You could search for fingerprint matching algorithms. Fingerprints are usually converted to a set of points with their relative location to each other, which makes it basically the same problem as yours.

Zed
+3  A: 

A common way to test for similarity is with image moments. Moments are intrinsically translationally invariant, and if the objects you compare might be scaled or rotated you can use moments that are invariant to these transformations, such as Hu moments.

Most of the programs I know would require rasterized versions of the vector objects; but the moments could be calculated directly from the vector graphics using a Green's Theorem approach, or a more simplistic approach that just identifies unique (unordered) vertex configurations would be to convert the Hu moment integrals to sums over the vertices -- in a physics analogy replacing the continuous object with equal point masses at each vertex.

There is a paper on a tool called VISTO that sorts vector graphics images (using moments, I think), which should certainly be useful for more details.

tom10
A: 

You could transform it to a non-vector graphic and then apply standard image analysis techniques like SIFT points, etc.

ldog
Thanks, I know, but I asked this question specifically about vector graphics in hope that there are existing ways to solve such problems without "go back" to raster algorithms. It's a theoretical question and I don't have a specific problem to solve, so I can't find an example of drawbacks of raster algorithms right now, but I'm sure their vector analogs should be more quality and universal.
Kamarey