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)

Optical flow for motion estimation


We saw how to track different objects in a scene and how to make a human interface using them, but we did not see a more generalized approach. When an object changes its position, it moves through a scene and it is interesting to estimate the overall movement of the scene. Here, we will introduce the concept of optical flow, and will see how to use it for object tracking. In the first part, we will focus on the theory and then present two wonderful examples of the optical flow usage. Finally, we will create a simple gesture application.

The Lucas-Kanade optical flow

There are many definitions of optical flow, the main one is: it is the change in structured intensities of an image due to relative motion between the eyeball (camera) and the scene (http://www.scholarpedia.org/article/Optic_flow). According to another definition, it is the distribution of the apparent velocities of objects in an image (http://www.mathworks.com/discovery/optical-flow.html). To...