Skip to content

Vaishnavi-chintha/Image_Processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Noise & Comparison Tool

HS8 NOISE COMP

This project is a simple built in C for working with a custom binary image format called HS8. It’s designed to simulate noise in images and compare image data pixel-by-pixel against another picture.

This program applies 2 operations on the image:

  • apply_NOISE: It adds random noise to the RGB values of each pixel in an image.
  • apply_COMP: It compares an input image with a reference image and prints the identical and different pixels.

Implementation:

This program works exclusively with HS8 image format.

Step 1:

Create the latest version of the compiled code by running make in the terminal:

make

To manually compile the code run the following in the terminal:

gcc -o process process.c

Step 2:

Run the program by calling the file name followed by refernce file, input file, output file and noise. The noise value should be an integer within the range of 0 to 255, 0 being no noise and 255 being maximum (Multiple files can be inputed at once)

2a: Input single file

./process reference_file.hs8 input_file.hs8 output_file.hs8 noise

2b: Input multiple files

./process refernce_file.hs8 input_file1.hs8 output_file.hs8 input_file2.hs8 output_file2.hs8.....noise

The output_file(s) will be present in the current directory. But the image is in binary so we have to convert to view it.

Step 3:

Run the following to convert the file (.hs8) to view it. We have to make sure that the output_file (.ppm) has ppm extension.

./hsconvert input_file.hs8 output_file.ppm

The converted image will be presented in the current directory.

Step 4:

We can view the image directly in VSCode using an extension

PBM/PPM/PGM Viewer for Visual Studio Code

Example Workflow

./process ref.hs8 noisy_input.hs8 result.hs8 100
./hsconvert result.hs8 result.ppm

Author

About

A C program to add noise to `.hs8` images and compare them pixel-by-pixel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published