Creating papercut art in svg format
- This project contains
- code that converts a dual-color bitmap image (png/jpg) to svg format
- a collection of papercut arts created by the program
- a collection of free svg papercut arts collected from internet
- Usg cmake to build the code, the target 2svg will be created.
- visual studio 2012 solution file is also provided under "vc_files"
- Usage: 2svg -ct color_intensity_threshold -st contour_size_threshold -smooth amount -simplify amount -invert image
- -ct color_intensity_threshold : This value is used to separate black from white.
- -st contour_size_threshold : Ignore polygon with less than the "contour_size_threshold" vertices
- -smooth amount : Smooth the polygon boundary, larger amount means more smooth
- -simplify amount : Simplify the polygons using Douglas Peucker algorithm. Smaller amount means more points are kept.
- -invert : Invert color in the image
- Examples of how the code is used are provide in "examples" folder
- See *.bat files in the folder
- For instance, to convert totoro.jpg to svg: 2svg -ct 80 -st 5 -smooth 0.75 .\totoro.jpg
- The input and output images are shown below