A modular computer vision pipeline implemented in Python, demonstrating classical image processing techniques using OpenCV and NumPy. This project is designed to process raw images through a customizable sequence of transformations to reduce noise, enhance contrast, and extract structural features.
- Noise Reduction: Selectable Gaussian, Median, and Bilateral filtering techniques.
- Contrast Enhancement: Global Histogram Equalization and Adaptive Equalization (CLAHE).
- Feature Extraction: High-performance Canny edge detection for boundary identification.
- Configurable Pipeline: Easy-to-tune hyperparameters via a central
config.yamland CLI overrides.
The image processing flow follows a sequential design, representing a fundamental preprocessing stage for advanced CV systems:
Input Image → Denoising → Contrast Enhancement → Edge Detection → Visualization & Export
- Clone the repository:
git clone https://github.com/nguyenpd-vincent/VisionFlow.git cd VisionFlow - Create and activate a virtual environment (Recommended):
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Run the pipeline using the default configuration file:
python main.py --config config.yamlProcess a specific image on the fly via the CLI:
python main.py --image resources/sample.jpgRun test:
.venv/bin/pip install pytest && .venv/bin/pytest tests Output:
The script displays a side-by-side visual comparison and saves processed images (denoised, enhanced, and edge-extracted) to the results/ directory.
vision-image-processing/
├── src/
│ ├── pipeline.py # Orchestration logic
│ ├── filters.py # Noise reduction implementations
│ ├── histogram.py # Contrast enhancement operations
│ └── edge.py # Feature extraction
├── resources/ # Sample inputs
├── results/ # Processed outputs
├── main.py # Application entry point
├── config.yaml # Pipeline hyperparameters
└── requirements.txt # Project dependencies