This repository hosts a professional-grade suite of Computer Vision modules designed to solve real-world image processing and analysis challenges. Built with Python and OpenCV, this project demonstrates advanced proficiency in algorithmic image manipulation, real-time video analytics, and deep learning model integration.
Unlike standard scripts, these tools are wrapped in robust Tkinter GUIs, featuring multi-threaded processing for responsiveness, JSON-based persistent configuration, and error-resilient architectures. This collection serves as a powerful reference for implementing production-ready computer vision systems.
This project demonstrates mastery across the following key technical domains:
| Domain | Skills Illustrated |
|---|---|
| Advanced Computer Vision | Feature Matching (SIFT/ORB), Homography, Watershed Segmentation, Hough Transforms, Optical Flow. |
| Deep Learning Integration | Deployment of ONNX models (YuNet) for high-performance Face Detection within standard OpenCV pipelines. |
| Software Engineering | Multi-threading (GUI responsiveness), Exception Handling, Modular Design, User Configuration Management (JSON). |
| GUI Development | Complex Tkinter interfaces with tabbed navigation, real-time canvas rendering, and dynamic parameter control. |
| Mathematical Foundations | Matrix operations, geometrical transformations, histogram analysis, and statistical image filtering. |
File: face_Detection_OpenCV.py
A production-ready face detection application utilizing the YuNet deep neural network (via ONNX).
- Capabilities: Real-time detection from webcam or video files; static image analysis.
- Key Features:
- Adjustable Confidence & NMS (Non-Maximum Suppression) thresholds.
- Visual Debugging: Renders bounding boxes and 5-point facial landmarks.
- Persistence: Automatically saves/loaded user preferences via
face_detection_settings.json. - Performance: Multi-threaded video loop ensures the UI never freezes.
File: Object_trackeng_OpenCV.py
A versatile tracking suite implementation supporting the full range of OpenCV tracking APIs.
- Algorithms Supported: KCF, CSRT (State-of-the-art), MIL, BOOSTING, MEDIANFLOW, MOSSE, TLD.
- Intelligence: Automatically handles legacy vs. modern OpenCV version differences.
- Usage: Select an ROI (Region of Interest) with the mouse and track it robustly through occlusions and movement.
File: image_Segmentation_OpenCV.py
An interactive laboratory for isolating objects from backgrounds.
- Methods:
- Watershed Algorithm: Marker-based segmentation for touching objects.
- Adaptive Thresholding: Gaussian-weighted local thresholding for varied lighting.
- Global Thresholding: Standard binary segmentation.
- Controls: Real-time sliders for kernel sizes, threshold factors, and block sizes.
- Hough Line Detection (
Hough_Transform_for_LineDetection.py): Detects structural lines in images using probabilistic Hough transforms. Essential for lane detection and document scanning. - Feature Mapping (
feature_Mapping_OpenCV.py): Implements SIFT/SURF/ORB descriptors to find homographies and match objects across different perspectives. - Image Stitching (
image_Stitching_OpenCV.py): Automates panorama creation by stitching multiple overlapping photos.
- Pencil Sketching (
Pencil_sketch_conversion_OpenCV.py): Converts photorealistic images into artistic pencil sketches using gaussian differences and division blending. - Morphological Ops (
morphological_transformations_OpenCV.py): Interactive tool for Erosion, Dilation, Opening, and Closing—critical for noise removal in binary images. - Live Grayscale (
live_GrayScale_Conversion.py): High-performance video stream color space conversion.
- Python 3.8+
- Webcam (for live modules)
Install the required packages using pip:
pip install opencv-python opencv-contrib-python numpy pillow scipyNote: opencv-contrib-python is recommended for full feature access (like certain tracking algorithms).
For the Face Detection module, ensure the YuNet ONNX model is present in the root directory:
face_detection_yunet_2023mar.onnx
Most modules are standalone scripts. Run them directly via Python:
To launch Face Detection:
python face_Detection_OpenCV.pyNavigate the tabs to switch between "Image" and "Video" modes. Adjust thresholds in "Settings".
To launch Object Tracking:
python Object_trackeng_OpenCV.pyFollow the CLI prompts to select a tracker (e.g., KCF or CSRT), then draw a box around the object you wish to track.
.
├── 📄 face_Detection_OpenCV.py # AI Face Detection App
├── 📄 Object_trackeng_OpenCV.py # Multi-algo Object Tracker
├── 📄 image_Segmentation_OpenCV.py # Watershed/Thresholding Tool
├── 📄 Hough_Transform_for_LineDetection.py
├── 📄 feature_Mapping_OpenCV.py
├── 📄 image_Stitching_OpenCV.py
├── 📄 Pencil_sketch_conversion_OpenCV.py
├── ⚙️ face_detection_settings.json # Config file (Auto-generated)
├── 🧠 face_detection_yunet_2023mar.onnx # Pre-trained Model
└── 📂 sample_files/ # Test footage (Airport, Crowd, etc.)
This project is open-source and available for educational and commercial modification.
- License: MIT License
- Contributions: Pull requests designed to add new OpenCV algorithms (e.g., YOLOv8 integration, Optical Character Recognition) are highly encouraged.