Skip to content

"My journey through computer vision basics. This repo contains organized code snippets, exercises, and examples demonstrating core OpenCV functionalities, from reading images to implementing filters."

Notifications You must be signed in to change notification settings

ImdataScientistSachin/Open-CV-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👁️ Computer Vision & Real-Time Processing Suite

Python OpenCV Tkinter Status

📖 Executive Summary

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.


🛠️ Technical Competency Matrix

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.

📂 Module Breakdown

1. 🤖 Deep Learning Face Detection

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.

2. 🎯 Real-Time Object Tracking

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.

3. 🧩 Intelligent Image Segmentation

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.

4. 📐 Geometry & Feature Analysis

  • 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.

5. 🎨 Image Processing & Artistry

  • 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.

⚙️ Installation & Setup

Prerequisites

  • Python 3.8+
  • Webcam (for live modules)

Dependencies

Install the required packages using pip:

pip install opencv-python opencv-contrib-python numpy pillow scipy

Note: opencv-contrib-python is recommended for full feature access (like certain tracking algorithms).

Model Setup

For the Face Detection module, ensure the YuNet ONNX model is present in the root directory:

  • face_detection_yunet_2023mar.onnx

🚀 Usage Guide

Running FLASK / GUI Applications

Most modules are standalone scripts. Run them directly via Python:

To launch Face Detection:

python face_Detection_OpenCV.py

Navigate the tabs to switch between "Image" and "Video" modes. Adjust thresholds in "Settings".

To launch Object Tracking:

python Object_trackeng_OpenCV.py

Follow the CLI prompts to select a tracker (e.g., KCF or CSRT), then draw a box around the object you wish to track.


📂 Project Structure

.
├── 📄 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.)

🤝 Contribution & License

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.

Developed with precision for Computer Vision Engineering roles.

About

"My journey through computer vision basics. This repo contains organized code snippets, exercises, and examples demonstrating core OpenCV functionalities, from reading images to implementing filters."

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published