git clone https://github.com/cadedupont/color-frequency-palette.git
make
to compile the program and generate the executable./color_frequency <image_file>
from the root directory to run the program on the image of your choice (include file extension but exclude file path)Included in the res/in
directory are some sample images of album covers I used to test the program. The program is hardcoded to look inside the res/in
directory for the image file, so if you want to use your own image, you’ll need to move it into that directory.
The program will generate two files in the res/out
directory:
<image_file_name>.jpg
- a 1000x1000 image containing a palette of the 100 most frequent colors found in the provided image, with each color’s hex code written on their respective block in the palette<image_file_name>.csv
- a csv file containing every color’s RGB values, hex code, and frequency in the original image (sorted by frequency in descending order)Album Cover |
Input Image |
Output Image |
Lahai - Sampha |
||
Wish You Were Here - Pink Floyd |
||
American Love Call - Durand Jones & The Indications |
||
This Old Dog - Mac DeMarco |