In this project, I tried to make a grayscale image(.pgm format) a binary image(.pgm format, you can convert it easily into .pbm format). This process is called 'Binarization'. This image processing code is totally written in C language without using any type of 'image libraries' e.g - 'stb_image'. We need 2 files to process an image. Here you have to put your input image file (.pgm format) --> final output image file (.pbm format).
Follow the Steps to Run the Program and Get Desired Output::
- Run the Command Prompt in the folder where you have stored your code. Or you can simply run CMD and change the file directory to the destination folder.
- Run the given command - "gcc -o bin bin.c". It'll create the executable file for your C program.
- Run the given command - "bin.exe input_filename.pgm output_filename.pbm". You're done.
- Congratulations, you have just used my code and run it to Binarize a grayscale image successfully.