Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timmoth/polymatcher
An experimental orientation invariant algorithm for identifying a collection of vertices
https://github.com/timmoth/polymatcher
Last synced: 21 days ago
JSON representation
An experimental orientation invariant algorithm for identifying a collection of vertices
- Host: GitHub
- URL: https://github.com/timmoth/polymatcher
- Owner: Timmoth
- Created: 2023-12-17T11:08:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-17T21:51:06.000Z (about 1 year ago)
- Last Synced: 2023-12-18T18:35:32.560Z (about 1 year ago)
- Language: C#
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PolyMatcher
An experimental orientation and scale invariant algorithm for identifying a collection of vertices## Initial solution
### Identification
- Sort the vertices in ascending order by their distance to the centroid. This order will be the same for any orientation / scale.
- Normalize the vertices using the furthest point from the centroid.
- Calculate the angle between each pair of points and the centroid. (If there are an odd number of vertices, pair the last vertex with the first)
- Return an array of floating points, each element is calculated by product of the angle between the pair of vertices and the centroid squared and the normalized euclidean distance from the centroid to both points.Note, the order of the elements in the resultant array is important for correct identification, so if multiple vertices have the same euclidean distance to the centroid the angle for each is compared and the smallest is chosen first.
### Comparison
- Calculate the Euclidean distance between two arrays of floating point angles in radians.
- The lower the Euclidean distance the better the match (between 0.0 and 1.0)### ToDo
- Store the angle array in a MySql database and construct a query to retrieve it.
- Consider using a database which supports k-Nearest Neighbor similarity algorithm