Home > GSOC2015, kivy, matplotlib, strokes > Corner detection on Strokes and Strokes annotations on Matplotlib

Corner detection on Strokes and Strokes annotations on Matplotlib

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: http://faculty.cse.tamu.edu/hammond/publications/pdf/2008WolinSBIM.pdf

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

Advertisements
  1. cool_thx
    August 21, 2015 at 11:27 pm

    This is awesome! I was looking for a way to render matplotlib with kivy. any new progress? how can we use it ?

    • August 22, 2015 at 7:59 am

      Hey thanks I am going to write a post soon about matplotlib and kivy. The widgets are on the kivy garden.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: