Posts Tagged ‘corners’

Corner detection on Strokes and Strokes annotations on Matplotlib

August 6th, 2015 2 comments

Following my proposal for the Google Summer of Code 2015, an algorithm to detect corners on strokes was implemented and it is going to be polished and tested with a template matching classifier. This implementation follows Wolin approach in his paper: “ShortStraw: A Simple and Effective Corner Finder for Polylines” which can be downloaded from:

A brief explanation of the algorithm consists on sampling each one of the points in order to have equal distance between them. Then a window of +/-3 points is used and the average or mean of the distances is calculated. The distance between the initial point and the last point of the window form a straw. The straw is smaller in the cases that the window of points contain a corner.

corners strokesFrom the figure can be seen that pretty much corners are being detected. However a post processing still needs to be performed. In addition, a stroke canvas behavior was added to a figure canvas widget so annotations can be done on top of the graphs as can be seen in the figure below. The yellow background and the blue dots are just debugging information.

backend_kivy with annotations