This project is a Computer Vision-based virtual drag & drop application that allows users to move objects on the screen simply by hand movements in front of the camera, without the need for a mouse or other physical input devices. By utilizing OpenCV for image processing, CVZone HandTrackingModule for hand detection, and Mediapipe for tracking key points (landmarks) on the hand, this system is able to recognize finger positions in real-time.
- Real-Time Hand Tracking using your laptop/PC camera.
- Pinch-to-Grab Gesture : Move objects by pinching your thumb and index finger.
- Multi-Object Drag & Drop : Multiple objects can be moved independently.
- Smooth Motion : Smoother object movement with a smoothing system.
- Transparent Labels & Colors : Each object has a label and a semi-transparent visual effect.
- Easy Interaction : Simply use hand gestures in front of the camera.
- Python 3
- OpenCV – image & video processing
- CVZone – hand tracking support module
- Mediapipe – hand point detection
- Math Library – finger distance calculation
git clone https://github.com/404-mind72/Virtual-Drag-Drop-with-Hand-Tracking-OpenCV-CVZone.gitpip install opencv-python cvzone mediapipe- Make sure your laptop/PC camera is active.
- Run the program:
python App.py- Follow the on-screen instructions:
- Point your hand at the camera.
- Pinch your thumb and index finger to pick up an object.
- Swipe your hand to move the object.
- Release the pinch to place the object.
- Press q to exit.
- Result 1
- Multi-Hand Support: Supports simultaneous interaction with two hands.
- Custom Shapes: Add objects with customizable shapes and sizes.
- Additional Gestures: Rotate, resize, or delete objects with different gestures.
- AR Integration: Combine virtual objects with the real environment for a more immersive experience.
- Education Mode: Used for interactive learning without conventional input devices.
I would appreciate contributions to improve the model, add or enhance features, and optimize the deployment process. For any queries, reach out to me at joni150703@gmail.com
This project is licensed under the MIT License. Free to use, modify, and distribute.