In this project I am going to learn how to create a virtual drag and drop system using opencv and python
- Clone this repository on your computer
https://github.com/paveldat/drag_and_drop.git
- Install all the requirements
run libraries.bat
orpip install -r requirements.txt
- Run the program
python main.py
You might face issue with webcam not showing and you get errors.
To solve it just change the value in this line (for example to 1
).
cap = cv2.VideoCapture(0)
Increment this number until you see your webcam.
In order to simulate a click, you need to connect the index and middle fingers on your hand. An example of a valid click is shown in the image below.