100% found this document useful (1 vote)
1K views19 pages

Air Canvas: Using Open-Cv and Mediapipe

The air canvas project uses computer vision with OpenCV and Mediapipe to allow users to interact with and draw on a digital canvas using hand gestures detected by a webcam. It tracks hand movements and recognizes gestures to map actions like selecting colors, drawing, and erasing. This provides an innovative and intuitive way for creative expression compared to traditional inputs. The implementation involves initializing libraries, loading images, tracking hands in real-time to detect gestures, and mapping those gestures to drawing actions on the canvas display. The project is an example of how computer vision can enhance creativity and make art more accessible.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views19 pages

Air Canvas: Using Open-Cv and Mediapipe

The air canvas project uses computer vision with OpenCV and Mediapipe to allow users to interact with and draw on a digital canvas using hand gestures detected by a webcam. It tracks hand movements and recognizes gestures to map actions like selecting colors, drawing, and erasing. This provides an innovative and intuitive way for creative expression compared to traditional inputs. The implementation involves initializing libraries, loading images, tracking hands in real-time to detect gestures, and mapping those gestures to drawing actions on the canvas display. The project is an example of how computer vision can enhance creativity and make art more accessible.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

AIR CANVAS

USING OPEN-CV AND MEDIAPIPE

Presented by, Guided by,


Vraj Diyora Prof. Deepali Ma’am

Abhi Kakadiya
Rudra Dobariya
Prashant Amipara
Welcome!!


them to life and creating a new reality with them. The Air Canvas
project, using OpenCV and Mediapipe, showcases the power of com-

Innovation is not just about creating new ideas, it's about bringing

puter vision and technology to bring creativity to life in a new and ex-
citing way.

Innovative Hand
Drawing Solution
CONTENT
01 Introduction
• Brief overview of air canvas project
• Purpose of the project
.

02 Background
• Explanation of open-cv and Mediapipe
• Significance of using open-cv and Mediapipe

03 Implementation
• steps involved in implementing
• Image representing Implementation

04 Conclusion
Introduction
overview
About Air canvas
o Air canvas is a computer vision based project that allows a user to interact with a com-
puter display using hand gestures. It makes use of the OpenCV library for computer vision
and the Mediapipe framework for hand tracking and gesture recognition. The project aims
to provide a unique and intuitive way for users to control their computer.

o The key features and functionalities of the air canvas project include hand tracking, ges-
ture recognition, and real-time image processing. The user's hand movements are cap-
tured by a camera and processed by the software to identify specific gestures. These ges-
tures are then mapped to various actions, such as clicking, scrolling, or drawing on the
screen. This provides a natural and intuitive way for users to interact with their computer.

o Overall, the air canvas project provides a unique and innovative way for users to interact
with their computer. It has the potential to become a popular alternative to traditional
mouse and keyboard interfaces, and has applications in fields such as gaming, education,
and entertainment.
Purpose
Of Air canvas

o The purpose of the air canvas project is to develop a new and innovative method of
digital drawing and painting. The aim is to use hand gestures to control a cursor on a
screen, allowing the user to create digital art in a more intuitive and natural way. This
project combines the use of computer vision and image processing technologies like
OpenCV and Mediapipe to track hand movements and translate them into digital
brush strokes on a canvas. The end goal is to provide a user-friendly and accessible
tool for artists and creatives to express themselves digitally.

o Another Purpose of this project is to make computer interaction more natural and intu-
itive for the user, thereby improving the overall user experience.
Background
Explanation of OpenCV and Mediapipe

o OpenCV (Open Source Computer Vision Library) is an open-source computer vision


and machine learning software library that provides various functions and algorithms
for computer vision and image processing tasks. It supports various programming
languages like Python, Java, and C++.

o Mediapipe is a cross-platform framework for building pipelines for processing multi-


media content, including images and videos. It provides a set of pre-built and opti-
mized components for tasks like object detection, face detection, hand detection, and
more. Mediapipe works with a variety of deep learning frameworks, including Tensor-
Flow and TensorFlow Lite.
Different Landmarks on Hand
Palm Displaying Landmarks
Significance of using OpenCV and Mediapipe
1. Robust Image Processing: OpenCV provides a variety of image processing functions
that can be used to process hand detection, color filtering, and edge detection in the
air canvas project.

2. Real-time Processing: OpenCV's real-time processing capabilities allow for fast and
accurate hand detection and tracking, which is crucial in a real-time air canvas appli-
cation.

3. Customizable: The Mediapipe framework is highly customizable and can be used to


build complex computer vision pipelines, making it an ideal choice for the air canvas
project.

4. Scalable: Mediapipe provides an efficient and scalable solution for computer vision
processing, allowing the air canvas project to be extended and built upon in the fu-
ture.
Implementation
Steps Involved in Implementation
Step-1 : Import necessary libraries: Import OpenCV (cv2), NumPy (numpy), Pygame and
trackingModule as tm.
Note : Hand Tracking Module (trackingModule as tm) Detects Number of hands ,
Find Position of Each Landmark on Palm and return it.

Step-2 : Load Images: Load static images for air canvas. The images are stored in the
"static/Images" folder.

Step-3 : Initialize Video Capture: Initialize the video capture using OpenCV with the came
ra set to a resolution of 640x480.

Step-4 : Initialize Canvas: Create a black canvas with dimensions of 640x480. The color
of the canvas can be changed later.
Steps Involved in Implementation (Cont.)
Step-5 : Initialize Sound: Initialize Pygame mixer to play sound when the user starts
drawing

Step-6 : Initialize Hand Tracker: Initialize the hand tracker object from trackingModule.

Step-7 : Start While Loop: The while loop captures video frames and detects the user’s
hand.

Step-8 : Read Video Frame: Read a video frame from the camera and resize it to 640x480.

Step-9 : Detect Hand Landmarks: Pass the frame to the hand tracker object to detect hand
landmarks.

Step-10 : Count Fingers: Count the number of fingers the user has fisted or splayed.
Steps Involved in Implementation (Cont.)
Step-11 : Selection Mode: When two fingers are Splayed, it enters selection mode. In this mo
de, the user can select different colors for drawing.

Step-12 : Drawing Mode: When one finger is Splayed and the others are Fisted, it enters
drawing mode. In this mode, the user can draw on the canvas using the select
ed color.

Step-13 : Erase Mode: When Two fingers are fisted and Eraser is selected ,it enters erase mo
de. In this mode ,the user can erase their drawings.

Step-14 : Display Canvas: Display the canvas and the static images for selecting
different colors.

Step-15 : End Loop: The while loop continues until the user stops it.
Image representing implementation
Conclusion
Conclusion

In conclusion, the air canvas project is a unique and innovative application of computer
vision and machine learning technologies using OpenCV and MediaPipe. The combination
of these technologies enables the project to bring an interactive and engaging digital canvas
experience to users, where they can create art with just hand gestures in front of a webcam.
The hand gesture recognition system is reliable and accurate, allowing users to control the
virtual paintbrush with ease. Overall, the air canvas project is a great example of how tech-
nology can be used to enhance creative expression and make art more accessible to every-
one.
Thank you

You might also like