/Virtual-Whiteboard

A project to draw on live webcam video and share it to other softwares via OBS Studio. It uses mediapipe library to detect and track hand landmarks.

Primary LanguagePythonMIT LicenseMIT

Virtual-Whiteboard

Description

A python project to draw on live video captured from the webcam(or any other camera) and broadcast it to a virtual camera via OBS Studio.

Demo

You can find the project's demo at my youtube page here.

Installation Instructions:

For the program to run properly followin installation instructions should be followed:

  1. Clone the repository to the desired path.
  2. Download the python packages of specified version mentioned in the requirements.txt file. Or, run the command: pip install -r /path/to/requirements.txt

Note: The following steps are required only if you want to broadcast the output to other softwares. To just use this program, without broadcasting the output, above two steps are all what you need to get started.

  1. Install OBS Studio for your operating system then follow the following instructions to set up virtual camera.

Setting Up Virtual Camera in OBS (To use the output in other softwares):

  1. Open OBS Studio. Following screen will appear:

Open View

  1. Under the Sources tab, click on + button and select Video Capture Device.

image

  1. Click on Create New radio button and enter the name of the virtual camera, and click OK Button.

image

  1. Select OBS Virtual Camera from the Device dropdown, leaving other setting unchanged, click OK Button.

image

  1. Following screen will appear.

image Virtual camera has been set up successfully.

How to Use:

To start the application, run the GUI.py file. The program works on varius hand gestures. These are explained below:

  1. Index finger Click: To toggle the active state of the currently selected tool.

Single Finger Click

  1. Index Finger drag : To draw on the canvas

  2. Index And Middle finger drag : To Move the mouse inside the GUI.

Mouse Tracking GIF

  1. Index and Middle finger click : To simulate mouse click, to click the GUI buttons.

Mouse Click

  1. Index finger and thumb pan : To change the draawing size of the tool.

Size Change

  1. Fist drag : To scroll the canvas.

Canvas Move