Skip to content

Vatsal057/AirSwipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirSwipe - Hand Gesture-Based Presentation Control System

Overview

AirSwipe is my final year B.Tech project focused on revolutionizing how presentations are delivered. The system enables users to control PowerPoint slides using simple hand gestures—eliminating the need for physical remotes or keyboards. By integrating computer vision and gesture recognition, AirSwipe offers a touchless, intuitive, and interactive way to manage presentations. It is designed to be easy to use, fast in response, and fully customizable, making it suitable for a wide range of presentation setups and user needs.

Features

Gesture Recognition

  • Advanced Hand Tracking: Utilizes MediaPipe's state-of-the-art hand tracking solution
  • Multi-hand Support: Can detect and track both left and right hands simultaneously
  • Real-time Processing: Processes video feed at high frame rates for smooth gesture recognition
  • Robust Detection: Maintains tracking even with partial hand occlusions

Presentation Controls

  • Start/Stop Slideshow:
    • Start: Four fingers up, thumb closed
    • Stop: Make a fist (all fingers down)
  • Slide Navigation:
    • Next/Previous: All fingers up with flat palm, swipe left/right
    • Configurable swipe sensitivity
  • Zoom Controls:
    • Zoom In: Thumb and index finger pinch (wide)
    • Zoom Out: Thumb and index finger pinch (narrow)
  • Laser Pointer Mode:
    • Single index finger extended
    • Real-time cursor movement
    • Click-and-hold functionality

User Interface

  • Real-time Visual Feedback:
    • On-screen gesture recognition status
    • Active control indicators
    • Hand landmark visualization
  • Customizable Overlay:
    • Adjustable position and size
    • Configurable colors and fonts
    • Optional gesture hints

Configuration Options

  • Camera settings (resolution, frame rate)
  • Gesture detection parameters
  • UI customization
  • Screen resolution settings
  • Gesture cooldown periods
  • Sensitivity thresholds

Technical Architecture

Core Components

1. HandDetector (core/detector.py)

  • MediaPipe Integration:
    • Hand landmark detection
    • Handedness classification
    • Confidence scoring
  • Performance Optimizations:
    • Frame preprocessing
    • Efficient landmark extraction
    • Memory management
  • Configuration Management:
    • Dynamic parameter adjustment
    • Error handling
    • Resource cleanup

2. GestureController (core/gestures.py)

  • Gesture Recognition:
    • Finger state detection
    • Hand orientation analysis
    • Movement tracking
  • Action Mapping:
    • Gesture-to-action translation
    • Priority handling
    • Conflict resolution
  • System Integration:
    • PyAutoGUI control
    • Mouse emulation
    • Keyboard simulation

3. AirSwipeController (core/controller.py)

  • Main Control Loop:
    • Camera feed management
    • Frame processing pipeline
    • Component coordination
  • Error Handling:
    • Camera initialization
    • Resource management
    • Exception recovery
  • State Management:
    • Mode switching
    • Gesture state tracking
    • System status monitoring

UI Components

Overlay (ui/overlay.py)

  • Visual Feedback:

    • Gesture recognition status
    • Active control indicators
  • Performance:

    • Efficient rendering
    • Minimal impact on main processing
    • Smooth updates

Overlay (ui/gui.py)

  • Dark mode User Interface:
    • Gesture recognition status along with it's action
    • Configurable sensitivity right from inside the ui
    • Option to change the camera resolution
    • Start/Stop button for the camera.

System Requirements

Hardware

  • Will work on any laptop/pc with a camera/webcam

Software

  • Python 3.7 to 3.12
  • Windows 10/11
  • PowerPoint 2016 or newer
  • Webcam drivers

Dependencies

  • OpenCV 4.5+
  • MediaPipe 0.8+
  • PyAutoGUI 0.9+
  • Mouse 0.7+
  • NumPy 1.19+

Installation

Prerequisites

  1. Install Python 3.7 or higher(3.12)
  2. Install pip (Python package manager)
  3. Install Git (for version control)

Setup Steps

  1. Clone the repository:
git clone https://github.com/Vatsal057/AirSwipe.git
cd AirSwipe
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage Guide

Basic Operation

  1. Start the application:
python main.py
  1. Press the Start button:
  • Ensure good lighting
  • Change the camera resolution if needed
  • Maintain appropriate distance
  • Change the sensitivity if needed
  1. Use gestures:
  • Start presentation: Four fingers up, thumb closed
  • Stop presentation: Make a fist (all fingers down)
  • Navigate slides: All fingers up with flat palm, swipe left/right
  • Zoom: Thumb and index finger pinch
  • Laser pointer: Single index finger

Advanced Usage

  • Custom Settings: Modify gesture thresholds in config.json
  • Performance Tuning: Adjust camera settings for optimal performance
  • UI Customization: Change overlay appearance in config.json

Troubleshooting

  1. Camera Issues:

    • Check device permissions
    • Verify camera connection
    • Update drivers if needed
  2. Gesture Recognition:

    • Ensure proper lighting
    • Adjust camera position
    • Modify detection thresholds
  3. Performance Problems:

    • Reduce camera resolution
    • Close background applications
    • Update system drivers

Project Structure

AirSwipe_Project/
├── core/
│   ├── controller.py      # Main control logic
│   ├── detector.py        # Hand detection
│   └── gestures.py        # Gesture processing
├── ui/
│   └── overlay.py         # Visual feedback
│   └── gui.py             # Interactive User Interface
├── main.py                # Entry point
├── config.json            # Configuration
├── requirements.txt       # Dependencies
└── README.md             # Documentation

Technical Implementation Details

Hand Detection

  • Uses MediaPipe's hand tracking solution
  • Processes frames at 30 FPS
  • Maintains tracking with 70% confidence threshold
  • Supports multi-hand tracking

Gesture Processing

  • Real-time gesture classification
  • Smooth gesture-to-action translation
  • Configurable sensitivity settings
  • Gesture cooldown implementation

System Integration

  • Seamless PowerPoint control
  • Low-latency mouse emulation
  • Efficient resource utilization
  • Cross-platform compatibility

Performance Considerations

  • Optimized for real-time processing
  • Minimal system resource usage
  • Configurable performance parameters
  • Error handling and recovery

License

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

Contact

For questions or support, please contact:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages