Giter Club home page Giter Club logo

string_art's Introduction

string_art

Create string art from image, using python

This script attempts to approximate a given image by a series of strings/lines connecting 2 points along the circumference of a circle centered at the image center.

General processing steps

  1. Convert image to gray scale, and scale width to 400 pixels.
  2. Blur slightly, invert intensity and threshold using Otsu thresholding.
  3. Clip the image to within the center circle.
  4. Compute Hough transformation on the thresholded image.
  5. Given the number of points (N) on the circle, compute Hough parameters for all possible lines linking all N*(N-1)/2.
  6. Compute allowed Hough parameter space based on results from step 5.
  7. Pick iteratively peaks from the Hough transformation, and for each peak within the allowed Hough parameter space, add a line with 2 end points on the circle.

Currently it is not working quite well. The output is sensitive to the type of image and a few parameters. Any improvement or suggestion is appreciated.

Dependencies:

Tested in python2.

Requires:

  • numpy
  • PIL
  • skimage
  • matplotlib

string_art's People

Contributors

xunius avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.