Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top