Getting Started
- Clone the Repository
git clone https://github.com/yourusername/gaussian-blur.git
cd gaussian-blur- Create a Virtual Environment
python -m venv venv- Activate the Virtual Environment
- Windows:
venv\Scripts\activate
- Mac/Linux:
source venv/bin/activate
- Install Required Libraries
pip install numpy matplotlib opencv-pythonUsage
- Generate a Noisy Image
Run the following script to create a synthetic noisy grayscale image:
python code/generate_noise.pyThis will save a noisy image in the images/ folder.
- Apply Gaussian Blur
Run the Gaussian blur script to process the noisy image with different sigma values:
python code/gaussian_blur.pyThis will generate blurred images (with various sigma values) in the images/ folder.
- Calculate PSNR
To quantitatively compare the blurred images with the original, run:
python code/psnr_calculation.py