Reader small image

You're reading from  Computer Vision for the Web

Product typeBook
Published inOct 2015
Reading LevelIntermediate
PublisherPackt
ISBN-139781785886171
Edition1st Edition
Languages
Right arrow
Author (1)
Foat Akhmadeev
Foat Akhmadeev
author image
Foat Akhmadeev

Foat Akhmadeev has 5 years of experience in software development and research. He completed his master's degree in the year 2014 from the Kazan Federal University, Russia. He has worked on different projects, including development of high-loaded websites written in Java and real-time object detection for mobile phones. He has an extensive background in the field of Computer Vision. He has also written a scientific paper on 3D reconstruction from a single image. For more information, you can visit his website at http://foat.me.
Read more about Foat Akhmadeev

Right arrow

Introducing the tracking.js library


Let me give you a quick review of the tracking.js library. It is a great library that helps you with object detection, tracking, and image filtering. You can download it from http://trackingjs.com. In this section, we will focus on the the installation of the library and how both JSFeat and tracking.js libraries can be used together.

Installation and image loading

Actually, the installation of a JavaScript library is straightforward. You just need to add a script file to your <head> tag:

<script src="js/tracking.js"></script>

The image loading is done using the context, just like we did in the previous chapter:

var imageData = context.getImageData(0, 0, cols, rows);

In contrast to the JSFeat library, tracking.js works with arrays and it does not create a new object for images (as you remember, it is the matrix_t function for JSFeat). In that case, how do we apply a simple operation? Here is an example of how to convert a colored image to grayscale...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Computer Vision for the Web
Published in: Oct 2015Publisher: PacktISBN-13: 9781785886171

Author (1)

author image
Foat Akhmadeev

Foat Akhmadeev has 5 years of experience in software development and research. He completed his master's degree in the year 2014 from the Kazan Federal University, Russia. He has worked on different projects, including development of high-loaded websites written in Java and real-time object detection for mobile phones. He has an extensive background in the field of Computer Vision. He has also written a scientific paper on 3D reconstruction from a single image. For more information, you can visit his website at http://foat.me.
Read more about Foat Akhmadeev