I am working on an optical character recognition algorithm that takes vector data (i.e. polylines) as input rather than raster picture. E.g., we have N polyline samples, and when certain polyline is given as algorithm input we want to know which sample most likely it is.
My question is as follows: is there any metric of similarity between two polylines? I have an idea about it, but I wonder if that a form of some well-known method, or are there any alternative algorithms of recognizing curves in vector representation.
So my idea of similarity measurement:
- Move two curves so that their "center" points match.
Measure the area formed by two curves (yellow on figure). The less area is - the more similar curves are.
We can also consider curves length as metric. E.g., the area can be about zero, but one curve can be much longer than another and thus not similar to it.
Is that idea correct? Are there any other algorithms? Thanks.