This project contains python code to sort images by color into a rainbow or other pattern.
Example of sorting avatar screenshots by color.
Example of sorting pokemon by color.
Example image datasets can be downloaded from the datasets folder
datasets/pokemon
- Downloading all pokemon images.
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.
This algorithm takes a few steps
- Gather and prepare data
- Identify main colors of images
- Sort colors of images
- Combine images into mosaic using sorting
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
To update list of packages with current environment, use the following command:
conda list --export > .\packages.txt