All Projects → codebox → Mosaic

codebox / Mosaic

Licence: mit
Python script for creating photomosaic images

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Mosaic

Tailor
A streaming layout service for front-end microservices
Stars: ✭ 1,640 (+401.53%)
Mutual labels:  mosaic
quarkdet
QuarkDet lightweight object detection in PyTorch .Real-Time Object Detection on Mobile Devices.
Stars: ✭ 82 (-74.92%)
Mutual labels:  mosaic
react-auto-mosaic
Automatic box behavior in the grid - responsive mosaic
Stars: ✭ 12 (-96.33%)
Mutual labels:  mosaic
Tessellate
Server-side React render service.
Stars: ✭ 142 (-56.57%)
Mutual labels:  mosaic
Skipper
An HTTP router and reverse proxy for service composition, including use cases like Kubernetes Ingress
Stars: ✭ 2,606 (+696.94%)
Mutual labels:  mosaic
CollectionViewMultiColumnLayout
A tiled waterfal/mosaic UICollectionViewLayout with support for explicit columns.
Stars: ✭ 13 (-96.02%)
Mutual labels:  mosaic
Yet Another Yolov4 Pytorch
YOLOv4 Pytorch implementation with all freebies and specials and 15+ more exclusive improvements. Easy to use!
Stars: ✭ 105 (-67.89%)
Mutual labels:  mosaic
mosaicshapes
Transform pictures to Chuck Close inspired mosaic art.
Stars: ✭ 18 (-94.5%)
Mutual labels:  mosaic
Mosaic
Mosaic, an openFrameworks based Visual Patching Creative-Coding Platform
Stars: ✭ 250 (-23.55%)
Mutual labels:  mosaic
image-masaic
Set mosaic to image by canvas.
Stars: ✭ 25 (-92.35%)
Mutual labels:  mosaic
Zlimageeditor
A powerful image editor framework. Supports graffiti, cropping, mosaic, text stickers, image stickers, filters.
Stars: ✭ 148 (-54.74%)
Mutual labels:  mosaic
Innkeeper
Simple route management API for Skipper
Stars: ✭ 158 (-51.68%)
Mutual labels:  mosaic
BlurKit
A lightweight library that can easily blur the view.
Stars: ✭ 17 (-94.8%)
Mutual labels:  mosaic
Mosaic Contracts
Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
Stars: ✭ 119 (-63.61%)
Mutual labels:  mosaic
OrientedRepPoints DOTA
Oriented Object Detection: Oriented RepPoints + Swin Transformer/ReResNet
Stars: ✭ 62 (-81.04%)
Mutual labels:  mosaic
Uav Mapper
UAV-Mapper is a lightweight UAV Image Processing System, Visual SFM reconstruction or Aerial Triangulation, Fast Ortho-Mosaic, Plannar Mosaic, Fast Digital Surface Map (DSM) and 3d reconstruction for UAVs.
Stars: ✭ 106 (-67.58%)
Mutual labels:  mosaic
photomosaics
Python program that makes a photo mosaic out of a given image
Stars: ✭ 25 (-92.35%)
Mutual labels:  mosaic
mosaix
An iOS photo mosaic application.
Stars: ✭ 42 (-87.16%)
Mutual labels:  mosaic
mosaic-node-generator
Generate mosaic images in Node.
Stars: ✭ 25 (-92.35%)
Mutual labels:  mosaic
go-mosaic
相片马赛克 (Photographic mosaic)
Stars: ✭ 23 (-92.97%)
Mutual labels:  mosaic

mosaic

This utility can be used to generate photo-mosaic images, to use it you must have Python installed, along with the Pillow imaging library.

As well as an image to use for the photo-mosaic (most common image formats are supported), you will need a large collection of different images to be used as tiles. The tile images can be any shape or size (the utility will automatically crop and resize them) but for good results you will need a lot of them - a few hundred at least. One convenient way of generating large numbers of tile images is to extract screenshots from video files using ffmpeg.

Run the utility from the command line, as follows:

python mosaic.py <image> <tiles directory>
  • The image argument should contain the path to the image for which you want to build the mosaic
  • The tiles directory argument should contain the path to the directory containing the tile images (the directory will be searched recursively, so it doesn't matter if some of the images are contained in sub-directories)

For example:

python mosaic.py game_of_thrones_poster.jpg /home/admin/images/screenshots

The images below show an example of how the mosaic tiles are matched to the details of the original image:

Mosaic Image
Original

Mosaic Image Detail
Mosaic Detail (click through for full mosaic ~15MB)

Producing large, highly detailed mosaics can take some time - you should experiment with the various configuration parameters explained in the source code to find the right balance between image quality and render time.

In particular the TILE_MATCH_RES parameter can have a big impact on both these factors - its value determines how closely the program examines each tile when trying to find the best fit for a particular segment of the image. Setting TILE_MATCH_RES to '1' simply finds the average colour of each tile, and picks the one that most closely matches the average colour of the image segment. As the value is increased, the tile is examined in more detail. Setting TILE_MATCH_RES to equal TILE_SIZE will cause the utility to examine each pixel in the tile individually, producing the best possible match (during my testing I didn't find a very noticeable improvement beyond a value of 5, but YMMV).

By default the utility will configure itself to use all available CPUs/CPU-cores on the host system, if you want to leave some processing power spare for other tasks then adjust the WORKER_COUNT parameter accordingly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].