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