Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Creating Photo Mosaics Using Python

4 min readJun 21, 2020

--

Image created using Tubromosaic.com by AmaltasCoder

Code updated December 8th 2021

  • Image_Tester.py no longer necessary
  • Thanks to Dan Black, Johannes la Pourte, and Jordan Maurice edits and comments

Photo mosaics are an image composed of many smaller images. The smaller images possess a similar color and brightness as a position in the original image making the original image visible from a distance similar to a Claude Monet painting. There exist many online tools (paid software) to create photo mosaics, however, I decided to implement a photo mosaic creator in python3 and share it with the community. My wife is creating a new lifestyle blog and I thought what better way to help her project than by creating a beautiful image from our wedding a little over a year ago. The source code is freely available on at the Data Dolittle GitHub. Let’s begin by setting up the environment necessary to run the scripts.

The Tools

The photo mosaic program requires Pillow and numpy to process the images and matrix manipulation respectively. Follow the instructions from the text hyperlinks above to install both packages.

The Images

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Cody Glickman, PhD
Cody Glickman, PhD

Written by Cody Glickman, PhD

Currently a biological data scientist blogging about side projects and things learned through brute force. https://codyglickman.com/