Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/pyar/fotos2imagen
- Owner: PyAr
- Created: 2021-11-20T20:11:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-20T15:02:39.000Z (about 3 years ago)
- Last Synced: 2023-08-21T17:01:18.532Z (over 1 year ago)
- Language: Python
- Size: 61.5 KB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```