nicholas-maltbie / ColorSortImages

Sorting Images by Main Colors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Color Sort Images

This project contains python code to sort images by color into a rainbow or other pattern.

Example of sorting avatar screenshots by color.

Mosaic of Avatar Screenshots

Example of sorting pokemon by color.

Pokemon Sorted by Color

Datasets

Example image datasets can be downloaded from the datasets folder

  • datasets/pokemon - Downloading all pokemon images.

Source

A huge inspiration from this project comes from the great article The incredibly challenging task of sorting colours by Alan Zucconi about colors and image processing.

Overview

This algorithm takes a few steps

  1. Gather and prepare data
  2. Identify main colors of images
  3. Sort colors of images
  4. Combine images into mosaic using sorting

Usage

To use this project, setup a python environment with the following commands:

conda create -n colorsort --file packages.txt
conda activate colorsort

To open the jupyter notebook, use jupyter lab as follows:

conda activate colorsort
jupyter lab

Package List

To update list of packages with current environment, use the following command:

conda list --export > .\packages.txt

About

Sorting Images by Main Colors

License:MIT License


Languages

Language:Jupyter Notebook 54.8%Language:Python 45.2%