Skip to content

Commit

Permalink
Finishes explaining in the readme, adds another image
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Gonzalez Duque committed Jul 25, 2020
1 parent 2d531fc commit 0adf6fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Binary file modified example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified out.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

A Python script that takes an image and outputs a pixelated version using [Voronoi tessellations](https://en.wikipedia.org/wiki/Voronoi_diagram).

The script loads the image, places `n_points` random points in the image and uses them as the seeds in a Voronoi tessellation. Right now the script is somewhat slow, because I went with the overkill of computing the shortest distance of each pixel to the seeds using a [KDTree](https://en.wikipedia.org/wiki/K-d_tree#Nearest_neighbour_search).
The script loads the image, places `n_points` random points in the image and uses them as the seeds in a Voronoi tessellation. Then, region of the tessellation gets covered by the average color in it.

Right now the script is somewhat slow, because I went with the overkill of computing the shortest distance of each pixel to the seeds using a [KDTree](https://en.wikipedia.org/wiki/K-d_tree#Nearest_neighbour_search).

## Usage

Expand Down

0 comments on commit 0adf6fc

Please sign in to comment.