| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Shape matching for mere mortals.
Sketchy.js is a JavaScript shape matching library. Input two shapes and get back a percentage value based on their similarity. Are they exactly the same? 100%. Perfectly different? 0%. Currently, only vector paths are supported as shapes, but should the need arise, support for raster graphics could be implemented with relative ease.
Specifically, we wanted to support shapes drawn by hand in-browser. Raphael SketchPad (which uses Raphaël) does the task of taking input just fine. While we use a generic vector path format behind the scenes, we also provide the preprocessing necessary to work directly with SketchPad (which is JSON-wrapped SVG data).
Currently, there are two algorithms implemented to accomplish the task of comparing shapes: Hausdorff distance and shape contexts. Both work reasonably well, and they each have their advantages, but we recommend the use of shape contexts. Both functions take two shapes in as arguments, and output a score in the range [0.0, 1.0]. Nota bene: the output scores from the two algorithms are not intended to be compared directly. They should be similar, but each algorithm has its own mapping from dissimilarity to percentage.
Sketchy.js is framework-agnostic (though including json2.js can't hurt to ensure JSON support by older browsers). Input must come from somewhere, though, and unless you have a source and the necessary preprocessing, we recommend Raphael SketchPad.
Practical uses include symbol classification (e.g. Detexify and Shapecatcher), optical character recognition, sketching games, and a variety of other computer vision tasks.
The original development team was formed for a computer vision term project at The University of Georgia in Spring 2013. We are, in alphabetical order:
Contributors are welcome!
MIT © 2017 Kyle Krafka
| Back | FazBrowse Home | New Git URL |