Coder Social home page Coder Social logo

pointu's Introduction

pointu

pointu is a tool to render images with points of varying sizes and colors in an artistic way. The implementation is based on Adrian Secord's 2002 paper entitled Weighted Voronoi Stippling. The name pointu is derived from pointillism, a painting technique in which points are used to form an image.

Installation

  1. Install Go
  2. Make sure that $GOPATH is set and that $GOPATH/bin has been added to the global path
  3. Run go get -u github.com/MaxHalford/pointu
  4. Run pointu -help to check that the installation was successful

Examples

pointu -in examples/originals/plant4h.png -out examples/processed/plant4h.png -points 5000
Original Processed
plant4h_original plant4h_processed
pointu -in examples/originals/plant2_400x400.png -out examples/processed/plant2_400x400.png -points 10000 -rmin 0.5 -rmax 0.5
Original Processed
plant2_400x400_original plant2_400x400_processed
pointu -in examples/originals/figure5_525x525.png -out examples/processed/figure5_525x525.png -points 3000 -rmax 2
Original Processed
figure5_525x525_original figure5_525x525_processed
pointu -in examples/originals/shoe_1300x1300_org.png -out examples/processed/shoe_1300x1300_org.png -points 5000 -iterations 100 -rmin 2 -rmax 3
Original Processed
shoe_1300x1300_org_original shoe_1300x1300_org_processed
pointu -in examples/originals/bird.jpg -out examples/processed/bird.png -points 60000 -iterations 15 -rmin 2 -rmax 3 -color
Original Processed
bird_original bird_processed
pointu -in examples/originals/pasta.jpg -out examples/processed/pasta.png -points 80000 -iterations 15 -rmin 2 -rmax 3 -resolution 4 -color
Original Processed
pasta_original pasta_processed

Usage

Run pointu -h to get a list of available parameters.

Implementation details

Please check out this blog post for some details on the implementation.

License

The MIT License (MIT). Please see the license file for more information.

pointu's People

Contributors

maxhalford avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pointu's Issues

panic: invalid argument to Intn

$ convert -size 100x100 xc:black black.png
$ pointu -in black.png -out black_p.png
panic: invalid argument to Intn

goroutine 1 [running]:
math/rand.(*Rand).Intn(0xc4200182d0, 0x0, 0xc42003fbbc)
        /home/user/go/src/math/rand/rand.go:141 +0xc7
github.com/MaxHalford/pointu/pointu.ImportanceSample(0x1f4, 0xc4200143c0, 0xc4200143c8, 0xc4200182d0, 0x64, 0x0, 0xc420014140)
        /home/user/gocode/src/github.com/MaxHalford/pointu/pointu/importance_sampling.go:35 +0x336
main.main()
        /home/user/gocode/src/github.com/MaxHalford/pointu/cli.go:55 +0x13a

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.