This repository contains a C/C++ program for processing raw images using file input/output operations (fopen
, fread
, fwrite
, fclose
) in the C/C++ library.
The program takes a raw image file (unesco750-1.raw
), performs three different processing operations on it, and saves the processed images to separate raw files. The operations performed are:
- Reversing intensity:
255 - f(x, y)
- Adding 20 to every pixel value
- Adding 100 to every pixel value
image_processing.cpp
: The main C++ source file containing the image processing code.unesco750-1.raw
: The input raw image file.reverse_intensity.raw
: Output file after reversing intensity.add_20pixel.raw
: Output file after adding 20 to every pixel.add_100pixel.raw
: Output file after adding 100 to every pixel.README.md
: This README file providing an overview of the project.
To compile and run the program:
- Compile the C++ code:
g++ image_processing.cpp -o image_processing
- Run the compiled program:
./image_processing
- C/C++ compiler (e.g., GCC)
- Adobe Photoshop or similar software for converting raw files to JPEG format (optional)
Shubham Vats