This project is about coding an image compressor in Haskell based on K-Means algorithm
This project is based on stack, but uses makefile to compile the program.
To compile the program, run the following command:
make
To run the program, run the following command with the desired parameters:
./imageCompressor [image_name] [k] [n]
- image_name: The name of the image you want to compress
- k: The number of colors you want to compress the image to
- n: The precision of the compression (the lower the number, the more precise the compression)
Warning
Your image must be in the images folder and must be in .jpg format
./imageCompressor.py mona-lisa.jpg 5 0.1
./imageCompressor.py velocity-design-comfort.jpg 10 5