Skip to content

A simple notebook and script to convert an image into stylised svg.

Notifications You must be signed in to change notification settings

iusekarma/img_to_svg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img_to_svg

Just a simple python notenook (and a python command line script) to convert an image into a svg img made up dots.
As the name suggest this project was inspired by dot matrix pattern of ink printing. Though this version only creates a greyscale image.


1. Original Image, 2. Style 0 (dot-matrix), 3. Style 1 (lines)

How to use

  • Open this notebook in Google Colab OR clone this repo and install requirements pip install numpy opencv-python. (I prefer google colab method)
    • If, on google colab upload your image the compute instance from the side pane
  • Set the image file location in img_path
  • rows is the height of the resultant svg (not pixel height, just the number of column of dots.)
  • depth is the different and distinct radii dots can have. (Basically different level of greyscale values)

NOTE :- The dog.jpg file is property of istockphoto.com (link to the image)

About

A simple notebook and script to convert an image into stylised svg.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published