-
apply_NOISE: Applies random noise to the Image, adding a random value to the RGB components of the Image.
-
apply_CODE: reveals the source of the image in R,G,B format including the width and height, so you can copy the code on to another program if needed.
-
Make sure you're in the directory where the makefile is located.
-
To run the make file, run
make
in your terminal (Assuming that the makefile and the process are both located at the same directory) -
Running the above command should create a new executable called process in the directory you're currently at.
-
If you want to know how to compile the program using GCC, follow the below steps.
- Make sure you have (GNU C Compiler) installed on your machine
- To compile the proces file, use:
gcc process.c -o process
- To run process on a given image use:
For example:
./process input_file output_file noise_strength
./process coffee.hs16 coffee_processed.hs16 10000
- Running the above given command will create a file with the given output file name, which will be the processed image.
- To pass in multiple input files to process, follow the below steps:
- Pass in multiple files to process using the below given syntax:
./process input_file1 output_file1 noise_strength1 input_file2 output_file2 noise_strength2 input_file3 output_file3 noise_strength3 ...
- For example:
./process coffee.hs16 coffee_processed.hs16 10000 music.hs16 music_processed.hs16 50000
- Pass in multiple files to process using the below given syntax:
- To view the hs16 formatted image, use hsconvert
- Use hsconvert like below:
- Ensure you have the hsconvert file on the machine
- Ensure you have a program or website to view PPM files, it's recommended to install the VSCode extension called "PBM/PPM/PGM Viewer for Visual Studio Code"
- After making sure you have both of the above, Run:
For example:
./hsconvert -f PPM inputfile.hs16 outputfile.ppm
./hsconvert -f PPM coffee.hs16 coffee.ppm
- Memory Usage for the program, the program loads in all images into memory before processing.