Book Image

Computer Vision for the Web

By : Foat Akhmadeev
Book Image

Computer Vision for the Web

By: Foat Akhmadeev

Overview of this book

This book will give you an insight into controlling your applications with gestures and head motion and readying them for the web. Packed with real-world tasks, it begins with a walkthrough of the basic concepts of Computer Vision that the JavaScript world offers us, and you’ll implement various powerful algorithms in your own online application. Then, we move on to a comprehensive analysis of JavaScript functions and their applications. Furthermore, the book will show you how to implement filters and image segmentation, and use tracking.js and jsfeat libraries to convert your browser into Photoshop. Subjects such as object and custom detection, feature extraction, and object matching are covered to help you find an object in a photo. You will see how a complex object such as a face can be recognized by a browser as you move toward the end of the book. Finally, you will focus on algorithms to create a human interface. By the end of this book, you will be familiarized with the application of complex Computer Vision algorithms to develop your own applications, without spending much time learning sophisticated theory.
Table of Contents (13 chapters)

Head tracking with Camshift


Head tracking is another huge topic in the field of Computer Vision. It is very useful when you want to create a human computer interface. For example, it is usually used in web browser games to move objects or control a 3D interface. There are differences between object detection and tracking. First of all, tracking works only on videos, since you track an object (not reestimate) a new instance in each frame. Consequently, we need to assume that the object we track is the same as it was on the previous frame.

Tracking can be done for multiple objects but here we will focus on a single object, in our case, it is a head or more precisely—face. There is a wonderful library that can help us to track it. It is called headtrackr (https://github.com/auduno/headtrackr). In addition to face tracking, it provides a functionality to create an interface that helps to control your browser applications using head motion. We will not focus on the motion estimation part here...