Skip to content

KevDP/Img-preprocessing-techniques

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Preprocessing Techniques

Python application implementing a two-phase image filter — histogram equalization and Gaussian convolution — with an interactive tkinter GUI. Simulates a mobile-style photo filter with real-time visualization and color style switching.


Overview

This project demonstrates core image processing concepts applied to a practical use case: a "mobile camera filter" pipeline. Users can load an image, apply preprocessing techniques sequentially, and compare results interactively.


Tech Stack

Tool Purpose
Python Core language
OpenCV Image processing (convolution, histogram)
NumPy Matrix operations
tkinter Graphical user interface
Matplotlib Result visualization and color maps

Project Structure

Img-preprocessing-techniques/
├── interfaz.py               # Main entry point — launches the GUI
├── hist.py                   # Histogram equalization module (standalone test)
├── convolucion_proyecto.py   # Gaussian convolution module (standalone test)
├── images/
│   ├── original_equalized.png
│   └── interfaz.png
└── README.md

Pipeline

Phase 1 — Histogram Equalization

Improves image contrast by redistributing pixel intensity values across the histogram range. This enhances fine details that may be lost in low-contrast images.

Original image → Spread intensity distribution → Improved contrast

Phase 2 — Gaussian Convolution (Blur Filter)

Applies a Gaussian kernel via convolution to smooth the image. Multiple kernel sizes are available for testing. A cmap parameter allows applying different color styles post-processing.

Equalized image → Gaussian kernel convolution → Styled output

GUI Usage

Run the main interface:

python interfaz.py

Workflow:

  1. Enter the image filename in the text box
  2. Click Start to load and display the image
  3. Click Equalize to apply histogram equalization
  4. Click Apply Gaussian Filter to run the convolution
  5. Select one of 3 color styles to apply a visual effect

Running Modules Independently

# Test histogram equalization only
python hist.py

# Test Gaussian convolution only
python convolucion_proyecto.py

Installation

pip install opencv-python numpy matplotlib

tkinter is included in the Python standard library.


Concepts Demonstrated

  • Histogram equalization for contrast enhancement
  • 2D convolution with Gaussian kernels
  • Real-time image processing pipeline
  • GUI design with tkinter
  • Matplotlib color maps for visual styling

Authors

Kevin Joan Delgado Pérez - Tecnológico de Monterrey

About

Here is a small project of a image preprocessing techniques with an interface as a PoC result.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%