In this section, we are going to develop an optical flow over a set of points. To choose the best points to track, we are going to use an OpenCV function to choose them.
In previous chapters, we were going to construct the HTML code that we needed to grab the frames and show the result. Then we require the video element and a canvas to show the processed result, and a start button to process input frames. The HTML code looks like this:
<div class="row">
<div class="col">
<div id="status" class="alert alert-primary" role="alert"><img src="img/ajax-loader.gif" /> Loading OpenCV...</div>
</div>
</div>
<a href="#" class="btn btn-primary" style="display: none;" id="cv_start">Start</a>
<div class...