reorganize examples & add script to make them

This commit is contained in:
Jack Wines 2024-06-07 03:58:13 -04:00
parent be0715850e
commit 628e02b572
No known key found for this signature in database
GPG key ID: 25B20640600571E6
11 changed files with 10 additions and 7 deletions

View file

@ -1,14 +1,14 @@
# image-triangles # image-triangles
Makes a [voroni diagram](https://en.wikipedia.org/wiki/Voronoi_diagram) and fills each cell with the average color the image below in. Makes a [voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram) and fills each cell with the average color the image below in.
### examples ### examples
![Sierra mountains original](examples/sierra.jpeg) ![Sierra mountains original](examples/inputs/sierra.jpeg)
![Sierra mountains post-filter](examples/sierra-result.jpeg) ![Sierra mountains post-filter](examples/outputs/sierra.jpeg)
![Hawaii original](examples/birds-eye-view.png) ![Hawaii original](examples/inputs/birds-eye-view.png)
![Hawaii post-filter](examples/birds-eye-view-result.jpeg) ![Hawaii post-filter](examples/outputs/birds-eye-view.png)
![Dog original](examples/luna.jpeg) ![Dog original](examples/inputs/luna.jpeg)
![Dog post-filter](examples/luna-result.jpeg) ![Dog post-filter](examples/outputs/luna.jpeg)
### to run: ### to run:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 MiB

View file

Before

Width:  |  Height:  |  Size: 13 MiB

After

Width:  |  Height:  |  Size: 13 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 820 KiB

After

Width:  |  Height:  |  Size: 820 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 372 KiB

After

Width:  |  Height:  |  Size: 372 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 MiB

BIN
examples/outputs/luna.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

3
generate-outputs.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env sh
nix build;
ls examples/inputs | xargs -I aoeui --max-procs=0 ./result/bin/image-triangles --minDistance 0.01 --input ./examples/inputs/aoeui --output examples/outputs/aoeui