Virtual Screen enables users to write on their screen using hand gestures tracked by a webcam. With real-time hand detection and motion tracking, users can draw, annotate, or interact with the screen without physical input devices, offering a seamless and intuitive virtual writing experience.
- Real-Time Hand Tracking: Detects the user's hand and tracks the index finger.
- Smooth Drawing: Implements position smoothing for stable and seamless drawing.
- Boundary Constraint: Ensures drawing is allowed only within a predefined rectangle.
- Customizable Canvas: Clear the canvas using a key press (
c
). - Live Feedback: Displays the tracked finger position and boundary area.
- Color Palette: Choose different colors for drawing.
- Brush Size Palette: Adjust brush size for precise or bold strokes.
- Palm Erase: Use your palm gesture to erase parts of the canvas.
- Python 3.7+
- OpenCV: For video capture and frame processing.
- MediaPipe: For hand and finger tracking.
- NumPy: For efficient array operations.
- Clone the Repository
git clone https://github.com/rishraks/Virtual_Screen.git
cd virtual-drawing-canvas
- Install Dependencies Use pip to install the required libraries
pip install opencv-python mediapipe numpy
- Run the Application Execute the Python script
python Virtual_Screen.py
- Start Drawing:
- Position your index finger within the boundary rectangle displayed on the screen.
- Move your finger to draw lines on the virtual canvas.
- Select Color:
Move your hand over the color palette area on the screen and tap with your index finger to select a color.
- Adjust Brush Size:
Interact with the brush size palette to switch between various brush thicknesses.
- Clear Canvas:
- Press the c key to clear the canvas.
- Exit:
- Press the q key to quit the application.
- Save the canvas as an image file.
- Implement multi-finger gesture recognition for advanced controls.
- Add undo/redo functionality for enhanced editing.
This project is licensed under the MIT License. See the LICENSE file for details.
- MediaPipe for robust hand tracking.
- OpenCV for frame processing.
- Community tutorials and resources on computer vision.