Swatch is a quick project idea I came up with while reading about color theory and film. It has two main features; image and video processing. By inputting an image, the user can find the average color for that image, as well as the average color by row or average color by column (rows and columns in reference to the rows and columns of pixels that make up the image). By inputting a video file, the program parses through the frames of a video and generates the average color for each frame. Then, it creates a color palette using all of those average colors. This repo comes with sample images and videos to use swatch on.
Example of Swatch on Vermeer's View of Delft:
Source Image:
Average Color:
Average Color by Row:
Average Color by Column:
Example of Swatch on Christopher Nolan's Inception (2010):
Example of Swatch on Pixar's Inside Out (2015):
Swatch runs on Python 3.x. You can download Python here.
Swatch uses a few libraries:
pillow
numpy
opencv
imageio
You can install these libraries using pip. Here is a guide.
To install swatch after all the prerequisites have been installed, follow these steps:
- Clone this repo:
git clone git@github.com:shaikat9000/swatch.git
- Go into the /swatch directory:
cd swatch
- Run swatch:
python swatch.py
- Shaikat Islam - Github
This project is licensed under the MIT License - see the LICENSE.md file for details
- Artists and coders everywhere.
- Great teachers and professors!
- Codacken - for the name