0% found this document useful (0 votes)
4 views12 pages

Air Drawing App Using Computer Vision Presentation

The Air Drawing App utilizes computer vision to enable users to draw using simple hand gestures and a colored object, making digital creation accessible for individuals with motor issues and those lacking traditional input devices. Built with Python, OpenCV, and NumPy, the app captures video from a webcam, detects colors, and allows real-time drawing on a virtual canvas. Its applications include serving as a drawing tool for children, providing touch-free interfaces for public kiosks, and assisting individuals with motor impairments.

Uploaded by

tarlanavikas12
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
0% found this document useful (0 votes)
4 views12 pages

Air Drawing App Using Computer Vision Presentation

The Air Drawing App utilizes computer vision to enable users to draw using simple hand gestures and a colored object, making digital creation accessible for individuals with motor issues and those lacking traditional input devices. Built with Python, OpenCV, and NumPy, the app captures video from a webcam, detects colors, and allows real-time drawing on a virtual canvas. Its applications include serving as a drawing tool for children, providing touch-free interfaces for public kiosks, and assisting individuals with motor impairments.

Uploaded by

tarlanavikas12
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/ 12

Title: Air Drawing App

using Computer Vision


Subtitle: Statement Code: CV-06
Compiler : Jupiter note book.
Tools Used: Python, OpenCV, NumPy
The Problem: Limited Digital Creation
Not Accessible for No Access to Input Need for Touch-
All Devices Free Interfaces
People with motor issues struggle Many users lack tools like stylus Touch-based tools can spread
with traditional input methods. or touchscreens for digital germs in shared spaces.
Solution: Enables drawing drawing. Solution: Offers safe,
through simple hand gestures. Solution: Draw using just a contactless drawing interaction.
webcam and a colored object.
Tools & Technologies
• Python
• OpenCV
• NumPy
• Webcam / Laptop Camera
• Jupiter Notebook
Work Behind Air Drawing
app
Detect colored object (e.g., Blue pen cap)

Track its movement using contours

Draw a line between previous and current positions

Show live drawing on screen


Work Behind Air Drawing app
1.Introduction & Objective
Virtual Paint Using Color Detection
• The program uses a webcam and OpenCV to track a colored object in real-time.
• The object acts like a brush to draw on a virtual canvas.
• It supports multiple colors: Blue, Green, Red, and Yellow.
• You can also switch colors or clear the canvas using on-screen buttons.

2.Setting Up the Interface


Trackbars & Canvas Setup
• cv2.createTrackbar() creates sliders to set HSV (Hue, Saturation, Value) color range for
object detection.
• paintWindow: A white canvas where drawing happens.
• Colored rectangles at the top of the screen act as buttons (Clear, Blue, Green, Red,
Yellow).
Work Behind Air Drawing app
3. Capturing and Processing Video
Frame Processing & Color Detection
• cap = cv2.VideoCapture(0) opens the webcam.
• Each frame is flipped (cv2.flip()) and converted to HSV (cv2.cvtColor()).
• The HSV range from trackbars is used to generate a mask of the detected color
(cv2.inRange()).

4. Morphological
Detecting the operations clean the mask: erode, open, and dilate.
Marker and Handling Buttons
Contour Detection & User Interaction
• Contours in the mask are found using cv2.findContours().
• The largest contour is considered the marker.
• If marker is near the top (y ≤ 65), it checks for button press:
• Clear: resets all points.
• Color buttons: changes brush color.
• Else, marker coordinates are stored for drawing.
Work Behind Air Drawing app
5. Drawing Mechanism & Output
Drawing on Frame and Canvas
• Points are stored in deques based on color (Blue, Green, Red, Yellow).
• cv2.line() draws connecting lines between points.
• Drawing happens on both:
• The live video feed (frame).
• The persistent white canvas (paintWindow).
• cv2.imshow() displays:
• Live tracking,
• The canvas,
• The binary mask.
• Pressing ‘q’ quits the program.
Core Code Snippet –
Color Detection
hsv = cv2.cvtColor(frame,
cv2.COLOR_BGR2HSV)

mask = cv2.inRange(hsv, lower_red,


upper_red)

contours, _ = cv2.findContours(mask,
cv2.RETR_EXTERNAL,
cv2.CHAIN_APPROX_SIMPLE)
Running the Air Drawing App – Main Loop & Exit Handling
Starting video capture

cap = cv2.VideoCapture(0)

Main loop

while True: success, frame = cap.read() if not success: break

# Flip the frame (mirror effect)


frame = cv2.flip(frame, 1)

# Your processing logic goes here


# (e.g., color detection, drawing, gesture recognition)

cv2.imshow("Air Drawing App", frame)

# Exit condition: Press 'q' to quit


if cv2.waitKey(1) & 0xFF == ord('q'):
break

Releasing resources

cap.release() cv2.destroyAllWindows()
Core Code Snippet – Drawing Logic
if contours:

x, y, w, h = cv2.boundingRect(contours[0])

if prev_x and prev_y:

cv2.line(canvas, (prev_x, prev_y), (x, y), (0, 0, 255), 5) prev_x, prev_y = x, y


Features
• Real-time drawing: The app captures movements instantly, allowing users to draw live
on-screen with minimal delay or lag.
• Color-based tracking: It identifies and follows specific colored object, using HSV values
to isolate and track the "pen."
• No external hardware: Only a webcam is required; the system works without needing
styluses, sensors, or additional devices.
• Smooth and responsive: Efficient contour detection and frame processing ensure fluid
drawing actions and immediate system response to movement.

Applications
• Kids’ Drawing Tool: Provides an engaging and mess-free way for children to express
creativity by drawing virtually with a color-tracked pen.
• Touch-Free UI for Public Kiosks: Enables hands-free interactions at public kiosks,
reducing physical contact and enhancing hygiene in high-traffic areas.
• Motor-Impaired Assistance: Offers an accessible alternative for individuals with motor
impairments, allowing them to create digital drawings with minimal physical effort.
• Fun Interactive Learning: Enhances learning by integrating engaging visual activities,
making educational experiences more enjoyable through digital interaction.
Thank You

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy