Shape detection - recognition
-
-
-
-
Google for the shortstraw algorithm, should find those 2 articles:
"ShortStraw: A Simple and Effective Corner Finder for Polylines"
"Revisiting ShortStraw – Improving Corner Finding in Sketch-Based Interfaces"It's easy to implement or you might find some implementations around.
Once you have the corners you can find if the edge between them are roughly straight lines, find the angle between each edge, find the edges that are crossing each other, etc.
With that information you can classify your shapes. For example, 4 corners, 4 straight lines, about 90 degree angles imply a rectangle or a square.
I'm planning on using that technique for a project of mine.
-
Thank You for the paper information.
What You posted is my initial idea of implementing it but I just wanted to ask before, because maybe someone already did lib or something.Anyway thanks for the info.