Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pyar/fotos2imagen

La idea es armar una imagen pero compuesta por miles de fotitos. Jugar y aprender.
https://github.com/pyar/fotos2imagen

Last synced: about 1 month ago
JSON representation

La idea es armar una imagen pero compuesta por miles de fotitos. Jugar y aprender.

Awesome Lists containing this project

README

        

# fotos2imagen

The idea is to build an image composed by zillion small photos, aiming to play and learn.

## What you need to try this

- A zillion images that will be used as source

- The image you want to "reproduce" (we call it "original")

## Setup

Create a virtualenv and install the dependencies

```bash
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
```

## Preprocess

Pre-process all source images so they are useful input for next setp. This is necessary only once (or every time you want to update your images DB).

```bash
mkdir -p downloads/processed
python preprocess.py downloads/processed 50 200
```

where source-dir is a directory with all your image sources; 50 and 200 are the sizes of the small squares to be replaced in the original image and the size of the replacing image in each small square.

Only JPG images are supported.

## Create the mosaic

Run the mosaicking script

```bash
python fotos2imagen.py --help
python fotos2imagen.py imagenOriginal.jpg output.jpg \
--chunk-size 50 \
--tile-size 200 \
--randomization 25 \
--blend 0.15 \
--images-root-dir downloads/processed \
--show-progress-window
```