This Project was completed using OpenCv only, If you hope to find Deep Learning and Machine Learning in this project then you won't find any!!!
This Project was done using 6 steps:
-
Find the color range of the target object and save it
-
Apply the correct morphological operation to reduce noise in the video
-
Detect and track the colored object with contour detection.
-
Find the object's x,y location coordinates to draw on the screen
-
Add a Wiper Functionality to wipe off the Whole screen
-
Add an Eraser Functionality to erase parts of the drawing
Before moving on I strongly recommend you to check Edge detection, Countor Detection, BackgroundSubtractor and look how to find them in OpenCV and all the Parameteres they accept
And do check about RBG, HSV
And yeah please select pen somthing like this:
So that when ever you want to write next alphabet you just have to switch the position of pen and program will no longer detect the pen and you can write next alphabet where-ever you want in the screen. There is no complusion that you have to select the pen similar to above images, main point just select the pen which has two different color for forntface and backface
Please find the code for virtual pen in virtualPen.ipynb
Feel free to set your own range during mask, and to set the upper and lower range for cv2.inRange() you can run this file.
Ok lets get Started!!!