Skip to content

🤖 A small Weekend tutorial : A comprehensive collection of computer vision projects and implementations focusing on foundational concepts, practical image processing techniques, and real-world applications using OpenCV, NumPy, and Python. To learn something new this weekend

License

Notifications You must be signed in to change notification settings

TheHashiramaSenju/ComputerVision

Repository files navigation

Computer Vision Learning Journey 🎯

License: MIT Python OpenCV Educational Weekend Project Beginner Friendly Made with Love PRs Welcome

🤖 A comprehensive weekend tutorial collection for computer vision fundamentals using OpenCV, NumPy, and Python. Perfect for students wanting hands-on experience with image processing and real-world applications!

Week-long exploration into computer vision fundamentals using OpenCV and Python. Perfect for students wanting to dive into image processing, real-time video manipulation, and creative visual effects.

📋 Table of Contents

🎯 Overview

This project serves as a hands-on introduction to computer vision concepts, designed for students to explore OpenCV capabilities through practical, engaging examples. Each module builds upon previous concepts while maintaining independence for flexible learning.

What You'll Learn:

  • Digital image fundamentals and pixel manipulation
  • Real-time video processing and webcam integration
  • Face detection and recognition techniques
  • Creative filter effects and image enhancements
  • Color space transformations and masking
  • Professional branding and logo integration

📁 Project Structure

ComputerVision/
├── 🎨 BrandingsOnVideos/
│   ├── AddingLogos.py                 # Logo overlay techniques
│   ├── AdjustingTransparency.py       # Alpha blending controls
│   ├── AspectRatioAnalysis.py         # Proper scaling methods
│   └── FinalFitForLogo.py            # Professional logo integration
│
├── 📸 Capturing selfies/
│   ├── capturingmultipleselfies.py    # Batch photo capture
│   └── capturingsingleselfies.py      # Single photo capture
│
├── 🎭 DIY IG Filters/
│   ├── ImageMerging.py                # Blend multiple images
│   ├── controllingbrightness.py      # Brightness adjustments
│   └── increasingwarmth.py            # Color temperature effects
│
├── 👤 FaceDetectionAndManipulation/
│   ├── FaceCropANDFaceBlur.py        # Face isolation and privacy
│   ├── FaceDetectionOnLive.py        # Real-time face detection
│   └── ShapeExtraction.py            # Geometric shape analysis
│
├── 🎨 Image Enhancements: Introductory set/
│   ├── ChessBoard.py                  # Pattern generation
│   ├── CreatingCustomColors.py       # Color space exploration
│   ├── GradientTransitions.py        # Smooth color transitions
│   ├── TheRGBColorspace.py           # RGB fundamentals
│   ├── Transitioncolours.py          # Dynamic color changes
│   ├── matrixvisualization.py        # Array visualization
│   └── notes.md                      # Learning notes
│
├── 🔧 ImageManipulation/
│   ├── DetectionWithBlur.py          # Selective blur effects
│   ├── ImageBlur.py                  # Various blur techniques
│   ├── Imagescaling.py               # Resize and scaling
│   ├── drawingshapes.py              # Geometric primitives
│   ├── edgedetection.py              # Edge detection algorithms
│   └── notes.md                      # Technical documentation
│
├── 🎭 ImageMasking/
│   ├── Masking.py                    # Region isolation techniques
│   └── thresholding.py               # Binary image processing
│
└── ⏱️ ImageProcessingInRealTime/
    ├── HSV.py                        # HSV color space manipulation
    ├── cropandflip.py                # Basic transformations
    ├── notes.md                      # Real-time processing notes
    └── webcam.py                     # Live video capture

🚀 Getting Started

Prerequisites

  • Python 3.7+ - Modern Python version with type hints support
  • Webcam - For real-time video processing modules
  • Basic Python knowledge - Variables, functions, and basic syntax

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/computer-vision-learning.git
cd computer-vision-learning
  1. Create virtual environment:
python -m venv pythonenvfile1
source pythonenvfile1/bin/activate  # Linux/Mac
# or
pythonenvfile1\Scripts\activate     # Windows
  1. Install dependencies:
pip install opencv-python numpy matplotlib

Quick Test

import cv2
import numpy as np

# Test installation
print(f"OpenCV Version: {cv2.__version__}")
print("✅ Installation successful!")

📚 Module Breakdown

🎨 Image Enhancements: Introductory Set

Difficulty: Beginner
Duration: Day 1-2
Focus: Understanding digital images as arrays and basic color manipulation

  • ChessBoard.py - Learn array patterns and structured data
  • TheRGBColorspace.py - Explore RGB color fundamentals
  • CreatingCustomColors.py - Build custom color palettes
  • GradientTransitions.py - Smooth color blending techniques

🔧 Image Manipulation

Difficulty: Beginner-Intermediate
Duration: Day 2-3
Focus: Core image processing operations

  • ImageBlur.py - Gaussian, motion, and artistic blur effects
  • Imagescaling.py - Resize images while maintaining quality
  • edgedetection.py - Canny edge detection and contour analysis
  • drawingshapes.py - Overlay geometric shapes and annotations

⏱️ Real-Time Processing

Difficulty: Intermediate
Duration: Day 3-4
Focus: Live video manipulation and webcam integration

  • webcam.py - Camera capture and basic controls
  • cropandflip.py - Dynamic image transformations
  • HSV.py - Advanced color space manipulation for better filtering

🎭 DIY Instagram Filters

Difficulty: Intermediate
Duration: Day 4-5
Focus: Creative effects and artistic image processing

  • controllingbrightness.py - Master exposure and contrast
  • increasingwarmth.py - Color temperature adjustments
  • ImageMerging.py - Blend multiple images for artistic effects

👤 Face Detection & Manipulation

Difficulty: Intermediate-Advanced
Duration: Day 5-6
Focus: Machine learning integration and human feature detection

  • FaceDetectionOnLive.py - Real-time face detection using Haar Cascades
  • FaceCropANDFaceBlur.py - Privacy protection and selective processing
  • ShapeExtraction.py - Geometric analysis of facial features

📸 Selfie Capture System

Difficulty: Beginner-Intermediate
Duration: Day 6
Focus: Automated photo capture with timing controls

  • capturingsingleselfies.py - Single photo with countdown
  • capturingmultipleselfies.py - Batch capture for profile photos

🎨 Professional Branding

Difficulty: Advanced
Duration: Day 7
Focus: Commercial-grade logo integration and transparency handling

  • AddingLogos.py - Basic logo overlay techniques
  • AdjustingTransparency.py - Alpha channel manipulation
  • AspectRatioAnalysis.py - Maintain proper proportions
  • FinalFitForLogo.py - Production-ready logo integration

🛤️ Recommended Learning Path

Week Schedule:

Days 1-2: Foundation Building

  • Start with Image Enhancements: Introductory set
  • Understand pixels, arrays, and color spaces
  • Practice with static image manipulation

Days 3-4: Dynamic Processing

  • Move to ImageManipulation and Real-Time Processing
  • Learn webcam integration and live filtering
  • Experiment with different blur and edge effects

Days 5-6: Advanced Features

  • Explore Face Detection and DIY Filters
  • Implement machine learning-based detection
  • Create Instagram-style filter effects

Day 7: Professional Application

  • Master Branding and Selfie Capture
  • Build production-ready features
  • Combine multiple concepts into polished applications

💡 Usage Examples

Basic Image Processing

import cv2
import numpy as np

# Load and display an image
img = cv2.imread('sample.jpg')
cv2.imshow('Original', img)

# Apply Gaussian blur
blurred = cv2.GaussianBlur(img, (15, 15), 0)
cv2.imshow('Blurred', blurred)

cv2.waitKey(0)
cv2.destroyAllWindows()

Real-Time Face Detection

import cv2

# Initialize face detector
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')
cap = cv2.VideoCapture(0)

while True:
    ret, frame = cap.read()
    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    
    faces = face_cascade.detectMultiScale(gray, 1.1, 4)
    
    for (x, y, w, h) in faces:
        cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 2)
    
    cv2.imshow('Face Detection', frame)
    
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

🤝 Contributing

We welcome contributions from the community! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contribution Guidelines:

  • Add comprehensive comments to your code
  • Include example usage in docstrings
  • Update documentation for new features
  • Test your code with different image types and sizes

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 Computer Vision Learning Journey

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

🙏 Acknowledgments

  • OpenCV Community - For the incredible computer vision library
  • Python Software Foundation - For the amazing programming language
  • Contributors - Everyone who helps improve this educational resource

Happy Learning! 🎉
Remember: The best way to learn computer vision is by experimenting. Don't be afraid to modify the code and see what happens!


GitHub stars GitHub forks GitHub watchers

About

🤖 A small Weekend tutorial : A comprehensive collection of computer vision projects and implementations focusing on foundational concepts, practical image processing techniques, and real-world applications using OpenCV, NumPy, and Python. To learn something new this weekend

Topics

Resources

License

Stars

Watchers

Forks

Languages