myoluk/virtual-paint
✏️ Virtual painting via webcam. OpenCV based Python project.
Virtual Paint via webcam
⭐ 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
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
🚀 Paint Tools
✅ 3 thickness options (small, medium, large), 5 color options (purple, blue, green, red, yellow)
🚀 Paint
✅ Draw whatever you want!
🚀 Eraser & Clear
✅ Eraser for area cleaning, Clear for whole page cleaning
🚀 Discrete Writing
✅ There is a little trick, flip the other side of the tracked object to write discretely
✅ Press 'Q' to exit
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!





