Skip to content

✏️ Virtual painting via webcam. OpenCV based Python project.

License

Notifications You must be signed in to change notification settings

myoluk/virtual-paint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Paint via webcam

stars forks licence last-commit

⭐ Based on OpenCV

💾 set_color_range.py allows to set the color range required to detect the object to be tracked

✏️ paint.py tracks the object its color was set and enables the painting

Virtual Painting

Contents

Features

  • 3 different marker thicknesses (small, medium, large)

  • 5 different colors (🟣purple, 🔵blue, 🟢green, 🔴red, 🟡yellow)

  • paints can be erased and the entire page can be cleaned

  • possible to write discrete (with a little trick)

🚀 Set Color Range

Color range can be adjusted with trackbars

After determining the color range, save by pressing the 'S' key, it will save a numpy array as hsvVal.npy

Press 'Q' to exit

Set Color Range

🚀 Paint Tools

3 thickness options (small, medium, large), 5 color options (purple, blue, green, red, yellow)

Paint Tools

🚀 Paint

Draw whatever you want!

Paint

🚀 Eraser & Clear

Eraser for area cleaning, Clear for whole page cleaning

Eraser & Clear

🚀 Discrete Writing

There is a little trick, flip the other side of the tracked object to write discretely

Press 'Q' to exit

Marker Enable/Disable

How to use?

1️⃣ Run the set_color_range.py file to set the color range (just make sure the object is detected)

2️⃣ Save the adjusted values by pressing the 'S' key, values will be saved as hsvVal.npy file

3️⃣ Run the paint.py file, it will automatically open the hsvVal.npy file

💯 Enjoy painting!