pyPhotoMosaic lets you create photomosaics in a few steps.
Trying to optimise the efficiency of the code to reduce build time.
Artist: https://www.pixiv.net/artworks/96381546
Benchmark Params: TILE_SIZE = 80
, ENLARGE_FACTOR = 8
, REUSE_CACHE = FALSE
- Old PIL processing time: 3m 03.70s total
- New CV2 processing time: 2m 14.98s total
- numpy
- cv2
Windows:
python pMos.py <target_image> <image tiles folder> <output_filename>
Linux & macOS:
python3 pMos.py <target_image> <image tiles folder> <output_filename>
It might take a while to create a the Photo Mosaics.
TILE_SIZE
(Mosaic Tiles' sizes in pixels)CACHE_DIR
(Mosaic Tiles' cache directory)TARGET_CACHE_DIR
(Target Image's cache directory)REUSE_CACHE
(True
to reuse the cache,False
to regenerate cache)ENLARGE_FACTOR
(Factor to enlarge the image)