Skip to content

About

A Python simulation to demonstrate Image Sampling and Quantization using OpenCV

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Digital Image Processing: Sampling & Quantization Simulation 📌 Project Overview This project is a practical exploration of how continuous visual information is transformed into discrete digital data. Using Python and OpenCV, I have simulated the two fundamental pillars of image digitization: Sampling and Quantization.

The goal is to visualize how changes in spatial resolution and color depth affect human perception and how a computer "sees" an image as a numerical matrix.

🛠 Features Low Sampling Simulation: Demonstrates the "Pixelation" effect by reducing spatial resolution.

Color Quantization: Illustrates the "Posterization" effect by limiting intensity levels (Bit Depth reduction).

Matrix Visualization: Extracts and displays raw numerical data from image fragments to show the underlying math.

Interactive Environment: Built and tested on Google Colab for easy reproduction.

🚀 Technologies Used Python 3

OpenCV: For image manipulation and resampling.

NumPy: For matrix operations and numerical analysis.

Matplotlib: For professional data visualization and plotting.

📊 Visual Results The simulation generates a comparative view of:

Original Image: High fidelity (Full Sampling & Quantization).

Pixelated Image: Lowered sampling rate showing the grid structure.

Quantized Image: Reduced color levels showing intensity banding.

📜 How to Run Open the .ipynb file in Google Colab.

Run the cells and upload any portrait image when prompted. Results Matrix Results Matrix Observe the transformation of the image into various digital states and its corresponding matrix.

About

A Python simulation to demonstrate Image Sampling and Quantization using OpenCV

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages