Colored PPM image to grayscale PGM images
I developed a program that produces six different color to black and white conversion using a PPM image file.
git clone https://github.com/namitoyokota/grayscale-converter.git
cd grayscale-converter
Command | Description |
---|---|
make setup | creates required directories |
make all | object files created |
make grayscale | converts ppm to pgm grayscale images |
make clean | restores repository to original |
By default, the Strawberry.ppm file is selected as the input image. To change this, import an ppm images under ./img/input
then go to makefile and change all places with Strawberry.ppm
to your new image file.
The algorithm used for the grayscale operation is from John Cook