Skip to content

Latest commit

 

History

History
90 lines (61 loc) · 2.75 KB

File metadata and controls

90 lines (61 loc) · 2.75 KB

Virtual Paint

A Python application that uses hands detection and movement to do painting on live camera stream.

About The Project

Virtual paint can be used to paint in real time with hands detection, It can be useful in drawing basic paintings or in online meetings when trying to explain something.

Demo

demo

Getting Started

This project is built on Python 3.8.5 mainly using OpenCV and mediapipe.

Prerequisites

I would recommend to create a new virtual environment as it's always a good practice to use seperate environements for separate projects and not mix up diffrent libraries with diffrent versions. I have used virtualenv for that purpose.

pip3 install virtualenv
python3 -m virtualenv <ENVIRONMENT_NAME>
source <ENVIRONMENT_NAME>/bin/activate

Installation

  1. Clone the repo
    git clone https://github.com/itsrandeep/virtual_paint.git
  2. Install Required Libraries
    pip install -r requirements.txt
  3. Start the Python app
    python main.py
    (use -h for info about additional parameters)

Usage

There are two modes in this application

  1. Selection Mode - When two fingers(Index and middle) are up, It will show a rectangle to show that application is in selction mode and nothing will be drawn.
  2. Drawing Mode - When only Index finger is up, then application is in drawing mode and moving your finger will draw a line on Screen.

press q to exit.

usage: main.py [-h] [-hl] [-v FILENAME] [-i FILENAME]

optional arguments:
  -h, --help            show this help message and exit
  -hl, --hand-landmarks
                        Enable showing hand landmarks
  -v FILENAME, --output-video FILENAME
                        Name of the exported video file
  -i FILENAME, --output-image FILENAME
                        Name of the exported Image file

Roadmap

It is currently only a basic app. I'm planning to add many features to make it more usable.

  • Enabling/Disabling showing of hand landmarks points. (Done.)
  • Instead of drawing with a single color, give multiple options of colors on frame. (Done)
  • Colors can be switched in selection mode. (Done)
  • Option of saving the entire video of drawing session. (Done)
  • Option of saving only Drawing in diffrent image formats.(Done, White background will be better)
  • Currently it supports only 1 hand, Add 2 hands support.
  • Integration in meeting apps like zoom.

Acknowledgements