Sketching with Real-time Contrast Preserving Decolorization and Potrace

Always looking for some ways to learn the computer to ‘see’, I came accross two very interesting algorithms: ‘Real-time Contrast Preserving Decolorization’ by Cewu Lu, Li Xu and Jiaya Jia. And Potrace by Peter Selinger. I’ve translated both to Xojo.

Playing around with both algorithms, I came up with the idea to use them for a project I had in mind for some time: Sketching pictures on my wall using a Pico projector.

The algorithms are very good when you want to create (scalable) vector graphics from a bitmap. You could save it in SVG format (not included in this project, but could easliky be done as all it uses are Polylines, Polygons and Lines).

Full source code at http://alwaysbusycorner.com/2015/09/23/xojo-sketching-with-real-time-contrast-preserving-decolorization-and-potrace/