Background
In my Bachelor project my group was tasked to create firmware and software for a drawing robot. The software should in some way convert an image to SVG-format in order to draw the image using the robot. I wrote the firmware and on the way cobbled together a webapp that could do the image to svg comversion. Another post will go through the robot in dept.
A stylistic overview of the project looks something like this (if you click the image you can download a high res pdf.)
I did some googling and stumbled upon a webpage that could take an input image and convert it into a line drawing. How did it perform this miracle? By going through the source code of the web page I found a reference to Potrace (https://potrace.sourceforge.net/). This turned out to be an old library creating line traces around objects in B&W images. It's still being maintained and forked into different languages etc. It turned out someone had created a JS library that was open source, and I borrowed it for our benefit. It is embedded in the conversion page I created. A also edited the JS library to fit our need for the output.
The app uses opencv.js as well for image processing. Still a work in progress, but it can at least create the needed output for the drawing robot.
A link to the app can be found here: https://mauroy.no/image2svg