Giter Club home page Giter Club logo

air-canvas's Introduction

Air Canvas

VP

Ever wanted to draw your imagination by just waving your finger in the air. The project titled “Air Canvas” is a desktop application allowing the user to draw doodles, numbers, shapes, and various objects out of thin air. Air Canvas project incorporates real-time video tracking of the pointer(bead),which the user moves throughout the canvas by pointing a specific and pre-defined object in front of their webcam.

Basic Working

Air Canvas is a fairly simple project to use but has a fairly intriguing and complex mechanism of working. First and foremost, the project includes the reading of frames sent by webcam(internal or external). As computers capture frames, the project plays a series of images together which appears as video capturing to the user. These captured frames are converted into HSV frames in real-time which assists in the process of color recognition of a selected object for the machine. As the webcams come in various resolutions the projects perform morphological operations on the frames continuously by dilating and eroding the pixels in the captured frames and creating a smooth picture. Color recognition is followed by determining the contours of the object, which are then sorted to find the center of the largest contour in the frame. The center of the largest contour defines the coordinates, therefore creating a bead around the largest contour. After the coordinates have been determined, they are constantly pushed into dequeues calling the part of the code to draw lines on the coordinates that the bead passes through. Air Canvas project makes use of dequeues to hold the values of coordinates for various color options offered by the project. Due to which the user can make use of the various colors in the same paint window to highlight a portion of the drawing/doodle.

Requirements and Specifications

SOFTWARE REQUIREMENTS:

  • Python (3.6 and higher)
  • Open Computer Vision
  • NumPy
  • Git
  • Microsoft Windows
  • The software can be run on any system that supports python.

HARDWARE REQUIREMENTS:

-It can work on any system with support of internal or external web camera as Python is platform independent.

Algorithm

  • Start reading the frames and convert the captured frames to HSV color space. (Easy for color detection)
  • Prepare the canvas frame and put the respective ink buttons on it.
  • Adjust the trackbar values for finding the mask of colored objects.
  • Preprocess the mask with morphological operations. (Erosion and dilation)
  • Detect the contours, find the center coordinates of largest contour and keep storing them in the dequeue for successive frames.
  • Finally draw the points stored in dequeues on the frames and canvas.

Demo

Virtual_Paint

air-canvas's People

Contributors

isharrma 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.