Git Product home page Git Product logo

air_canvas_ml_model's Introduction

Air_Canvas_ml_model

Ever wished to capture your imagination by just waving your finger in the air? In this post, we have an Air Canvas that can draw anything on it by simply moving our hands and observing the landmark on the hand knuckles. A virtual drawing tool (Computer vision project) that allows you to draw in the air using hand gestures, thanks to the powerful combination of OpenCV and MediaPipe.

๐Ÿ”ง Tools and Libraries Used:

  • Python3 , NumPy , opencv , mediapipe

  • OpenCV: This open-source library is essential for real-time computer vision tasks. It helped me capture and process video frames from the webcam seamlessly.

  • MediaPipe: Developed by Google, MediaPipe is a fantastic framework for building multimodal machine learning pipelines. In this project, I used MediaPipe for hand tracking, enabling accurate and real-time recognition of hand landmarks.

How It Works:

  • Capture Video: Using OpenCV, the script captures live video feed from the webcam.
  • Process Frames: Each frame is processed using MediaPipe to detect and track hand landmarks.
  • Draw Landmarks: The detected hand landmarks are drawn on the video frames, creating a virtual canvas for drawing in the air.

Algorithm

Start reading the frames and convert the captured frames to HSV colour space.(Easy for colour detection)

Prepare the canvas frame and put the respective ink buttons on it.

Adjust the values of the mediapipe utilization to detect one hand only.

Detect the landmarks by passing the RGB frame to the mediapipe hand detector.

Detect the landmarks, find the forefinger coordinates and keep storing them in the array for successive frames.(Arrays for drawing points on canvas)

Finally, draw the points stored in an array on the frames and canvas.

image

air_canvas_ml_model's People

Contributors

kanishkasah20 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.