You are on page 1of 22

MALOUT INSTITUTE OF MANAGEMENT AND

INFORMATION TECHNOLOGY

FINAL YEAR PROJECT


OPTICAL FLOW VIRTUAL KEYBOARD

Submitted To: Submitted By:


MR. HARKIRAT SINGH BRAR SHALINI KUMARI
(Asst. Prof.) (CSE 7th sem) (15113143)
CONTENTS

 INTRODUCTION

 VIRTUAL KEYBOARD

 MODULES OF VIRTUAL KEYBOARD

 TECHNOLOGY USED

 HARDWARE INVOLVED

 CONCLUSION

 REFRENCES
INTRODUCTION

 The Aim of this technology is to develop an augemented reality (AR) solution for a

handheld device that enables the user to write text.

 In virtual keyboard camera tracks the finger movement of the typist to get the correct

keystroke

 The software and hardware part recognises the typed characters and pass it to the
computers.
VIRTUAL KEYBOARD

 Virtual keyboard is just another example of today's computer trend of smaller and

faster.

 Virtual keybaord uses optical flow, video capturing throgh webcam to let user work on

any surface as it it were a keyboard.

 The keyboard is displayed on the computer screen, and the user move its hand in front

of webcam to get the desired word /letter and touches the key virtually by just gesture

of finger pressing the key in front of web cam.


MODULES OF VIRTUAL KEYBOARD

 Video capture module

 Optical flow

 Background Substraction

 Contour Detection
VIDEO CAPTURE MODULE

 Often, we have to capture live stream with camera. OpenCV provides a very simple

interface to this. Let’s capture a video from the camera (I am using the in-built webcam

of my laptop), convert it into grayscale video and display it.

 To capture a video, you need to create a Video Capture object. Its argument can be

either the device index or through the camera. Device index is just the number to

specify which camera will be selected.

 Normally one camera will be connected (as in my case). So I simply pass 0 (or -1). You

can select the second camera by passing 1 and so on. After that, you can capture frame-

by-frame. But at the end, don’t forget to release the capture.


OPTICAL FLOW MODULE

 Optical flow is the pattern of apparent motion of image objects between two

consecutive frames caused by the movement of object or camera.

 It is 2D vector field where each vector is a displacement vector showing the

movement of points from first frame to second.

 Optical flow works on several assumptions: -

 The pixel intensities of an object do not change between consecutive frames.

 Neighbouring pixels have similar motion.


BACKGROUND SUBSTRACTION

 Background subtraction is a major preprocessing step in many vision-based

applications.

 For example, consider the case of a visitor counter where a static camera takes the

number of visitors entering or leaving the room, or a traffic camera extracting

information about the vehicles etc. In all these cases, first you need to extract the

person or vehicles alone. Technically, you need to extract the moving foreground from

static background.

 For extracting the moving foreground from static background we use several

algorithms.
CONTOUR DETECTION

 Contours can be explained simply as a curve joining all the continuous points

(along the boundary) having same color or intensity.

 The contours are a useful tool for shape analysis and object detection and recognition.

 In OpenCV, finding contours is like finding white object from black background. So

remember, object to be found should be white and background should be black.

 contours is a Python list of all the contours in the image.

 Each individual contour is a Numpy array of (x,y) coordinates of boundary points of

the object.
TECHNOLOGY USED

 PYTHON

 OPENCV

 NUMPY
PYTHON

 Python is a popular programming language. It was created in 1991 by Guido van

Rossum.

 Python can be used on a server to create web applications.

 Python can be used alongside software to create workflows.

 Python can connect to database systems. It can also read and modify files.

 Python can be used for rapid prototyping, or for production-ready software

development.

 Pyhton can be used for system scripting.


WHY PYTHON

 Python has a simple syntax similar to the English language.

 Python has syntax that allows developers to write programs with fewer lines than some

other programming languages.

 Python runs on an interpreter system, meaning that code can be executed as soon as it

is written. This means that prototyping can be very quick.

 Python can be treated in a procedural way, an object-orientated way or a functional

way.
OPENCV

 OpenCV is an open source python library for image processing and computer vision.

 It was originally developed by Intel and now supported by Willow Garage. It is free

for both commercial and non-commercial use.

 OpenCV is written in C++ and its primay interface is in C++, but it still retains a less

comprehensive though extensive older C interface.

 There are bindings in Python, Java and MATLAB/OCTAVE. The API for these

interfaces can be found in the online documentation.


NUMPY

 Numpy is an extension module for Python, mostly written in C.

 Numpy makes sure that the precompiled mathematical and numerical functions and

functionalities of Numpy guarantee great execution speed

 NumPy is a general-purpose array-processing package.

 It provides a high-performance multidimensional array object, and tools for working

with these arrays.

 It is the fundamental package for scientific computing with Python.

 NumPy can also be used as an efficient multi-dimensional container of generic data.

 Arbitrary data-types can be defined using Numpy which allows NumPy to seamlessly

and speedily integrate with a wide variety of databases.


HARDWARE INVOLVED

 RAM – 8GB

 CPU – Intel ® Core (TM) i5 CPU @ 2.00GHZ

 CACHE – L1 Cache(128KB)

 L2 Cache(512KB)

 L3 Cache(3MB)

 HARDDISK – 1TB

 WEBCAM – 2 MP
CONCLUSIONS

 Compared with previous basic keyboard, Virtual Keyboard has rather more advantages

for personalization, convenience.

 Virtual keyboard is of great significance as it minimises the space of keyboard.

 Its application is attainable and practical.

 No extra hardware required, just a screen and some software. Infinitely customizable.

 Gestures such as swipe and hold allow more efficient typing.


REFRENCES
 Kolsch, M. and Turk, M.”Keyboards without Keyboards: A survey of Virtual
Keyboards,” n. pag.University of California, Nov. 05, 2003
(http://www.create.ucsb.edu/sims/PDFs/Koelsch_and_Tu rk_SIMS.pdf).

 Alpern, M., “Projection Keyboards,” Oct. 28, 2003


(http://www.alpern.org/weblog/stories/2003/01/09/pr ojectionKeyboards.html).

 Hirsh, L., “Virtual Keyboard Replicates Real Typing,”


Oct.23,2003
(http://www.wirelessnewsfactor.com/perl/story/14762. html).

 Wrolstad, J., “Laser Device Projects Full-Size Keyboard for Handhelds,”


Oct.28,2003
(http://www.wirelessnewsfactor.com/perl/story/17756. html).

 Khar, A., “Virtual Typing,” Oct. 28, 2003


(http://www.pcquest.com/content/technology/1030304 02.asp).
THANK YOU

You might also like